]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Hacks to enable self-hosting on amd64, so as to facilitate
authorJulian Seward <jseward@acm.org>
Sun, 13 Nov 2005 18:51:31 +0000 (18:51 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 13 Nov 2005 18:51:31 +0000 (18:51 +0000)
cachegrinding it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5119

coregrind/m_aspacemgr/aspacemgr.c
coregrind/m_dispatch/dispatch-amd64-linux.S

index 1a419d7dc95010dcce0e9840ae9b86a7fad6567e..693a784a5e65b6aef3128a476fb35f2d18d15e3a 100644 (file)
@@ -1751,9 +1751,12 @@ Addr VG_(am_startup) ( Addr sp_at_startup )
    aspacem_minAddr = (Addr) 0x04000000; // 64M
 
 #  if VG_WORDSIZE == 8
-   aspacem_maxAddr = (Addr)0x800000000 - 1; // 32G
+     aspacem_maxAddr = (Addr)0x800000000 - 1; // 32G
+#    ifdef ENABLE_INNER
+     aspacem_maxAddr = VG_PGROUNDDN( sp_at_startup ) - 1;
+#    endif
 #  else
-   aspacem_maxAddr = VG_PGROUNDDN( sp_at_startup ) - 1;
+     aspacem_maxAddr = VG_PGROUNDDN( sp_at_startup ) - 1;
 #  endif
 
    aspacem_cStart = aspacem_minAddr; // 64M
index 2f661be5f8e4f126bb4c90bbf78f1b3e1127f0f2..f3169a594ffa40c4039fc6c8eaa02a2cb35c2db2 100644 (file)
@@ -145,11 +145,14 @@ run_innerloop_exit:
        /* 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 */