mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix register hints for arithmetic helper functions.
This commit is contained in:
parent
c805a49d30
commit
c01aaad890
@ -1556,6 +1556,9 @@ static void asm_setup_regsp(ASMState *as)
|
|||||||
if (inloop)
|
if (inloop)
|
||||||
as->modset = RSET_SCRATCH;
|
as->modset = RSET_SCRATCH;
|
||||||
break;
|
break;
|
||||||
|
#if !LJ_TARGET_X86ORX64 && !LJ_SOFTFP
|
||||||
|
case IR_ATAN2: case IR_LDEXP:
|
||||||
|
#endif
|
||||||
case IR_POW:
|
case IR_POW:
|
||||||
if (!LJ_SOFTFP && irt_isnum(ir->t)) {
|
if (!LJ_SOFTFP && irt_isnum(ir->t)) {
|
||||||
#if LJ_TARGET_X86ORX64
|
#if LJ_TARGET_X86ORX64
|
||||||
@ -1571,14 +1574,12 @@ static void asm_setup_regsp(ASMState *as)
|
|||||||
}
|
}
|
||||||
/* fallthrough for integer POW */
|
/* fallthrough for integer POW */
|
||||||
case IR_DIV: case IR_MOD:
|
case IR_DIV: case IR_MOD:
|
||||||
#if LJ_64 && LJ_HASFFI
|
|
||||||
if (!irt_isnum(ir->t)) {
|
if (!irt_isnum(ir->t)) {
|
||||||
ir->prev = REGSP_HINT(RID_RET);
|
ir->prev = REGSP_HINT(RID_RET);
|
||||||
if (inloop)
|
if (inloop)
|
||||||
as->modset |= (RSET_SCRATCH & RSET_GPR);
|
as->modset |= (RSET_SCRATCH & RSET_GPR);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case IR_FPMATH:
|
case IR_FPMATH:
|
||||||
#if LJ_TARGET_X86ORX64
|
#if LJ_TARGET_X86ORX64
|
||||||
|
Loading…
Reference in New Issue
Block a user