Store proper %sp register value

This commit is contained in:
Dmitry Stogov 2023-06-13 18:22:21 +03:00
parent 848613ce81
commit defd58cec3
2 changed files with 6 additions and 3 deletions

View File

@ -4230,7 +4230,8 @@ static void ir_emit_exitcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
| stp x0, x1, [sp, #-16]! | stp x0, x1, [sp, #-16]!
| mov Rx(IR_REG_INT_ARG2), sp | 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) | mov Rx(IR_REG_INT_ARG1), Rx(IR_REG_INT_TMP)
if (IR_IS_CONST_REF(insn->op2)) { if (IR_IS_CONST_REF(insn->op2)) {

View File

@ -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 | movsd qword [rsp+16*8+15*8], xmm15
| |
| mov Ra(IR_REG_INT_ARG2), rsp | 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] | mov Ra(IR_REG_INT_ARG1), [rsp+16*8+16*8+8]
|.if X64WIN |.if X64WIN
| sub rsp, 32 /* shadow space */ | 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 | movsd qword [esp+8*4+7*8], xmm7
| |
| mov Ra(IR_REG_INT_FCARG2), esp | 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] | mov Ra(IR_REG_INT_FCARG1), [esp+8*4+8*8+12]
|.endif |.endif