================
@@ -67,6 +67,15 @@ static const MCPhysReg FixedCSRFIMap[] = {
 // `QC.C.MILEAVERET`.
 static constexpr uint64_t QCIInterruptPushAmount = 96;
 
+// Smip/Ssip push six registers. ACLIC specifies a 24-byte frame for RV32E,
+// a 32-byte frame for RV32I, and a 48-byte frame for RV64I/E.
+static uint64_t getACLICInterruptPushAmount(const MachineFunction &MF) {
+  const auto &STI = MF.getSubtarget<RISCVSubtarget>();
+  if (STI.is64Bit())
+    return 48;
+  return STI.getTargetABI() == RISCVABI::ABI::ILP32E ? 24 : 32;
----------------
topperc wrote:

I don't think this can be based on the ABI. The hardware doesn't know the ABI. 
It only knows ISA string.

https://github.com/llvm/llvm-project/pull/238325
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to