From: Mike Pall Date: Tue, 27 May 2014 13:25:34 +0000 (+0200) Subject: x86: Fix code generation for unused result of math.random(). X-Git-Tag: v2.0.4~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc76d540a076e44bd95af939e0675b0a44acf3c0;p=thirdparty%2FLuaJIT.git x86: Fix code generation for unused result of math.random(). --- diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index fda911e5..40f95636 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) lua_assert(!irt_ispri(ir->t)); ra_destreg(as, ir, RID_RET); } - } else if (LJ_32 && irt_isfp(ir->t)) { + } else if (LJ_32 && irt_isfp(ir->t) && !(ci->flags & CCI_CASTU64)) { emit_x87op(as, XI_FPOP); /* Pop unused result from x87 st0. */ } }