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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index def3eb2a..0adc2f6b 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -1043,9 +1043,9 @@ dotypecheck:
1043static void asm_cnew(ASMState *as, IRIns *ir) 1043static void asm_cnew(ASMState *as, IRIns *ir)
1044{ 1044{
1045 CTState *cts = ctype_ctsG(J2G(as->J)); 1045 CTState *cts = ctype_ctsG(J2G(as->J));
1046 CTypeID typeid = (CTypeID)IR(ir->op1)->i; 1046 CTypeID ctypeid = (CTypeID)IR(ir->op1)->i;
1047 CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ? 1047 CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ?
1048 lj_ctype_size(cts, typeid) : (CTSize)IR(ir->op2)->i; 1048 lj_ctype_size(cts, ctypeid) : (CTSize)IR(ir->op2)->i;
1049 const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco]; 1049 const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco];
1050 IRRef args[2]; 1050 IRRef args[2];
1051 RegSet allow = (RSET_GPR & ~RSET_SCRATCH); 1051 RegSet allow = (RSET_GPR & ~RSET_SCRATCH);
@@ -1079,11 +1079,11 @@ static void asm_cnew(ASMState *as, IRIns *ir)
1079 ofs -= 4; if (LJ_BE) ir++; else ir--; 1079 ofs -= 4; if (LJ_BE) ir++; else ir--;
1080 } 1080 }
1081 } 1081 }
1082 /* Initialize gct and typeid. lj_mem_newgco() already sets marked. */ 1082 /* Initialize gct and ctypeid. lj_mem_newgco() already sets marked. */
1083 emit_tsi(as, MIPSI_SB, RID_RET+1, RID_RET, offsetof(GCcdata, gct)); 1083 emit_tsi(as, MIPSI_SB, RID_RET+1, RID_RET, offsetof(GCcdata, gct));
1084 emit_tsi(as, MIPSI_SH, RID_TMP, RID_RET, offsetof(GCcdata, typeid)); 1084 emit_tsi(as, MIPSI_SH, RID_TMP, RID_RET, offsetof(GCcdata, ctypeid));
1085 emit_ti(as, MIPSI_LI, RID_RET+1, ~LJ_TCDATA); 1085 emit_ti(as, MIPSI_LI, RID_RET+1, ~LJ_TCDATA);
1086 emit_ti(as, MIPSI_LI, RID_TMP, typeid); /* Lower 16 bit used. Sign-ext ok. */ 1086 emit_ti(as, MIPSI_LI, RID_TMP, ctypeid); /* Lower 16 bit used. Sign-ext ok. */
1087 asm_gencall(as, ci, args); 1087 asm_gencall(as, ci, args);
1088 ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)), 1088 ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)),
1089 ra_releasetmp(as, ASMREF_TMP1)); 1089 ra_releasetmp(as, ASMREF_TMP1));