mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
x86/x64: Fix fusion of unsigned byte comparisons with swapped ops.
This commit is contained in:
parent
e44cb53874
commit
08d8ec0648
@ -2067,8 +2067,8 @@ static void asm_comp(ASMState *as, IRIns *ir, uint32_t cc)
|
|||||||
lua_assert(irt_is64(ir->t) || irt_isint(ir->t) || irt_isaddr(ir->t));
|
lua_assert(irt_is64(ir->t) || irt_isint(ir->t) || irt_isaddr(ir->t));
|
||||||
/* Swap constants (only for ABC) and fusable loads to the right. */
|
/* Swap constants (only for ABC) and fusable loads to the right. */
|
||||||
if (irref_isk(lref) || (!irref_isk(rref) && opisfusableload(leftop))) {
|
if (irref_isk(lref) || (!irref_isk(rref) && opisfusableload(leftop))) {
|
||||||
if ((cc & 0xc) == 0xc) cc ^= 3; /* L <-> G, LE <-> GE */
|
if ((cc & 0xc) == 0xc) cc ^= 0x53; /* L <-> G, LE <-> GE */
|
||||||
else if ((cc & 0xa) == 0x2) cc ^= 5; /* A <-> B, AE <-> BE */
|
else if ((cc & 0xa) == 0x2) cc ^= 0x55; /* A <-> B, AE <-> BE */
|
||||||
lref = ir->op2; rref = ir->op1;
|
lref = ir->op2; rref = ir->op1;
|
||||||
}
|
}
|
||||||
if (asm_isk32(as, rref, &imm)) {
|
if (asm_isk32(as, rref, &imm)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user