summaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
authorMike Pall <mike>2012-07-17 22:20:03 +0200
committerMike Pall <mike>2012-07-17 22:22:07 +0200
commit4d9c29a78cde2596ea3286744d93d29dd2a6d9ca (patch)
tree62af9fd2c6765a06005f8fa8ed00a1b491c0a356 /src/lj_asm_x86.h
parent2139c6791f4b802560ce62dc688293786803a9ca (diff)
downloadluajit-4d9c29a78cde2596ea3286744d93d29dd2a6d9ca.tar.gz
luajit-4d9c29a78cde2596ea3286744d93d29dd2a6d9ca.tar.bz2
luajit-4d9c29a78cde2596ea3286744d93d29dd2a6d9ca.zip
FFI: Box all accessed or returned enums.
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r--src/lj_asm_x86.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index c68768b4..ceeefbee 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -337,7 +337,7 @@ static Reg asm_fuseload(ASMState *as, IRRef ref, RegSet allow)
337 } 337 }
338 } else if (ir->o == IR_FLOAD) { 338 } else if (ir->o == IR_FLOAD) {
339 /* Generic fusion is only ok for 32 bit operand (but see asm_comp). */ 339 /* Generic fusion is only ok for 32 bit operand (but see asm_comp). */
340 if ((irt_isint(ir->t) || irt_isaddr(ir->t)) && 340 if ((irt_isint(ir->t) || irt_isu32(ir->t) || irt_isaddr(ir->t)) &&
341 noconflict(as, ref, IR_FSTORE, 0)) { 341 noconflict(as, ref, IR_FSTORE, 0)) {
342 asm_fusefref(as, ir, xallow); 342 asm_fusefref(as, ir, xallow);
343 return RID_MRM; 343 return RID_MRM;
@@ -2064,7 +2064,8 @@ static void asm_comp(ASMState *as, IRIns *ir, uint32_t cc)
2064 IROp leftop = (IROp)(IR(lref)->o); 2064 IROp leftop = (IROp)(IR(lref)->o);
2065 Reg r64 = REX_64IR(ir, 0); 2065 Reg r64 = REX_64IR(ir, 0);
2066 int32_t imm = 0; 2066 int32_t imm = 0;
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) ||
2068 irt_isu32(ir->t) || irt_isaddr(ir->t));
2068 /* Swap constants (only for ABC) and fusable loads to the right. */ 2069 /* Swap constants (only for ABC) and fusable loads to the right. */
2069 if (irref_isk(lref) || (!irref_isk(rref) && opisfusableload(leftop))) { 2070 if (irref_isk(lref) || (!irref_isk(rref) && opisfusableload(leftop))) {
2070 if ((cc & 0xc) == 0xc) cc ^= 0x53; /* L <-> G, LE <-> GE */ 2071 if ((cc & 0xc) == 0xc) cc ^= 0x53; /* L <-> G, LE <-> GE */