diff options
author | Mike Pall <mike> | 2014-05-27 15:25:34 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2014-05-27 15:25:34 +0200 |
commit | fc76d540a076e44bd95af939e0675b0a44acf3c0 (patch) | |
tree | e505e4f7f765dac9ec180c8fa862834b55bb2a7e | |
parent | e15765186c9e6a02cea1479e91ca6b02a23d8677 (diff) | |
download | luajit-fc76d540a076e44bd95af939e0675b0a44acf3c0.tar.gz luajit-fc76d540a076e44bd95af939e0675b0a44acf3c0.tar.bz2 luajit-fc76d540a076e44bd95af939e0675b0a44acf3c0.zip |
x86: Fix code generation for unused result of math.random().
-rw-r--r-- | src/lj_asm_x86.h | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
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 | } |