[llvm] [Xtensa] Implement vararg support. (PR #117126)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 17:07:39 PST 2024


================
@@ -378,6 +393,68 @@ SDValue XtensaTargetLowering::LowerFormalArguments(
     }
   }
 
+  if (IsVarArg) {
+    static const MCPhysReg XtensaArgRegs[6] = {
+        Xtensa::A2, Xtensa::A3, Xtensa::A4, Xtensa::A5, Xtensa::A6, Xtensa::A7};
----------------
s-barannikov wrote:

It is the same array as in `CC_Xtensa_Custom`, pull it to a common place.

https://github.com/llvm/llvm-project/pull/117126


More information about the llvm-commits mailing list