]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix JIT FPU FETOXM1
authorToni Wilen <twilen@winuae.net>
Wed, 9 May 2018 16:04:44 +0000 (19:04 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 9 May 2018 16:04:44 +0000 (19:04 +0300)
jit/compemu_raw_x86.cpp

index 8f918c8a3686ece7a1c500a6ca65811643c7e09b..1edbfabd122c0a0c3a6b04917141e2f74c5a78ac 100644 (file)
@@ -2752,10 +2752,16 @@ LENDFUNC(NONE,NONE,2,raw_fetox_rr,(FW d, FR s))
        emit_byte(0xe1);    /* fsub x*log2(e) - int(x*log2(e))  */
        emit_byte(0xd9);
        emit_byte(0xf0);    /* f2xm1 (2^frac(x))-1 */
+       emit_byte(0xd8);
+       emit_byte(0x05);
+       emit_long((uae_u32)&one);  /* fadd (2^frac(x))-1 + 1 */
        emit_byte(0xd9);
-       emit_byte(0xfd);    /* fscale ((2^frac(x))-1)*2^int(x*log2(e)) */
+       emit_byte(0xfd);    /* fscale ((2^frac(x)))*2^int(x*log2(e)) */
        emit_byte(0xdd);
        emit_byte(0xd9);    /* fstp copy & pop */
+       emit_byte(0xd8);
+       emit_byte(0x25);
+       emit_long((uae_u32)&one);  /* fsub 1 */
        if (s!=d)
                tos_make(d);    /* store y=(e^x)-1 */
 }