diff options
author | Mike Pall <mike> | 2016-10-19 09:48:38 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2016-10-19 09:48:38 +0200 |
commit | bdcaf4bfd97d61461a5bc892d5fed3b0ac7ff256 (patch) | |
tree | 2ff2803ccaefc5c238704adb4114f8aea59d80e2 /src/lj_asm_x86.h | |
parent | 6a25014c1c33448cabdc013ccb9e5c4fc98a0238 (diff) | |
download | luajit-bdcaf4bfd97d61461a5bc892d5fed3b0ac7ff256.tar.gz luajit-bdcaf4bfd97d61461a5bc892d5fed3b0ac7ff256.tar.bz2 luajit-bdcaf4bfd97d61461a5bc892d5fed3b0ac7ff256.zip |
LJ_GC64: Fix HREF for pointers.
Contributed by Peter Cawley.
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r-- | src/lj_asm_x86.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index 50784daa..7931ffb5 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h | |||
@@ -1246,7 +1246,18 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge) | |||
1246 | #endif | 1246 | #endif |
1247 | } else { | 1247 | } else { |
1248 | emit_rr(as, XO_MOV, tmp, key); | 1248 | emit_rr(as, XO_MOV, tmp, key); |
1249 | #if LJ_GC64 | ||
1250 | emit_gri(as, XG_ARITHi(XOg_XOR), dest, irt_toitype(kt) << 15); | ||
1251 | if ((as->flags & JIT_F_BMI2)) { | ||
1252 | emit_i8(as, 32); | ||
1253 | emit_mrm(as, XV_RORX|VEX_64, dest, key); | ||
1254 | } else { | ||
1255 | emit_shifti(as, XOg_SHR|REX_64, dest, 32); | ||
1256 | emit_rr(as, XO_MOV, dest|REX_64, key|REX_64); | ||
1257 | } | ||
1258 | #else | ||
1249 | emit_rmro(as, XO_LEA, dest, key, HASH_BIAS); | 1259 | emit_rmro(as, XO_LEA, dest, key, HASH_BIAS); |
1260 | #endif | ||
1250 | } | 1261 | } |
1251 | } | 1262 | } |
1252 | } | 1263 | } |