]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
More ppc64-linux function replacement/wrapping stuff.
authorJulian Seward <jseward@acm.org>
Tue, 17 Jan 2006 02:21:09 +0000 (02:21 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 17 Jan 2006 02:21:09 +0000 (02:21 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5536

coregrind/m_trampoline.S
coregrind/pub_core_trampoline.h

index 85428df2c784b68d46dd2f9e11cd73069e069c8a..3416eb4d8664eae2308e7677238feb0a592916ca 100644 (file)
@@ -302,6 +302,11 @@ VG_(trampoline_stuff_end):
 .global VG_(trampoline_stuff_start)
 VG_(trampoline_stuff_start):
 
+       /* See comment in pub_core_trampoline.h for what this is for */
+.global VG_(ppc64_linux_magic_redirect_return_stub)
+VG_(ppc64_linux_magic_redirect_return_stub):
+       trap
+
        /* this function is written using the "dotless" ABI convention */
        .align 2
        .globl VG_(ppc64_linux_REDIR_FOR_strlen)
index 2034c41d86bd7be5179fc6b253c8f7f53b32c353..134a569d81ea570193f7da78d804f7e3b9862589 100644 (file)
@@ -69,6 +69,14 @@ extern void* VG_(ppc32_linux_REDIR_FOR_strchr)( void*, Int );
 #if defined(VGP_ppc64_linux)
 extern UInt  VG_(ppc64_linux_REDIR_FOR_strlen)( void* );
 extern void* VG_(ppc64_linux_REDIR_FOR_strchr)( void*, Int );
+/* A label (sans dot) marking the ultra-magical return stub via which
+   all redirected and wrapped functions are made to "return" on
+   ppc64-linux.  The one insn at this label is never really
+   translated.  Instead, m_translate generates IR to restore the
+   thread's LR and R2 registers from a small stack in the ppc64 guest
+   state structure, and then branch to LR.  Convoluted?  Confusing?
+   You betcha.  Could I think of anything simpler?  No. */
+extern void VG_(ppc64_linux_magic_redirect_return_stub);
 #endif
  
 #endif   // __PUB_CORE_TRAMPOLINE_H