From a3842cf5b65e5a0cc10cb00f0dcfe1cb835ac6cb Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 31 Dec 2014 12:11:15 +0000 Subject: [PATCH] The definition of type Addr has moved to VEX and the resteer callback has changed (VEX r3050). Track those changes. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14840 --- coregrind/m_translate.c | 16 ++++++---------- include/pub_tool_basics.h | 5 +---- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c index 386465733e..8f7b452d55 100644 --- a/coregrind/m_translate.c +++ b/coregrind/m_translate.c @@ -855,9 +855,8 @@ static UInt needs_self_check ( void* closureV, Chasing across them obviously defeats the redirect mechanism, with bad effects for Memcheck, Helgrind, DRD, Massif, and possibly others. */ -static Bool chase_into_ok ( void* closureV, Addr64 addr64 ) +static Bool chase_into_ok ( void* closureV, Addr addr ) { - Addr addr = (Addr)addr64; NSegment const* seg = VG_(am_find_nsegment)(addr); /* Work through a list of possibilities why we might not want to @@ -872,11 +871,8 @@ static Bool chase_into_ok ( void* closureV, Addr64 addr64 ) goto dontchase; # if defined(VG_PLAT_USES_PPCTOC) || defined(VGP_ppc64le_linux) - /* This needs to be at the start of its own block. Don't chase. Re - ULong_to_Ptr, be careful to ensure we only compare 32 bits on a - 32-bit target.*/ - if (ULong_to_Ptr(addr64) - == (void*)&VG_(ppctoc_magic_redirect_return_stub)) + /* This needs to be at the start of its own block. Don't chase. */ + if (addr == (Addr)&VG_(ppctoc_magic_redirect_return_stub)) goto dontchase; # endif @@ -893,9 +889,9 @@ static Bool chase_into_ok ( void* closureV, Addr64 addr64 ) Chasing into EX increases the number of EX translations from 21 to 102666 causing a 7x runtime increase for "none" and a 3.2x runtime increase for memcheck. */ - if (((UChar *)ULong_to_Ptr(addr))[0] == 0x44 || /* EX */ - ((UChar *)ULong_to_Ptr(addr))[0] == 0xC6) /* EXRL */ - goto dontchase; + if (((UChar *)addr)[0] == 0x44 || /* EX */ + ((UChar *)addr)[0] == 0xC6) /* EXRL */ + goto dontchase; # endif /* well, ok then. go on and chase. */ diff --git a/include/pub_tool_basics.h b/include/pub_tool_basics.h index ebb75d20f6..0ff597e87d 100644 --- a/include/pub_tool_basics.h +++ b/include/pub_tool_basics.h @@ -43,7 +43,7 @@ ------------------------------------------------------------------ */ // VEX defines Char, UChar, Short, UShort, Int, UInt, Long, ULong, SizeT, -// Addr32, Addr64, HWord, HChar, Bool, False and True. +// Addr, Addr32, Addr64, HWord, HChar, Bool, False and True. #include "libvex_basictypes.h" // For varargs types @@ -86,9 +86,6 @@ typedef unsigned long UWord; // 32 64 typedef signed long Word; // 32 64 -// Addr is for holding an address. -typedef UWord Addr; // 32 64 - // Our equivalent of POSIX 'ssize_t': // - ssize_t is "used for a count of bytes or an error indication". typedef Word SSizeT; // 32 64 -- 2.47.3