aboutsummaryrefslogtreecommitdiff
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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h
index 221e221a..7deeb66e 100644
--- a/src/lj_asm_ppc.h
+++ b/src/lj_asm_ppc.h
@@ -323,8 +323,10 @@ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
323 } else { 323 } else {
324 ra_destreg(as, ir, RID_FPRET); 324 ra_destreg(as, ir, RID_FPRET);
325 } 325 }
326#if LJ_32
326 } else if (hiop) { 327 } else if (hiop) {
327 ra_destpair(as, ir); 328 ra_destpair(as, ir);
329#endif
328 } else { 330 } else {
329 ra_destreg(as, ir, RID_RET); 331 ra_destreg(as, ir, RID_RET);
330 } 332 }
@@ -343,7 +345,7 @@ static void asm_callx(ASMState *as, IRIns *ir)
343 func = ir->op2; irf = IR(func); 345 func = ir->op2; irf = IR(func);
344 if (irf->o == IR_CARG) { func = irf->op1; irf = IR(func); } 346 if (irf->o == IR_CARG) { func = irf->op1; irf = IR(func); }
345 if (irref_isk(func)) { /* Call to constant address. */ 347 if (irref_isk(func)) { /* Call to constant address. */
346 ci.func = (ASMFunction)(void *)(irf->i); 348 ci.func = (ASMFunction)(void *)(intptr_t)(irf->i);
347 } else { /* Need a non-argument register for indirect calls. */ 349 } else { /* Need a non-argument register for indirect calls. */
348 RegSet allow = RSET_GPR & ~RSET_RANGE(RID_R0, REGARG_LASTGPR+1); 350 RegSet allow = RSET_GPR & ~RSET_RANGE(RID_R0, REGARG_LASTGPR+1);
349 Reg freg = ra_alloc1(as, func, allow); 351 Reg freg = ra_alloc1(as, func, allow);
@@ -527,7 +529,7 @@ static void asm_tvptr(ASMState *as, Reg dest, IRRef ref)
527 /* Otherwise use g->tmptv to hold the TValue. */ 529 /* Otherwise use g->tmptv to hold the TValue. */
528 RegSet allow = rset_exclude(RSET_GPR, dest); 530 RegSet allow = rset_exclude(RSET_GPR, dest);
529 Reg type; 531 Reg type;
530 emit_tai(as, PPCI_ADDI, dest, RID_JGL, offsetof(global_State, tmptv)-32768); 532 emit_tai(as, PPCI_ADDI, dest, RID_JGL, (int32_t)offsetof(global_State, tmptv)-32768);
531 if (!irt_ispri(ir->t)) { 533 if (!irt_ispri(ir->t)) {
532 Reg src = ra_alloc1(as, ref, allow); 534 Reg src = ra_alloc1(as, ref, allow);
533 emit_setgl(as, src, tmptv.gcr); 535 emit_setgl(as, src, tmptv.gcr);