aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_asm_mips.h12
-rw-r--r--src/vm_mips.dasc2
2 files changed, 6 insertions, 8 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index 6163882e..299b4439 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -364,15 +364,13 @@ static void asm_callid(ASMState *as, IRIns *ir, IRCallID id)
364static void asm_callround(ASMState *as, IRIns *ir, IRCallID id) 364static void asm_callround(ASMState *as, IRIns *ir, IRCallID id)
365{ 365{
366 /* The modified regs must match with the *.dasc implementation. */ 366 /* The modified regs must match with the *.dasc implementation. */
367 RegSet drop = RID2RSET(RID_R1)|RID2RSET(RID_R12)|RID2RSET(RID_F2)| 367 RegSet drop = RID2RSET(RID_R1)|RID2RSET(RID_R12)|RID2RSET(RID_FPRET)|
368 RID2RSET(RID_F4)|RID2RSET(RID_F12)|RID2RSET(RID_F14); 368 RID2RSET(RID_F2)|RID2RSET(RID_F4)|RID2RSET(REGARG_FIRSTFPR);
369 const CCallInfo *ci = &lj_ir_callinfo[id]; 369 if (ra_hasreg(ir->r)) rset_clear(drop, ir->r);
370 IRRef args[2];
371 args[0] = ir->op1;
372 args[1] = ir->op2;
373 ra_evictset(as, drop); 370 ra_evictset(as, drop);
374 ra_destreg(as, ir, RID_FPRET); 371 ra_destreg(as, ir, RID_FPRET);
375 asm_gencall(as, ci, args); 372 emit_call(as, (void *)lj_ir_callinfo[id].func);
373 ra_leftov(as, REGARG_FIRSTFPR, ir->op1);
376} 374}
377 375
378/* -- Returns ------------------------------------------------------------- */ 376/* -- Returns ------------------------------------------------------------- */
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc
index 23692e34..46038c36 100644
--- a/src/vm_mips.dasc
+++ b/src/vm_mips.dasc
@@ -2154,7 +2154,7 @@ static void build_subroutines(BuildCtx *ctx)
2154 |//-- Math helper functions ---------------------------------------------- 2154 |//-- Math helper functions ----------------------------------------------
2155 |//----------------------------------------------------------------------- 2155 |//-----------------------------------------------------------------------
2156 | 2156 |
2157 |// Modifies AT, TMP0, FRET1, FRET2, f4. Keeps all others incl. FARG1, FARG2. 2157 |// Modifies AT, TMP0, FRET1, FRET2, f4. Keeps all others incl. FARG1.
2158 |.macro vm_round, func 2158 |.macro vm_round, func
2159 | lui TMP0, 0x4330 // Hiword of 2^52 (double). 2159 | lui TMP0, 0x4330 // Hiword of 2^52 (double).
2160 | mtc1 r0, f4 2160 | mtc1 r0, f4