aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2011-10-22 02:00:15 +0200
committerMike Pall <mike>2011-10-22 02:00:15 +0200
commitc01aaad890aab1584086b94f239e6a4ccfa7091b (patch)
treecf2e82c6d3f59318be874f1d96902d7608b3aa35 /src
parentc805a49d304c344d69630a4282d21d753c70e1bd (diff)
downloadluajit-c01aaad890aab1584086b94f239e6a4ccfa7091b.tar.gz
luajit-c01aaad890aab1584086b94f239e6a4ccfa7091b.tar.bz2
luajit-c01aaad890aab1584086b94f239e6a4ccfa7091b.zip
Fix register hints for arithmetic helper functions.
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index 3d9a213b..c795b99e 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -1556,6 +1556,9 @@ static void asm_setup_regsp(ASMState *as)
1556 if (inloop) 1556 if (inloop)
1557 as->modset = RSET_SCRATCH; 1557 as->modset = RSET_SCRATCH;
1558 break; 1558 break;
1559#if !LJ_TARGET_X86ORX64 && !LJ_SOFTFP
1560 case IR_ATAN2: case IR_LDEXP:
1561#endif
1559 case IR_POW: 1562 case IR_POW:
1560 if (!LJ_SOFTFP && irt_isnum(ir->t)) { 1563 if (!LJ_SOFTFP && irt_isnum(ir->t)) {
1561#if LJ_TARGET_X86ORX64 1564#if LJ_TARGET_X86ORX64
@@ -1571,14 +1574,12 @@ static void asm_setup_regsp(ASMState *as)
1571 } 1574 }
1572 /* fallthrough for integer POW */ 1575 /* fallthrough for integer POW */
1573 case IR_DIV: case IR_MOD: 1576 case IR_DIV: case IR_MOD:
1574#if LJ_64 && LJ_HASFFI
1575 if (!irt_isnum(ir->t)) { 1577 if (!irt_isnum(ir->t)) {
1576 ir->prev = REGSP_HINT(RID_RET); 1578 ir->prev = REGSP_HINT(RID_RET);
1577 if (inloop) 1579 if (inloop)
1578 as->modset |= (RSET_SCRATCH & RSET_GPR); 1580 as->modset |= (RSET_SCRATCH & RSET_GPR);
1579 continue; 1581 continue;
1580 } 1582 }
1581#endif
1582 break; 1583 break;
1583 case IR_FPMATH: 1584 case IR_FPMATH:
1584#if LJ_TARGET_X86ORX64 1585#if LJ_TARGET_X86ORX64