diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_asm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index d377eb4d..cc788407 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -2225,7 +2225,17 @@ static void asm_setup_regsp(ASMState *as) | |||
2225 | as->modset |= RSET_SCRATCH; | 2225 | as->modset |= RSET_SCRATCH; |
2226 | continue; | 2226 | continue; |
2227 | } | 2227 | } |
2228 | case IR_CALLN: case IR_CALLA: case IR_CALLL: case IR_CALLS: { | 2228 | case IR_CALLL: |
2229 | /* lj_vm_next needs two TValues on the stack. */ | ||
2230 | #if LJ_TARGET_X64 && LJ_ABI_WIN | ||
2231 | if (ir->op2 == IRCALL_lj_vm_next && as->evenspill < SPS_FIRST + 4) | ||
2232 | as->evenspill = SPS_FIRST + 4; | ||
2233 | #else | ||
2234 | if (SPS_FIRST < 4 && ir->op2 == IRCALL_lj_vm_next && as->evenspill < 4) | ||
2235 | as->evenspill = 4; | ||
2236 | #endif | ||
2237 | /* fallthrough */ | ||
2238 | case IR_CALLN: case IR_CALLA: case IR_CALLS: { | ||
2229 | const CCallInfo *ci = &lj_ir_callinfo[ir->op2]; | 2239 | const CCallInfo *ci = &lj_ir_callinfo[ir->op2]; |
2230 | ir->prev = asm_setup_call_slots(as, ir, ci); | 2240 | ir->prev = asm_setup_call_slots(as, ir, ci); |
2231 | if (inloop) | 2241 | if (inloop) |