summaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
authorMike Pall <mike>2012-07-16 23:43:03 +0200
committerMike Pall <mike>2012-07-16 23:43:03 +0200
commit08d8ec0648daaf9a80e6a734630cec3c877377b3 (patch)
treeebc030484a7856a6af341308097b9f9606396c90 /src/lj_asm_x86.h
parente44cb538745f5287d030193ab967e493ebd8f98d (diff)
downloadluajit-08d8ec0648daaf9a80e6a734630cec3c877377b3.tar.gz
luajit-08d8ec0648daaf9a80e6a734630cec3c877377b3.tar.bz2
luajit-08d8ec0648daaf9a80e6a734630cec3c877377b3.zip
x86/x64: Fix fusion of unsigned byte comparisons with swapped ops.
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r--src/lj_asm_x86.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 86dc7af2..c68768b4 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -2067,8 +2067,8 @@ static void asm_comp(ASMState *as, IRIns *ir, uint32_t cc)
2067 lua_assert(irt_is64(ir->t) || irt_isint(ir->t) || irt_isaddr(ir->t)); 2067 lua_assert(irt_is64(ir->t) || irt_isint(ir->t) || irt_isaddr(ir->t));
2068 /* Swap constants (only for ABC) and fusable loads to the right. */ 2068 /* Swap constants (only for ABC) and fusable loads to the right. */
2069 if (irref_isk(lref) || (!irref_isk(rref) && opisfusableload(leftop))) { 2069 if (irref_isk(lref) || (!irref_isk(rref) && opisfusableload(leftop))) {
2070 if ((cc & 0xc) == 0xc) cc ^= 3; /* L <-> G, LE <-> GE */ 2070 if ((cc & 0xc) == 0xc) cc ^= 0x53; /* L <-> G, LE <-> GE */
2071 else if ((cc & 0xa) == 0x2) cc ^= 5; /* A <-> B, AE <-> BE */ 2071 else if ((cc & 0xa) == 0x2) cc ^= 0x55; /* A <-> B, AE <-> BE */
2072 lref = ir->op2; rref = ir->op1; 2072 lref = ir->op2; rref = ir->op1;
2073 } 2073 }
2074 if (asm_isk32(as, rref, &imm)) { 2074 if (asm_isk32(as, rref, &imm)) {