Explorar o código

x86: Fix code generation for unused result of math.random().

Mike Pall %!s(int64=11) %!d(string=hai) anos
pai
achega
fc76d540a0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/lj_asm_x86.h

+ 1 - 1
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. */
   }
 }