Rename IR_POWI to IR_POW.

This commit is contained in:
Mike Pall 2011-02-02 21:33:11 +01:00
parent 433fd18f6d
commit 1027018b21
5 changed files with 15 additions and 15 deletions

View File

@ -2749,7 +2749,7 @@ static void asm_fpmath(ASMState *as, IRIns *ir)
}
}
static void asm_powi(ASMState *as, IRIns *ir)
static void asm_fppowi(ASMState *as, IRIns *ir)
{
/* The modified regs must match with the *.dasc implementation. */
RegSet drop = RSET_RANGE(RID_XMM0, RID_XMM1+1)|RID2RSET(RID_EAX);
@ -4020,14 +4020,14 @@ static void asm_ir(ASMState *as, IRIns *ir)
case IR_FPMATH: case IR_ATAN2: case IR_LDEXP:
asm_fpmath(as, ir);
break;
case IR_POWI:
case IR_POW:
#if LJ_64 && LJ_HASFFI
if (!irt_isnum(ir->t))
asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 :
IRCALL_lj_carith_powu64);
else
#endif
asm_powi(as, ir);
asm_fppowi(as, ir);
break;
/* Overflow-checking arithmetic ops. Note: don't use LEA here! */
@ -4183,7 +4183,7 @@ static void asm_setup_regsp(ASMState *as, GCtrace *T)
if (inloop)
as->modset = RSET_SCRATCH;
break;
case IR_POWI:
case IR_POW:
if (irt_isnum(ir->t)) {
ir->prev = REGSP_HINT(RID_XMM0);
if (inloop)

View File

@ -67,7 +67,7 @@
_(MUL, C , ref, ref) \
_(DIV, N , ref, ref) \
_(MOD, N , ref, ref) \
_(POWI, N , ref, ref) \
_(POW, N , ref, ref) \
_(NEG, N , ref, ref) \
\
_(ABS, N , ref, ref) \

View File

@ -184,12 +184,12 @@ LJFOLDF(kfold_fpmath)
return lj_ir_knum(J, y);
}
LJFOLD(POWI KNUM KINT)
LJFOLDF(kfold_powi)
LJFOLD(POW KNUM KINT)
LJFOLDF(kfold_numpow)
{
lua_Number a = knumleft;
lua_Number b = cast_num(fright->i);
lua_Number y = lj_vm_foldarith(a, b, IR_POWI - IR_ADD);
lua_Number y = lj_vm_foldarith(a, b, IR_POW - IR_ADD);
return lj_ir_knum(J, y);
}
@ -326,7 +326,7 @@ LJFOLDF(kfold_int64arith)
LJFOLD(DIV KINT64 KINT64)
LJFOLD(MOD KINT64 KINT64)
LJFOLD(POWI KINT64 KINT64)
LJFOLD(POW KINT64 KINT64)
LJFOLDF(kfold_int64arith2)
{
#if LJ_HASFFI
@ -784,8 +784,8 @@ LJFOLDF(simplify_nummuldiv_negneg)
return RETRYFOLD;
}
LJFOLD(POWI any KINT)
LJFOLDF(simplify_powi_xk)
LJFOLD(POW any KINT)
LJFOLDF(simplify_numpow_xk)
{
int32_t k = fright->i;
TRef ref = fins->op1;
@ -814,8 +814,8 @@ LJFOLDF(simplify_powi_xk)
return ref;
}
LJFOLD(POWI KNUM any)
LJFOLDF(simplify_powi_kx)
LJFOLD(POW KNUM any)
LJFOLDF(simplify_numpow_kx)
{
lua_Number n = knumleft;
if (n == 2.0) { /* 2.0 ^ i ==> ldexp(1.0, tonum(i)) */

View File

@ -428,7 +428,7 @@ TRef lj_opt_narrow_pow(jit_State *J, TRef rb, TRef rc, TValue *vc)
tmp = emitir(IRTI(IR_ADD), rc, lj_ir_kint(J, 65536-2147483647-1));
emitir(IRTGI(IR_LE), tmp, lj_ir_kint(J, 2*65536-2147483647-1));
}
return emitir(IRTN(IR_POWI), rb, rc);
return emitir(IRTN(IR_POW), rb, rc);
}
/* FOLD covers most cases, but some are easier to do here. */
if (tref_isk(rb) && tvispone(ir_knum(IR(tref_ref(rb)))))

View File

@ -207,7 +207,7 @@ static void split_ir(jit_State *J)
irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 :
IRCALL_lj_carith_modu64);
break;
case IR_POWI:
case IR_POW:
hi = split_call64(J, hisubst, oir, ir,
irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 :
IRCALL_lj_carith_powu64);