aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMCallingConv.td
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM/ARMCallingConv.td')
-rw-r--r--lib/Target/ARM/ARMCallingConv.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMCallingConv.td b/lib/Target/ARM/ARMCallingConv.td
index bda1517685..e0f3a871ba 100644
--- a/lib/Target/ARM/ARMCallingConv.td
+++ b/lib/Target/ARM/ARMCallingConv.td
@@ -105,6 +105,10 @@ def CC_ARM_APCS_GHC : CallingConv<[
def CC_ARM_AAPCS_Common : CallingConv<[
+ // @LOCALMOD-BEGIN (PR11018)
+ CCIfByVal<CCPassByVal<4, 4>>,
+ // @LOCALMOD-END
+
CCIfType<[i1, i8, i16], CCPromoteToType<i32>>,
// i64/f64 is passed in even pairs of GPRs
@@ -202,3 +206,9 @@ def CSR_iOS : CalleeSavedRegs<(add LR, R7, R6, R5, R4, (sub CSR_AAPCS, R9))>;
// add is a workaround for not being able to compile empty list:
// def CSR_GHC : CalleeSavedRegs<()>;
def CSR_GHC : CalleeSavedRegs<(add)>;
+
+// @LOCALMOD-START
+// NaCl does not save R9, but otherwise uses the same order as AAPCS
+def CSR_NaCl : CalleeSavedRegs<(add LR, R11, R10, R8, R7, R6, R5, R4,
+ (sequence "D%u", 15, 8))>;
+// @LOCALMOD-END \ No newline at end of file