aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r--src/lj_asm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index 50f877e7..20d26278 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -1105,7 +1105,7 @@ static void asm_fuseahuref(ASMState *as, IRRef ref, RegSet allow)
1105 case IR_UREFC: 1105 case IR_UREFC:
1106 if (irref_isk(ir->op1)) { 1106 if (irref_isk(ir->op1)) {
1107 GCfunc *fn = ir_kfunc(IR(ir->op1)); 1107 GCfunc *fn = ir_kfunc(IR(ir->op1));
1108 GCupval *uv = &gcref(fn->l.uvptr[ir->op2])->uv; 1108 GCupval *uv = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv;
1109 as->mrm.ofs = ptr2addr(&uv->tv); 1109 as->mrm.ofs = ptr2addr(&uv->tv);
1110 as->mrm.base = as->mrm.idx = RID_NONE; 1110 as->mrm.base = as->mrm.idx = RID_NONE;
1111 return; 1111 return;
@@ -1702,7 +1702,7 @@ static void asm_uref(ASMState *as, IRIns *ir)
1702 Reg dest = ra_dest(as, ir, RSET_GPR); 1702 Reg dest = ra_dest(as, ir, RSET_GPR);
1703 if (irref_isk(ir->op1)) { 1703 if (irref_isk(ir->op1)) {
1704 GCfunc *fn = ir_kfunc(IR(ir->op1)); 1704 GCfunc *fn = ir_kfunc(IR(ir->op1));
1705 MRef *v = &gcref(fn->l.uvptr[ir->op2])->uv.v; 1705 MRef *v = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.v;
1706 emit_rma(as, XO_MOV, dest, v); 1706 emit_rma(as, XO_MOV, dest, v);
1707 } else { 1707 } else {
1708 Reg uv = ra_scratch(as, RSET_GPR); 1708 Reg uv = ra_scratch(as, RSET_GPR);
@@ -1716,7 +1716,7 @@ static void asm_uref(ASMState *as, IRIns *ir)
1716 emit_rmro(as, XO_MOV, dest, uv, offsetof(GCupval, v)); 1716 emit_rmro(as, XO_MOV, dest, uv, offsetof(GCupval, v));
1717 } 1717 }
1718 emit_rmro(as, XO_MOV, uv, func, 1718 emit_rmro(as, XO_MOV, uv, func,
1719 (int32_t)offsetof(GCfuncL, uvptr) + 4*(int32_t)ir->op2); 1719 (int32_t)offsetof(GCfuncL, uvptr) + 4*(int32_t)(ir->op2 >> 8));
1720 } 1720 }
1721 } 1721 }
1722} 1722}