|
From: <sv...@va...> - 2005-11-13 18:51:37
|
Author: sewardj
Date: 2005-11-13 18:51:31 +0000 (Sun, 13 Nov 2005)
New Revision: 5119
Log:
Hacks to enable self-hosting on amd64, so as to facilitate
cachegrinding it.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_dispatch/dispatch-amd64-linux.S
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.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/coregrind/m_aspacemgr/aspacemgr.c 2005-11-13 18:50:39 UTC (rev =
5118)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-11-13 18:51:31 UTC (rev =
5119)
@@ -1751,9 +1751,12 @@
aspacem_minAddr =3D (Addr) 0x04000000; // 64M
=20
# if VG_WORDSIZE =3D=3D 8
- aspacem_maxAddr =3D (Addr)0x800000000 - 1; // 32G
+ aspacem_maxAddr =3D (Addr)0x800000000 - 1; // 32G
+# ifdef ENABLE_INNER
+ aspacem_maxAddr =3D VG_PGROUNDDN( sp_at_startup ) - 1;
+# endif
# else
- aspacem_maxAddr =3D VG_PGROUNDDN( sp_at_startup ) - 1;
+ aspacem_maxAddr =3D VG_PGROUNDDN( sp_at_startup ) - 1;
# endif
=20
aspacem_cStart =3D aspacem_minAddr; // 64M
Modified: trunk/coregrind/m_dispatch/dispatch-amd64-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-amd64-linux.S 2005-11-13 18:50:39=
UTC (rev 5118)
+++ trunk/coregrind/m_dispatch/dispatch-amd64-linux.S 2005-11-13 18:51:31=
UTC (rev 5119)
@@ -145,11 +145,14 @@
/* We're leaving. Check that nobody messed with
%mxcsr or %fpucw. We can't mess with %rax here as it
holds the tentative return value, but any other is OK. */
+#if !defined(ENABLE_INNER)
+ /* This check fails for self-hosting, so skip in that case */
pushq $0
fstcw (%rsp)
cmpl $0x027F, (%rsp)
popq %r11 /* get rid of the word without trashing %eflags */
jnz invariant_violation
+#endif
pushq $0
stmxcsr (%rsp)
andl $0xFFFFFFC0, (%rsp) /* mask out status flags */
|