aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_asm_ppc.h2
-rw-r--r--src/lj_asm_x86.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h
index 676bfcbf..815d9058 100644
--- a/src/lj_asm_ppc.h
+++ b/src/lj_asm_ppc.h
@@ -49,6 +49,8 @@ static void asm_exitstub_setup(ASMState *as, ExitNo nexits)
49{ 49{
50 ExitNo i; 50 ExitNo i;
51 MCode *mxp = as->mctop; 51 MCode *mxp = as->mctop;
52 if (mxp - (nexits + 3 + MCLIM_REDZONE) < as->mclim)
53 asm_mclimit(as);
52 /* 1: mflr r0; bl ->vm_exit_handler; li r0, traceno; bl <1; bl <1; ... */ 54 /* 1: mflr r0; bl ->vm_exit_handler; li r0, traceno; bl <1; bl <1; ... */
53 for (i = nexits-1; (int32_t)i >= 0; i--) 55 for (i = nexits-1; (int32_t)i >= 0; i--)
54 *--mxp = PPCI_BL|(((-3-i)&0x00ffffffu)<<2); 56 *--mxp = PPCI_BL|(((-3-i)&0x00ffffffu)<<2);
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 3e87ba18..12c7a6ba 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -571,7 +571,7 @@ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
571 lua_assert(!irt_ispri(ir->t)); 571 lua_assert(!irt_ispri(ir->t));
572 ra_destreg(as, ir, RID_RET); 572 ra_destreg(as, ir, RID_RET);
573 } 573 }
574 } else if (LJ_32 && irt_isfp(ir->t)) { 574 } else if (LJ_32 && irt_isfp(ir->t) && !(ci->flags & CCI_CASTU64)) {
575 emit_x87op(as, XI_FPOP); /* Pop unused result from x87 st0. */ 575 emit_x87op(as, XI_FPOP); /* Pop unused result from x87 st0. */
576 } 576 }
577} 577}