[PATCH] D71013: [AIX] Allow vararg calls when all arguments reside in registers.

Chris Bowler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 06:34:49 PST 2019


cebowleratibm created this revision.
cebowleratibm added reviewers: sfertile, ZarkoCA.
Herald added subscribers: llvm-commits, jsji, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.

This patch pushes the AIX vararg unimplemented error diagnostic later and allows vararg calls so long as all the arguments can be passed in register.

This patch extends the AIX calling convention implementation to initialize GPR(s) for vararg float arguments.  On AIX, both GPR(s) and FPR are allocated for floating point arguments.  The GPR(s) are only initialized for vararg calls, otherwise the callee is expected to retrieve the float argument in the FPR.

f64 in AIX PPC32 requires special handling in order to allocated and initialize 2 GPRs.  This is performed with bitcast, SRL, truncation to initialize one GPR for the MSW and bitcast, truncations to initialize the other GPR for the LSW.

A future patch will follow to add support for arguments passed on the stack.


https://reviews.llvm.org/D71013

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/test/CodeGen/PowerPC/aix-cc-abi.ll
  llvm/test/CodeGen/PowerPC/aix_cc_abi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71013.232104.patch
Type: text/x-patch
Size: 11999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191204/a2e83bc2/attachment.bin>


More information about the llvm-commits mailing list