diff options
-rw-r--r-- | src/lj_asm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 9ff9215f..cfdfa99f 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -1365,6 +1365,7 @@ static void asm_head_side(ASMState *as) | |||
1365 | IRRef1 sloadins[RID_MAX]; | 1365 | IRRef1 sloadins[RID_MAX]; |
1366 | RegSet allow = RSET_ALL; /* Inverse of all coalesced registers. */ | 1366 | RegSet allow = RSET_ALL; /* Inverse of all coalesced registers. */ |
1367 | RegSet live = RSET_EMPTY; /* Live parent registers. */ | 1367 | RegSet live = RSET_EMPTY; /* Live parent registers. */ |
1368 | RegSet pallow = RSET_GPR; /* Registers needed by the parent stack check. */ | ||
1368 | IRIns *irp = &as->parent->ir[REF_BASE]; /* Parent base. */ | 1369 | IRIns *irp = &as->parent->ir[REF_BASE]; /* Parent base. */ |
1369 | int32_t spadj, spdelta; | 1370 | int32_t spadj, spdelta; |
1370 | int pass2 = 0; | 1371 | int pass2 = 0; |
@@ -1404,6 +1405,7 @@ static void asm_head_side(ASMState *as) | |||
1404 | sloadins[rs] = (IRRef1)i; | 1405 | sloadins[rs] = (IRRef1)i; |
1405 | rset_set(live, rs); /* Block live parent register. */ | 1406 | rset_set(live, rs); /* Block live parent register. */ |
1406 | } | 1407 | } |
1408 | if (!ra_hasspill(regsp_spill(rs))) rset_clear(pallow, regsp_reg(rs)); | ||
1407 | } | 1409 | } |
1408 | 1410 | ||
1409 | /* Calculate stack frame adjustment. */ | 1411 | /* Calculate stack frame adjustment. */ |
@@ -1520,7 +1522,7 @@ static void asm_head_side(ASMState *as) | |||
1520 | ExitNo exitno = as->J->exitno; | 1522 | ExitNo exitno = as->J->exitno; |
1521 | #endif | 1523 | #endif |
1522 | as->T->topslot = (uint8_t)as->topslot; /* Remember for child traces. */ | 1524 | as->T->topslot = (uint8_t)as->topslot; /* Remember for child traces. */ |
1523 | asm_stack_check(as, as->topslot, irp, allow & RSET_GPR, exitno); | 1525 | asm_stack_check(as, as->topslot, irp, pallow, exitno); |
1524 | } | 1526 | } |
1525 | } | 1527 | } |
1526 | 1528 | ||