- update to 3.7.0 (bnc#724215):

* Support for IBM z/Architecture (s390x) running Linux.  Valgrind can
  analyse 64-bit programs running on z/Architecture.  Most user space
  instructions up to and including z10 are supported.
  See README.s390 for more details.
  * Support for the IBM Power ISA 2.06 (Power7 instructions)
  * Further solidification of support for SSE 4.2 in 64-bit mode
  * Memcheck:
  * - reduction of memory use in some circumstances
  * - improved handling of freed memory for finding more errors
  * - fix of a longstanding bug that could cause false negatives
  * Helgrind:
  * - Helgrind: performance improvements and major memory use reductions
  *  GDB server: Valgrind now has an embedded GDB server.  That means it
  is possible to control a Valgrind run from GDB, doing all the usual
  things that GDB can do (single stepping, breakpoints, examining
  data, etc).  Tool-specific functionality is also available.
  * Over 160 bugs have been fixed.

OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=54
This commit is contained in:
Dirk Mueller 2011-11-09 19:07:31 +00:00 committed by Git OBS Bridge
parent e5117a83d1
commit 986d98e892
25 changed files with 120 additions and 81097 deletions

View File

@ -1,33 +0,0 @@
------------------------------------------------------------------------
r11800 | tom | 2011-06-07 23:52:26 +0200 (Di, 07. Jun 2011) | 2 Zeilen
Add glibc 2.14 support. Patch from Dmitry Djachenko <dimhen@gmail.com>.
------------------------------------------------------------------------
Index: configure.in
===================================================================
--- configure.in (Revision 11799)
+++ configure.in (Revision 11800)
@@ -779,6 +779,13 @@ case "${GLIBC_VERSION}" in
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
+ 2.14)
+ AC_MSG_RESULT(2.14 family)
+ AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x])
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
aix5)
AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
@@ -792,7 +799,7 @@ case "${GLIBC_VERSION}" in
*)
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.13])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.14])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
AC_MSG_ERROR([or Darwin libc])
;;

View File

@ -1,46 +1,6 @@
Index: include/valgrind.h
===================================================================
--- include/valgrind.h.orig
+++ include/valgrind.h
@@ -4328,7 +4328,12 @@ typedef
VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
/* Querying of debug info. */
- VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701
+ VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,
+
+ /* JIT support */
+ VG_USERREQ__JIT_REGISTER_MAP = 0x1702,
+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1703
+
} Vg_ClientRequest;
#if !defined(__GNUC__)
@@ -4780,6 +4785,19 @@ VALGRIND_PRINTF_BACKTRACE(const char *fo
addr, buf64, 0, 0, 0); \
}
+#define VALGRIND_JIT_REGISTER_MAP(name, start, end) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__JIT_REGISTER_MAP, \
+ name, start, end, 0, 0); \
+ }
+
+#define VALGRIND_JIT_UNREGISTER_MAP(name, start) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__JIT_REGISTER_MAP, \
+ start, 0, 0, 0, 0); \
+ }
#undef PLAT_x86_linux
#undef PLAT_amd64_linux
Index: coregrind/m_debuginfo/debuginfo.c
===================================================================
--- coregrind/m_debuginfo/debuginfo.c.orig
--- coregrind/m_debuginfo/debuginfo.c
+++ coregrind/m_debuginfo/debuginfo.c
@@ -48,6 +48,7 @@
@@ -49,6 +49,7 @@
#include "pub_core_oset.h"
#include "pub_core_stacktrace.h" // VG_(get_StackTrace) XXX: circular dependency
#include "pub_core_ume.h"
@ -48,8 +8,8 @@ Index: coregrind/m_debuginfo/debuginfo.c
#include "priv_misc.h" /* dinfo_zalloc/free */
#include "priv_d3basics.h" /* ML_(pp_GX) */
@@ -1201,6 +1202,132 @@ ULong VG_(di_aix5_notify_segchange)(
#endif /* defined(VGO_aix5) */
@@ -1253,6 +1254,132 @@
#endif /* defined(VGO_linux) || defined(VGO_darwin) */
+/* Storing and retrieving information caused by JITted code. TODO:
@ -181,7 +141,7 @@ Index: coregrind/m_debuginfo/debuginfo.c
/*------------------------------------------------------------*/
/*--- ---*/
/*--- TOP LEVEL: QUERYING EXISTING DEBUG INFO ---*/
@@ -1336,8 +1463,19 @@ Bool get_sym_name ( Bool do_cxx_demangli
@@ -1388,8 +1515,19 @@
PtrdiffT offset;
search_all_symtabs ( a, &di, &sno, match_anywhere_in_sym, findText );
@ -200,30 +160,11 @@ Index: coregrind/m_debuginfo/debuginfo.c
return False;
+ }
vg_assert(di->symtab[sno].pri_name);
VG_(demangle) ( do_cxx_demangling, do_z_demangling,
di->symtab[sno].name, buf, nbuf );
Index: coregrind/pub_core_debuginfo.h
===================================================================
--- coregrind/pub_core_debuginfo.h.orig
+++ coregrind/pub_core_debuginfo.h
@@ -106,6 +106,12 @@ Bool VG_(get_fnname_raw) ( Addr a, Char*
extern
Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf );
+/* Register/deregister symbols created by JITs. */
+extern
+void VG_(register_jited_code)( Char* name, Addr start, SizeT len );
+
+extern
+void VG_(unregister_jited_code)( Addr start );
/* Use DWARF2/3 CFA information to do one step of stack unwinding.
D3UnwindRegs holds the current register values, and is
Index: coregrind/m_scheduler/scheduler.c
===================================================================
--- coregrind/m_scheduler/scheduler.c.orig
--- coregrind/m_scheduler/scheduler.c
+++ coregrind/m_scheduler/scheduler.c
@@ -1585,6 +1585,16 @@ void do_client_request ( ThreadId tid )
@@ -1669,6 +1669,16 @@
goto my_default;
}
@ -240,3 +181,51 @@ Index: coregrind/m_scheduler/scheduler.c
default:
my_default:
if (os_client_request(tid, arg)) {
--- coregrind/pub_core_debuginfo.h
+++ coregrind/pub_core_debuginfo.h
@@ -93,6 +93,12 @@
extern
Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, Char* buf, Int nbuf );
+/* Register/deregister symbols created by JITs. */
+extern
+void VG_(register_jited_code)( Char* name, Addr start, SizeT len );
+
+extern
+void VG_(unregister_jited_code)( Addr start );
/* Use DWARF2/3 CFA information to do one step of stack unwinding.
D3UnwindRegs holds the current register values, and is
--- include/valgrind.h
+++ include/valgrind.h
@@ -3664,6 +3664,10 @@
/* Querying of debug info. */
VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,
+ /* JIT support */
+ VG_USERREQ__JIT_REGISTER_MAP = 0x1702,
+ VG_USERREQ__JIT_UNREGISTER_MAP = 0x1703,
+
/* Disable/enable error reporting level. Takes a single
Word arg which is the delta to this thread's error
disablement indicator. Hence 1 disables or further
@@ -3828,6 +3832,19 @@
_qyy_arg1, _qyy_arg2, \
_qyy_arg3, 0)
+#define VALGRIND_JIT_REGISTER_MAP(name, start, end) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__JIT_REGISTER_MAP, \
+ name, start, end, 0, 0); \
+ }
+
+#define VALGRIND_JIT_UNREGISTER_MAP(name, start) \
+ {unsigned int _qzz_res; \
+ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
+ VG_USERREQ__JIT_REGISTER_MAP, \
+ start, 0, 0, 0, 0); \
+ }
/* Counts the number of errors that have been recorded by a tool. Nb:
the tool must record the errors with VG_(maybe_record_error)() or

File diff suppressed because one or more lines are too long

View File

@ -1,15 +0,0 @@
--- configure.in
+++ configure.in
@@ -225,9 +225,9 @@ case "${host_os}" in
kernel=`uname -r`
case "${kernel}" in
- 2.6.*)
- AC_MSG_RESULT([2.6 family (${kernel})])
- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
+ 2.6.*|3.*)
+ AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
+ AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
;;
2.4.*)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:49bdcc4fbcf060049b5f0dcfd8a187a6e90e0b0e57309f633b64e44430726a0e
size 5974836

3
valgrind-3.7.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6
size 6624216

View File

@ -1,20 +0,0 @@
------------------------------------------------------------------------
r11643 | sewardj | 2011-03-14 10:53:44 +0100 (Mo, 14. Mär 2011) | 3 Zeilen
Build fix for older s390x-linux assemblers. Fixes #264800.
(Florian Krohm, britzel@acm.org)
------------------------------------------------------------------------
Index: helgrind/tests/tc03_re_excl.c
===================================================================
--- helgrind/tests/tc03_re_excl.c (Revision 11642)
+++ helgrind/tests/tc03_re_excl.c (Revision 11643)
@@ -10,7 +10,7 @@
/* A simple function to "use" a value, so that gcc can't
possibly optimise it into nothing. */
static void use ( int x ) {
- __asm__ __volatile__( "nop" : : "r"(x) : "cc","memory" );
+ __asm__ __volatile__( "" : : "r"(x) : "cc","memory" );
}
static void* worker_thread ( void* argV )

View File

@ -1,35 +0,0 @@
------------------------------------------------------------------------
r11644 | sewardj | 2011-03-15 09:13:08 +0100 (Di, 15. Mär 2011) | 3 Zeilen
Some fixes for the faultstatus testcase. Fixes #253206.
(Christian Borntraeger, borntraeger@de.ibm.com)
------------------------------------------------------------------------
Index: none/tests/faultstatus.c
===================================================================
--- none/tests/faultstatus.c (Revision 11643)
+++ none/tests/faultstatus.c (Revision 11644)
@@ -70,7 +70,13 @@ static int testcode(int code, int want)
static int testaddr(void *addr, volatile void *want)
{
+ /* Some architectures (e.g. s390) just provide enough information to
+ resolve the page fault, but do not provide the offset within a page */
+#if defined(__s390__)
+ if (addr != (void *) ((unsigned long) want & ~0xffful)) {
+#else
if (addr != want) {
+#endif
fprintf(stderr, " FAIL: expected si_addr==%p, not %p\n", want, addr);
return 0;
}
@@ -132,7 +138,8 @@ int main()
for(i = 0; i < sizeof(sigs)/sizeof(*sigs); i++)
sigaction(sigs[i], &sa, NULL);
- fd = open("faultstatus.tmp", O_CREAT|O_TRUNC|O_EXCL, 0600);
+ /* we need O_RDWR for the truncate below */
+ fd = open("faultstatus.tmp", O_CREAT|O_TRUNC|O_EXCL|O_RDWR, 0600);
if (fd == -1) {
perror("tmpfile");
exit(1);

View File

@ -1,62 +0,0 @@
------------------------------------------------------------------------
r2106 | sewardj | 2011-03-07 19:34:34 +0100 (Mo, 07. Mär 2011) | 4 Zeilen
Add folding rules for Clz32 and Clz64. See bug 243404 comment 52.
(Florian Krohn, britzel@acm.org).
------------------------------------------------------------------------
--- priv/ir_opt.c
+++ priv/ir_opt.c
@@ -956,6 +956,31 @@ static IRExpr* mkOnesOfPrimopResultType
}
}
+/* Helpers for folding Clz32/64. */
+static UInt fold_Clz64 ( ULong value )
+{
+ UInt i;
+ vassert(value != 0ULL); /* no defined semantics for arg==0 */
+ for (i = 0; i < 64; ++i) {
+ if (value & (((ULong)1) << (63 - i))) return i;
+ }
+ vassert(0);
+ /*NOTREACHED*/
+ return 0;
+}
+
+static UInt fold_Clz32 ( UInt value )
+{
+ UInt i;
+ vassert(value != 0); /* no defined semantics for arg==0 */
+ for (i = 0; i < 32; ++i) {
+ if (value & (((UInt)1) << (31 - i))) return i;
+ }
+ vassert(0);
+ /*NOTREACHED*/
+ return 0;
+}
+
static IRExpr* fold_Expr ( IRExpr* e )
{
@@ -1154,6 +1179,19 @@ static IRExpr* fold_Expr ( IRExpr* e )
break;
}
+ case Iop_Clz32: {
+ UInt u32 = e->Iex.Unop.arg->Iex.Const.con->Ico.U32;
+ if (u32 != 0)
+ e2 = IRExpr_Const(IRConst_U32(fold_Clz32(u32)));
+ break;
+ }
+ case Iop_Clz64: {
+ ULong u64 = e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
+ if (u64 != 0ULL)
+ e2 = IRExpr_Const(IRConst_U64(fold_Clz64(u64)));
+ break;
+ }
+
default:
goto unhandled;
}

View File

@ -1,28 +0,0 @@
--- pub/libvex.h
+++ pub/libvex.h
@@ -381,15 +381,25 @@
/* Initialise the library. You must call this first. */
extern void LibVEX_Init (
+
/* failure exit function */
+# if __cplusplus == 1 && __GNUC__ && __GNUC__ <= 3
+ /* g++ 3.x doesn't understand attributes on function parameters.
+ See #265762. */
+# else
__attribute__ ((noreturn))
+# endif
void (*failure_exit) ( void ),
+
/* logging output function */
void (*log_bytes) ( HChar*, Int nbytes ),
+
/* debug paranoia level */
Int debuglevel,
+
/* Are we supporting valgrind checking? */
Bool valgrind_support,
+
/* Control ... */
/*READONLY*/VexControl* vcon
);

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Nov 9 20:01:00 CET 2011 - dmueller@suse.de
- update to 3.7.0 (bnc#724215):
* Support for IBM z/Architecture (s390x) running Linux. Valgrind can
analyse 64-bit programs running on z/Architecture. Most user space
instructions up to and including z10 are supported.
See README.s390 for more details.
* Support for the IBM Power ISA 2.06 (Power7 instructions)
* Further solidification of support for SSE 4.2 in 64-bit mode
* Memcheck:
* - reduction of memory use in some circumstances
* - improved handling of freed memory for finding more errors
* - fix of a longstanding bug that could cause false negatives
* Helgrind:
* - Helgrind: performance improvements and major memory use reductions
* GDB server: Valgrind now has an embedded GDB server. That means it
is possible to control a Valgrind run from GDB, doing all the usual
things that GDB can do (single stepping, breakpoints, examining
data, etc). Tool-specific functionality is also available.
* Over 160 bugs have been fixed.
-------------------------------------------------------------------
Tue Oct 25 01:14:42 CEST 2011 - ro@suse.de

View File

@ -27,32 +27,12 @@ License: GPLv2+
Group: Development/Tools/Debuggers
Summary: Memory Management Debugger
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Version: 3.6.1
Release: 11
Version: 3.7.0
Release: 1
Source0: %{name}-%{version}.tar.bz2
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_5_0 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_5_BRANCH > 3_5_BRANCH.diff
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_5_0 svn://svn.valgrind.org/vex/branches/VEX_3_5_BRANCH > VEX_3_5_BRANCH.diff
Patch1: jit-register-unregister.diff
Patch3: valgrind-3.6.0.svn11566-s390x-port.diff
Patch5: valgrind-vex-r2109.diff
Patch6: valgrind-r11644.diff
Patch7: valgrind-r11643.diff
Patch8: valgrind-vex-r2106.diff
Patch9: vg_bug259977_r11687.patch
Patch10: vg_bug259977_r11688.patch
Patch11: vg_bug259977_r11689.patch
Patch12: vg_bug259977_r11690.patch
Patch14: vg_bug270794_r11697.patch
Patch15: vg_bug271042_r11699.patch
Patch16: vg_bug271043_r11700.patch
Patch17: vg_bug271043_r11765.patch
Patch41: vg_bug267630_r2127.patch
Patch42: vg_bug270851_r2130.patch
Patch43: vg_bug270856_r2136.patch
Patch44: vg_bug270851_r2148.patch
Patch45: valgrind-3.6.1-kernel3.patch
Patch46: glibc-2.14.diff
Patch47: valgrind_r12002.diff
# during building the major version of glibc is built into the suppression file
%define glibc_main_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f1)
%define glibc_major_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f2)
@ -149,31 +129,8 @@ Authors:
%prep
%setup -q -n %{name}-%{version}
cd VEX
%patch5
%patch8
cd ..
%patch1
#%ifarch s390x
%patch3
#%endif
%patch6
%patch7
%patch9
%patch10
%patch11
%patch12
%patch14
%patch15
%patch16
%patch17
%patch41
%patch42
%patch43
%patch44
%patch45
%patch46
%patch47
%build
%ifarch %arm
@ -230,6 +187,43 @@ cp -a README* NEWS AUTHORS COPYING COPYING.DOCS $RPM_BUILD_ROOT/%_defaultdocdir/
%endif
%_libdir/valgrind/*-linux.so
%_libdir/valgrind/*.supp
%_libdir/valgrind/32bit-core.xml
%_libdir/valgrind/32bit-linux.xml
%_libdir/valgrind/32bit-sse.xml
%_libdir/valgrind/64bit-core.xml
%_libdir/valgrind/64bit-linux.xml
%_libdir/valgrind/64bit-sse.xml
%_libdir/valgrind/32bit-core-valgrind-s*.xml
%_libdir/valgrind/32bit-linux-valgrind-s*.xml
%_libdir/valgrind/32bit-sse-valgrind-s*.xml
%_libdir/valgrind/64bit-core-valgrind-s*.xml
%_libdir/valgrind/64bit-linux-valgrind-s*.xml
%_libdir/valgrind/64bit-sse-valgrind-s*.xml
%_libdir/valgrind/amd64-coresse-valgrind.xml
%_libdir/valgrind/amd64-linux-valgrind.xml
%_libdir/valgrind/arm-core-valgrind-s*.xml
%_libdir/valgrind/arm-core.xml
%_libdir/valgrind/arm-vfpv3-valgrind-s*.xml
%_libdir/valgrind/arm-vfpv3.xml
%_libdir/valgrind/arm-with-vfpv3-valgrind.xml
%_libdir/valgrind/arm-with-vfpv3.xml
%_libdir/valgrind/i386-coresse-valgrind.xml
%_libdir/valgrind/i386-linux-valgrind.xml
%_libdir/valgrind/power-altivec-valgrind-s*.xml
%_libdir/valgrind/power-altivec.xml
%_libdir/valgrind/power-core.xml
%_libdir/valgrind/power-fpu-valgrind-s*.xml
%_libdir/valgrind/power-fpu.xml
%_libdir/valgrind/power-linux-valgrind-s*.xml
%_libdir/valgrind/power-linux.xml
%_libdir/valgrind/power64-core-valgrind-s*.xml
%_libdir/valgrind/power64-core.xml
%_libdir/valgrind/power64-linux-valgrind-s*.xml
%_libdir/valgrind/power64-linux.xml
%_libdir/valgrind/powerpc-altivec32l-valgrind.xml
%_libdir/valgrind/powerpc-altivec32l.xml
%_libdir/valgrind/powerpc-altivec64l-valgrind.xml
%_libdir/valgrind/powerpc-altivec64l.xml
%if %suse_version > 1100

View File

@ -1,59 +0,0 @@
------------------------------------------------------------------------
r12002 | dirk | 2011-08-23 22:29:10 +0200 (Tue, 23 Aug 2011) | 2 lines
Changed paths:
M /trunk/glibc-2.X.supp.in
fix the suppressions to also match libc-2.XX.y.so
------------------------------------------------------------------------
Index: glibc-2.X.supp.in
===================================================================
--- glibc-2.X.supp.in (revision 12001)
+++ glibc-2.X.supp.in (revision 12002)
@@ -168,9 +168,9 @@
Memcheck:Param
socketcall.sendto(msg)
fun:__sendto_nocancel
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
{
glibc24-64bit-padding-1c
@@ -180,7 +180,7 @@
fun:__nscd_get_map_ref
fun:nscd_get*_r
fun:*nscd*
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
@@ -199,18 +199,18 @@
Memcheck:Param
socketcall.sendto(msg)
fun:send
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
{
X11-64bit-padding-4b
Memcheck:Param
socketcall.send(msg)
fun:send
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
- obj:/*libc-@GLIBC_VERSION@.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
+ obj:/*libc-@GLIBC_VERSION@*.so
}
##----------------------------------------------------------------------##

View File

@ -1,918 +0,0 @@
Index: memcheck/mc_leakcheck.c
===================================================================
--- memcheck/mc_leakcheck.c.orig
+++ memcheck/mc_leakcheck.c
@@ -43,12 +43,11 @@
#include "pub_tool_options.h"
#include "pub_tool_oset.h"
#include "pub_tool_signals.h"
+#include "pub_tool_libcsetjmp.h" // setjmp facilities
#include "pub_tool_tooliface.h" // Needed for mc_include.h
#include "mc_include.h"
-#include <setjmp.h> // For jmp_buf
-
/*------------------------------------------------------------*/
/*--- An overview of leak checking. ---*/
/*------------------------------------------------------------*/
@@ -636,7 +635,7 @@ lc_push_if_a_chunk_ptr(Addr ptr, Int cli
}
-static jmp_buf memscan_jmpbuf;
+static VG_MINIMAL_JMP_BUF memscan_jmpbuf;
static
void scan_all_valid_memory_catcher ( Int sigNo, Addr addr )
@@ -644,7 +643,7 @@ void scan_all_valid_memory_catcher ( Int
if (0)
VG_(printf)("OUCH! sig=%d addr=%#lx\n", sigNo, addr);
if (sigNo == VKI_SIGSEGV || sigNo == VKI_SIGBUS)
- __builtin_longjmp(memscan_jmpbuf, 1);
+ VG_MINIMAL_LONGJMP(memscan_jmpbuf);
}
// Scan a block of memory between [start, start+len). This range may
@@ -686,7 +685,7 @@ lc_scan_memory(Addr start, SizeT len, Bo
}
}
- if (__builtin_setjmp(memscan_jmpbuf) == 0) {
+ if (VG_MINIMAL_SETJMP(memscan_jmpbuf) == 0) {
if ( MC_(is_valid_aligned_word)(ptr) ) {
lc_scanned_szB += sizeof(Addr);
addr = *(Addr *)ptr;
Index: include/pub_tool_libcsetjmp.h
===================================================================
--- /dev/null
+++ include/pub_tool_libcsetjmp.h
@@ -0,0 +1,76 @@
+
+/*--------------------------------------------------------------------*/
+/*--- A minimal setjmp/longjmp facility. pub_tool_libcsetjmp.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2010 Mozilla Inc
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* Contributed by Julian Seward <jseward@acm.org> */
+
+#ifndef __PUB_TOOL_LIBCSETJMP_H
+#define __PUB_TOOL_LIBCSETJMP_H
+
+//--------------------------------------------------------------------
+// PURPOSE: Provides a minimal setjmp/longjmp facility, that saves/
+// restores integer registers, but not necessarily anything more.
+//--------------------------------------------------------------------
+
+
+/* This provides an extremely minimal setjmp/longjmp facility, in
+ which only the host's integer registers are saved/restored. Or at
+ least, that is the minimal guaranteed functionality.
+
+ Until Apr 2011 we used __builtin_setjmp and __builtin_longjmp, but
+ it appears that that is not always correctly implemented. See
+ https://bugs.kde.org/show_bug.cgi?id=259977. So this module wraps
+ those functions up and facilitates replacing them with our own
+ implementations where necessary.
+*/
+
+/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
+#include <setjmp.h>
+/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
+
+
+/* Don't use jmp_buf, __builtin_setjmp or __builtin_longjmp directly.
+ They don't always work reliably. Instead use these macros, which
+ provide the opportunity to supply alternative implementations as
+ necessary.
+
+ Note that the abstraction is done with macros (ick) rather than
+ functions and typedefs, since wrapping __builtin_setjmp up in a
+ second function (eg, VG_(minimal_setjmp)) doesn't seem to work for
+ whatever reason -- returns via a VG_(minimal_longjmp) go wrong.
+*/
+#define VG_MINIMAL_JMP_BUF jmp_buf
+#define VG_MINIMAL_SETJMP(_env) __builtin_setjmp((_env))
+#define VG_MINIMAL_LONGJMP(_env) __builtin_longjmp((_env),1)
+
+
+#endif // __PUB_TOOL_LIBCSETJMP_H
+
+/*--------------------------------------------------------------------*/
+/*--- end pub_tool_libcsetjmp.h ---*/
+/*--------------------------------------------------------------------*/
Index: include/Makefile.am
===================================================================
--- include/Makefile.am.orig
+++ include/Makefile.am
@@ -18,6 +18,7 @@ nobase_pkginclude_HEADERS = \
pub_tool_libcfile.h \
pub_tool_libcprint.h \
pub_tool_libcproc.h \
+ pub_tool_libcsetjmp.h \
pub_tool_libcsignal.h \
pub_tool_machine.h \
pub_tool_mallocfree.h \
Index: coregrind/m_translate.c
===================================================================
--- coregrind/m_translate.c.orig
+++ coregrind/m_translate.c
@@ -53,6 +53,7 @@
#include "pub_core_dispatch.h" // VG_(run_innerloop__dispatch_{un}profiled)
// VG_(run_a_noredir_translation__return_point)
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" // VexGuestArchState
#include "pub_core_trampoline.h" // VG_(ppctoc_magic_redirect_return_stub)
Index: coregrind/m_sigframe/sigframe-s390x-linux.c
===================================================================
--- coregrind/m_sigframe/sigframe-s390x-linux.c.orig
+++ coregrind/m_sigframe/sigframe-s390x-linux.c
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Index: coregrind/m_sigframe/sigframe-ppc32-linux.c
===================================================================
--- coregrind/m_sigframe/sigframe-ppc32-linux.c.orig
+++ coregrind/m_sigframe/sigframe-ppc32-linux.c
@@ -36,6 +36,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Index: coregrind/m_sigframe/sigframe-amd64-linux.c
===================================================================
--- coregrind/m_sigframe/sigframe-amd64-linux.c.orig
+++ coregrind/m_sigframe/sigframe-amd64-linux.c
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Index: coregrind/m_sigframe/sigframe-ppc64-linux.c
===================================================================
--- coregrind/m_sigframe/sigframe-ppc64-linux.c.orig
+++ coregrind/m_sigframe/sigframe-ppc64-linux.c
@@ -36,6 +36,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Index: coregrind/m_sigframe/sigframe-arm-linux.c
===================================================================
--- coregrind/m_sigframe/sigframe-arm-linux.c.orig
+++ coregrind/m_sigframe/sigframe-arm-linux.c
@@ -38,6 +38,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Index: coregrind/m_sigframe/sigframe-x86-linux.c
===================================================================
--- coregrind/m_sigframe/sigframe-x86-linux.c.orig
+++ coregrind/m_sigframe/sigframe-x86-linux.c
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h" /* find_segment */
#include "pub_core_libcbase.h"
Index: coregrind/m_execontext.c
===================================================================
--- coregrind/m_execontext.c.orig
+++ coregrind/m_execontext.c
@@ -37,6 +37,7 @@
#include "pub_core_stacktrace.h"
#include "pub_core_machine.h" // VG_(get_IP)
#include "pub_core_vki.h" // To keep pub_core_threadstate.h happy
+#include "pub_core_libcsetjmp.h" // Ditto
#include "pub_core_threadstate.h" // VG_(is_valid_tid)
#include "pub_core_execontext.h" // self
Index: coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-ppc64-linux.c.orig
+++ coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuglog.h"
Index: coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-linux.c.orig
+++ coregrind/m_syswrap/syswrap-linux.c
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuginfo.h" // VG_(di_notify_*)
Index: coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-amd64-linux.c.orig
+++ coregrind/m_syswrap/syswrap-amd64-linux.c
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuglog.h"
Index: coregrind/m_syswrap/syswrap-arm-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-arm-linux.c.orig
+++ coregrind/m_syswrap/syswrap-arm-linux.c
@@ -35,6 +35,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuglog.h"
Index: coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- coregrind/m_syswrap/syswrap-generic.c.orig
+++ coregrind/m_syswrap/syswrap-generic.c
@@ -34,6 +34,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_debuginfo.h" // VG_(di_notify_*)
#include "pub_core_aspacemgr.h"
Index: coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-ppc32-linux.c.orig
+++ coregrind/m_syswrap/syswrap-ppc32-linux.c
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuglog.h"
Index: coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-x86-linux.c.orig
+++ coregrind/m_syswrap/syswrap-x86-linux.c
@@ -38,6 +38,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuglog.h"
Index: coregrind/m_syswrap/syswrap-s390x-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-s390x-linux.c.orig
+++ coregrind/m_syswrap/syswrap-s390x-linux.c
@@ -34,6 +34,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuglog.h"
Index: coregrind/m_syswrap/syswrap-main.c
===================================================================
--- coregrind/m_syswrap/syswrap-main.c.orig
+++ coregrind/m_syswrap/syswrap-main.c
@@ -34,6 +34,7 @@
#include "pub_core_aspacemgr.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
@@ -2266,7 +2267,7 @@ void ML_(wqthread_continue_NORETURN)(Thr
sci->status.what = SsIdle;
vg_assert(tst->sched_jmpbuf_valid);
- __builtin_longjmp(tst->sched_jmpbuf, True);
+ VG_MINIMAL_LONGJMP(tst->sched_jmpbuf, True);
/* NOTREACHED */
vg_assert(0);
Index: coregrind/m_syswrap/syswrap-linux-variants.c
===================================================================
--- coregrind/m_syswrap/syswrap-linux-variants.c.orig
+++ coregrind/m_syswrap/syswrap-linux-variants.c
@@ -48,6 +48,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_debuginfo.h" // VG_(di_notify_*)
Index: coregrind/m_libcassert.c
===================================================================
--- coregrind/m_libcassert.c.orig
+++ coregrind/m_libcassert.c
@@ -31,6 +31,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
Index: coregrind/m_libcsetjmp.c
===================================================================
--- /dev/null
+++ coregrind/m_libcsetjmp.c
@@ -0,0 +1,44 @@
+
+/*--------------------------------------------------------------------*/
+/*--- A minimal setjmp/longjmp implementation. m_libcsetjmp.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2010 Mozilla Inc
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* Contributed by Julian Seward <jseward@acm.org> */
+
+
+#include "pub_core_basics.h"
+#include "pub_core_libcsetjmp.h" /* self */
+
+
+/* See include/pub_tool_libcsetjmp.h for background and rationale. */
+
+/* No alternative implementations at present. */
+
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Index: coregrind/m_errormgr.c
===================================================================
--- coregrind/m_errormgr.c.orig
+++ coregrind/m_errormgr.c
@@ -30,6 +30,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h"
#include "pub_core_threadstate.h" // For VG_N_THREADS
#include "pub_core_debugger.h"
#include "pub_core_debuginfo.h"
Index: coregrind/m_machine.c
===================================================================
--- coregrind/m_machine.c.orig
+++ coregrind/m_machine.c
@@ -30,6 +30,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // setjmp facilities
#include "pub_core_threadstate.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcbase.h"
@@ -418,11 +419,14 @@ Int VG_(machine_arm_archlevel) = 4;
/* fixs390: anything for s390x here ? */
/* For hwcaps detection on ppc32/64 and arm we'll need to do SIGILL
- testing, so we need a jmp_buf. */
-#if defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_arm) || defined(VGA_s390x)
-#include <setjmp.h> // For jmp_buf
-static jmp_buf env_unsup_insn;
-static void handler_unsup_insn ( Int x ) { __builtin_longjmp(env_unsup_insn,1); }
+ testing, so we need a VG_MINIMAL_JMP_BUF. */
+#if defined(VGA_ppc32) || defined(VGA_ppc64) \
+ || defined(VGA_arm) || defined(VGA_s390x)
+#include "pub_tool_libcsetjmp.h"
+static VG_MINIMAL_JMP_BUF env_unsup_insn;
+static void handler_unsup_insn ( Int x ) {
+ VG_MINIMAL_LONGJMP(env_unsup_insn);
+}
#endif
@@ -462,7 +466,7 @@ static void find_ppc_dcbz_sz(VexArchInfo
vg_assert(dcbz_szB == 32 || dcbz_szB == 64 || dcbz_szB == 128);
/* dcbzl clears 128B on G5/PPC970, and usually 32B on other platforms */
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
dcbzl_szB = 0; /* indicates unsupported */
}
else {
@@ -692,7 +696,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* standard FP insns */
have_F = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_F = False;
} else {
__asm__ __volatile__(".long 0xFC000090"); /*fmr 0,0 */
@@ -700,7 +704,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* Altivec insns */
have_V = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_V = False;
} else {
/* Unfortunately some older assemblers don't speak Altivec (or
@@ -713,7 +717,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* General-Purpose optional (fsqrt, fsqrts) */
have_FX = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_FX = False;
} else {
__asm__ __volatile__(".long 0xFC00002C"); /*fsqrt 0,0 */
@@ -721,7 +725,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* Graphics optional (stfiwx, fres, frsqrte, fsel) */
have_GX = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_GX = False;
} else {
__asm__ __volatile__(".long 0xFC000034"); /* frsqrte 0,0 */
@@ -811,7 +815,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* standard FP insns */
have_F = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_F = False;
} else {
__asm__ __volatile__("fmr 0,0");
@@ -819,7 +823,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* Altivec insns */
have_V = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_V = False;
} else {
__asm__ __volatile__(".long 0x10000484"); /*vor 0,0,0*/
@@ -827,7 +831,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* General-Purpose optional (fsqrt, fsqrts) */
have_FX = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_FX = False;
} else {
__asm__ __volatile__(".long 0xFC00002C"); /*fsqrt 0,0*/
@@ -835,7 +839,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* Graphics optional (stfiwx, fres, frsqrte, fsel) */
have_GX = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_GX = False;
} else {
__asm__ __volatile__(".long 0xFC000034"); /*frsqrte 0,0*/
@@ -902,7 +906,7 @@ Bool VG_(machine_get_hwcaps)( void )
is not supported on z900. */
have_LDISP = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_LDISP = False;
} else {
/* BASR loads the address of the next insn into r1. Needed to avoid
@@ -913,7 +917,7 @@ Bool VG_(machine_get_hwcaps)( void )
}
have_EIMM = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_EIMM = False;
} else {
__asm__ __volatile__(".long 0xc0090000\n\t" /* iilf r0,0 */
@@ -921,7 +925,7 @@ Bool VG_(machine_get_hwcaps)( void )
}
have_GIE = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_GIE = False;
} else {
__asm__ __volatile__(".long 0xc2010000\n\t" /* msfi r0,0 */
@@ -929,7 +933,7 @@ Bool VG_(machine_get_hwcaps)( void )
}
have_DFP = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_DFP = False;
} else {
__asm__ __volatile__(".long 0xb3d20000"
@@ -1007,7 +1011,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* VFP insns */
have_VFP = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_VFP = False;
} else {
__asm__ __volatile__(".word 0xEEB02B42"); /* VMOV.F64 d2, d2 */
@@ -1019,7 +1023,7 @@ Bool VG_(machine_get_hwcaps)( void )
/* NEON insns */
have_NEON = True;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_NEON = False;
} else {
__asm__ __volatile__(".word 0xF2244154"); /* VMOV q2, q2 */
@@ -1029,7 +1033,7 @@ Bool VG_(machine_get_hwcaps)( void )
archlevel = 5; /* v5 will be base level */
if (archlevel < 7) {
archlevel = 7;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
archlevel = 5;
} else {
__asm__ __volatile__(".word 0xF45FF000"); /* PLI [PC,#-0] */
@@ -1037,7 +1041,7 @@ Bool VG_(machine_get_hwcaps)( void )
}
if (archlevel < 6) {
archlevel = 6;
- if (__builtin_setjmp(env_unsup_insn)) {
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
archlevel = 5;
} else {
__asm__ __volatile__(".word 0xE6822012"); /* PKHBT r2, r2, r2 */
Index: coregrind/m_mallocfree.c
===================================================================
--- coregrind/m_mallocfree.c.orig
+++ coregrind/m_mallocfree.c
@@ -38,6 +38,7 @@
#include "pub_core_libcprint.h"
#include "pub_core_mallocfree.h"
#include "pub_core_options.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" // For VG_INVALID_THREADID
#include "pub_core_tooliface.h"
#include "valgrind.h"
Index: coregrind/pub_core_basics.h
===================================================================
--- coregrind/pub_core_basics.h.orig
+++ coregrind/pub_core_basics.h
@@ -64,9 +64,6 @@
# error Unknown arch
#endif
-// For jmp_buf
-#include <setjmp.h>
-
/* ---------------------------------------------------------------------
A struct to hold starting values for stack unwinding.
Index: coregrind/m_initimg/initimg-pathscan.c
===================================================================
--- coregrind/m_initimg/initimg-pathscan.c.orig
+++ coregrind/m_initimg/initimg-pathscan.c
@@ -44,7 +44,6 @@
#include "pub_core_ume.h"
#include "pub_core_options.h"
#include "pub_core_tooliface.h" /* VG_TRACK */
-#include "pub_core_threadstate.h" /* ThreadArchState */
#include "pub_core_initimg.h" /* self */
#include "priv_initimg_pathscan.h"
Index: coregrind/m_initimg/initimg-linux.c
===================================================================
--- coregrind/m_initimg/initimg-linux.c.orig
+++ coregrind/m_initimg/initimg-linux.c
@@ -48,6 +48,7 @@
#include "pub_core_options.h"
#include "pub_core_syscall.h"
#include "pub_core_tooliface.h" /* VG_TRACK */
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" /* ThreadArchState */
#include "priv_initimg_pathscan.h"
#include "pub_core_initimg.h" /* self */
Index: coregrind/m_debuginfo/debuginfo.c
===================================================================
--- coregrind/m_debuginfo/debuginfo.c.orig
+++ coregrind/m_debuginfo/debuginfo.c
@@ -31,6 +31,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_debuginfo.h" /* self */
#include "pub_core_demangle.h"
Index: coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- coregrind/m_debuginfo/readdwarf3.c.orig
+++ coregrind/m_debuginfo/readdwarf3.c
@@ -139,6 +139,7 @@
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
+#include "pub_core_libcsetjmp.h" // setjmp facilities
#include "pub_core_options.h"
#include "pub_core_tooliface.h" /* VG_(needs) */
#include "pub_core_xarray.h"
@@ -3952,18 +3953,14 @@ void new_dwarf3_reader_wrk (
/*--- ---*/
/*------------------------------------------------------------*/
-/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
-#include <setjmp.h> /* For jmp_buf */
-/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
-
-static Bool d3rd_jmpbuf_valid = False;
-static HChar* d3rd_jmpbuf_reason = NULL;
-static jmp_buf d3rd_jmpbuf;
+static Bool d3rd_jmpbuf_valid = False;
+static HChar* d3rd_jmpbuf_reason = NULL;
+static VG_MINIMAL_JMP_BUF d3rd_jmpbuf;
static __attribute__((noreturn)) void barf ( HChar* reason ) {
vg_assert(d3rd_jmpbuf_valid);
d3rd_jmpbuf_reason = reason;
- __builtin_longjmp(&d3rd_jmpbuf, 1);
+ VG_MINIMAL_LONGJMP(d3rd_jmpbuf);
/*NOTREACHED*/
vg_assert(0);
}
@@ -3991,7 +3988,7 @@ ML_(new_dwarf3_reader) (
vg_assert(d3rd_jmpbuf_reason == NULL);
d3rd_jmpbuf_valid = True;
- jumped = __builtin_setjmp(&d3rd_jmpbuf);
+ jumped = VG_MINIMAL_SETJMP(d3rd_jmpbuf);
if (jumped == 0) {
/* try this ... */
new_dwarf3_reader_wrk( di, barf,
Index: coregrind/m_debugger.c
===================================================================
--- coregrind/m_debugger.c.orig
+++ coregrind/m_debugger.c
@@ -30,6 +30,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h"
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
Index: coregrind/m_coredump/coredump-elf.c
===================================================================
--- coregrind/m_coredump/coredump-elf.c.orig
+++ coregrind/m_coredump/coredump-elf.c
@@ -42,6 +42,7 @@
#include "pub_core_libcproc.h" // VG_(geteuid), VG_(getegid)
#include "pub_core_libcassert.h" // VG_(exit), vg_assert
#include "pub_core_mallocfree.h" // VG_(malloc), VG_(free)
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
Index: coregrind/m_signals.c
===================================================================
--- coregrind/m_signals.c.orig
+++ coregrind/m_signals.c
@@ -197,6 +197,7 @@
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
#include "pub_core_debuglog.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
@@ -1777,7 +1778,7 @@ static void resume_scheduler(ThreadId ti
if (tst->sched_jmpbuf_valid) {
/* Can't continue; must longjmp back to the scheduler and thus
enter the sighandler immediately. */
- __builtin_longjmp(tst->sched_jmpbuf, True);
+ VG_MINIMAL_LONGJMP(tst->sched_jmpbuf);
}
}
Index: coregrind/m_stacktrace.c
===================================================================
--- coregrind/m_stacktrace.c.orig
+++ coregrind/m_stacktrace.c
@@ -30,6 +30,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_debuginfo.h" // XXX: circular dependency
#include "pub_core_aspacemgr.h" // For VG_(is_addressable)()
Index: coregrind/m_main.c
===================================================================
--- coregrind/m_main.c.orig
+++ coregrind/m_main.c
@@ -31,6 +31,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_xarray.h"
#include "pub_core_clientstate.h"
Index: coregrind/m_scheduler/scheduler.c
===================================================================
--- coregrind/m_scheduler/scheduler.c.orig
+++ coregrind/m_scheduler/scheduler.c
@@ -61,6 +61,7 @@
#include "pub_core_debuglog.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h" // __NR_sched_yield
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_clreq.h" // for VG_USERREQ__*
@@ -581,7 +582,7 @@ void VG_(scheduler_init_phase2) ( Thread
do { \
ThreadState * volatile _qq_tst = VG_(get_ThreadState)(tid); \
\
- (jumped) = __builtin_setjmp(_qq_tst->sched_jmpbuf); \
+ (jumped) = VG_MINIMAL_SETJMP(_qq_tst->sched_jmpbuf); \
if ((jumped) == 0) { \
vg_assert(!_qq_tst->sched_jmpbuf_valid); \
_qq_tst->sched_jmpbuf_valid = True; \
Index: coregrind/pub_core_libcsetjmp.h
===================================================================
--- /dev/null
+++ coregrind/pub_core_libcsetjmp.h
@@ -0,0 +1,49 @@
+
+/*--------------------------------------------------------------------*/
+/*--- A minimal setjmp/longjmp facility. pub_core_libcsetjmp.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2010 Mozilla Inc
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* Contributed by Julian Seward <jseward@acm.org> */
+
+#ifndef __PUB_CORE_LIBCSETJMP_H
+#define __PUB_CORE_LIBCSETJMP_H
+
+//--------------------------------------------------------------------
+// PURPOSE: Provides a minimal setjmp/longjmp facility, that saves/
+// restores integer registers, but not necessarily anything more.
+//--------------------------------------------------------------------
+
+// No core-only exports; everything in this module is visible to both
+// the core and tools.
+
+#include "pub_tool_libcsetjmp.h"
+
+#endif // __PUB_CORE_LIBCSETJMP_H
+
+/*--------------------------------------------------------------------*/
+/*--- end pub_core_libcsetjmp.h ---*/
+/*--------------------------------------------------------------------*/
Index: coregrind/m_threadstate.c
===================================================================
--- coregrind/m_threadstate.c.orig
+++ coregrind/m_threadstate.c
@@ -30,6 +30,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_libcassert.h"
Index: coregrind/Makefile.am
===================================================================
--- coregrind/Makefile.am.orig
+++ coregrind/Makefile.am
@@ -154,6 +154,7 @@ noinst_HEADERS = \
pub_core_libcfile.h \
pub_core_libcprint.h \
pub_core_libcproc.h \
+ pub_core_libcsetjmp.h \
pub_core_libcsignal.h \
pub_core_mach.h \
pub_core_machine.h \
@@ -239,6 +240,7 @@ COREGRIND_SOURCES_COMMON = \
m_libcfile.c \
m_libcprint.c \
m_libcproc.c \
+ m_libcsetjmp.c \
m_libcsignal.c \
m_machine.c \
m_main.c \
Index: coregrind/pub_core_threadstate.h
===================================================================
--- coregrind/pub_core_threadstate.h.orig
+++ coregrind/pub_core_threadstate.h
@@ -355,8 +355,8 @@ typedef struct {
ThreadOSstate os_state;
/* Per-thread jmp_buf to resume scheduler after a signal */
- Bool sched_jmpbuf_valid;
- jmp_buf sched_jmpbuf;
+ Bool sched_jmpbuf_valid;
+ VG_MINIMAL_JMP_BUF sched_jmpbuf;
}
ThreadState;

View File

@ -1,199 +0,0 @@
Index: memcheck/mc_leakcheck.c
===================================================================
--- memcheck/mc_leakcheck.c (revision 11687)
+++ memcheck/mc_leakcheck.c (revision 11688)
@@ -635,7 +635,7 @@
}
-static VG_MINIMAL_JMP_BUF memscan_jmpbuf;
+static VG_MINIMAL_JMP_BUF(memscan_jmpbuf);
static
void scan_all_valid_memory_catcher ( Int sigNo, Addr addr )
Index: include/pub_tool_libcsetjmp.h
===================================================================
--- include/pub_tool_libcsetjmp.h (revision 11687)
+++ include/pub_tool_libcsetjmp.h (revision 11688)
@@ -64,10 +64,21 @@
second function (eg, VG_(minimal_setjmp)) doesn't seem to work for
whatever reason -- returns via a VG_(minimal_longjmp) go wrong.
*/
-#define VG_MINIMAL_JMP_BUF jmp_buf
+
+#if defined(VGP_ppc32_linux)
+
+#define VG_MINIMAL_JMP_BUF(_name) UInt _name [32+1+1]
+Int VG_MINIMAL_SETJMP(VG_MINIMAL_JMP_BUF(_env));
+void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env));
+
+#else
+
+/* The default implementation. */
+#define VG_MINIMAL_JMP_BUF(_name) jmp_buf _name
#define VG_MINIMAL_SETJMP(_env) __builtin_setjmp((_env))
#define VG_MINIMAL_LONGJMP(_env) __builtin_longjmp((_env),1)
+#endif
#endif // __PUB_TOOL_LIBCSETJMP_H
Index: coregrind/m_libcsetjmp.c
===================================================================
--- coregrind/m_libcsetjmp.c (revision 11687)
+++ coregrind/m_libcsetjmp.c (revision 11688)
@@ -36,9 +36,114 @@
/* See include/pub_tool_libcsetjmp.h for background and rationale. */
-/* No alternative implementations at present. */
+/* The only alternative implementations are for ppc{32,64}-linux. See
+ #259977. */
+#if defined(VGP_ppc32_linux)
+__asm__(
+".text" "\n"
+"" "\n"
+".global VG_MINIMAL_SETJMP" "\n" // r3 = jmp_buf
+"VG_MINIMAL_SETJMP:" "\n"
+" stw 0, 0(3)" "\n"
+" stw 1, 4(3)" "\n"
+" stw 2, 8(3)" "\n"
+" stw 3, 12(3)" "\n"
+" stw 4, 16(3)" "\n"
+" stw 5, 20(3)" "\n"
+" stw 6, 24(3)" "\n"
+" stw 7, 28(3)" "\n"
+" stw 8, 32(3)" "\n"
+" stw 9, 36(3)" "\n"
+" stw 10, 40(3)" "\n"
+" stw 11, 44(3)" "\n"
+" stw 12, 48(3)" "\n"
+" stw 13, 52(3)" "\n"
+" stw 14, 56(3)" "\n"
+" stw 15, 60(3)" "\n"
+" stw 16, 64(3)" "\n"
+" stw 17, 68(3)" "\n"
+" stw 18, 72(3)" "\n"
+" stw 19, 76(3)" "\n"
+" stw 20, 80(3)" "\n"
+" stw 21, 84(3)" "\n"
+" stw 22, 88(3)" "\n"
+" stw 23, 92(3)" "\n"
+" stw 24, 96(3)" "\n"
+" stw 25, 100(3)" "\n"
+" stw 26, 104(3)" "\n"
+" stw 27, 108(3)" "\n"
+" stw 28, 112(3)" "\n"
+" stw 29, 116(3)" "\n"
+" stw 30, 120(3)" "\n"
+" stw 31, 124(3)" "\n"
+ // must use a caller-save register here as scratch, hence r4
+" mflr 4" "\n"
+" stw 4, 128(3)" "\n"
+" mfcr 4" "\n"
+" stw 4, 132(3)" "\n"
+" li 3, 0" "\n"
+" blr" "\n"
+"" "\n"
+
+
+".global VG_MINIMAL_LONGJMP" "\n"
+"VG_MINIMAL_LONGJMP:" "\n" // r3 = jmp_buf
+ // do r4 = 1
+ // and park it in the restore slot for r3 (the ret reg)
+" li 4, 1" "\n"
+" stw 4, 12(3)" "\n"
+ // restore everything except r3
+ // then r3 last of all
+ // then blr
+" lwz 0, 128(3)" "\n"
+" mtlr 0" "\n"
+" lwz 0, 132(3)" "\n"
+" mtcr 0" "\n"
+" lwz 0, 0(3)" "\n"
+" lwz 1, 4(3)" "\n"
+" lwz 2, 8(3)" "\n"
+ // r3 is done at the end
+" lwz 4, 16(3)" "\n"
+" lwz 5, 20(3)" "\n"
+" lwz 6, 24(3)" "\n"
+" lwz 7, 28(3)" "\n"
+" lwz 8, 32(3)" "\n"
+" lwz 9, 36(3)" "\n"
+" lwz 10, 40(3)" "\n"
+" lwz 11, 44(3)" "\n"
+" lwz 12, 48(3)" "\n"
+" lwz 13, 52(3)" "\n"
+" lwz 14, 56(3)" "\n"
+" lwz 15, 60(3)" "\n"
+" lwz 16, 64(3)" "\n"
+" lwz 17, 68(3)" "\n"
+" lwz 18, 72(3)" "\n"
+" lwz 19, 76(3)" "\n"
+" lwz 20, 80(3)" "\n"
+" lwz 21, 84(3)" "\n"
+" lwz 22, 88(3)" "\n"
+" lwz 23, 92(3)" "\n"
+" lwz 24, 96(3)" "\n"
+" lwz 25, 100(3)" "\n"
+" lwz 26, 104(3)" "\n"
+" lwz 27, 108(3)" "\n"
+" lwz 28, 112(3)" "\n"
+" lwz 29, 116(3)" "\n"
+" lwz 30, 120(3)" "\n"
+" lwz 31, 124(3)" "\n"
+" lwz 3, 12(3)" "\n"
+" blr" "\n"
+"" "\n"
+
+
+".previous" "\n"
+);
+
+#endif /* VGP_ppc32_linux */
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Index: coregrind/m_machine.c
===================================================================
--- coregrind/m_machine.c (revision 11687)
+++ coregrind/m_machine.c (revision 11688)
@@ -423,7 +423,7 @@
#if defined(VGA_ppc32) || defined(VGA_ppc64) \
|| defined(VGA_arm) || defined(VGA_s390x)
#include "pub_tool_libcsetjmp.h"
-static VG_MINIMAL_JMP_BUF env_unsup_insn;
+static VG_MINIMAL_JMP_BUF(env_unsup_insn);
static void handler_unsup_insn ( Int x ) {
VG_MINIMAL_LONGJMP(env_unsup_insn);
}
Index: coregrind/m_debuginfo/readdwarf3.c
===================================================================
--- coregrind/m_debuginfo/readdwarf3.c (revision 11687)
+++ coregrind/m_debuginfo/readdwarf3.c (revision 11688)
@@ -3955,7 +3955,7 @@
static Bool d3rd_jmpbuf_valid = False;
static HChar* d3rd_jmpbuf_reason = NULL;
-static VG_MINIMAL_JMP_BUF d3rd_jmpbuf;
+static VG_MINIMAL_JMP_BUF(d3rd_jmpbuf);
static __attribute__((noreturn)) void barf ( HChar* reason ) {
vg_assert(d3rd_jmpbuf_valid);
Index: coregrind/pub_core_threadstate.h
===================================================================
--- coregrind/pub_core_threadstate.h (revision 11687)
+++ coregrind/pub_core_threadstate.h (revision 11688)
@@ -356,7 +356,7 @@
/* Per-thread jmp_buf to resume scheduler after a signal */
Bool sched_jmpbuf_valid;
- VG_MINIMAL_JMP_BUF sched_jmpbuf;
+ VG_MINIMAL_JMP_BUF(sched_jmpbuf);
}
ThreadState;

View File

@ -1,188 +0,0 @@
Index: include/pub_tool_libcsetjmp.h
===================================================================
--- include/pub_tool_libcsetjmp.h (revision 11688)
+++ include/pub_tool_libcsetjmp.h (revision 11689)
@@ -71,6 +71,12 @@
Int VG_MINIMAL_SETJMP(VG_MINIMAL_JMP_BUF(_env));
void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env));
+#elif defined(VGP_ppc64_linux)
+
+#define VG_MINIMAL_JMP_BUF(_name) ULong _name [32+1+1]
+Int VG_MINIMAL_SETJMP(VG_MINIMAL_JMP_BUF(_env));
+void VG_MINIMAL_LONGJMP(VG_MINIMAL_JMP_BUF(_env));
+
#else
/* The default implementation. */
Index: coregrind/m_libcsetjmp.c
===================================================================
--- coregrind/m_libcsetjmp.c (revision 11688)
+++ coregrind/m_libcsetjmp.c (revision 11689)
@@ -39,11 +39,13 @@
/* The only alternative implementations are for ppc{32,64}-linux. See
#259977. */
+/* ------------ ppc32-linux ------------ */
+
#if defined(VGP_ppc32_linux)
__asm__(
".text" "\n"
-"" "\n"
+"" "\n"
".global VG_MINIMAL_SETJMP" "\n" // r3 = jmp_buf
"VG_MINIMAL_SETJMP:" "\n"
" stw 0, 0(3)" "\n"
@@ -85,7 +87,7 @@
" stw 4, 132(3)" "\n"
" li 3, 0" "\n"
" blr" "\n"
-"" "\n"
+"" "\n"
".global VG_MINIMAL_LONGJMP" "\n"
@@ -135,15 +137,140 @@
" lwz 31, 124(3)" "\n"
" lwz 3, 12(3)" "\n"
" blr" "\n"
-"" "\n"
+"" "\n"
-
".previous" "\n"
);
#endif /* VGP_ppc32_linux */
+/* ------------ ppc64-linux ------------ */
+
+#if defined(VGP_ppc64_linux)
+
+__asm__(
+".section \".toc\",\"aw\"" "\n"
+
+".section \".text\"" "\n"
+".align 2" "\n"
+".p2align 4,,15" "\n"
+".globl VG_MINIMAL_SETJMP" "\n"
+
+".section \".opd\",\"aw\"" "\n"
+".align 3" "\n"
+"VG_MINIMAL_SETJMP:" "\n"
+".quad .L.VG_MINIMAL_SETJMP,.TOC.@tocbase,0" "\n"
+".previous" "\n"
+
+".type VG_MINIMAL_SETJMP, @function" "\n"
+".L.VG_MINIMAL_SETJMP:" "\n"
+" std 0, 0(3)" "\n"
+" std 1, 8(3)" "\n"
+" std 2, 16(3)" "\n"
+" std 3, 24(3)" "\n"
+" std 4, 32(3)" "\n"
+" std 5, 40(3)" "\n"
+" std 6, 48(3)" "\n"
+" std 7, 56(3)" "\n"
+" std 8, 64(3)" "\n"
+" std 9, 72(3)" "\n"
+" std 10, 80(3)" "\n"
+" std 11, 88(3)" "\n"
+" std 12, 96(3)" "\n"
+" std 13, 104(3)" "\n"
+" std 14, 112(3)" "\n"
+" std 15, 120(3)" "\n"
+" std 16, 128(3)" "\n"
+" std 17, 136(3)" "\n"
+" std 18, 144(3)" "\n"
+" std 19, 152(3)" "\n"
+" std 20, 160(3)" "\n"
+" std 21, 168(3)" "\n"
+" std 22, 176(3)" "\n"
+" std 23, 184(3)" "\n"
+" std 24, 192(3)" "\n"
+" std 25, 200(3)" "\n"
+" std 26, 208(3)" "\n"
+" std 27, 216(3)" "\n"
+" std 28, 224(3)" "\n"
+" std 29, 232(3)" "\n"
+" std 30, 240(3)" "\n"
+" std 31, 248(3)" "\n"
+ // must use a caller-save register here as scratch, hence r4
+" mflr 4" "\n"
+" std 4, 256(3)" "\n"
+" mfcr 4" "\n"
+" std 4, 264(3)" "\n"
+" li 3, 0" "\n"
+" blr" "\n"
+"" "\n"
+
+
+".globl VG_MINIMAL_LONGJMP" "\n"
+
+".section \".opd\",\"aw\"" "\n"
+".align 3" "\n"
+"VG_MINIMAL_LONGJMP:" "\n"
+".quad .L.VG_MINIMAL_LONGJMP,.TOC.@tocbase,0" "\n"
+".previous" "\n"
+
+".type VG_MINIMAL_LONGJMP, @function" "\n"
+".L.VG_MINIMAL_LONGJMP:" "\n"
+ // do r4 = 1
+ // and park it in the restore slot for r3 (the ret reg)
+" li 4, 1" "\n"
+" std 4, 24(3)" "\n"
+ // restore everything except r3
+ // then r3 last of all
+ // then blr
+" ld 0, 256(3)" "\n"
+" mtlr 0" "\n"
+" ld 0, 264(3)" "\n"
+" mtcr 0" "\n"
+" ld 0, 0(3)" "\n"
+" ld 1, 8(3)" "\n"
+" ld 2, 16(3)" "\n"
+ // r3 is done at the end
+" ld 4, 32(3)" "\n"
+" ld 5, 40(3)" "\n"
+" ld 6, 48(3)" "\n"
+" ld 7, 56(3)" "\n"
+" ld 8, 64(3)" "\n"
+" ld 9, 72(3)" "\n"
+" ld 10, 80(3)" "\n"
+" ld 11, 88(3)" "\n"
+" ld 12, 96(3)" "\n"
+" ld 13, 104(3)" "\n"
+" ld 14, 112(3)" "\n"
+" ld 15, 120(3)" "\n"
+" ld 16, 128(3)" "\n"
+" ld 17, 136(3)" "\n"
+" ld 18, 144(3)" "\n"
+" ld 19, 152(3)" "\n"
+" ld 20, 160(3)" "\n"
+" ld 21, 168(3)" "\n"
+" ld 22, 176(3)" "\n"
+" ld 23, 184(3)" "\n"
+" ld 24, 192(3)" "\n"
+" ld 25, 200(3)" "\n"
+" ld 26, 208(3)" "\n"
+" ld 27, 216(3)" "\n"
+" ld 28, 224(3)" "\n"
+" ld 29, 232(3)" "\n"
+" ld 30, 240(3)" "\n"
+" ld 31, 248(3)" "\n"
+" ld 3, 24(3)" "\n"
+" blr" "\n"
+"" "\n"
+
+".previous" "\n"
+".previous" "\n"
+);
+
+
+#endif /* VGP_ppc64_linux */
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/

View File

@ -1,97 +0,0 @@
Index: coregrind/m_sigframe/sigframe-x86-darwin.c
===================================================================
--- coregrind/m_sigframe/sigframe-x86-darwin.c (revision 11689)
+++ coregrind/m_sigframe/sigframe-x86-darwin.c (revision 11690)
@@ -34,6 +34,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Index: coregrind/m_sigframe/sigframe-amd64-darwin.c
===================================================================
--- coregrind/m_sigframe/sigframe-amd64-darwin.c (revision 11689)
+++ coregrind/m_sigframe/sigframe-amd64-darwin.c (revision 11690)
@@ -34,6 +34,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_libcbase.h"
Index: coregrind/m_syswrap/syswrap-x86-darwin.c
===================================================================
--- coregrind/m_syswrap/syswrap-x86-darwin.c (revision 11689)
+++ coregrind/m_syswrap/syswrap-x86-darwin.c (revision 11690)
@@ -32,6 +32,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_xarray.h"
Index: coregrind/m_syswrap/syswrap-amd64-darwin.c
===================================================================
--- coregrind/m_syswrap/syswrap-amd64-darwin.c (revision 11689)
+++ coregrind/m_syswrap/syswrap-amd64-darwin.c (revision 11690)
@@ -32,6 +32,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_xarray.h"
Index: coregrind/m_syswrap/syswrap-main.c
===================================================================
--- coregrind/m_syswrap/syswrap-main.c (revision 11689)
+++ coregrind/m_syswrap/syswrap-main.c (revision 11690)
@@ -2267,7 +2267,7 @@
sci->status.what = SsIdle;
vg_assert(tst->sched_jmpbuf_valid);
- VG_MINIMAL_LONGJMP(tst->sched_jmpbuf, True);
+ VG_MINIMAL_LONGJMP(tst->sched_jmpbuf);
/* NOTREACHED */
vg_assert(0);
Index: coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- coregrind/m_syswrap/syswrap-darwin.c (revision 11689)
+++ coregrind/m_syswrap/syswrap-darwin.c (revision 11690)
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_xarray.h"
Index: coregrind/m_initimg/initimg-darwin.c
===================================================================
--- coregrind/m_initimg/initimg-darwin.c (revision 11689)
+++ coregrind/m_initimg/initimg-darwin.c (revision 11690)
@@ -47,6 +47,7 @@
#include "pub_core_ume.h"
#include "pub_core_options.h"
#include "pub_core_tooliface.h" /* VG_TRACK */
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h" /* ThreadArchState */
#include "priv_initimg_pathscan.h"
#include "pub_core_initimg.h" /* self */
Index: coregrind/m_coredump/coredump-macho.c
===================================================================
--- coregrind/m_coredump/coredump-macho.c (revision 11689)
+++ coregrind/m_coredump/coredump-macho.c (revision 11690)
@@ -33,6 +33,7 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h"
#include "pub_core_coredump.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
#include "pub_core_threadstate.h"
void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,62 +0,0 @@
Index: VEX/priv/ir_defs.c
===================================================================
--- VEX/priv/ir_defs.c (revision 2129)
+++ VEX/priv/ir_defs.c (revision 2130)
@@ -2265,7 +2265,7 @@
case Iop_I32StoF64: UNARY(Ity_I32, Ity_F64);
case Iop_I64StoF64: BINARY(ity_RMode,Ity_I64, Ity_F64);
case Iop_I64UtoF64: BINARY(ity_RMode,Ity_I64, Ity_F64);
- case Iop_I64UtoF32: BINARY(ity_RMode,Ity_I64, Ity_F64);
+ case Iop_I64UtoF32: BINARY(ity_RMode,Ity_I64, Ity_F32);
case Iop_I32UtoF64: UNARY(Ity_I32, Ity_F64);
Index: VEX/priv/guest_ppc_toIR.c
===================================================================
--- VEX/priv/guest_ppc_toIR.c (revision 2129)
+++ VEX/priv/guest_ppc_toIR.c (revision 2130)
@@ -7256,7 +7256,7 @@
case 0x3Ce: // fcfidus (Float convert from unsigned DWord to single precision)
DIP("fcfidus%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr);
assign( r_tmp64, unop( Iop_ReinterpF64asI64, mkexpr(frB)) );
- assign( frD, binop( Iop_I64UtoF32, rm, mkexpr( r_tmp64 ) ) );
+ assign( frD, unop( Iop_F32toF64, binop( Iop_I64UtoF32, rm, mkexpr( r_tmp64 ) ) ) );
goto putFR;
}
}
Index: VEX/priv/host_ppc_isel.c
===================================================================
--- VEX/priv/host_ppc_isel.c (revision 2129)
+++ VEX/priv/host_ppc_isel.c (revision 2130)
@@ -3190,8 +3190,7 @@
return r_dst;
}
- if (e->Iex.Binop.op == Iop_I64StoF64 || e->Iex.Binop.op == Iop_I64UtoF64
- || e->Iex.Binop.op == Iop_I64UtoF32) {
+ if (e->Iex.Binop.op == Iop_I64StoF64 || e->Iex.Binop.op == Iop_I64UtoF64) {
if (mode64) {
HReg fdst = newVRegF(env);
HReg isrc = iselWordExpr_R(env, e->Iex.Binop.arg2);
@@ -3206,8 +3205,8 @@
addInstr(env, PPCInstr_Store(8, zero_r1, isrc, True/*mode64*/));
addInstr(env, PPCInstr_FpLdSt(True/*load*/, 8, fdst, zero_r1));
addInstr(env, PPCInstr_FpCftI(True/*I->F*/, False/*int64*/,
- e->Iex.Binop.op == Iop_I64StoF64 ? True : False,
- e->Iex.Binop.op == Iop_I64UtoF32 ? False : True,
+ e->Iex.Binop.op == Iop_I64StoF64,
+ True/*fdst is 64 bit*/,
fdst, fdst));
add_to_sp( env, 16 );
@@ -3234,8 +3233,8 @@
addInstr(env, PPCInstr_Store(4, four_r1, isrcLo, False/*mode32*/));
addInstr(env, PPCInstr_FpLdSt(True/*load*/, 8, fdst, zero_r1));
addInstr(env, PPCInstr_FpCftI(True/*I->F*/, False/*int64*/,
- e->Iex.Binop.op == Iop_I64StoF64 ? True : False,
- e->Iex.Binop.op == Iop_I64UtoF32 ? False : True,
+ e->Iex.Binop.op == Iop_I64StoF64,
+ True/*fdst is 64 bit*/,
fdst, fdst));
add_to_sp( env, 16 );

View File

@ -1,211 +0,0 @@
Index: VEX/priv/host_ppc_defs.c
===================================================================
--- VEX/priv/host_ppc_defs.c.orig
+++ VEX/priv/host_ppc_defs.c
@@ -962,17 +962,65 @@ PPCInstr* PPCInstr_FpRSP ( HReg dst, HRe
i->Pin.FpRSP.src = src;
return i;
}
+
+/*
+Valid combo | fromI | int32 | syned | flt64 |
+--------------------------------------------
+ | n n n n |
+--------------------------------------------
+ F64->I64U | n n n y |
+--------------------------------------------
+ | n n y n |
+--------------------------------------------
+ F64->I64S | n n y y |
+--------------------------------------------
+ | n y n n |
+--------------------------------------------
+ F64->I32U | n y n y |
+--------------------------------------------
+ | n y y n |
+--------------------------------------------
+ F64->I32S | n y y y |
+--------------------------------------------
+ I64U->F32 | y n n n |
+--------------------------------------------
+ I64U->F64 | y n n y |
+--------------------------------------------
+ | y n y n |
+--------------------------------------------
+ I64S->F64 | y n y y |
+--------------------------------------------
+ | y y n n |
+--------------------------------------------
+ | y y n y |
+--------------------------------------------
+ | y y y n |
+--------------------------------------------
+ | y y y y |
+--------------------------------------------
+*/
PPCInstr* PPCInstr_FpCftI ( Bool fromI, Bool int32, Bool syned,
- Bool dst64, HReg dst, HReg src ) {
+ Bool flt64, HReg dst, HReg src ) {
+ Bool tmp = fromI | int32 | syned | flt64;
+ vassert(tmp == True || tmp == False); // iow, no high bits set
+ UShort conversion = 0;
+ conversion = (fromI << 3) | (int32 << 2) | (syned << 1) | flt64;
+ switch (conversion) {
+ // Supported conversion operations
+ case 1: case 3: case 5: case 7:
+ case 8: case 9: case 11:
+ break;
+ default:
+ vpanic("PPCInstr_FpCftI(ppc_host)");
+ }
PPCInstr* i = LibVEX_Alloc(sizeof(PPCInstr));
i->tag = Pin_FpCftI;
i->Pin.FpCftI.fromI = fromI;
i->Pin.FpCftI.int32 = int32;
i->Pin.FpCftI.syned = syned;
- i->Pin.FpCftI.dst64 = dst64;
+ i->Pin.FpCftI.flt64 = flt64;
i->Pin.FpCftI.dst = dst;
i->Pin.FpCftI.src = src;
- vassert(!(int32 && fromI)); /* no such insn ("fcfiw"). */
return i;
}
PPCInstr* PPCInstr_FpCMov ( PPCCondCode cond, HReg dst, HReg src ) {
@@ -1445,7 +1493,7 @@ void ppPPCInstr ( PPCInstr* i, Bool mode
if (i->Pin.FpCftI.fromI == True && i->Pin.FpCftI.int32 == False) {
if (i->Pin.FpCftI.syned == True)
str = "fcfid";
- else if (i->Pin.FpCftI.dst64 == True)
+ else if (i->Pin.FpCftI.flt64 == True)
str = "fcfidu";
else
str = "fcfidus";
@@ -3397,7 +3445,7 @@ Int emit_PPCInstr ( UChar* buf, Int nbuf
// fcfid (conv i64 to f64), PPC64 p434
p = mkFormX(p, 63, fr_dst, 0, fr_src, 846, 0);
goto done;
- } else if (i->Pin.FpCftI.dst64 == True) {
+ } else if (i->Pin.FpCftI.flt64 == True) {
// fcfidu (conv u64 to f64)
p = mkFormX(p, 63, fr_dst, 0, fr_src, 974, 0);
goto done;
Index: VEX/priv/host_ppc_defs.h
===================================================================
--- VEX/priv/host_ppc_defs.h.orig
+++ VEX/priv/host_ppc_defs.h
@@ -461,7 +461,7 @@ typedef
Pin_FpLdSt, /* FP load/store */
Pin_FpSTFIW, /* stfiwx */
Pin_FpRSP, /* FP round IEEE754 double to IEEE754 single */
- Pin_FpCftI, /* fcfid/fctid/fctiw */
+ Pin_FpCftI, /* fcfid[u,s,us]/fctid[u]/fctiw[u] */
Pin_FpCMov, /* FP floating point conditional move */
Pin_FpLdFPSCR, /* mtfsf */
Pin_FpCmp, /* FP compare, generating value into int reg */
@@ -662,13 +662,15 @@ typedef
HReg src;
HReg dst;
} FpRSP;
- /* fcfid/fctid/fctiw. Note there's no fcfiw so fromI==True
- && int32==True is not allowed. */
+ /* fcfid[u,s,us]/fctid[u]/fctiw[u]. Only some combinations
+ of the various fields are allowed. This is asserted for
+ and documented in the code for the constructor,
+ PPCInstr_FpCftI, in host_ppc_defs.c. */
struct {
- Bool fromI; /* False==F->I, True==I->F */
- Bool int32; /* True== I is 32, False==I is 64 */
+ Bool fromI; /* True== I->F, False== F->I */
+ Bool int32; /* True== I is 32, False== I is 64 */
Bool syned;
- Bool dst64; /* True==dest is 64bit; False==dest is 32bit */
+ Bool flt64; /* True== F is 64, False== F is 32 */
HReg src;
HReg dst;
} FpCftI;
Index: VEX/priv/host_ppc_isel.c
===================================================================
--- VEX/priv/host_ppc_isel.c.orig
+++ VEX/priv/host_ppc_isel.c
@@ -1471,8 +1471,9 @@ static HReg iselWordExpr_R_wrk ( ISelEnv
set_FPU_rounding_mode( env, e->Iex.Binop.arg1 );
sub_from_sp( env, 16 );
- addInstr(env, PPCInstr_FpCftI(False/*F->I*/, True/*int32*/, True,
- False, ftmp, fsrc));
+ addInstr(env, PPCInstr_FpCftI(False/*F->I*/, True/*int32*/,
+ True/*syned*/, True/*flt64*/,
+ ftmp, fsrc));
addInstr(env, PPCInstr_FpSTFIW(r1, ftmp));
addInstr(env, PPCInstr_Load(4, idst, zero_r1, mode64));
@@ -2959,6 +2960,8 @@ static HReg iselFltExpr ( ISelEnv* env,
/* DO NOT CALL THIS DIRECTLY */
static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e )
{
+ Bool mode64 = env->mode64;
+
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_F32);
@@ -3027,6 +3030,60 @@ static HReg iselFltExpr_wrk ( ISelEnv* e
return fdst;
}
+ if (e->tag == Iex_Binop && e->Iex.Binop.op == Iop_I64UtoF32) {
+ if (mode64) {
+ HReg fdst = newVRegF(env);
+ HReg isrc = iselWordExpr_R(env, e->Iex.Binop.arg2);
+ HReg r1 = StackFramePtr(env->mode64);
+ PPCAMode* zero_r1 = PPCAMode_IR( 0, r1 );
+
+ /* Set host rounding mode */
+ set_FPU_rounding_mode( env, e->Iex.Binop.arg1 );
+
+ sub_from_sp( env, 16 );
+
+ addInstr(env, PPCInstr_Store(8, zero_r1, isrc, True/*mode64*/));
+ addInstr(env, PPCInstr_FpLdSt(True/*load*/, 8, fdst, zero_r1));
+ addInstr(env, PPCInstr_FpCftI(True/*I->F*/, False/*int64*/,
+ False, False,
+ fdst, fdst));
+
+ add_to_sp( env, 16 );
+
+ ///* Restore default FPU rounding. */
+ //set_FPU_rounding_default( env );
+ return fdst;
+ } else {
+ /* 32-bit mode */
+ HReg fdst = newVRegF(env);
+ HReg isrcHi, isrcLo;
+ HReg r1 = StackFramePtr(env->mode64);
+ PPCAMode* zero_r1 = PPCAMode_IR( 0, r1 );
+ PPCAMode* four_r1 = PPCAMode_IR( 4, r1 );
+
+ iselInt64Expr(&isrcHi, &isrcLo, env, e->Iex.Binop.arg2);
+
+ /* Set host rounding mode */
+ set_FPU_rounding_mode( env, e->Iex.Binop.arg1 );
+
+ sub_from_sp( env, 16 );
+
+ addInstr(env, PPCInstr_Store(4, zero_r1, isrcHi, False/*mode32*/));
+ addInstr(env, PPCInstr_Store(4, four_r1, isrcLo, False/*mode32*/));
+ addInstr(env, PPCInstr_FpLdSt(True/*load*/, 8, fdst, zero_r1));
+ addInstr(env, PPCInstr_FpCftI(True/*I->F*/, False/*int64*/,
+ False, False,
+ fdst, fdst));
+
+ add_to_sp( env, 16 );
+
+ ///* Restore default FPU rounding. */
+ //set_FPU_rounding_default( env );
+ return fdst;
+ }
+
+ }
+
vex_printf("iselFltExpr(ppc): No such tag(%u)\n", e->tag);
ppIRExpr(e);
vpanic("iselFltExpr_wrk(ppc)");

View File

@ -1,31 +0,0 @@
Index: VEX/priv/host_ppc_isel.c
===================================================================
--- VEX/priv/host_ppc_isel.c (revision 2135)
+++ VEX/priv/host_ppc_isel.c (revision 2136)
@@ -1615,6 +1615,7 @@
case Iop_Not16:
case Iop_Not32:
case Iop_Not64: {
+ if (op_unop == Iop_Not64) vassert(mode64);
HReg r_dst = newVRegI(env);
HReg r_src = iselWordExpr_R(env, e->Iex.Unop.arg);
addInstr(env, PPCInstr_Unary(Pun_NOT,r_dst,r_src));
@@ -2885,6 +2886,18 @@
return;
}
+ case Iop_Not64: {
+ HReg xLo, xHi;
+ HReg tmpLo = newVRegI(env);
+ HReg tmpHi = newVRegI(env);
+ iselInt64Expr(&xHi, &xLo, env, e->Iex.Unop.arg);
+ addInstr(env, PPCInstr_Unary(Pun_NOT,tmpLo,xLo));
+ addInstr(env, PPCInstr_Unary(Pun_NOT,tmpHi,xHi));
+ *rHi = tmpHi;
+ *rLo = tmpLo;
+ return;
+ }
+
/* ReinterpF64asI64(e) */
/* Given an IEEE754 double, produce an I64 with the same bit
pattern. */

View File

@ -1,13 +0,0 @@
Index: configure.in
===================================================================
--- configure.in (revision 11698)
+++ configure.in (revision 11699)
@@ -986,7 +986,7 @@
#include <altivec.h>
], [
vector unsigned int v;
- __asm__ __volatile__("xsmaddadp %vs32, %vs32, %vs33" ::: "memory","cc");
+ __asm__ __volatile__("xsmaddadp 32, 32, 33" ::: "memory","cc");
],
[
ac_have_vsx=yes

View File

@ -1,22 +0,0 @@
Index: coregrind/m_dispatch/dispatch-ppc64-linux.S
===================================================================
--- coregrind/m_dispatch/dispatch-ppc64-linux.S (revision 11699)
+++ coregrind/m_dispatch/dispatch-ppc64-linux.S (revision 11700)
@@ -310,7 +310,7 @@
/* start over */
b .VG_(run_innerloop__dispatch_unprofiled)
/*NOTREACHED*/
- .size VG_(run_innerloop), .-VG_(run_innerloop)
+ .size .VG_(run_innerloop), .-.VG_(run_innerloop)
/*----------------------------------------------------*/
@@ -385,7 +385,7 @@
/* start over */
b .VG_(run_innerloop__dispatch_profiled)
/*NOTREACHED*/
- .size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation)
+ .size .VG_(run_a_noredir_translation), .-.VG_(run_a_noredir_translation)
/*----------------------------------------------------*/

View File

@ -1,13 +0,0 @@
Index: coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 11764)
+++ coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 11765)
@@ -1380,7 +1380,7 @@
// _____(__NR_rt_sigsuspend, sys_rt_sigsuspend), // 178
GENXY(__NR_pread64, sys_pread64), // 179
-// _____(__NR_pwrite64, sys_pwrite64), // 180
+ GENX_(__NR_pwrite64, sys_pwrite64), // 180
GENX_(__NR_chown, sys_chown), // 181
GENXY(__NR_getcwd, sys_getcwd), // 182
LINXY(__NR_capget, sys_capget), // 183