From: Mike Pall Date: Wed, 22 Jun 2011 15:55:43 +0000 (+0200) Subject: x86/x64: Fix fusion of comparisons with u8/u16 XLOAD. X-Git-Tag: v2.0.0-beta8~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2246db688382ed69e5929f1e698b545e58b5035;p=thirdparty%2FLuaJIT.git x86/x64: Fix fusion of comparisons with u8/u16 XLOAD. --- diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index e5bc4a0e..ba28792d 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h @@ -2037,6 +2037,8 @@ static void asm_comp(ASMState *as, IRIns *ir, uint32_t cc) left = asm_fuseload(as, lref, RSET_GPR); irl->t = origt; if (left == RID_MRM) { /* Fusion succeeded? */ + if (irt_isu8(irl->t) || irt_isu16(irl->t)) + cc >>= 4; /* Need unsigned compare. */ asm_guardcc(as, cc); emit_i8(as, imm); emit_mrm(as, (irt_isi8(origt) || irt_isu8(origt)) ?