From: Julian Seward Date: Tue, 17 Jan 2006 02:21:09 +0000 (+0000) Subject: More ppc64-linux function replacement/wrapping stuff. X-Git-Tag: svn/VALGRIND_3_2_0~375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e2f451da8922845a6dd61093f604a51b64a30f1;p=thirdparty%2Fvalgrind.git More ppc64-linux function replacement/wrapping stuff. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5536 --- diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S index 85428df2c7..3416eb4d86 100644 --- a/coregrind/m_trampoline.S +++ b/coregrind/m_trampoline.S @@ -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) diff --git a/coregrind/pub_core_trampoline.h b/coregrind/pub_core_trampoline.h index 2034c41d86..134a569d81 100644 --- a/coregrind/pub_core_trampoline.h +++ b/coregrind/pub_core_trampoline.h @@ -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