|
From: <sv...@va...> - 2014-07-17 21:23:18
|
Author: philippe
Date: Thu Jul 17 21:23:09 2014
New Revision: 14174
Log:
Simplify the code to get the function entry + avoids too many casts
Modified:
trunk/coregrind/vg_preloaded.c
Modified: trunk/coregrind/vg_preloaded.c
==============================================================================
--- trunk/coregrind/vg_preloaded.c (original)
+++ trunk/coregrind/vg_preloaded.c Thu Jul 17 21:23:09 2014
@@ -86,9 +86,10 @@
#if defined(VGP_ppc64_linux)
/* ppc64 uses function descriptors, so get the actual function entry
address for the client request, but return the function descriptor
- from this function. */
- UWord *descr = (UWord*)(void*)result;
- fnentry = (Addr)(void*)(descr[0]);
+ from this function.
+ result points to the function descriptor, which starts with the
+ function entry. */
+ fnentry = *(Addr*)result;
#else
fnentry = result;
#endif
|