|
From: <sv...@va...> - 2006-02-06 05:31:41
|
Author: sewardj
Date: 2006-02-06 05:31:37 +0000 (Mon, 06 Feb 2006)
New Revision: 5615
Log:
Set fpscr back to a known state after running generated code (64-bit mode=
).
Modified:
trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
Modified: trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
=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/coregrind/m_dispatch/dispatch-ppc64-linux.S 2006-02-06 05:14:31=
UTC (rev 5614)
+++ trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S 2006-02-06 05:31:37=
UTC (rev 5615)
@@ -432,19 +432,15 @@
/* We're leaving. Check that nobody messed with
VSCR or FPSCR. */
=20
- /* This check avoidance may be removable if stfiwx is
- implemented. */
-# if 0 //!defined(ENABLE_INNER)
- /* Check FPSCR & 0xFF =3D=3D 0 (lowest 8bits are controls) */
- mffs 4 /* fpscr -> fpr */
- li 5,144 /* =3D> 96(parent_sp) */
- stfiwx 4,5,1 /* fpr to stack */
- lwzx 6,5,1 /* load to gpr */
- andi. 6,6,0xFF /* mask wanted bits */
- cmplwi 6,0x0 /* cmp with zero */
- bne .invariant_violation /* branch if not zero */
-# endif
-
+ /* Set fpscr back to a known state, since vex-generated code
+ may have messed with fpscr[rm]. */
+ li 5,0
+ addi 1,1,-16
+ stw 5,0(1)
+ lfs 3,0(1)
+ addi 1,1,16
+ mtfsf 0xFF,3 /* fpscr =3D f3 */
+=09
/* Using r11 - value used again further on, so don't trash! */
ld 11,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
ld 11,0(11)
|