summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMISelLowering.h
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2013-05-20 08:01:34 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2013-05-20 08:01:34 +0000
commit083bc97344d618884ef04bc1ba1fc4ddf14d867d (patch)
treeb108c3d768a319d6649d9e28cbb7f51f38420f05 /lib/Target/ARM/ARMISelLowering.h
parent3a408fa8789b902f6fb1d8f256f9d00dd27e9619 (diff)
downloadllvm-083bc97344d618884ef04bc1ba1fc4ddf14d867d.tar.gz
llvm-083bc97344d618884ef04bc1ba1fc4ddf14d867d.tar.bz2
llvm-083bc97344d618884ef04bc1ba1fc4ddf14d867d.tar.xz
PR15868 fix.
Introduction: In case when stack alignment is 8 and GPRs parameter part size is not N*8: we add padding to GPRs part, so part's last byte must be recovered at address K*8-1. We need to do it, since remained (stack) part of parameter starts from address K*8, and we need to "attach" "GPRs head" without gaps to it: Stack: |---- 8 bytes block ----| |---- 8 bytes block ----| |---- 8 bytes... [ [padding] [GPRs head] ] [ ------ Tail passed via stack ------ ... FIX: Note, once we added padding we need to correct *all* Arg offsets that are going after padded one. That's why we need this fix: Arg offsets were never corrected before this patch. See new test-cases included in patch. We also don't need to insert padding for byval parameters that are stored in GPRs only. We need pad only last byval parameter and only in case it outsides GPRs and stack alignment = 8. Though, stack area, allocated for recovered byval params, must satisfy "Size mod 8 = 0" restriction. This patch reduces stack usage for some cases: We can reduce ArgRegsSaveArea since inner N*4 bytes sized byval params my be "packed" with alignment 4 in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.h')
-rw-r--r--lib/Target/ARM/ARMISelLowering.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.h b/lib/Target/ARM/ARMISelLowering.h
index 1d1b42abed..8aa926fd5e 100644
--- a/lib/Target/ARM/ARMISelLowering.h
+++ b/lib/Target/ARM/ARMISelLowering.h
@@ -480,6 +480,7 @@ namespace llvm {
unsigned InRegsParamRecordIdx,
unsigned OffsetFromOrigArg,
unsigned ArgOffset,
+ unsigned ArgSize,
bool ForceMutable) const;
void VarArgStyleRegisters(CCState &CCInfo, SelectionDAG &DAG,
@@ -489,6 +490,7 @@ namespace llvm {
void computeRegArea(CCState &CCInfo, MachineFunction &MF,
unsigned InRegsParamRecordIdx,
+ unsigned ArgSize,
unsigned &ArgRegsSize,
unsigned &ArgRegsSaveSize) const;