]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
x64: Fix math.random() code generation.
authorMike Pall <mike>
Sat, 22 Oct 2011 00:01:44 +0000 (02:01 +0200)
committerMike Pall <mike>
Sat, 22 Oct 2011 00:01:44 +0000 (02:01 +0200)
src/lj_asm_x86.h

index ae90309bff7907fec3eb2424b49850cdb7bd1496..45afdc8843034645bc406a0934cd5523d48df942 100644 (file)
@@ -463,9 +463,8 @@ static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci)
          ra_free(as, dest);
          ra_modified(as, dest);
          emit_rr(as, XO_MOVD, dest|REX_64, RID_RET);  /* Really MOVQ. */
-       } else {
-         emit_movtomro(as, RID_RET|REX_64, RID_ESP, ofs);
        }
+       if (ofs) emit_movtomro(as, RID_RET|REX_64, RID_ESP, ofs);
       } else {
        ra_destreg(as, ir, RID_FPRET);
       }