mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-24 12:29:33 +00:00
[Stackmap] The first integer argument is passed in register for the WebKit_JS calling convention.
Pass the first integer argument (callee) in register to optimize inline caches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197416 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b961a26cec
commit
1d86f6730f
@ -357,6 +357,10 @@ def CC_X86_64_WebKit_JS : CallingConv<[
|
||||
// Promote i8/i16 arguments to i32.
|
||||
CCIfType<[i8, i16], CCPromoteToType<i32>>,
|
||||
|
||||
// Only the first integer argument is passed in register.
|
||||
CCIfType<[i32], CCAssignToReg<[EDI]>>,
|
||||
CCIfType<[i64], CCAssignToReg<[RDI]>>,
|
||||
|
||||
// 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>>
|
||||
|
@ -39,23 +39,23 @@ entry:
|
||||
}
|
||||
|
||||
; Test the webkit_jscc calling convention.
|
||||
; Two arguments will be pushed on the stack.
|
||||
; One argument will be passed in register, the other will be pushed on the stack.
|
||||
; Return value in $rax.
|
||||
define void @jscall_patchpoint_codegen(i64 %p1, i64 %p2, i64 %p3, i64 %p4) {
|
||||
entry:
|
||||
; CHECK-LABEL: jscall_patchpoint_codegen:
|
||||
; CHECK: Ltmp
|
||||
; CHECK: movq %r{{.+}}, 8(%rsp)
|
||||
; CHECK: movq %r{{.+}}, (%rsp)
|
||||
; CHECK: movq %r{{.+}}, %rdi
|
||||
; CHECK: Ltmp
|
||||
; CHECK-NEXT: movabsq $-559038736, %r11
|
||||
; CHECK-NEXT: callq *%r11
|
||||
; CHECK: movq %rax, 8(%rsp)
|
||||
; CHECK: movq %rax, (%rsp)
|
||||
; CHECK: callq
|
||||
%resolveCall2 = inttoptr i64 -559038736 to i8*
|
||||
%result = tail call webkit_jscc i64 (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.i64(i64 5, i32 15, i8* %resolveCall2, i32 2, i64 %p1, i64 %p2)
|
||||
%result = tail call webkit_jscc i64 (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.i64(i64 5, i32 15, i8* %resolveCall2, i32 2, i64 %p4, i64 %p2)
|
||||
%resolveCall3 = inttoptr i64 -559038737 to i8*
|
||||
tail call webkit_jscc void (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.void(i64 6, i32 15, i8* %resolveCall3, i32 2, i64 %p1, i64 %result)
|
||||
tail call webkit_jscc void (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.void(i64 6, i32 15, i8* %resolveCall3, i32 2, i64 %p4, i64 %result)
|
||||
ret void
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user