aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2011-02-02 21:33:11 +0100
committerMike Pall <mike>2011-02-02 21:33:11 +0100
commit1027018b2135caf45057c3d3b3da03ffb0c6add3 (patch)
tree3d3eeae358900db5e164f9d4d80f819e84c7c895
parent433fd18f6d44ab5fc68f65cfdf1d1fab7d89992e (diff)
downloadluajit-1027018b2135caf45057c3d3b3da03ffb0c6add3.tar.gz
luajit-1027018b2135caf45057c3d3b3da03ffb0c6add3.tar.bz2
luajit-1027018b2135caf45057c3d3b3da03ffb0c6add3.zip
Rename IR_POWI to IR_POW.
-rw-r--r--src/lj_asm.c8
-rw-r--r--src/lj_ir.h2
-rw-r--r--src/lj_opt_fold.c16
-rw-r--r--src/lj_opt_narrow.c2
-rw-r--r--src/lj_opt_split.c2
5 files changed, 15 insertions, 15 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index 27c9ac31..8864c9a3 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -2749,7 +2749,7 @@ static void asm_fpmath(ASMState *as, IRIns *ir)
2749 } 2749 }
2750} 2750}
2751 2751
2752static void asm_powi(ASMState *as, IRIns *ir) 2752static void asm_fppowi(ASMState *as, IRIns *ir)
2753{ 2753{
2754 /* The modified regs must match with the *.dasc implementation. */ 2754 /* The modified regs must match with the *.dasc implementation. */
2755 RegSet drop = RSET_RANGE(RID_XMM0, RID_XMM1+1)|RID2RSET(RID_EAX); 2755 RegSet drop = RSET_RANGE(RID_XMM0, RID_XMM1+1)|RID2RSET(RID_EAX);
@@ -4020,14 +4020,14 @@ static void asm_ir(ASMState *as, IRIns *ir)
4020 case IR_FPMATH: case IR_ATAN2: case IR_LDEXP: 4020 case IR_FPMATH: case IR_ATAN2: case IR_LDEXP:
4021 asm_fpmath(as, ir); 4021 asm_fpmath(as, ir);
4022 break; 4022 break;
4023 case IR_POWI: 4023 case IR_POW:
4024#if LJ_64 && LJ_HASFFI 4024#if LJ_64 && LJ_HASFFI
4025 if (!irt_isnum(ir->t)) 4025 if (!irt_isnum(ir->t))
4026 asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 : 4026 asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 :
4027 IRCALL_lj_carith_powu64); 4027 IRCALL_lj_carith_powu64);
4028 else 4028 else
4029#endif 4029#endif
4030 asm_powi(as, ir); 4030 asm_fppowi(as, ir);
4031 break; 4031 break;
4032 4032
4033 /* Overflow-checking arithmetic ops. Note: don't use LEA here! */ 4033 /* Overflow-checking arithmetic ops. Note: don't use LEA here! */
@@ -4183,7 +4183,7 @@ static void asm_setup_regsp(ASMState *as, GCtrace *T)
4183 if (inloop) 4183 if (inloop)
4184 as->modset = RSET_SCRATCH; 4184 as->modset = RSET_SCRATCH;
4185 break; 4185 break;
4186 case IR_POWI: 4186 case IR_POW:
4187 if (irt_isnum(ir->t)) { 4187 if (irt_isnum(ir->t)) {
4188 ir->prev = REGSP_HINT(RID_XMM0); 4188 ir->prev = REGSP_HINT(RID_XMM0);
4189 if (inloop) 4189 if (inloop)
diff --git a/src/lj_ir.h b/src/lj_ir.h
index d2ad87f3..dfafc5db 100644
--- a/src/lj_ir.h
+++ b/src/lj_ir.h
@@ -67,7 +67,7 @@
67 _(MUL, C , ref, ref) \ 67 _(MUL, C , ref, ref) \
68 _(DIV, N , ref, ref) \ 68 _(DIV, N , ref, ref) \
69 _(MOD, N , ref, ref) \ 69 _(MOD, N , ref, ref) \
70 _(POWI, N , ref, ref) \ 70 _(POW, N , ref, ref) \
71 _(NEG, N , ref, ref) \ 71 _(NEG, N , ref, ref) \
72 \ 72 \
73 _(ABS, N , ref, ref) \ 73 _(ABS, N , ref, ref) \
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 93fb782c..c3b0a082 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -184,12 +184,12 @@ LJFOLDF(kfold_fpmath)
184 return lj_ir_knum(J, y); 184 return lj_ir_knum(J, y);
185} 185}
186 186
187LJFOLD(POWI KNUM KINT) 187LJFOLD(POW KNUM KINT)
188LJFOLDF(kfold_powi) 188LJFOLDF(kfold_numpow)
189{ 189{
190 lua_Number a = knumleft; 190 lua_Number a = knumleft;
191 lua_Number b = cast_num(fright->i); 191 lua_Number b = cast_num(fright->i);
192 lua_Number y = lj_vm_foldarith(a, b, IR_POWI - IR_ADD); 192 lua_Number y = lj_vm_foldarith(a, b, IR_POW - IR_ADD);
193 return lj_ir_knum(J, y); 193 return lj_ir_knum(J, y);
194} 194}
195 195
@@ -326,7 +326,7 @@ LJFOLDF(kfold_int64arith)
326 326
327LJFOLD(DIV KINT64 KINT64) 327LJFOLD(DIV KINT64 KINT64)
328LJFOLD(MOD KINT64 KINT64) 328LJFOLD(MOD KINT64 KINT64)
329LJFOLD(POWI KINT64 KINT64) 329LJFOLD(POW KINT64 KINT64)
330LJFOLDF(kfold_int64arith2) 330LJFOLDF(kfold_int64arith2)
331{ 331{
332#if LJ_HASFFI 332#if LJ_HASFFI
@@ -784,8 +784,8 @@ LJFOLDF(simplify_nummuldiv_negneg)
784 return RETRYFOLD; 784 return RETRYFOLD;
785} 785}
786 786
787LJFOLD(POWI any KINT) 787LJFOLD(POW any KINT)
788LJFOLDF(simplify_powi_xk) 788LJFOLDF(simplify_numpow_xk)
789{ 789{
790 int32_t k = fright->i; 790 int32_t k = fright->i;
791 TRef ref = fins->op1; 791 TRef ref = fins->op1;
@@ -814,8 +814,8 @@ LJFOLDF(simplify_powi_xk)
814 return ref; 814 return ref;
815} 815}
816 816
817LJFOLD(POWI KNUM any) 817LJFOLD(POW KNUM any)
818LJFOLDF(simplify_powi_kx) 818LJFOLDF(simplify_numpow_kx)
819{ 819{
820 lua_Number n = knumleft; 820 lua_Number n = knumleft;
821 if (n == 2.0) { /* 2.0 ^ i ==> ldexp(1.0, tonum(i)) */ 821 if (n == 2.0) { /* 2.0 ^ i ==> ldexp(1.0, tonum(i)) */
diff --git a/src/lj_opt_narrow.c b/src/lj_opt_narrow.c
index 837ca015..71062493 100644
--- a/src/lj_opt_narrow.c
+++ b/src/lj_opt_narrow.c
@@ -428,7 +428,7 @@ TRef lj_opt_narrow_pow(jit_State *J, TRef rb, TRef rc, TValue *vc)
428 tmp = emitir(IRTI(IR_ADD), rc, lj_ir_kint(J, 65536-2147483647-1)); 428 tmp = emitir(IRTI(IR_ADD), rc, lj_ir_kint(J, 65536-2147483647-1));
429 emitir(IRTGI(IR_LE), tmp, lj_ir_kint(J, 2*65536-2147483647-1)); 429 emitir(IRTGI(IR_LE), tmp, lj_ir_kint(J, 2*65536-2147483647-1));
430 } 430 }
431 return emitir(IRTN(IR_POWI), rb, rc); 431 return emitir(IRTN(IR_POW), rb, rc);
432 } 432 }
433 /* FOLD covers most cases, but some are easier to do here. */ 433 /* FOLD covers most cases, but some are easier to do here. */
434 if (tref_isk(rb) && tvispone(ir_knum(IR(tref_ref(rb))))) 434 if (tref_isk(rb) && tvispone(ir_knum(IR(tref_ref(rb)))))
diff --git a/src/lj_opt_split.c b/src/lj_opt_split.c
index f4339e85..f53616b3 100644
--- a/src/lj_opt_split.c
+++ b/src/lj_opt_split.c
@@ -207,7 +207,7 @@ static void split_ir(jit_State *J)
207 irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 : 207 irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 :
208 IRCALL_lj_carith_modu64); 208 IRCALL_lj_carith_modu64);
209 break; 209 break;
210 case IR_POWI: 210 case IR_POW:
211 hi = split_call64(J, hisubst, oir, ir, 211 hi = split_call64(J, hisubst, oir, ir,
212 irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 : 212 irt_isi64(ir->t) ? IRCALL_lj_carith_powi64 :
213 IRCALL_lj_carith_powu64); 213 IRCALL_lj_carith_powu64);