aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm_x86.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 303d129f..941d0919 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -1731,8 +1731,12 @@ static void asm_intarith(ASMState *as, IRIns *ir, x86Arith xa)
1731 Reg dest, right; 1731 Reg dest, right;
1732 int32_t k = 0; 1732 int32_t k = 0;
1733 if (as->flagmcp == as->mcp) { /* Drop test r,r instruction. */ 1733 if (as->flagmcp == as->mcp) { /* Drop test r,r instruction. */
1734 as->flagmcp = NULL; 1734 MCode *p = as->mcp + ((LJ_64 && *as->mcp < XI_TESTb) ? 3 : 2);
1735 as->mcp += (LJ_64 && *as->mcp < XI_TESTb) ? 3 : 2; 1735 if ((p[1] & 15) < 14) {
1736 if ((p[1] & 15) >= 12) p[1] -= 4; /* L <->S, NL <-> NS */
1737 as->flagmcp = NULL;
1738 as->mcp = p;
1739 } /* else: cannot transform LE/NLE to cc without use of OF. */
1736 } 1740 }
1737 right = IR(rref)->r; 1741 right = IR(rref)->r;
1738 if (ra_hasreg(right)) { 1742 if (ra_hasreg(right)) {