diff options
author | Stepan Dyatkovskiy <stpworld@narod.ru> | 2013-05-05 07:48:36 +0000 |
---|---|---|
committer | Stepan Dyatkovskiy <stpworld@narod.ru> | 2013-05-05 07:48:36 +0000 |
commit | 46abfcf4187432da728cbe452c32143da077e07f (patch) | |
tree | 1166ab9d35b6cf746dd4198825afe6afa52b8716 /lib/Target/ARM/ARMISelLowering.h | |
parent | 46e7e6f39e8a4efec0cc45ca346b40683288ff9e (diff) | |
download | external_llvm-46abfcf4187432da728cbe452c32143da077e07f.zip external_llvm-46abfcf4187432da728cbe452c32143da077e07f.tar.gz external_llvm-46abfcf4187432da728cbe452c32143da077e07f.tar.bz2 |
For ARM backend, fixed "byval" attribute support.
Now even the small structures could be passed within byval (small enough
to be stored in GPRs).
In regression tests next function prototypes are checked:
PR15293:
%artz = type { i32 }
define void @foo(%artz* byval %s)
define void @foo2(%artz* byval %s, i32 %p, %artz* byval %s2)
foo: "s" stored in R0
foo2: "s" stored in R0, "s2" stored in R2.
Next AAPCS rules are checked:
5.5 Parameters Passing, C.4 and C.5,
"ParamSize" is parameter size in 32bit words:
-- NSAA != 0, NCRN < R4 and NCRN+ParamSize > R4.
Parameter should be sent to the stack; NCRN := R4.
-- NSAA != 0, and NCRN < R4, NCRN+ParamSize < R4.
Parameter stored in GPRs; NCRN += ParamSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.h')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.h b/lib/Target/ARM/ARMISelLowering.h index 46b8438..426010e 100644 --- a/lib/Target/ARM/ARMISelLowering.h +++ b/lib/Target/ARM/ARMISelLowering.h @@ -477,6 +477,7 @@ namespace llvm { int StoreByValRegs(CCState &CCInfo, SelectionDAG &DAG, DebugLoc dl, SDValue &Chain, const Value *OrigArg, + unsigned InRegsParamRecordIdx, unsigned OffsetFromOrigArg, unsigned ArgOffset, bool ForceMutable) const; @@ -487,6 +488,7 @@ namespace llvm { bool ForceMutable = false) const; void computeRegArea(CCState &CCInfo, MachineFunction &MF, + unsigned InRegsParamRecordIdx, unsigned &ArgRegsSize, unsigned &ArgRegsSaveSize) const; |