|
From: <sv...@va...> - 2005-04-01 20:19:40
|
Author: sewardj
Date: 2005-04-01 21:19:20 +0100 (Fri, 01 Apr 2005)
New Revision: 1116
Modified:
trunk/priv/guest-amd64/toIR.c
trunk/priv/guest-x86/toIR.c
Log:
Remember to clear C2 after fsincos, as that actually makes it work
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.
Modified: trunk/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/toIR.c 2005-03-30 23:20:47 UTC (rev 1115)
+++ trunk/priv/guest-amd64/toIR.c 2005-04-01 20:19:20 UTC (rev 1116)
@@ -4901,6 +4901,7 @@
//.. put_ST_UNCHECKED(0, unop(Iop_SinF64, mkexpr(a1)));
//.. fp_push();
//.. put_ST(0, unop(Iop_CosF64, mkexpr(a1)));
+//.. clear_C2(); /* HACK */
//.. break;
//.. }
//..=20
Modified: trunk/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/toIR.c 2005-03-30 23:20:47 UTC (rev 1115)
+++ trunk/priv/guest-x86/toIR.c 2005-04-01 20:19:20 UTC (rev 1116)
@@ -4112,6 +4112,7 @@
put_ST_UNCHECKED(0, unop(Iop_SinF64, mkexpr(a1)));
fp_push();
put_ST(0, unop(Iop_CosF64, mkexpr(a1)));
+ clear_C2(); /* HACK */
break;
}
=20
|