mirror of
https://github.com/danog/ir.git
synced 2024-12-03 10:08:29 +01:00
Store proper %sp register value
This commit is contained in:
parent
848613ce81
commit
defd58cec3
@ -4230,7 +4230,8 @@ static void ir_emit_exitcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
| stp x0, x1, [sp, #-16]!
|
||||
|
||||
| mov Rx(IR_REG_INT_ARG2), sp
|
||||
| str Rx(IR_REG_INT_ARG2), [sp, #(31*8)]
|
||||
| add Rx(IR_REG_INT_ARG1), Rx(IR_REG_INT_ARG2), #(32*8+32*8)
|
||||
| str Rx(IR_REG_INT_ARG1), [sp, #(31*8)]
|
||||
| mov Rx(IR_REG_INT_ARG1), Rx(IR_REG_INT_TMP)
|
||||
|
||||
if (IR_IS_CONST_REF(insn->op2)) {
|
||||
|
@ -7210,7 +7210,8 @@ static void ir_emit_exitcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
| movsd qword [rsp+16*8+15*8], xmm15
|
||||
|
|
||||
| mov Ra(IR_REG_INT_ARG2), rsp
|
||||
| mov aword [rsp+4*8], Ra(IR_REG_INT_ARG2)
|
||||
| lea Ra(IR_REG_INT_ARG1), [rsp+16*8+16*8+16]
|
||||
| mov aword [rsp+4*8], Ra(IR_REG_INT_ARG1)
|
||||
| mov Ra(IR_REG_INT_ARG1), [rsp+16*8+16*8+8]
|
||||
|.if X64WIN
|
||||
| sub rsp, 32 /* shadow space */
|
||||
@ -7234,7 +7235,8 @@ static void ir_emit_exitcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
| movsd qword [esp+8*4+7*8], xmm7
|
||||
|
|
||||
| mov Ra(IR_REG_INT_FCARG2), esp
|
||||
| mov aword [esp+4*4], Ra(IR_REG_INT_FCARG2)
|
||||
| lea Ra(IR_REG_INT_FCARG1), [esp+8*4+8*8+16]
|
||||
| mov aword [esp+4*4], Ra(IR_REG_INT_FCARG1)
|
||||
| mov Ra(IR_REG_INT_FCARG1), [esp+8*4+8*8+12]
|
||||
|.endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user