diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_asm_ppc.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h index e270b36c..46821515 100644 --- a/src/lj_asm_ppc.h +++ b/src/lj_asm_ppc.h | |||
@@ -804,17 +804,23 @@ static PPCIns asm_fxstoreins(IRIns *ir) | |||
804 | static void asm_fload(ASMState *as, IRIns *ir) | 804 | static void asm_fload(ASMState *as, IRIns *ir) |
805 | { | 805 | { |
806 | Reg dest = ra_dest(as, ir, RSET_GPR); | 806 | Reg dest = ra_dest(as, ir, RSET_GPR); |
807 | Reg idx = ra_alloc1(as, ir->op1, RSET_GPR); | ||
808 | PPCIns pi = asm_fxloadins(ir); | 807 | PPCIns pi = asm_fxloadins(ir); |
808 | Reg idx; | ||
809 | int32_t ofs; | 809 | int32_t ofs; |
810 | if (ir->op2 == IRFL_TAB_ARRAY) { | 810 | if (ir->op1 == REF_NIL) { |
811 | ofs = asm_fuseabase(as, ir->op1); | 811 | idx = RID_JGL; |
812 | if (ofs) { /* Turn the t->array load into an add for colocated arrays. */ | 812 | ofs = ir->op2 - 32768; |
813 | emit_tai(as, PPCI_ADDI, dest, idx, ofs); | 813 | } else { |
814 | return; | 814 | idx = ra_alloc1(as, ir->op1, RSET_GPR); |
815 | if (ir->op2 == IRFL_TAB_ARRAY) { | ||
816 | ofs = asm_fuseabase(as, ir->op1); | ||
817 | if (ofs) { /* Turn the t->array load into an add for colocated arrays. */ | ||
818 | emit_tai(as, PPCI_ADDI, dest, idx, ofs); | ||
819 | return; | ||
820 | } | ||
815 | } | 821 | } |
822 | ofs = field_ofs[ir->op2]; | ||
816 | } | 823 | } |
817 | ofs = field_ofs[ir->op2]; | ||
818 | lua_assert(!irt_isi8(ir->t)); | 824 | lua_assert(!irt_isi8(ir->t)); |
819 | emit_tai(as, pi, dest, idx, ofs); | 825 | emit_tai(as, pi, dest, idx, ofs); |
820 | } | 826 | } |