[llvm] Xtensa] Implement windowed call ABI. (PR #130001)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 6 00:33:39 PST 2025
================
@@ -9,16 +9,30 @@
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
-// Xtensa return value calling convention
+// Xtensa base calling convention
//===----------------------------------------------------------------------===//
+// Xtensa return value
def RetCC_Xtensa : CallingConv<[
// First two return values go in a2, a3, a4, a5
CCIfType<[i32], CCAssignToReg<[A2, A3, A4, A5]>>,
CCIfType<[i64], CCAssignToRegWithShadow<[A2, A4], [A3, A5]>>
]>;
+// Callee-saved register lists
+def CSR_Xtensa : CalleeSavedRegs<(add A0, A12, A13, A14, A15)>;
+
//===----------------------------------------------------------------------===//
-// Callee-saved register lists.
+// Xtensa windowed calling convention. Currently by default implemented
+// rotation window by 8 registers.
//===----------------------------------------------------------------------===//
+// Xtensa return value for 8 registers window
+def RetCCW8_Xtensa : CallingConv<[
+ //First two return values go in a10, a11, a12, a13
+ CCIfType<[i32], CCAssignToReg<[A10, A11, A12, A13]>>,
+ CCIfType<[i64], CCAssignToRegWithShadow<[A10, A12], [A11, A13]>>
+]>;
-def CSR_Xtensa : CalleeSavedRegs<(add A0, A12, A13, A14, A15)>;
+// Callee-saved register lists for rotation window by 8 registers
+def CSRW8_Xtensa : CalleeSavedRegs<(add)> {
+ let OtherPreserved = (add A0, SP, A2, A3, A4, A5, A6, A7);
+}
----------------
arsenm wrote:
End of file whitespace error
https://github.com/llvm/llvm-project/pull/130001
More information about the llvm-commits
mailing list