diff options
author | Mike Pall <mike> | 2012-06-27 19:54:52 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-06-27 19:54:52 +0200 |
commit | 9a98ba64b4cc52b1e00383b952926369cb3fe526 (patch) | |
tree | 54fa0d914cb7863065a8579b48fcbbcc5999f205 /src/lj_opt_mem.c | |
parent | 3dc7baf6af317f3d1358a94a1e5f92258d6d0ff4 (diff) | |
download | luajit-9a98ba64b4cc52b1e00383b952926369cb3fe526.tar.gz luajit-9a98ba64b4cc52b1e00383b952926369cb3fe526.tar.bz2 luajit-9a98ba64b4cc52b1e00383b952926369cb3fe526.zip |
Fix TDUP to HLOAD forwarding for DUALNUM builds.
Diffstat (limited to 'src/lj_opt_mem.c')
-rw-r--r-- | src/lj_opt_mem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c index 17e29569..a0bfba19 100644 --- a/src/lj_opt_mem.c +++ b/src/lj_opt_mem.c | |||
@@ -181,7 +181,8 @@ static TRef fwd_ahload(jit_State *J, IRRef xref) | |||
181 | lua_assert(ir->o != IR_TNEW || irt_isnil(fins->t)); | 181 | lua_assert(ir->o != IR_TNEW || irt_isnil(fins->t)); |
182 | if (irt_ispri(fins->t)) { | 182 | if (irt_ispri(fins->t)) { |
183 | return TREF_PRI(irt_type(fins->t)); | 183 | return TREF_PRI(irt_type(fins->t)); |
184 | } else if (irt_isnum(fins->t) || irt_isstr(fins->t)) { | 184 | } else if (irt_isnum(fins->t) || (LJ_DUALNUM && irt_isint(fins->t)) || |
185 | irt_isstr(fins->t)) { | ||
185 | TValue keyv; | 186 | TValue keyv; |
186 | cTValue *tv; | 187 | cTValue *tv; |
187 | IRIns *key = IR(xr->op2); | 188 | IRIns *key = IR(xr->op2); |
@@ -191,6 +192,8 @@ static TRef fwd_ahload(jit_State *J, IRRef xref) | |||
191 | lua_assert(itype2irt(tv) == irt_type(fins->t)); | 192 | lua_assert(itype2irt(tv) == irt_type(fins->t)); |
192 | if (irt_isnum(fins->t)) | 193 | if (irt_isnum(fins->t)) |
193 | return lj_ir_knum_u64(J, tv->u64); | 194 | return lj_ir_knum_u64(J, tv->u64); |
195 | else if (LJ_DUALNUM && irt_isint(fins->t)) | ||
196 | return lj_ir_kint(J, intV(tv)); | ||
194 | else | 197 | else |
195 | return lj_ir_kstr(J, strV(tv)); | 198 | return lj_ir_kstr(J, strV(tv)); |
196 | } | 199 | } |