summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2013-12-16 22:05:32 +0000
committerJuergen Ributzka <juergen@apple.com>2013-12-16 22:05:32 +0000
commit9ed985baadc3b1df704892d1c85a97c38a19e46a (patch)
tree233dcebe45bbb4332776c6b84e32430cec9e9403 /llvm/lib
parent47debc013689044c148542080b9d7a5828abb1ff (diff)
downloadbcm5719-llvm-9ed985baadc3b1df704892d1c85a97c38a19e46a.tar.gz
bcm5719-llvm-9ed985baadc3b1df704892d1c85a97c38a19e46a.zip
[Stackmap] Allow WebKit_JS calling convention to store 4 byte sized and aligned arguments.
This allows the WebKit_JS calling convention to perform partial writes on a 4 byte granularity to stack slots. llvm-svn: 197431
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86CallingConv.td13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86CallingConv.td b/llvm/lib/Target/X86/X86CallingConv.td
index ef8caa0290e..6185c1cd387 100644
--- a/llvm/lib/Target/X86/X86CallingConv.td
+++ b/llvm/lib/Target/X86/X86CallingConv.td
@@ -358,12 +358,15 @@ def CC_X86_64_WebKit_JS : CallingConv<[
CCIfType<[i8, i16], CCPromoteToType<i32>>,
// Only the first integer argument is passed in register.
- CCIfType<[i32], CCAssignToReg<[EDI]>>,
- CCIfType<[i64], CCAssignToReg<[RDI]>>,
+ CCIfType<[i32], CCAssignToReg<[EAX]>>,
+ CCIfType<[i64], CCAssignToReg<[RAX]>>,
- // Integer/FP values are always stored in stack slots that are 8 bytes in size
- // and 8-byte aligned.
- CCIfType<[i32, i64, f32, f64], CCAssignToStack<8, 8>>
+ // The remaining integer arguments are passed on the stack. 32bit integer and
+ // floating-point arguments are aligned to 4 byte and stored in 4 byte slots.
+ // 64bit integer and floating-point arguments are aligned to 8 byte and stored
+ // in 8 byte stack slots.
+ CCIfType<[i32, f32], CCAssignToStack<4, 4>>,
+ CCIfType<[i64, f64], CCAssignToStack<8, 8>>
]>;
// No explicit register is specified for the AnyReg calling convention. The
OpenPOWER on IntegriCloud