aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r--src/lj_asm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index fae5b241..b0e6d313 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -2319,13 +2319,23 @@ static void asm_setup_regsp(ASMState *as)
2319 } 2319 }
2320 /* fallthrough */ /* for integer POW */ 2320 /* fallthrough */ /* for integer POW */
2321 case IR_DIV: case IR_MOD: 2321 case IR_DIV: case IR_MOD:
2322 if (!irt_isnum(ir->t)) { 2322 if ((LJ_64 && LJ_SOFTFP) || !irt_isnum(ir->t)) {
2323 ir->prev = REGSP_HINT(RID_RET); 2323 ir->prev = REGSP_HINT(RID_RET);
2324 if (inloop) 2324 if (inloop)
2325 as->modset |= (RSET_SCRATCH & RSET_GPR); 2325 as->modset |= (RSET_SCRATCH & RSET_GPR);
2326 continue; 2326 continue;
2327 } 2327 }
2328 break; 2328 break;
2329#if LJ_64 && LJ_SOFTFP
2330 case IR_ADD: case IR_SUB: case IR_MUL:
2331 if (irt_isnum(ir->t)) {
2332 ir->prev = REGSP_HINT(RID_RET);
2333 if (inloop)
2334 as->modset |= (RSET_SCRATCH & RSET_GPR);
2335 continue;
2336 }
2337 break;
2338#endif
2329 case IR_FPMATH: 2339 case IR_FPMATH:
2330#if LJ_TARGET_X86ORX64 2340#if LJ_TARGET_X86ORX64
2331 if (ir->op2 <= IRFPM_TRUNC) { 2341 if (ir->op2 <= IRFPM_TRUNC) {