[PATCH] D75904: [ARM][CodeGen] Fixing stack alignment of HFA arguments on AArch32 PCS

Lucas Prates via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 04:30:06 PDT 2020


pratlucas created this revision.
Herald added subscribers: llvm-commits, cfe-commits, danielkiss, hiraditya, kristof.beyls.
Herald added projects: clang, LLVM.
pratlucas added a parent revision: D75903: [AArch64][CodeGen] Fixing stack alignment of HFA arguments on AArch64 PCS.
pratlucas added reviewers: t.p.northover, olista01, rnk, asl.

Properly complying with AArch32 PCS on the handling of over-aligned HFA
arguments when those are placed on the stack. AAPCS specifies that the
stacked argument address should be adjusted upwards until correctly
aligned for the argument before copying it to memory.

This patch fixes the alignment of these arguments by makign use of the
stack alignment propagated through the `alignstack` IR argument
attribute during the calling convention lowering for ARM targets.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75904

Files:
  clang/lib/CodeGen/TargetInfo.cpp
  clang/test/CodeGen/arm-aapcs-vfp.c
  llvm/lib/Target/ARM/ARMCallingConv.cpp
  llvm/test/CodeGen/ARM/aapcs-hfa-code.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75904.249306.patch
Type: text/x-patch
Size: 6629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200310/20b53cb4/attachment.bin>


More information about the cfe-commits mailing list