]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remember to clear C2 after fsincos, as that actually makes it work
authorJulian Seward <jseward@acm.org>
Fri, 1 Apr 2005 20:19:20 +0000 (20:19 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 1 Apr 2005 20:19:20 +0000 (20:19 +0000)
right with reasonable-sized inputs.  This confirms fsincos as the
golden lemon of x87 floating point instructions, since Vex has by now
chomped through vast amounts of floating point code on x86 and this is
the first time this bug has come to light.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1116

VEX/priv/guest-amd64/toIR.c
VEX/priv/guest-x86/toIR.c

index 91846b9a6cb6d1bc187ab0011d6a595c0b58d1d6..6024348f99d8ac68cbe4033daedc84f7e1655f7b 100644 (file)
@@ -4901,6 +4901,7 @@ ULong dis_FPU ( /*OUT*/Bool* decode_ok,
 //..                put_ST_UNCHECKED(0, unop(Iop_SinF64, mkexpr(a1)));
 //..                fp_push();
 //..                put_ST(0, unop(Iop_CosF64, mkexpr(a1)));
+//..                clear_C2(); /* HACK */
 //..                break;
 //..             }
 //.. 
index 37d547880c4d0183196dcab8b3b20ef425d3434d..3766c6e4608df82cc3920d00c31bd9096adaa169 100644 (file)
@@ -4112,6 +4112,7 @@ UInt dis_FPU ( Bool* decode_ok, UChar sorb, UInt delta )
                put_ST_UNCHECKED(0, unop(Iop_SinF64, mkexpr(a1)));
                fp_push();
                put_ST(0, unop(Iop_CosF64, mkexpr(a1)));
+               clear_C2(); /* HACK */
                break;
             }