[PATCH] D77578: [AIX][PPC} Implement caller byval arguments in stack memory

Chris Bowler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 12:31:04 PDT 2020


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

This patch adds support to initialize byval arguments in stack memory when required.

On AIX, available GPRs are consumed for passing byval arguments.  When available GPRs are exhausted, any remaining bytes of byval arguments are written to the parameter save area on the stack.

Note that when an argument passes in both registers and the stack, memory is reserved in the parameter save area for the entire object.  Only the portion that does not reside in registers needs to be written by the caller.  On entry, the callee cannot expect that the portion of the byval argument that passed in register is initialized in the parameter save area.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77578

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/test/CodeGen/PowerPC/aix-cc-byval-limitation1.ll
  llvm/test/CodeGen/PowerPC/aix-cc-byval-limitation2.ll
  llvm/test/CodeGen/PowerPC/aix-cc-byval-mem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77578.255433.patch
Type: text/x-patch
Size: 12159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200406/c2e5c15a/attachment.bin>


More information about the llvm-commits mailing list