diff options
| author | Mike Pall <mike> | 2016-10-20 20:55:12 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2016-10-20 20:55:12 +0200 |
| commit | 716f2daef8019ce53d75d2c376c74b8f478fd5c5 (patch) | |
| tree | 6fc5e7c7191415c186d0baf0dbc3042d942e2362 | |
| parent | bdcaf4bfd97d61461a5bc892d5fed3b0ac7ff256 (diff) | |
| download | luajit-716f2daef8019ce53d75d2c376c74b8f478fd5c5.tar.gz luajit-716f2daef8019ce53d75d2c376c74b8f478fd5c5.tar.bz2 luajit-716f2daef8019ce53d75d2c376c74b8f478fd5c5.zip | |
LJ_GC64: Various followup fixes.
Contributed by Peter Cawley.
| -rw-r--r-- | src/lj_asm_x86.h | 17 | ||||
| -rw-r--r-- | src/lj_record.c | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index 7931ffb5..1b94371e 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h | |||
| @@ -1247,14 +1247,15 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge) | |||
| 1247 | } else { | 1247 | } else { |
| 1248 | emit_rr(as, XO_MOV, tmp, key); | 1248 | emit_rr(as, XO_MOV, tmp, key); |
| 1249 | #if LJ_GC64 | 1249 | #if LJ_GC64 |
| 1250 | emit_gri(as, XG_ARITHi(XOg_XOR), dest, irt_toitype(kt) << 15); | 1250 | checkmclim(as); |
| 1251 | if ((as->flags & JIT_F_BMI2)) { | 1251 | emit_gri(as, XG_ARITHi(XOg_XOR), dest, irt_toitype(kt) << 15); |
| 1252 | emit_i8(as, 32); | 1252 | if ((as->flags & JIT_F_BMI2)) { |
| 1253 | emit_mrm(as, XV_RORX|VEX_64, dest, key); | 1253 | emit_i8(as, 32); |
| 1254 | } else { | 1254 | emit_mrm(as, XV_RORX|VEX_64, dest, key); |
| 1255 | emit_shifti(as, XOg_SHR|REX_64, dest, 32); | 1255 | } else { |
| 1256 | emit_rr(as, XO_MOV, dest|REX_64, key|REX_64); | 1256 | emit_shifti(as, XOg_SHR|REX_64, dest, 32); |
| 1257 | } | 1257 | emit_rr(as, XO_MOV, dest|REX_64, key|REX_64); |
| 1258 | } | ||
| 1258 | #else | 1259 | #else |
| 1259 | emit_rmro(as, XO_LEA, dest, key, HASH_BIAS); | 1260 | emit_rmro(as, XO_LEA, dest, key, HASH_BIAS); |
| 1260 | #endif | 1261 | #endif |
diff --git a/src/lj_record.c b/src/lj_record.c index a858ffa9..448db0cf 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
| @@ -2263,6 +2263,8 @@ void lj_record_ins(jit_State *J) | |||
| 2263 | rc = lj_ir_kint(J, (int32_t)(int16_t)rc); | 2263 | rc = lj_ir_kint(J, (int32_t)(int16_t)rc); |
| 2264 | break; | 2264 | break; |
| 2265 | case BC_KNIL: | 2265 | case BC_KNIL: |
| 2266 | if (LJ_FR2 && ra > J->maxslot) | ||
| 2267 | J->base[ra-1] = 0; | ||
| 2266 | while (ra <= rc) | 2268 | while (ra <= rc) |
| 2267 | J->base[ra++] = TREF_NIL; | 2269 | J->base[ra++] = TREF_NIL; |
| 2268 | if (rc >= J->maxslot) J->maxslot = rc+1; | 2270 | if (rc >= J->maxslot) J->maxslot = rc+1; |
