aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm_arm.h')
-rw-r--r--src/lj_asm_arm.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h
index c64d59e7..23f42919 100644
--- a/src/lj_asm_arm.h
+++ b/src/lj_asm_arm.h
@@ -997,22 +997,26 @@ static ARMIns asm_fxstoreins(IRIns *ir)
997 997
998static void asm_fload(ASMState *as, IRIns *ir) 998static void asm_fload(ASMState *as, IRIns *ir)
999{ 999{
1000 Reg dest = ra_dest(as, ir, RSET_GPR); 1000 if (ir->op1 == REF_NIL) {
1001 Reg idx = ra_alloc1(as, ir->op1, RSET_GPR); 1001 lua_assert(!ra_used(ir)); /* We can end up here if DCE is turned off. */
1002 ARMIns ai = asm_fxloadins(ir); 1002 } else {
1003 int32_t ofs; 1003 Reg dest = ra_dest(as, ir, RSET_GPR);
1004 if (ir->op2 == IRFL_TAB_ARRAY) { 1004 Reg idx = ra_alloc1(as, ir->op1, RSET_GPR);
1005 ofs = asm_fuseabase(as, ir->op1); 1005 ARMIns ai = asm_fxloadins(ir);
1006 if (ofs) { /* Turn the t->array load into an add for colocated arrays. */ 1006 int32_t ofs;
1007 emit_dn(as, ARMI_ADD|ARMI_K12|ofs, dest, idx); 1007 if (ir->op2 == IRFL_TAB_ARRAY) {
1008 return; 1008 ofs = asm_fuseabase(as, ir->op1);
1009 if (ofs) { /* Turn the t->array load into an add for colocated arrays. */
1010 emit_dn(as, ARMI_ADD|ARMI_K12|ofs, dest, idx);
1011 return;
1012 }
1009 } 1013 }
1014 ofs = field_ofs[ir->op2];
1015 if ((ai & 0x04000000))
1016 emit_lso(as, ai, dest, idx, ofs);
1017 else
1018 emit_lsox(as, ai, dest, idx, ofs);
1010 } 1019 }
1011 ofs = field_ofs[ir->op2];
1012 if ((ai & 0x04000000))
1013 emit_lso(as, ai, dest, idx, ofs);
1014 else
1015 emit_lsox(as, ai, dest, idx, ofs);
1016} 1020}
1017 1021
1018static void asm_fstore(ASMState *as, IRIns *ir) 1022static void asm_fstore(ASMState *as, IRIns *ir)