[PATCH] D101010: [SystemZ] [z/OS] Add XPLINK64 Calling Convention to SystemZ

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 11:00:34 PDT 2021


uweigand added inline comments.


================
Comment at: llvm/lib/Target/SystemZ/SystemZCallingConv.td:165
 def CSR_SystemZ_XPLINK64 : CalleeSavedRegs<(add (sequence "R%dD", 8, 15),
-                                                (sequence "F%dD", 8, 15))>;
+                                                (sequence "F%dD", 15, 8))>;
+
----------------
Everybody0523 wrote:
> uweigand wrote:
> > Why are you changing the sequence here?  I didn't think the order of CSRs in that list should make any particular difference ...
> The CSR mask is generated in order based on this list. However, FPRs are preserved in the save area in reverse order, which is contrary to the current CSR mask. The previous commit not reversing the order of the callee-saved FPRs was an oversight. 
> 
> With all that said and done, if you prefer I can keep the sequence unchanged for now and create a separate patch that fixes this bug. 
If you need to save FPRs in some specific place in the save area for ABI reasons, that should be handled by code in SystemZFrameLowering.cpp (like is done for GPRs on Linux -- for FPRs there is no defined place where they need to be saved so it doesn't matter).

But in any case this is an independent question, so I agree that this should best be handled in a separate patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101010/new/

https://reviews.llvm.org/D101010



More information about the llvm-commits mailing list