aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2010-12-06 13:15:53 +0100
committerMike Pall <mike>2010-12-06 13:15:53 +0100
commit5270586a80ff3027cee380936506e6948a7c2e32 (patch)
tree4f5a9d3c54b37d0ae7e088e3cb8acd0652bae195 /src
parent86fd2289f067536c99e677af8cae3f307810b855 (diff)
downloadluajit-5270586a80ff3027cee380936506e6948a7c2e32.tar.gz
luajit-5270586a80ff3027cee380936506e6948a7c2e32.tar.bz2
luajit-5270586a80ff3027cee380936506e6948a7c2e32.zip
Fix XLOAD/XSTORE references.
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index ce42c437..53da1f1d 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -1300,17 +1300,18 @@ static void asm_fusestrref(ASMState *as, IRIns *ir, RegSet allow)
1300static void asm_fusexref(ASMState *as, IRRef ref, RegSet allow) 1300static void asm_fusexref(ASMState *as, IRRef ref, RegSet allow)
1301{ 1301{
1302 IRIns *ir = IR(ref); 1302 IRIns *ir = IR(ref);
1303 as->mrm.idx = RID_NONE;
1303 if (ir->o == IR_KPTR) { 1304 if (ir->o == IR_KPTR) {
1304 as->mrm.ofs = ir->i; 1305 as->mrm.ofs = ir->i;
1305 as->mrm.base = as->mrm.idx = RID_NONE; 1306 as->mrm.base = RID_NONE;
1306 } else if (ir->o == IR_STRREF) { 1307 } else if (ir->o == IR_STRREF) {
1307 asm_fusestrref(as, ir, allow); 1308 asm_fusestrref(as, ir, allow);
1308 } else if (mayfuse(as, ref) && ir->o == IR_ADD && 1309 } else if (mayfuse(as, ref) && ir->o == IR_ADD &&
1309 asm_isk32(as, ir->op2, &as->mrm.ofs)) { 1310 asm_isk32(as, ir->op2, &as->mrm.ofs)) {
1310 /* NYI: gather index and shifts. */ 1311 /* NYI: gather index and shifts. */
1311 as->mrm.idx = RID_NONE;
1312 as->mrm.base = (uint8_t)ra_alloc1(as, ir->op1, allow); 1312 as->mrm.base = (uint8_t)ra_alloc1(as, ir->op1, allow);
1313 } else { 1313 } else {
1314 as->mrm.ofs = 0;
1314 as->mrm.base = (uint8_t)ra_alloc1(as, ref, allow); 1315 as->mrm.base = (uint8_t)ra_alloc1(as, ref, allow);
1315 } 1316 }
1316} 1317}