summaryrefslogtreecommitdiff
path: root/src/lj_asm_ppc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm_ppc.h')
-rw-r--r--src/lj_asm_ppc.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h
index 142ef212..85b87bd5 100644
--- a/src/lj_asm_ppc.h
+++ b/src/lj_asm_ppc.h
@@ -1086,9 +1086,9 @@ dotypecheck:
1086static void asm_cnew(ASMState *as, IRIns *ir) 1086static void asm_cnew(ASMState *as, IRIns *ir)
1087{ 1087{
1088 CTState *cts = ctype_ctsG(J2G(as->J)); 1088 CTState *cts = ctype_ctsG(J2G(as->J));
1089 CTypeID typeid = (CTypeID)IR(ir->op1)->i; 1089 CTypeID ctypeid = (CTypeID)IR(ir->op1)->i;
1090 CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ? 1090 CTSize sz = (ir->o == IR_CNEWI || ir->op2 == REF_NIL) ?
1091 lj_ctype_size(cts, typeid) : (CTSize)IR(ir->op2)->i; 1091 lj_ctype_size(cts, ctypeid) : (CTSize)IR(ir->op2)->i;
1092 const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco]; 1092 const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco];
1093 IRRef args[2]; 1093 IRRef args[2];
1094 RegSet allow = (RSET_GPR & ~RSET_SCRATCH); 1094 RegSet allow = (RSET_GPR & ~RSET_SCRATCH);
@@ -1121,11 +1121,11 @@ static void asm_cnew(ASMState *as, IRIns *ir)
1121 ofs -= 4; ir++; 1121 ofs -= 4; ir++;
1122 } 1122 }
1123 } 1123 }
1124 /* Initialize gct and typeid. lj_mem_newgco() already sets marked. */ 1124 /* Initialize gct and ctypeid. lj_mem_newgco() already sets marked. */
1125 emit_tai(as, PPCI_STB, RID_RET+1, RID_RET, offsetof(GCcdata, gct)); 1125 emit_tai(as, PPCI_STB, RID_RET+1, RID_RET, offsetof(GCcdata, gct));
1126 emit_tai(as, PPCI_STH, RID_TMP, RID_RET, offsetof(GCcdata, typeid)); 1126 emit_tai(as, PPCI_STH, RID_TMP, RID_RET, offsetof(GCcdata, ctypeid));
1127 emit_ti(as, PPCI_LI, RID_RET+1, ~LJ_TCDATA); 1127 emit_ti(as, PPCI_LI, RID_RET+1, ~LJ_TCDATA);
1128 emit_ti(as, PPCI_LI, RID_TMP, typeid); /* Lower 16 bit used. Sign-ext ok. */ 1128 emit_ti(as, PPCI_LI, RID_TMP, ctypeid); /* Lower 16 bit used. Sign-ext ok. */
1129 asm_gencall(as, ci, args); 1129 asm_gencall(as, ci, args);
1130 ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)), 1130 ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)),
1131 ra_releasetmp(as, ASMREF_TMP1)); 1131 ra_releasetmp(as, ASMREF_TMP1));