summaryrefslogtreecommitdiff
path: root/src/lj_asm_mips.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm_mips.h')
-rw-r--r--src/lj_asm_mips.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index 0adc2f6b..6163882e 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -769,9 +769,7 @@ nolo:
769 769
770static void asm_newref(ASMState *as, IRIns *ir) 770static void asm_newref(ASMState *as, IRIns *ir)
771{ 771{
772 if (ir->r == RID_SINK) { /* Sink newref. */ 772 if (ir->r != RID_SINK) {
773 return;
774 } else {
775 const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey]; 773 const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_tab_newkey];
776 IRRef args[3]; 774 IRRef args[3];
777 args[0] = ASMREF_L; /* lua_State *L */ 775 args[0] = ASMREF_L; /* lua_State *L */
@@ -893,10 +891,7 @@ static void asm_fload(ASMState *as, IRIns *ir)
893 891
894static void asm_fstore(ASMState *as, IRIns *ir) 892static void asm_fstore(ASMState *as, IRIns *ir)
895{ 893{
896 if (ir->r == RID_SINK) { /* Sink store. */ 894 if (ir->r != RID_SINK) {
897 asm_snap_prep(as);
898 return;
899 } else {
900 Reg src = ra_alloc1z(as, ir->op2, RSET_GPR); 895 Reg src = ra_alloc1z(as, ir->op2, RSET_GPR);
901 IRIns *irf = IR(ir->op1); 896 IRIns *irf = IR(ir->op1);
902 Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src)); 897 Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src));
@@ -916,10 +911,7 @@ static void asm_xload(ASMState *as, IRIns *ir)
916 911
917static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs) 912static void asm_xstore(ASMState *as, IRIns *ir, int32_t ofs)
918{ 913{
919 if (ir->r == RID_SINK) { /* Sink store. */ 914 if (ir->r != RID_SINK) {
920 asm_snap_prep(as);
921 return;
922 } else {
923 Reg src = ra_alloc1z(as, ir->op2, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); 915 Reg src = ra_alloc1z(as, ir->op2, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR);
924 asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1, 916 asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1,
925 rset_exclude(RSET_GPR, src), ofs); 917 rset_exclude(RSET_GPR, src), ofs);
@@ -956,10 +948,8 @@ static void asm_ahustore(ASMState *as, IRIns *ir)
956 RegSet allow = RSET_GPR; 948 RegSet allow = RSET_GPR;
957 Reg idx, src = RID_NONE, type = RID_NONE; 949 Reg idx, src = RID_NONE, type = RID_NONE;
958 int32_t ofs = 0; 950 int32_t ofs = 0;
959 if (ir->r == RID_SINK) { /* Sink store. */ 951 if (ir->r == RID_SINK)
960 asm_snap_prep(as);
961 return; 952 return;
962 }
963 if (irt_isnum(ir->t)) { 953 if (irt_isnum(ir->t)) {
964 src = ra_alloc1(as, ir->op2, RSET_FPR); 954 src = ra_alloc1(as, ir->op2, RSET_FPR);
965 } else { 955 } else {
@@ -1574,9 +1564,7 @@ static void asm_hiop(ASMState *as, IRIns *ir)
1574 return; 1564 return;
1575 } else if ((ir-1)->o == IR_XSTORE) { 1565 } else if ((ir-1)->o == IR_XSTORE) {
1576 as->curins--; /* Handle both stores here. */ 1566 as->curins--; /* Handle both stores here. */
1577 if ((ir-1)->r == RID_SINK) { 1567 if ((ir-1)->r != RID_SINK) {
1578 asm_snap_prep(as);
1579 } else {
1580 asm_xstore(as, ir, LJ_LE ? 4 : 0); 1568 asm_xstore(as, ir, LJ_LE ? 4 : 0);
1581 asm_xstore(as, ir-1, LJ_LE ? 0 : 4); 1569 asm_xstore(as, ir-1, LJ_LE ? 0 : 4);
1582 } 1570 }