From eb7b452d5393993dc568683b05cbb7b3c4f4f5d0 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Fri, 29 Apr 2011 19:35:25 +0200 Subject: [PATCH] x86: Pop unused FP result from x87 stack. --- src/lj_asm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lj_asm.c b/src/lj_asm.c index a69f4461..d5e74185 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c @@ -1578,6 +1578,8 @@ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) lua_assert(!irt_ispri(ir->t)); ra_destreg(as, ir, RID_RET); } + } else if (LJ_32 && irt_isfp(ir->t)) { + emit_x87op(as, XI_FPOP); /* Pop unused result from x87 st0. */ } }