]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Counterpart to r5202: restore previous assembler state with .previous
authorJulian Seward <jseward@acm.org>
Sat, 19 Nov 2005 02:02:57 +0000 (02:02 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 19 Nov 2005 02:02:57 +0000 (02:02 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5204

coregrind/m_main.c
coregrind/m_signals.c
coregrind/m_syscall.c
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-x86-linux.c

index 71bd0e2e24de62eef5d701ccd9d3a03afd787b6a..8f4b4b7c75bdd44001cfe767fb032b96421428b8 100644 (file)
@@ -2801,6 +2801,7 @@ asm("\n"
     "\tpushl %eax\n"
     "\tcall  _start_in_C\n"
     "\thlt\n"
+    ".previous\n"
 );
 #elif defined(VGP_amd64_linux)
 asm("\n"
@@ -2818,6 +2819,7 @@ asm("\n"
     /* call _start_in_C, passing it the startup %rsp */
     "\tcall  _start_in_C\n"
     "\thlt\n"
+    ".previous\n"
 );
 #elif defined(VGP_ppc32_linux)
 asm("\n"
@@ -2843,6 +2845,7 @@ asm("\n"
     "\tmr 1,16\n"
     "\tbl _start_in_C\n"
     "\ttrap\n"
+    ".previous\n"
 );
 #else
 #error "_start: needs implementation on this platform"
index 272887f6a515fbfebf3323904f22c5539ae568f1..9dcf1879fed9c17919828d65d4dfc015e0b37d8b 100644 (file)
@@ -400,19 +400,22 @@ extern void my_sigreturn(void);
    ".text\n" \
    "my_sigreturn:\n" \
    "   movl    $" #name ", %eax\n" \
-   "   int     $0x80\n"
+   "   int     $0x80\n" \
+   ".previous\n"
 #elif defined(VGP_amd64_linux)
 #  define _MYSIG(name) \
    ".text\n" \
    "my_sigreturn:\n" \
    "   movq    $" #name ", %rax\n" \
-   "   syscall\n"
+   "   syscall\n" \
+   ".previous\n"
 #elif defined(VGP_ppc32_linux)
 #  define _MYSIG(name) \
    ".text\n" \
    "my_sigreturn:\n" \
    "   li      0, " #name "\n" \
-   "   sc\n"
+   "   sc\n" \
+   ".previous\n"
 #else
 #  error Unknown platform
 #endif
index 084604c9974749fbdb4c7eedcc9d0070a253bb8b..fa94a4b8561542d3258992a507d22901ab3e9f65 100644 (file)
@@ -130,6 +130,7 @@ asm(
 "      popl    %edi\n"
 "      popl    %esi\n"
 "      ret\n"
+".previous\n"
 );
 #elif defined(VGP_amd64_linux)
 /* Incoming args (syscall number + up to 6 args) come in %rdi, %rsi,
@@ -163,6 +164,7 @@ asm(
 "      movq    8(%rsp), %r9\n"  /* last arg from stack */
 "      syscall\n"
 "      ret\n"
+".previous\n"
 );
 #elif defined(VGP_ppc32_linux)
 /* Incoming args (syscall number + up to 6 args) come in %r0, %r3:%r8
@@ -194,6 +196,7 @@ asm(
 "        mfcr    4\n"           /* %cr -> low word of return var          */
 "        rlwinm  4,4,4,31,31\n" /* rotate flag bit so to lsb, and mask it */
 "        blr\n"                 /* and return                             */
+".previous\n"
 );
 #else
 #  error Unknown platform
index dd64dedfb41b8768706b78bd68d73a27103deb14..11e7e654118f2bf2a90f7251d9d7e455ad9d4b4f 100644 (file)
@@ -95,6 +95,7 @@ asm(
 "   popq   %rdi\n"         // arg1 to correct arg reg
 "   ret\n"                 // jump to f
 "   ud2\n"                 // should never get here
+".previous\n"
 );
 
 /*
@@ -171,6 +172,7 @@ asm(
 
 "1:\n"  // PARENT or ERROR
 "       ret\n"
+".previous\n"
 );
 
 #undef __NR_CLONE
index a6160f088f9287862fc8beb3c10774b1e1c6698a..63ed323ed33e563bb3e6f107c789e7fed3c4e228 100644 (file)
@@ -110,6 +110,7 @@ asm(
 "   mtcr 0\n\t"            // CAB: Need this?
 "   bctr\n\t"              // jump to dst
 "   trap\n"                // should never get here
+".previous\n"
 );
 
 
@@ -206,6 +207,7 @@ asm(
 "       lwz     31,28(1)\n"
 "       addi    1,1,32\n"
 "       blr\n"
+".previous\n"
 );
 
 #undef __NR_CLONE
index d65ece209e41e40164b9cb1a53c9990a262c714a..8f1ecf51194450b852937d91b03ce0b269d2df1b 100644 (file)
@@ -95,6 +95,7 @@ asm(
 "   movl $0, %ebp\n"
 "   ret\n"                 // jump to f
 "   ud2\n"                 // should never get here
+".previous\n"
 );
 
 
@@ -178,6 +179,7 @@ asm(
 "        pop     %edi\n"
 "        pop     %ebx\n"
 "        ret\n"
+".previous\n"
 );
 
 #undef FSZ