[PATCH] D129727: [ARM64EC 11/?] Add support for lowering variadic indirect calls.

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 20:38:51 PDT 2022


bcl5980 created this revision.
bcl5980 added reviewers: efriedma, dpaoliello.
Herald added subscribers: zzheng, hiraditya, kristof.beyls.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Part of initial Arm64EC patchset.
Variadic function's exit thunk is different from normal function. It need to allocate a dynamic stack allocation on the bottom of stack. Then copy the original arguments on the stack to the new allocation.
When we have a varargs function that returns the value in a register on AArch64, but requires an “sret” return on x64, we need to shuffle around the argument registers, and store x3 to the stack with 8bytes alignment.


https://reviews.llvm.org/D129727

Files:
  llvm/lib/Target/AArch64/AArch64Arm64ECCallLowering.cpp
  llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/arm64ec-cfg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129727.444505.patch
Type: text/x-patch
Size: 25931 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220714/ebeb1c95/attachment.bin>


More information about the llvm-commits mailing list