From 76c2bae8e4b3a7ce4fdabd60bd08f4a542a3ee64 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Feb 07 2009 11:51:28 +0000 Subject: 3.4.0-1 --- diff --git a/.cvsignore b/.cvsignore index 0b7d2ac..d395788 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -valgrind-3.3.0.tar.bz2 +valgrind-3.4.0.tar.bz2 diff --git a/import.log b/import.log new file mode 100644 index 0000000..4232194 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +valgrind-3_4_0-1:HEAD:valgrind-3.4.0-1.src.rpm:1234005462 diff --git a/sources b/sources index 27fc6d2..937f883 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e5fc39755a714f36b7e5014c1c6d4748 valgrind-3.3.0.tar.bz2 +1b0fe1219e1a583ff8c2db54ed2265e6 valgrind-3.4.0.tar.bz2 diff --git a/valgrind-3.3.0-cachegrind-improvements.patch b/valgrind-3.3.0-cachegrind-improvements.patch deleted file mode 100644 index c7864df..0000000 --- a/valgrind-3.3.0-cachegrind-improvements.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- valgrind-3.3.0/cachegrind/cg_sim.c.jj 2007-01-08 02:43:10.000000000 -0500 -+++ valgrind-3.3.0/cachegrind/cg_sim.c 2007-02-13 07:15:46.000000000 -0500 -@@ -42,29 +42,32 @@ typedef struct { - Int size; /* bytes */ - Int assoc; - Int line_size; /* bytes */ -- Int sets; - Int sets_min_1; - Int assoc_bits; - Int line_size_bits; - Int tag_shift; -- Char desc_line[128]; - UWord* tags; --} cache_t2; -+ Char desc_line[128]; -+} cache_t2 -+#ifdef __GNUC__ -+__attribute__ ((aligned (8 * sizeof (Int)))) -+#endif -+; - - /* By this point, the size/assoc/line_size has been checked. */ - static void cachesim_initcache(cache_t config, cache_t2* c) - { -- Int i; -+ Int sets; - - c->size = config.size; - c->assoc = config.assoc; - c->line_size = config.line_size; - -- c->sets = (c->size / c->line_size) / c->assoc; -- c->sets_min_1 = c->sets - 1; -+ sets = (c->size / c->line_size) / c->assoc; -+ c->sets_min_1 = sets - 1; - c->assoc_bits = VG_(log2)(c->assoc); - c->line_size_bits = VG_(log2)(c->line_size); -- c->tag_shift = c->line_size_bits + VG_(log2)(c->sets); -+ c->tag_shift = c->line_size_bits + VG_(log2)(sets); - - if (c->assoc == 1) { - VG_(sprintf)(c->desc_line, "%d B, %d B, direct-mapped", -@@ -74,10 +77,7 @@ static void cachesim_initcache(cache_t c - c->size, c->line_size, c->assoc); - } - -- c->tags = VG_(malloc)(sizeof(UWord) * c->sets * c->assoc); -- -- for (i = 0; i < c->sets * c->assoc; i++) -- c->tags[i] = 0; -+ c->tags = VG_(calloc)(sizeof(UWord) * sets, c->assoc); - } - - /* This is done as a macro rather than by passing in the cache_t2 as an -@@ -140,8 +140,7 @@ void cachesim_##L##_doref(Addr a, UChar - return; \ - \ - /* Second case: word straddles two lines. */ \ -- /* Nb: this is a fast way of doing ((set1+1) % L.sets) */ \ -- } else if (((set1 + 1) & (L.sets-1)) == set2) { \ -+ } else if (((set1 + 1) & (L.sets_min_1)) == set2) { \ - set = &(L.tags[set1 << L.assoc_bits]); \ - if (tag == set[0]) { \ - goto block2; \ diff --git a/valgrind-3.3.0-glibc27-dlhack.patch b/valgrind-3.3.0-glibc27-dlhack.patch deleted file mode 100644 index 3e2abbf..0000000 --- a/valgrind-3.3.0-glibc27-dlhack.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- valgrind-3.3.0/glibc-2.7.supp.jj 2007-12-10 18:18:47.000000000 -0500 -+++ valgrind-3.3.0/glibc-2.7.supp 2008-03-03 17:53:38.000000000 -0500 -@@ -22,6 +22,13 @@ - # if Param: name of system call param - - { -+ dl-hack1 -+ Memcheck:Cond -+ fun:_dl_start -+ fun:_start -+} -+ -+{ - dl-hack3-1 - Memcheck:Cond - obj:/lib*/ld-2.7*.so* diff --git a/valgrind-3.3.0-glibc28.patch b/valgrind-3.3.0-glibc28.patch deleted file mode 100644 index c68ebc1..0000000 --- a/valgrind-3.3.0-glibc28.patch +++ /dev/null @@ -1,236 +0,0 @@ ---- valgrind-3.3.0/configure.in.jj 2008-04-16 05:48:10.000000000 -0400 -+++ valgrind-3.3.0/configure.in 2008-04-16 05:54:04.000000000 -0400 -@@ -471,6 +471,16 @@ AC_EGREP_CPP([GLIBC_27], [ - ], - libc="2.7") - -+AC_EGREP_CPP([GLIBC_28], [ -+#include -+#ifdef __GNU_LIBRARY__ -+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8) -+ GLIBC_28 -+ #endif -+#endif -+], -+libc="2.8") -+ - AC_EGREP_CPP([AIX5_LIBC], [ - #include - #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530) -@@ -521,6 +531,12 @@ case "${libc}" in - DEFAULT_SUPP="glibc-2.7.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - ;; -+ 2.8) -+ AC_MSG_RESULT(2.8 family) -+ AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x]) -+ DEFAULT_SUPP="glibc-2.8.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.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]) -@@ -529,7 +545,7 @@ case "${libc}" in - - *) - AC_MSG_RESULT(unsupported version) -- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.7]) -+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.8]) - AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 libc]) - ;; - esac ---- valgrind-3.3.0/glibc-2.8.supp.jj 2008-04-16 05:50:23.000000000 -0400 -+++ valgrind-3.3.0/glibc-2.8.supp 2008-04-16 05:50:35.000000000 -0400 -@@ -0,0 +1,37 @@ -+ -+# Errors to suppress by default with glibc 2.8.x -+ -+# Format of this file is: -+# { -+# name_of_suppression -+# tool_name:supp_kind -+# (optional extra info for some suppression types) -+# caller0 name, or /name/of/so/file.so -+# caller1 name, or ditto -+# (optionally: caller2 name) -+# (optionally: caller3 name) -+# } -+# -+# For Memcheck, the supp_kinds are: -+# -+# Param Value1 Value2 Value4 Value8 Value16 Jump -+# Free Addr1 Addr2 Addr4 Addr8 Addr16 -+# Cond (previously known as Value0) -+# -+# and the optional extra info is: -+# if Param: name of system call param -+ -+{ -+ dl-hack1 -+ Memcheck:Cond -+ fun:_dl_start -+ fun:_start -+} -+ -+{ -+ dl-hack3-1 -+ Memcheck:Cond -+ obj:/lib*/ld-2.8*.so* -+ obj:/lib*/ld-2.8*.so* -+ obj:/lib*/ld-2.8*.so* -+} ---- valgrind-3.3.0/glibc-2.34567-NPTL-helgrind.supp.jj 2008-04-16 05:48:10.000000000 -0400 -+++ valgrind-3.3.0/glibc-2.34567-NPTL-helgrind.supp 2008-04-16 05:51:59.000000000 -0400 -@@ -1,12 +1,12 @@ - - ##----------------------------------------------------------------------## - # Suppressions for the Helgrind tool when using --# a glibc-2.{2,3,4,5,6} system -+# a glibc-2.{2,3,4,5,6,7,8} system - - ######------------ glibc-2.5 specific ------------###### - # - ## NB. This is the "reference set". Derived sets for --## glibc 2.7, 2.6, 2.4 and 2.3 follow below. -+## glibc 2.8, 2.7, 2.6, 2.4 and 2.3 follow below. - { - helgrind-glibc25-001 - Helgrind:Race -@@ -145,6 +145,65 @@ - fun:start_thread - } - -+######------------ glibc-2.8 specific ---------###### -+# -+{ -+ helgrind-glibc28-001 -+ Helgrind:Race -+ obj:/lib*/ld-2.8.*so -+ obj:/lib*/ld-2.8.*so -+} -+{ -+ helgrind-glibc28-003 -+ Helgrind:Race -+ obj:/lib*/ld-2.8.*so -+ obj:/lib*/libc-2.8.*so -+ obj:/lib*/libc-2.8.*so -+} -+{ -+ helgrind-glibc28-004 -+ Helgrind:Race -+ obj:/lib*/libc-2.8.*so -+ obj:/lib*/libc-2.8.*so -+} -+{ -+ helgrind-glibc28-005 -+ Helgrind:Race -+ obj:/lib*/libpthread-2.8.*so -+ obj:/lib*/libpthread-2.8.*so -+ obj:/lib*/libpthread-2.8.*so -+} -+{ -+ helgrind-glibc28-011 -+ Helgrind:Race -+ obj:/lib*/libc-2.8.*so -+ obj:/lib*/libpthread-2.8.*so -+} -+ -+{ -+ helgrind-glibc28-101 -+ Helgrind:Race -+ obj:/lib*/libpthread-2.8.*so -+ fun:pthread_* -+} -+{ -+ helgrind-glibc28-102 -+ Helgrind:Race -+ fun:mythread_wrapper -+ obj:/lib*/libpthread-2.8.*so -+} -+{ -+ helgrind-glibc28-107 -+ Helgrind:Race -+ obj:/lib*/libpthread-2.8.*so -+ fun:sem_* -+} -+{ -+ helgrind-glibc28-199 -+ Helgrind:Race -+ fun:pthread_barrier_wait -+} -+ - ######------------ glibc-2.7 specific ---------###### - # - { -@@ -198,11 +257,6 @@ - obj:/lib*/libpthread-2.7.*so - fun:sem_* - } --{ -- helgrind-glibc27-199 -- Helgrind:Race -- fun:pthread_barrier_wait --} - - ######------------ glibc-2.6 specific ---------###### - # ---- valgrind-3.3.0/configure.jj 2008-04-16 05:48:10.000000000 -0400 -+++ valgrind-3.3.0/configure 2008-04-16 05:54:08.000000000 -0400 -@@ -4624,6 +4624,28 @@ cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - -+#include -+#ifdef __GNU_LIBRARY__ -+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8) -+ GLIBC_28 -+ #endif -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "GLIBC_28" >/dev/null 2>&1; then -+ libc="2.8" -+fi -+rm -f conftest* -+ -+ -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ - #include - #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530) - AIX5_LIBC -@@ -4710,6 +4732,17 @@ _ACEOF - DEFAULT_SUPP="glibc-2.7.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - ;; -+ 2.8) -+ echo "$as_me:$LINENO: result: 2.8 family" >&5 -+echo "${ECHO_T}2.8 family" >&6 -+ -+cat >>confdefs.h <<\_ACEOF -+#define GLIBC_2_8 1 -+_ACEOF -+ -+ DEFAULT_SUPP="glibc-2.8.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ ;; - aix5) - echo "$as_me:$LINENO: result: AIX 5.1 or 5.2 or 5.3" >&5 - echo "${ECHO_T}AIX 5.1 or 5.2 or 5.3" >&6 -@@ -4724,8 +4757,8 @@ _ACEOF - *) - echo "$as_me:$LINENO: result: unsupported version" >&5 - echo "${ECHO_T}unsupported version" >&6 -- { { echo "$as_me:$LINENO: error: Valgrind requires glibc version 2.2 - 2.7" >&5 --echo "$as_me: error: Valgrind requires glibc version 2.2 - 2.7" >&2;} -+ { { echo "$as_me:$LINENO: error: Valgrind requires glibc version 2.2 - 2.8" >&5 -+echo "$as_me: error: Valgrind requires glibc version 2.2 - 2.8" >&2;} - { (exit 1); exit 1; }; } - { { echo "$as_me:$LINENO: error: or AIX 5.1 or 5.2 or 5.3 libc" >&5 - echo "$as_me: error: or AIX 5.1 or 5.2 or 5.3 libc" >&2;} diff --git a/valgrind-3.3.0-helgrind-p_b_w.patch b/valgrind-3.3.0-helgrind-p_b_w.patch deleted file mode 100644 index c78a6ca..0000000 --- a/valgrind-3.3.0-helgrind-p_b_w.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- valgrind-3.3.0/glibc-2.34567-NPTL-helgrind.supp.jj 2007-12-11 00:18:47.000000000 +0100 -+++ valgrind-3.3.0/glibc-2.34567-NPTL-helgrind.supp 2008-03-03 13:48:42.000000000 +0100 -@@ -198,6 +198,11 @@ - obj:/lib*/libpthread-2.7.*so - fun:sem_* - } -+{ -+ helgrind-glibc27-199 -+ Helgrind:Race -+ fun:pthread_barrier_wait -+} - - ######------------ glibc-2.6 specific ---------###### - # diff --git a/valgrind-3.3.0-openat.patch b/valgrind-3.3.0-openat.patch deleted file mode 100644 index 0a2d6a6..0000000 --- a/valgrind-3.3.0-openat.patch +++ /dev/null @@ -1,38 +0,0 @@ -Testcase: -#define _GNU_SOURCE -#include -#include - -int -main (void) -{ - int dfd = open ("/tmp", O_RDONLY); - int fd1 = openat (dfd, "abc", O_RDONLY); - int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY); - int fd3 = openat (AT_FDCWD, "abc", O_RDONLY); - /* This is the only one that should warn. */ - int fd4 = openat (0x12345678, "abc", O_RDONLY); - return 0; -} - ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c.jj 2007-12-11 00:18:43.000000000 +0100 -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c 2008-03-03 11:35:15.000000000 +0100 -@@ -2455,10 +2455,15 @@ PRE(sys_openat) - int, dfd, const char *, filename, int, flags); - } - -- if (ARG1 != VKI_AT_FDCWD && !ML_(fd_allowed)(ARG1, "openat", tid, False)) -+ PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); -+ -+ /* For absolute filenames, dfd is ignored. If dfd is AT_FDCWD, -+ filename is relative to cwd. */ -+ if (ML_(safe_to_deref)( (void*)ARG2, 1 ) -+ && *(Char *)ARG2 != '/' -+ && ARG1 != VKI_AT_FDCWD -+ && !ML_(fd_allowed)(ARG1, "openat", tid, False)) - SET_STATUS_Failure( VKI_EBADF ); -- else -- PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); - - /* Handle the case where the open is of /proc/self/cmdline or - /proc//cmdline, and just give it a copy of the fd for the diff --git a/valgrind-3.3.0-pkg-config.patch b/valgrind-3.3.0-pkg-config.patch deleted file mode 100644 index ffedf36..0000000 --- a/valgrind-3.3.0-pkg-config.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- valgrind-3.3.0/configure.in.jj 2007-01-29 14:42:52.000000000 -0500 -+++ valgrind-3.3.0/configure.in 2007-02-13 08:02:26.000000000 -0500 -@@ -251,6 +251,7 @@ AC_MSG_CHECKING([for a supported CPU/OS - - AC_SUBST(VG_PLATFORM_PRI) - AC_SUBST(VG_PLATFORM_SEC) -+AC_SUBST(VG_PLATFORM) - - case "$VG_ARCH-$VG_OS" in - x86-linux) -@@ -296,6 +297,7 @@ case "$VG_ARCH-$VG_OS" in - AC_MSG_ERROR([Valgrind is platform specific. Sorry. Please consider doing a port.]) - ;; - esac -+VG_PLATFORM=`echo "$VG_PLATFORM_PRI" | LC_ALL=C tr A-Z_ a-z-` - - # Set up VG_. Either one or two of these become defined. - # ---- valgrind-3.3.0/configure.jj 2007-01-29 14:45:30.000000000 -0500 -+++ valgrind-3.3.0/configure 2007-02-13 08:04:33.000000000 -0500 -@@ -311,7 +311,7 @@ ac_includes_default="\ - # include - #endif" - --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT VEX_DIR DISTCHECK_CONFIGURE_FLAGS LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB PERL GDB CCAS CCASFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VG_ARCH VG_ARCH_ALL VALT_LOAD_ADDRESS VG_OS VG_PLATFORM_PRI VG_PLATFORM_SEC VGP_X86_LINUX_TRUE VGP_X86_LINUX_FALSE VGP_AMD64_LINUX_TRUE VGP_AMD64_LINUX_FALSE VGP_PPC32_LINUX_TRUE VGP_PPC32_LINUX_FALSE VGP_PPC64_LINUX_TRUE VGP_PPC64_LINUX_FALSE VGP_PPC32_AIX5_TRUE VGP_PPC32_AIX5_FALSE VGP_PPC64_AIX5_TRUE VGP_PPC64_AIX5_FALSE VGO_LINUX_TRUE VGO_LINUX_FALSE VGO_AIX5_TRUE VGO_AIX5_FALSE VGP_HAVE_SECONDARY_TRUE VGP_HAVE_SECONDARY_FALSE DEFAULT_SUPP EGREP FLAG_M32 FLAG_MAIX32 FLAG_M64 FLAG_MAIX64 FLAG_MMMX FLAG_MSSE PREFERRED_STACK_BOUNDARY FLAG_WDECL_AFTER_STMT FLAG_FNO_STACK_PROTECTOR BUILD_SSE3_TESTS_TRUE BUILD_SSE3_TESTS_FALSE LIBOBJS MPI_CC BUILD_MPIWRAP_PRI_TRUE BUILD_MPIWRAP_PRI_FALSE BUILD_MPIWRAP_SEC_TRUE BUILD_MPIWRAP_SEC_FALSE LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT VEX_DIR DISTCHECK_CONFIGURE_FLAGS LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB PERL GDB CCAS CCASFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VG_ARCH VG_ARCH_ALL VALT_LOAD_ADDRESS VG_OS VG_PLATFORM_PRI VG_PLATFORM_SEC VG_PLATFORM VGP_X86_LINUX_TRUE VGP_X86_LINUX_FALSE VGP_AMD64_LINUX_TRUE VGP_AMD64_LINUX_FALSE VGP_PPC32_LINUX_TRUE VGP_PPC32_LINUX_FALSE VGP_PPC64_LINUX_TRUE VGP_PPC64_LINUX_FALSE VGP_PPC32_AIX5_TRUE VGP_PPC32_AIX5_FALSE VGP_PPC64_AIX5_TRUE VGP_PPC64_AIX5_FALSE VGO_LINUX_TRUE VGO_LINUX_FALSE VGO_AIX5_TRUE VGO_AIX5_FALSE VGP_HAVE_SECONDARY_TRUE VGP_HAVE_SECONDARY_FALSE DEFAULT_SUPP EGREP FLAG_M32 FLAG_MAIX32 FLAG_M64 FLAG_MAIX64 FLAG_MMMX FLAG_MSSE PREFERRED_STACK_BOUNDARY FLAG_WDECL_AFTER_STMT FLAG_FNO_STACK_PROTECTOR BUILD_SSE3_TESTS_TRUE BUILD_SSE3_TESTS_FALSE LIBOBJS MPI_CC BUILD_MPIWRAP_PRI_TRUE BUILD_MPIWRAP_PRI_FALSE BUILD_MPIWRAP_SEC_TRUE BUILD_MPIWRAP_SEC_FALSE LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -4348,6 +4348,7 @@ echo "$as_me: error: Valgrind is platfor - { (exit 1); exit 1; }; } - ;; - esac -+VG_PLATFORM=`echo "$VG_PLATFORM_PRI" | LC_ALL=C tr A-Z_ a-z-` - - # Set up VGP_. Either one or two of these become defined. - # -@@ -8351,6 +8352,7 @@ s,@VALT_LOAD_ADDRESS@,$VALT_LOAD_ADDRESS - s,@VG_OS@,$VG_OS,;t t - s,@VG_PLATFORM_PRI@,$VG_PLATFORM_PRI,;t t - s,@VG_PLATFORM_SEC@,$VG_PLATFORM_SEC,;t t -+s,@VG_PLATFORM@,$VG_PLATFORM,;t t - s,@VGP_X86_LINUX_TRUE@,$VGP_X86_LINUX_TRUE,;t t - s,@VGP_X86_LINUX_FALSE@,$VGP_X86_LINUX_FALSE,;t t - s,@VGP_AMD64_LINUX_TRUE@,$VGP_AMD64_LINUX_TRUE,;t t ---- valgrind-3.3.0/valgrind.pc.in.jj 2007-01-02 09:52:30.000000000 -0500 -+++ valgrind-3.3.0/valgrind.pc.in 2007-02-13 08:04:57.000000000 -0500 -@@ -4,13 +4,13 @@ libdir=@libdir@ - includedir=@includedir@/valgrind - arch=@VG_ARCH@ - os=@VG_OS@ --platform=@VG_PLATFORM_PRI@ -+platform=@VG_PLATFORM@ - valt_load_address=@VALT_LOAD_ADDRESS@ - - Name: Valgrind - Description: A dynamic binary instrumentation framework - Version: @VERSION@ - Requires: --Libs: -L${libdir}/valgrind/@VG_PLATFORM_PRI@ -lcoregrind -lvex -lgcc -+Libs: -L${libdir}/valgrind/@VG_PLATFORM@ -lcoregrind -lvex -lgcc - Cflags: -I${includedir} - diff --git a/valgrind-3.3.0-power5+-6.patch b/valgrind-3.3.0-power5+-6.patch deleted file mode 100644 index 48f884d..0000000 --- a/valgrind-3.3.0-power5+-6.patch +++ /dev/null @@ -1,781 +0,0 @@ ---- valgrind-3.3.0/VEX/priv/guest-ppc/toIR.c.jj 2007-12-11 00:18:52.000000000 +0100 -+++ valgrind-3.3.0/VEX/priv/guest-ppc/toIR.c 2008-03-03 09:58:59.000000000 +0100 -@@ -333,6 +333,7 @@ typedef enum { - } PPC_GST; - - #define MASK_FPSCR_RN 0x3 -+#define MASK_FPSCR_FPRF 0x1F000 - #define MASK_VSCR_VALID 0x00010001 - - -@@ -2142,7 +2143,7 @@ static IRExpr* /* ::Ity_I32 */ getGST_ma - - /* We're only keeping track of the rounding mode, - so if the mask isn't asking for this, just return 0x0 */ -- if (mask & 0x3) { -+ if (mask & (MASK_FPSCR_RN|MASK_FPSCR_FPRF)) { - assign( val, IRExpr_Get( OFFB_FPROUND, Ity_I32 ) ); - } else { - assign( val, mkU32(0x0) ); -@@ -2271,7 +2272,7 @@ static void putGST_masked ( PPC_GST reg, - switch (reg) { - case PPC_GST_FPSCR: { - /* Allow writes to Rounding Mode */ -- if (mask & 0x3) { -+ if (mask & (MASK_FPSCR_RN|MASK_FPSCR_FPRF)) { - /* construct new fpround from new and old values as per mask: - new fpround = (src & (3 & mask)) | (fpround & (3 & ~mask)) */ - stmt( -@@ -2279,11 +2280,11 @@ static void putGST_masked ( PPC_GST reg, - OFFB_FPROUND, - binop( - Iop_Or32, -- binop(Iop_And32, src, mkU32(3 & mask)), -+ binop(Iop_And32, src, mkU32((MASK_FPSCR_RN|MASK_FPSCR_FPRF) & mask)), - binop( - Iop_And32, - IRExpr_Get(OFFB_FPROUND,Ity_I32), -- mkU32(3 & ~mask) -+ mkU32((MASK_FPSCR_RN|MASK_FPSCR_FPRF) & ~mask) - ) - ) - ) -@@ -3224,6 +3225,48 @@ static Bool dis_int_logic ( UInt theInst - // TODO: alternatively: assign(rA, verbose_Clz64(rS)); - break; - -+ case 0x1FC: // cmpb (Power6: compare bytes) -+ DIP("cmpb r%u,r%u,r%u\n", rA_addr, rS_addr, rB_addr); -+ -+ if (mode64) -+ assign( rA, unop( Iop_V128to64, -+ binop( Iop_CmpEQ8x16, -+ binop( Iop_64HLtoV128, mkU64(0), mkexpr(rS) ), -+ binop( Iop_64HLtoV128, mkU64(0), mkexpr(rB) ) -+ )) ); -+ else -+ assign( rA, unop( Iop_V128to32, -+ binop( Iop_CmpEQ8x16, -+ unop( Iop_32UtoV128, mkexpr(rS) ), -+ unop( Iop_32UtoV128, mkexpr(rB) ) -+ )) ); -+ break; -+ -+ case 0x2DF: { // mftgpr (move floating-point to general purpose register) -+ IRTemp frB = newTemp(Ity_F64); -+ DIP("mftgpr r%u,fr%u\n", rS_addr, rB_addr); -+ -+ assign( frB, getFReg(rB_addr)); // always F64 -+ if (mode64) -+ assign( rA, unop( Iop_ReinterpF64asI64, mkexpr(frB)) ); -+ else -+ assign( rA, unop( Iop_64to32, unop( Iop_ReinterpF64asI64, mkexpr(frB))) ); -+ -+ putIReg( rS_addr, mkexpr(rA)); -+ return True; -+ } -+ case 0x25F: { // mffgpr (move floating-point from general purpose register) -+ IRTemp frA = newTemp(Ity_F64); -+ DIP("mffgpr fr%u,r%u\n", rS_addr, rB_addr); -+ -+ if (mode64) -+ assign( frA, unop( Iop_ReinterpI64asF64, mkexpr(rB)) ); -+ else -+ assign( frA, unop( Iop_ReinterpI64asF64, unop( Iop_32Uto64, mkexpr(rB))) ); -+ -+ putFReg( rS_addr, mkexpr(frA)); -+ return True; -+ } - default: - vex_printf("dis_int_logic(ppc)(opc2)\n"); - return False; -@@ -6533,6 +6576,45 @@ static Bool dis_fp_round ( UInt theInstr - binop(Iop_I64toF64, rm, mkexpr(r_tmp64)) ); - break; - -+ case 0x188: case 0x1A8: case 0x1C8: case 0x1E8: // frin, friz, frip, frim -+ switch(opc2) { -+ case 0x188: // frin (Floating Round to Integer Nearest) -+ DIP("frin%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); -+ assign( r_tmp64, -+ binop(Iop_F64toI64, mkU32(Irrm_NEAREST), mkexpr(frB)) ); -+ break; -+ case 0x1A8: // friz (Floating Round to Integer Toward Zero) -+ DIP("friz%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); -+ assign( r_tmp64, -+ binop(Iop_F64toI64, mkU32(Irrm_ZERO), mkexpr(frB)) ); -+ break; -+ case 0x1C8: // frip (Floating Round to Integer Plus) -+ DIP("frip%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); -+ assign( r_tmp64, -+ binop(Iop_F64toI64, mkU32(Irrm_PosINF), mkexpr(frB)) ); -+ break; -+ case 0x1E8: // frim (Floating Round to Integer Minus) -+ DIP("frim%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); -+ assign( r_tmp64, -+ binop(Iop_F64toI64, mkU32(Irrm_NegINF), mkexpr(frB)) ); -+ break; -+ } -+ -+ /* don't use the rounded integer if frB is outside -9e18..9e18 */ -+ /* F64 has only log10(2**52) significant digits anyway */ -+ /* need to preserve sign of zero */ -+ /* frD = (fabs(frB) > 9e18) ? frB : -+ (sign(frB)) ? -fabs((double)r_tmp64) : (double)r_tmp64 */ -+ assign( frD, IRExpr_Mux0X( unop( Iop_32to8, binop( Iop_CmpF64, -+ IRExpr_Const(IRConst_F64(9e18)), unop( Iop_AbsF64, mkexpr(frB)))), -+ IRExpr_Mux0X( unop( Iop_32to8, binop( Iop_Shr32, unop( Iop_64HIto32, -+ unop(Iop_ReinterpF64asI64, mkexpr(frB))), mkU8(31))), -+ binop( Iop_I64toF64, mkU32(0), mkexpr(r_tmp64) ), -+ unop( Iop_NegF64, unop( Iop_AbsF64, -+ binop(Iop_I64toF64, mkU32(0), mkexpr(r_tmp64)) )) ), -+ mkexpr(frB) )); -+ break; -+ - default: - vex_printf("dis_fp_round(ppc)(opc2)\n"); - return False; -@@ -9139,6 +9221,10 @@ DisResult disInstr_PPC_WRK ( - case 0x32E: // fctid - case 0x32F: // fctidz - case 0x34E: // fcfid -+ case 0x188: // frin (Power5+) -+ case 0x1A8: // friz (Power5+) -+ case 0x1C8: // frip (Power5+) -+ case 0x1E8: // frim (Power5+) - if (dis_fp_round(theInstr)) goto decode_success; - goto decode_failure; - -@@ -9216,6 +9302,10 @@ DisResult disInstr_PPC_WRK ( - if (dis_int_arith( theInstr )) goto decode_success; - goto decode_failure; - -+ case 0x1FC: // cmpb -+ if (dis_int_logic( theInstr )) goto decode_success; -+ goto decode_failure; -+ - default: - break; // Fall through... - } -@@ -9234,6 +9324,7 @@ DisResult disInstr_PPC_WRK ( - case 0x11C: case 0x3BA: case 0x39A: // eqv, extsb, extsh - case 0x1DC: case 0x07C: case 0x1BC: // nand, nor, or - case 0x19C: case 0x13C: // orc, xor -+ case 0x2DF: case 0x25F: // mftgpr, mffgpr - if (dis_int_logic( theInstr )) goto decode_success; - goto decode_failure; - ---- valgrind-3.3.0/none/tests/ppc32/Makefile.am.jj 2007-12-11 00:18:32.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc32/Makefile.am 2008-03-03 10:00:36.000000000 +0100 -@@ -19,13 +19,15 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ - testVMX.stderr.exp testVMX.stdout.exp testVMX.vgtest \ - twi.stderr.exp twi.stdout.exp twi.vgtest \ - tw.stderr.exp tw.stdout.exp tw.vgtest \ -- xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest -+ xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest \ -+ power5+_round.stderr.exp power5+_round.stdout.exp power5+_round.vgtest \ -+ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest - - check_PROGRAMS = \ - bug129390-ppc32 \ - bug139050-ppc32 \ - ldstrev lsw jm-insns mftocrf mcrfs round test_fx test_gx \ -- testVMX twi tw xlc_dbl_u32 -+ testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp - - AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ - @FLAG_M32@ ---- valgrind-3.3.0/none/tests/ppc32/power5+_round.c.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc32/power5+_round.c 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1,147 @@ -+/* Copyright (C) 2007 Pete Eberlein eberlein@us.ibm.com -+ -+ 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. -+*/ -+ -+ -+ -+#include -+#include -+#include -+#include -+ -+#define POS_NORMAL 0x4000 -+#define NEG_NORMAL 0x8000 -+#define POS_INF 0x5000 -+#define NEG_INF 0x9000 -+#define POS_ZERO 0x2000 -+#define NEG_ZERO 0x12000 -+#define POS_DENORMAL 0x14000 -+#define NEG_DENORMAL 0x18000 -+#define NAN 0x11000 -+#define FPRF_MASK 0x1F000 -+ -+ -+int main (int argc, char* argv[]) { -+ -+ double inf, neg0, nan; -+ union { -+ double d; -+ struct { unsigned int dummy, dummy2: 15, fprf:17; }; -+ } fpscr; -+ -+ inf = strtod("inf", NULL); -+ neg0 = copysign(0, -1); -+ nan = strtod("nan", NULL); -+ -+ -+ /* This set is disabled until fprf is implemented. */ -+ if (0) { -+ double set[] = {inf, 1.5, 0, neg0, -1.5, -inf, nan}; -+ int i, j, fprf; -+ for (i=0; i<7; ++i) { -+ for (j=0; j<7; ++j) { -+ asm ("fcmpu 1, %1, %2\n\t" \ -+ "mffs %0\n" \ -+ : "=f" (fpscr.d) \ -+ : "f" (set[i]), "f" (set[j]) \ -+ ); -+ -+ if (i == 6 || j == 6) { -+ fprf = 0x1000; // Unordered -+ } else if (i == j || (i==2 && j==3) || (i==3 && j==2)) { -+ fprf = 0x2000; // Equal -+ } else if (i < j) { -+ fprf = 0x4000; // Greater Than -+ } else if (i > j) { -+ fprf = 0x8000; // Less Than -+ } -+ -+ printf("fcmpu\t%.1f\t%.1f\t%x\t%s\n", set[i], set[j], fpscr.fprf, -+ fpscr.fprf == fprf ? "PASS" : "FAIL"); -+ } -+ } -+ } -+ -+ { -+ double set[] = {inf, 1.9, 1.1, 0, neg0, -1.1, -1.9, -inf, nan}; -+ double frin[] = {inf, 2.0, 1.0, 0, neg0, -1.0, -2.0, -inf, nan}; -+ double friz[] = {inf, 1.0, 1.0, 0, neg0, -1.0, -1.0, -inf, nan}; -+ double frip[] = {inf, 2.0, 2.0, 0, neg0, -1.0, -1.0, -inf, nan}; -+ double frim[] = {inf, 1.0, 1.0, 0, neg0, -2.0, -2.0, -inf, nan}; -+ int fprf[] = {POS_INF, POS_NORMAL, POS_NORMAL, POS_ZERO, NEG_ZERO, -+ NEG_NORMAL, NEG_NORMAL, NEG_INF, NAN}; -+ double set2[] = {0.9, 0.1, -0.1, -0.9, 1e-40, -1e-40}; -+ double frin2[] = {1.0, 0.0, -0.0, -1.0, 0.0, -0.0}; -+ int frin2rf[] = {POS_NORMAL,POS_ZERO,NEG_ZERO,NEG_NORMAL,POS_ZERO,NEG_ZERO}; -+ double friz2[] = {0.0, 0.0, -0.0, -0.0, 0.0, -0.0}; -+ int friz2rf[] = {POS_ZERO,POS_ZERO,NEG_ZERO,NEG_ZERO,POS_ZERO,NEG_ZERO}; -+ double frip2[] = {1.0, 1.0, -0.0, -0.0, 1.0, -0.0}; -+ int frip2rf[] = {POS_NORMAL,POS_NORMAL,NEG_ZERO,NEG_ZERO,POS_NORMAL,NEG_ZERO}; -+ double frim2[] = {0.0, 0.0, -1.0, -1.0, 0.0, -1.0}; -+ int frim2rf[] = {POS_ZERO,POS_ZERO,NEG_NORMAL,NEG_NORMAL,POS_ZERO,NEG_NORMAL}; -+ double ret; -+ int i; -+ -+#define DO_TEST(op,in,out,rf) for (i=0; i -+#include -+#include -+ -+#define CMPB(result,a,b) \ -+ asm __volatile ("cmpb %0, %1, %2\n" : "=r"(result) : "r"(a), "r"(b)) -+ -+ -+int main (int argc, char* argv[]) { -+ int i,j,k; -+ long mask; -+ for (i=1; i<16; i++) { -+ mask = 0; -+ if(i&1) mask+=0xff; -+ if(i&2) mask+=0xff00; -+ if(i&4) mask+=0xff0000; -+ if(i&8) mask+=0xff000000; -+ -+ for (j=0; j<256; j++) -+ for (k=0; k<256; k++) -+ if (j!=k) { -+ -+ long a, b, result; -+ a = (mask & (j*0x1010101)) + ((~mask) & (k*0x1010101)); -+ b = j*0x1010101; -+ CMPB(result, a, b); -+ if (result != mask) -+ printf("%8x %8x %8x %8x\n", mask, a, b, result); -+ exit(1); -+ } -+ -+ } -+ -+ return 0; -+} -+ ---- valgrind-3.3.0/none/tests/ppc32/power6_bcmp.stderr.exp.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc32/power6_bcmp.stderr.exp 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1,2 @@ -+ -+ ---- valgrind-3.3.0/none/tests/ppc32/power6_bcmp.vgtest.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc32/power6_bcmp.vgtest 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1 @@ -+prog: power6_bcmp ---- valgrind-3.3.0/none/tests/ppc64/Makefile.am.jj 2007-12-11 00:18:35.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/Makefile.am 2008-03-03 10:01:52.000000000 +0100 -@@ -9,10 +9,12 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ - std_reg_imm.vgtest std_reg_imm.stderr.exp std_reg_imm.stdout.exp \ - round.stderr.exp round.stdout.exp round.vgtest \ - twi_tdi.stderr.exp twi_tdi.stdout.exp twi_tdi.vgtest \ -- tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest -+ tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest \ -+ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \ -+ power6_mf_gpr.stderr.exp power6_mf_gpr.stdout.exp power6_mf_gpr.vgtest - - check_PROGRAMS = \ -- jm-insns lsw round std_reg_imm twi_tdi tw_td -+ jm-insns lsw round std_reg_imm twi_tdi tw_td power6_bcmp power6_mf_gpr - - AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ - @FLAG_M64@ ---- valgrind-3.3.0/none/tests/ppc64/power6_bcmp.c.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/power6_bcmp.c 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1,61 @@ -+/* Copyright (C) 2007 Pete Eberlein eberlein@us.ibm.com -+ -+ 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. -+*/ -+ -+ -+#include -+#include -+#include -+ -+#define CMPB(result,a,b) \ -+ asm ("cmpb %0, %1, %2\n" : "=r"(result) : "r"(a), "r"(b)) -+ -+ -+int main (int argc, char* argv[]) { -+ int i,j,k; -+ unsigned long mask; -+ for (i=1; i<256; i++) { -+ mask = 0; -+ if(i&1) mask+=0xff; -+ if(i&2) mask+=0xff00; -+ if(i&4) mask+=0xff0000; -+ if(i&8) mask+=0xff000000; -+ if(i&16) mask+=0xff00000000; -+ if(i&32) mask+=0xff0000000000; -+ if(i&64) mask+=0xff000000000000; -+ if(i&128) mask+=0xff00000000000000; -+ -+ for (j=0; j<256; j++) -+ for (k=0; k<256; k++) -+ if (j!=k) { -+ -+ unsigned long a, b, result; -+ a = (mask & (j*0x101010101010101)) + ((~mask) & (k*0x101010101010101)); -+ b = j*0x101010101010101; -+ CMPB(result, a, b); -+ if (result != mask) -+ printf("%8lx %8lx %8lx %8lx\n", mask, a, b, result); -+ exit(1); -+ } -+ -+ } -+ -+ return 0; -+} -+ ---- valgrind-3.3.0/none/tests/ppc64/power6_bcmp.stderr.exp.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/power6_bcmp.stderr.exp 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1,2 @@ -+ -+ ---- valgrind-3.3.0/none/tests/ppc64/power6_bcmp.vgtest.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/power6_bcmp.vgtest 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1 @@ -+prog: power6_bcmp ---- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.c.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.c 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1,47 @@ -+/* Copyright (C) 2007 Pete Eberlein eberlein@us.ibm.com -+ -+ 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. -+*/ -+ -+#include -+#include -+ -+ -+ -+int main (int argc, char* argv[]) -+{ -+ -+ long i; -+ double f; -+ -+ i = 0; -+ f = 100.0; -+ -+ printf("%lx %f\n", i, f); -+ -+ asm ("mftgpr %0, %1\n" : "=r"(i) : "f"(f)); -+ -+ f=0.0; -+ printf("%lx %f\n", i, f); -+ -+ asm ("mffgpr %0, %1\n" : "=f"(f) : "r"(i)); -+ -+ printf("%lx %f\n", i, f); -+ -+ return 0; -+} ---- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stderr.exp.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stderr.exp 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1,2 @@ -+ -+ ---- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stdout.exp.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stdout.exp 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1,3 @@ -+0 100.000000 -+4059000000000000 0.000000 -+4059000000000000 100.000000 ---- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.vgtest.jj 2008-03-03 09:58:59.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.vgtest 2008-03-03 09:58:59.000000000 +0100 -@@ -0,0 +1 @@ -+prog: power6_mf_gpr ---- valgrind-3.3.0/none/tests/ppc32/Makefile.in.jj 2007-12-11 00:23:53.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc32/Makefile.in 2008-03-03 10:02:14.000000000 +0100 -@@ -40,7 +40,8 @@ check_PROGRAMS = bug129390-ppc32$(EXEEXT - ldstrev$(EXEEXT) lsw$(EXEEXT) jm-insns$(EXEEXT) \ - mftocrf$(EXEEXT) mcrfs$(EXEEXT) round$(EXEEXT) \ - test_fx$(EXEEXT) test_gx$(EXEEXT) testVMX$(EXEEXT) \ -- twi$(EXEEXT) tw$(EXEEXT) xlc_dbl_u32$(EXEEXT) -+ twi$(EXEEXT) tw$(EXEEXT) xlc_dbl_u32$(EXEEXT) \ -+ power5+_round$(EXEEXT) power6_bcmp$(EXEEXT) - subdir = none/tests/ppc32 - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -71,6 +72,12 @@ mcrfs_LDADD = $(LDADD) - mftocrf_SOURCES = mftocrf.c - mftocrf_OBJECTS = mftocrf.$(OBJEXT) - mftocrf_LDADD = $(LDADD) -+power5__round_SOURCES = power5+_round.c -+power5__round_OBJECTS = power5+_round.$(OBJEXT) -+power5__round_LDADD = $(LDADD) -+power6_bcmp_SOURCES = power6_bcmp.c -+power6_bcmp_OBJECTS = power6_bcmp.$(OBJEXT) -+power6_bcmp_LDADD = $(LDADD) - round_SOURCES = round.c - round_OBJECTS = round.$(OBJEXT) - round_LDADD = $(LDADD) -@@ -101,11 +108,12 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUD - CCLD = $(CC) - LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - SOURCES = bug129390-ppc32.c bug139050-ppc32.c jm-insns.c ldstrev.c \ -- lsw.c mcrfs.c mftocrf.c round.c testVMX.c test_fx.c test_gx.c \ -- tw.c twi.c xlc_dbl_u32.c -+ lsw.c mcrfs.c mftocrf.c power5+_round.c power6_bcmp.c round.c \ -+ testVMX.c test_fx.c test_gx.c tw.c twi.c xlc_dbl_u32.c - DIST_SOURCES = bug129390-ppc32.c bug139050-ppc32.c jm-insns.c \ -- ldstrev.c lsw.c mcrfs.c mftocrf.c round.c testVMX.c test_fx.c \ -- test_gx.c tw.c twi.c xlc_dbl_u32.c -+ ldstrev.c lsw.c mcrfs.c mftocrf.c power5+_round.c \ -+ power6_bcmp.c round.c testVMX.c test_fx.c test_gx.c tw.c twi.c \ -+ xlc_dbl_u32.c - ETAGS = etags - CTAGS = ctags - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -@@ -266,7 +275,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ - testVMX.stderr.exp testVMX.stdout.exp testVMX.vgtest \ - twi.stderr.exp twi.stdout.exp twi.vgtest \ - tw.stderr.exp tw.stdout.exp tw.vgtest \ -- xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest -+ xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest \ -+ power5+_round.stderr.exp power5+_round.stdout.exp power5+_round.vgtest \ -+ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest - - AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ - @FLAG_M32@ -@@ -335,6 +346,12 @@ mcrfs$(EXEEXT): $(mcrfs_OBJECTS) $(mcrfs - mftocrf$(EXEEXT): $(mftocrf_OBJECTS) $(mftocrf_DEPENDENCIES) - @rm -f mftocrf$(EXEEXT) - $(LINK) $(mftocrf_LDFLAGS) $(mftocrf_OBJECTS) $(mftocrf_LDADD) $(LIBS) -+power5+_round$(EXEEXT): $(power5__round_OBJECTS) $(power5__round_DEPENDENCIES) -+ @rm -f power5+_round$(EXEEXT) -+ $(LINK) $(power5__round_LDFLAGS) $(power5__round_OBJECTS) $(power5__round_LDADD) $(LIBS) -+power6_bcmp$(EXEEXT): $(power6_bcmp_OBJECTS) $(power6_bcmp_DEPENDENCIES) -+ @rm -f power6_bcmp$(EXEEXT) -+ $(LINK) $(power6_bcmp_LDFLAGS) $(power6_bcmp_OBJECTS) $(power6_bcmp_LDADD) $(LIBS) - round$(EXEEXT): $(round_OBJECTS) $(round_DEPENDENCIES) - @rm -f round$(EXEEXT) - $(LINK) $(round_LDFLAGS) $(round_OBJECTS) $(round_LDADD) $(LIBS) -@@ -370,6 +387,8 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsw.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcrfs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mftocrf.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power5+_round.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power6_bcmp.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVMX-testVMX.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_fx.Po@am__quote@ ---- valgrind-3.3.0/none/tests/ppc64/Makefile.in.jj 2007-12-11 00:23:55.000000000 +0100 -+++ valgrind-3.3.0/none/tests/ppc64/Makefile.in 2008-03-03 10:02:14.000000000 +0100 -@@ -37,7 +37,8 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - check_PROGRAMS = jm-insns$(EXEEXT) lsw$(EXEEXT) round$(EXEEXT) \ -- std_reg_imm$(EXEEXT) twi_tdi$(EXEEXT) tw_td$(EXEEXT) -+ std_reg_imm$(EXEEXT) twi_tdi$(EXEEXT) tw_td$(EXEEXT) \ -+ power6_bcmp$(EXEEXT) power6_mf_gpr$(EXEEXT) - subdir = none/tests/ppc64 - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -53,6 +54,12 @@ jm_insns_LDADD = $(LDADD) - lsw_SOURCES = lsw.c - lsw_OBJECTS = lsw.$(OBJEXT) - lsw_LDADD = $(LDADD) -+power6_bcmp_SOURCES = power6_bcmp.c -+power6_bcmp_OBJECTS = power6_bcmp.$(OBJEXT) -+power6_bcmp_LDADD = $(LDADD) -+power6_mf_gpr_SOURCES = power6_mf_gpr.c -+power6_mf_gpr_OBJECTS = power6_mf_gpr.$(OBJEXT) -+power6_mf_gpr_LDADD = $(LDADD) - round_SOURCES = round.c - round_OBJECTS = round.$(OBJEXT) - round_LDADD = $(LDADD) -@@ -73,9 +80,10 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUD - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ --SOURCES = jm-insns.c lsw.c round.c std_reg_imm.c tw_td.c twi_tdi.c --DIST_SOURCES = jm-insns.c lsw.c round.c std_reg_imm.c tw_td.c \ -- twi_tdi.c -+SOURCES = jm-insns.c lsw.c power6_bcmp.c power6_mf_gpr.c round.c \ -+ std_reg_imm.c tw_td.c twi_tdi.c -+DIST_SOURCES = jm-insns.c lsw.c power6_bcmp.c power6_mf_gpr.c round.c \ -+ std_reg_imm.c tw_td.c twi_tdi.c - ETAGS = etags - CTAGS = ctags - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -@@ -226,7 +235,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ - std_reg_imm.vgtest std_reg_imm.stderr.exp std_reg_imm.stdout.exp \ - round.stderr.exp round.stdout.exp round.vgtest \ - twi_tdi.stderr.exp twi_tdi.stdout.exp twi_tdi.vgtest \ -- tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest -+ tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest \ -+ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \ -+ power6_mf_gpr.stderr.exp power6_mf_gpr.stdout.exp power6_mf_gpr.vgtest - - AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ - @FLAG_M64@ -@@ -277,6 +288,12 @@ jm-insns$(EXEEXT): $(jm_insns_OBJECTS) $ - lsw$(EXEEXT): $(lsw_OBJECTS) $(lsw_DEPENDENCIES) - @rm -f lsw$(EXEEXT) - $(LINK) $(lsw_LDFLAGS) $(lsw_OBJECTS) $(lsw_LDADD) $(LIBS) -+power6_bcmp$(EXEEXT): $(power6_bcmp_OBJECTS) $(power6_bcmp_DEPENDENCIES) -+ @rm -f power6_bcmp$(EXEEXT) -+ $(LINK) $(power6_bcmp_LDFLAGS) $(power6_bcmp_OBJECTS) $(power6_bcmp_LDADD) $(LIBS) -+power6_mf_gpr$(EXEEXT): $(power6_mf_gpr_OBJECTS) $(power6_mf_gpr_DEPENDENCIES) -+ @rm -f power6_mf_gpr$(EXEEXT) -+ $(LINK) $(power6_mf_gpr_LDFLAGS) $(power6_mf_gpr_OBJECTS) $(power6_mf_gpr_LDADD) $(LIBS) - round$(EXEEXT): $(round_OBJECTS) $(round_DEPENDENCIES) - @rm -f round$(EXEEXT) - $(LINK) $(round_LDFLAGS) $(round_OBJECTS) $(round_LDADD) $(LIBS) -@@ -298,6 +315,8 @@ distclean-compile: - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jm_insns-jm-insns.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsw.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power6_bcmp.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power6_mf_gpr.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/std_reg_imm.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tw_td.Po@am__quote@ diff --git a/valgrind-3.3.0-syscalls1.patch b/valgrind-3.3.0-syscalls1.patch deleted file mode 100644 index 8717054..0000000 --- a/valgrind-3.3.0-syscalls1.patch +++ /dev/null @@ -1,163 +0,0 @@ ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 7260) -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 7880) -@@ -1269,7 +1270,7 @@ const SyscallTableEntry ML_(syscall_tabl - GENXY(__NR_wait4, sys_wait4), // 114 - - // _____(__NR_swapoff, sys_swapoff), // 115 --// _____(__NR_sysinfo, sys_sysinfo), // 116 -+ LINXY(__NR_sysinfo, sys_sysinfo), // 116 - PLAXY(__NR_ipc, sys_ipc), // 117 - GENX_(__NR_fsync, sys_fsync), // 118 - // _____(__NR_sigreturn, sys_sigreturn), // 119 -@@ -1328,13 +1329,13 @@ const SyscallTableEntry ML_(syscall_tabl - GENX_(__NR_mremap, sys_mremap), // 163 - // _____(__NR_setresuid, sys_setresuid), // 164 - --// _____(__NR_getresuid, sys_getresuid), // 165 -+ LINXY(__NR_getresuid, sys_getresuid), // 165 - // _____(__NR_query_module, sys_query_module), // 166 - GENXY(__NR_poll, sys_poll), // 167 - // _____(__NR_nfsservctl, sys_nfsservctl), // 168 - // _____(__NR_setresgid, sys_setresgid), // 169 - --// _____(__NR_getresgid, sys_getresgid), // 170 -+ LINXY(__NR_getresgid, sys_getresgid), // 170 - // _____(__NR_prctl, sys_prctl), // 171 - PLAX_(__NR_rt_sigreturn, sys_rt_sigreturn), // 172 - LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 173 ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c (revision 7260) -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c (revision 7880) -@@ -2115,6 +2118,17 @@ POST(sys_waitid) - POST_MEM_WRITE( ARG5, sizeof(struct vki_rusage) ); - } - -+PRE(sys_sync_file_range) -+{ -+ PRINT("sys_sync_file_range ( %d, %lld, %lld, %d )", -+ ARG1,ARG2,ARG3,ARG4); -+ PRE_REG_READ4(long, "sync_file_range", -+ int, fd, vki_loff_t, offset, vki_loff_t, nbytes, -+ unsigned int, flags); -+ if (!ML_(fd_allowed)(ARG1, "sync_file_range", tid, False)) -+ SET_STATUS_Failure( VKI_EBADF ); -+} -+ - /* --------------------------------------------------------------------- - utime wrapper - ------------------------------------------------------------------ */ ---- valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h (revision 7260) -+++ valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h (revision 7880) -@@ -220,6 +220,9 @@ DECL_TEMPLATE(linux, sys_rt_sigtimedwait - DECL_TEMPLATE(linux, sys_rt_sigqueueinfo); - DECL_TEMPLATE(linux, sys_rt_sigsuspend); - -+// Linux-specific? -+DECL_TEMPLATE(linux, sys_sync_file_range); -+ - /* --------------------------------------------------------------------- - Wrappers for sockets and ipc-ery. These are split into standalone - procedures because x86-linux hides them inside multiplexors ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 7260) -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 7880) -@@ -1371,6 +1374,12 @@ const SyscallTableEntry ML_(syscall_tabl - // LINX_(__NR_unshare, sys_unshare), // 272 - LINX_(__NR_set_robust_list, sys_set_robust_list), // 273 - LINXY(__NR_get_robust_list, sys_get_robust_list), // 274 -+ -+// LINX_(__NR_splice, sys_ni_syscall), // 275 -+// LINX_(__NR_tee, sys_ni_syscall), // 276 -+ LINX_(__NR_sync_file_range, sys_sync_file_range), // 277 -+// LINX_(__NR_vmsplice, sys_ni_syscall), // 278 -+// LINX_(__NR_move_pages, sys_ni_syscall), // 279 - }; - - const UInt ML_(syscall_table_size) = ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c (revision 7260) -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c (revision 7880) -@@ -2216,6 +2217,14 @@ const SyscallTableEntry ML_(syscall_tabl - // LINX_(__NR_unshare, sys_unshare), // 310 - LINX_(__NR_set_robust_list, sys_set_robust_list), // 311 - LINXY(__NR_get_robust_list, sys_get_robust_list), // 312 -+// LINX_(__NR_splice, sys_ni_syscall), // 313 -+ LINX_(__NR_sync_file_range, sys_sync_file_range), // 314 -+ -+// LINX_(__NR_tee, sys_ni_syscall), // 315 -+// LINX_(__NR_vmsplice, sys_ni_syscall), // 316 -+// LINX_(__NR_move_pages, sys_ni_syscall), // 317 -+// LINX_(__NR_getcpu, sys_ni_syscall), // 318 -+// LINX_(__NR_epoll_pwait, sys_ni_syscall), // 319 - - LINX_(__NR_utimensat, sys_utimensat), // 320 - }; ---- valgrind-3.3.0/include/vki/vki-scnums-amd64-linux.h 2007-12-11 00:18:25.000000000 +0100 -+++ valgrind-3.3.0/include/vki/vki-scnums-amd64-linux.h 2008-04-16 11:48:19.000000000 +0200 -@@ -360,6 +360,13 @@ - #define __NR_tee 276 - #define __NR_sync_file_range 277 - #define __NR_vmsplice 278 -+#define __NR_move_pages 279 -+#define __NR_utimensat 280 -+#define __NR_epoll_pwait 281 -+#define __NR_signalfd 282 -+#define __NR_timerfd 283 -+#define __NR_eventfd 284 -+#define __NR_fallocate 285 - - #endif /* __VKI_SCNUMS_AMD64_LINUX_H */ - ---- valgrind-3.3.0/include/vki/vki-scnums-ppc32-linux.h 2007-12-11 00:18:25.000000000 +0100 -+++ valgrind-3.3.0/include/vki/vki-scnums-ppc32-linux.h 2008-04-16 11:48:19.000000000 +0200 -@@ -343,8 +343,17 @@ - #define __NR_faccessat 298 - #define __NR_get_robust_list 299 - #define __NR_set_robust_list 300 -+#define __NR_move_pages 301 -+#define __NR_getcpu 302 -+#define __NR_epoll_pwait 303 -+#define __NR_utimensat 304 -+#define __NR_signalfd 305 -+#define __NR_timerfd 306 -+#define __NR_eventfd 307 -+#define __NR_sync_file_range2 308 -+#define __NR_fallocate 309 - --#define __NR_syscalls 301 -+#define __NR_syscalls 310 - - #endif /* __VKI_SCNUMS_PPC32_LINUX_H */ - ---- valgrind-3.3.0/include/vki/vki-scnums-ppc64-linux.h 2007-12-11 00:18:25.000000000 +0100 -+++ valgrind-3.3.0/include/vki/vki-scnums-ppc64-linux.h 2008-04-16 11:48:19.000000000 +0200 -@@ -335,6 +335,15 @@ - #define __NR_faccessat 298 - #define __NR_get_robust_list 299 - #define __NR_set_robust_list 300 -+#define __NR_move_pages 301 -+#define __NR_getcpu 302 -+#define __NR_epoll_pwait 303 -+#define __NR_utimensat 304 -+#define __NR_signalfd 305 -+#define __NR_timerfd 306 -+#define __NR_eventfd 307 -+#define __NR_sync_file_range2 308 -+#define __NR_fallocate 309 - - #endif /* __VKI_SCNUMS_PPC64_LINUX_H */ - ---- valgrind-3.3.0/include/vki/vki-scnums-x86-linux.h 2007-12-11 00:18:25.000000000 +0100 -+++ valgrind-3.3.0/include/vki/vki-scnums-x86-linux.h 2008-04-16 11:48:19.000000000 +0200 -@@ -351,7 +351,14 @@ - #define __NR_sync_file_range 314 - #define __NR_tee 315 - #define __NR_vmsplice 316 -+#define __NR_move_pages 317 -+#define __NR_getcpu 318 -+#define __NR_epoll_pwait 319 - #define __NR_utimensat 320 -+#define __NR_signalfd 321 -+#define __NR_timerfd 322 -+#define __NR_eventfd 323 -+#define __NR_fallocate 324 - - #endif /* __VKI_SCNUMS_X86_LINUX_H */ - diff --git a/valgrind-3.3.0-syscalls2.patch b/valgrind-3.3.0-syscalls2.patch deleted file mode 100644 index 7943d28..0000000 --- a/valgrind-3.3.0-syscalls2.patch +++ /dev/null @@ -1,258 +0,0 @@ ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c.jj 2008-04-16 11:48:14.000000000 +0200 -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c 2008-04-16 14:45:32.000000000 +0200 -@@ -985,7 +985,7 @@ PRE(sys_ppoll) - UInt i; - struct vki_pollfd* ufds = (struct vki_pollfd *)ARG1; - *flags |= SfMayBlock; -- PRINT("sys_ppoll ( %p, %d, %p, %p, %llu )\n", ARG1,ARG2,ARG3,ARG4,ARG5); -+ PRINT("sys_ppoll ( %p, %d, %p, %p, %llu )\n", ARG1,ARG2,ARG3,ARG4,(ULong)ARG5); - PRE_REG_READ5(long, "ppoll", - struct vki_pollfd *, ufds, unsigned int, nfds, - struct vki_timespec *, tsp, vki_sigset_t *, sigmask, -@@ -1069,6 +1069,41 @@ POST(sys_epoll_wait) - POST_MEM_WRITE( ARG2, sizeof(struct vki_epoll_event)*RES ) ; - } - -+PRE(sys_epoll_pwait) -+{ -+ *flags |= SfMayBlock; -+ PRINT("sys_epoll_pwait ( %d, %p, %d, %d, %p, %llu )", ARG1,ARG2,ARG3,ARG4,ARG5,(ULong)ARG6); -+ PRE_REG_READ6(long, "epoll_pwait", -+ int, epfd, struct vki_epoll_event *, events, -+ int, maxevents, int, timeout, vki_sigset_t *, sigmask, -+ vki_size_t, sigsetsize); -+ PRE_MEM_WRITE( "epoll_pwait(events)", ARG2, sizeof(struct vki_epoll_event)*ARG3); -+ if (ARG4) -+ PRE_MEM_READ( "epoll_pwait(sigmask)", ARG5, sizeof(vki_sigset_t) ); -+} -+POST(sys_epoll_pwait) -+{ -+ vg_assert(SUCCESS); -+ if (RES > 0) -+ POST_MEM_WRITE( ARG2, sizeof(struct vki_epoll_event)*RES ) ; -+} -+ -+PRE(sys_eventfd) -+{ -+ PRINT("sys_eventfd ( %u )", ARG1); -+ PRE_REG_READ1(long, "sys_eventfd", unsigned int, count); -+} -+POST(sys_eventfd) -+{ -+ if (!ML_(fd_allowed)(RES, "eventfd", tid, True)) { -+ VG_(close)(RES); -+ SET_STATUS_Failure( VKI_EMFILE ); -+ } else { -+ if (VG_(clo_track_fds)) -+ ML_(record_fd_open_nameless) (tid, RES); -+ } -+} -+ - /* --------------------------------------------------------------------- - tid-related wrappers - ------------------------------------------------------------------ */ -@@ -1669,6 +1704,27 @@ PRE(sys_timer_delete) - PRE_REG_READ1(long, "timer_delete", vki_timer_t, timerid); - } - -+PRE(sys_timerfd) -+{ -+ PRINT("sys_timerfd ( %d, %d, %p )", ARG1, ARG2, ARG3); -+ PRE_REG_READ3(long, "sys_timerfd", -+ int, fd, int, clockid, const struct itimerspec *, tmr); -+ PRE_MEM_READ( "timerfd(tmr)", ARG3, -+ sizeof(struct vki_itimerspec) ); -+ if (ARG1 != -1 && !ML_(fd_allowed)(ARG1, "timerfd", tid, False)) -+ SET_STATUS_Failure( VKI_EBADF ); -+} -+POST(sys_timerfd) -+{ -+ if (!ML_(fd_allowed)(RES, "timerfd", tid, True)) { -+ VG_(close)(RES); -+ SET_STATUS_Failure( VKI_EMFILE ); -+ } else { -+ if (VG_(clo_track_fds)) -+ ML_(record_fd_open_nameless) (tid, RES); -+ } -+} -+ - /* --------------------------------------------------------------------- - capabilities wrappers - ------------------------------------------------------------------ */ -@@ -2217,6 +2273,27 @@ POST(sys_sigprocmask) - } - #endif - -+PRE(sys_signalfd) -+{ -+ PRINT("sys_signalfd ( %d, %p, %llu )", ARG1, ARG2, (ULong) ARG3); -+ PRE_REG_READ3(long, "sys_signalfd", -+ int, fd, vki_sigset_t *, sigmask, vki_size_t, sigsetsize); -+ PRE_MEM_READ( "signalfd(sigmask)", ARG2, sizeof(vki_sigset_t) ); -+ if (ARG1 != -1 && !ML_(fd_allowed)(ARG1, "signalfd", tid, False)) -+ SET_STATUS_Failure( VKI_EBADF ); -+} -+POST(sys_signalfd) -+{ -+ if (!ML_(fd_allowed)(RES, "signalfd", tid, True)) { -+ VG_(close)(RES); -+ SET_STATUS_Failure( VKI_EMFILE ); -+ } else { -+ if (VG_(clo_track_fds)) -+ ML_(record_fd_open_nameless) (tid, RES); -+ } -+} -+ -+ - /* --------------------------------------------------------------------- - rt_sig* wrappers - ------------------------------------------------------------------ */ -@@ -2544,7 +2621,17 @@ PRE(sys_futimesat) - int, dfd, char *, filename, struct timeval *, tvp); - PRE_MEM_RASCIIZ( "futimesat(filename)", ARG2 ); - if (ARG3 != 0) -- PRE_MEM_READ( "futimesat(tvp)", ARG3, sizeof(struct vki_timeval) ); -+ PRE_MEM_READ( "futimesat(tvp)", ARG3, 2 * sizeof(struct vki_timeval) ); -+} -+ -+PRE(sys_utimensat) -+{ -+ PRINT("sys_utimensat ( %d, %p(%s), %p, 0x%x )", ARG1,ARG2,ARG2,ARG3,ARG4); -+ PRE_REG_READ4(long, "utimensat", -+ int, dfd, char *, filename, struct timespec *, utimes, int, flags); -+ PRE_MEM_RASCIIZ( "utimensat(filename)", ARG2 ); -+ if (ARG3 != 0) -+ PRE_MEM_READ( "utimensat(tvp)", ARG3, 2 * sizeof(struct vki_timespec) ); - } - - PRE(sys_newfstatat) -@@ -2825,19 +2912,6 @@ PRE(sys_ioprio_set) - PRE_REG_READ3(int, "ioprio_set", int, which, int, who, int, ioprio); - } - -- --/* XXX I don't think this is really the right place for this. -- Move it elsewhere in this file? */ --PRE(sys_utimensat) --{ -- PRINT("sys_utimensat ( %d, %p(%s), %p )", ARG1,ARG2,ARG2,ARG3); -- PRE_REG_READ3(long, "utimensat", -- int, dfd, char *, filename, struct timespec *, tvp); -- PRE_MEM_RASCIIZ( "utimensat(filename)", ARG2 ); -- if (ARG3 != 0) -- PRE_MEM_READ( "utimensat(tvp)", ARG3, sizeof(struct vki_timespec) ); --} -- - #undef PRE - #undef POST - ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-generic.c.jj 2007-12-11 00:18:43.000000000 +0100 -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-generic.c 2008-04-16 16:52:43.000000000 +0200 -@@ -5638,7 +5638,7 @@ PRE(sys_utimes) - PRE_REG_READ2(long, "utimes", char *, filename, struct timeval *, tvp); - PRE_MEM_RASCIIZ( "utimes(filename)", ARG1 ); - if (ARG2 != 0) -- PRE_MEM_READ( "utimes(tvp)", ARG2, sizeof(struct vki_timeval) ); -+ PRE_MEM_READ( "utimes(tvp)", ARG2, 2 * sizeof(struct vki_timeval) ); - } - - PRE(sys_acct) ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c.jj 2008-04-16 11:48:14.000000000 +0200 -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c 2008-04-16 15:55:19.000000000 +0200 -@@ -1478,7 +1478,15 @@ const SyscallTableEntry ML_(syscall_tabl - LINX_(__NR_faccessat, sys_faccessat), // 298 - LINX_(__NR_set_robust_list, sys_set_robust_list), // 299 - LINXY(__NR_get_robust_list, sys_get_robust_list), // 300 -- -+// LINX_(__NR_move_pages, sys_ni_syscall), // 301 -+// LINX_(__NR_getcpu, sys_ni_syscall), // 302 -+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 303 -+ LINX_(__NR_utimensat, sys_utimensat), // 304 -+ LINXY(__NR_signalfd, sys_signalfd), // 305 -+ LINXY(__NR_timerfd, sys_timerfd), // 306 -+ LINX_(__NR_eventfd, sys_eventfd), // 307 -+// LINX_(__NR_sync_file_range2, sys_ni_syscall), // 308 -+// LINX_(__NR_fallocate, sys_ni_syscall), // 309 - }; - - const UInt ML_(syscall_table_size) = ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c.jj 2008-04-16 11:48:14.000000000 +0200 -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c 2008-04-16 14:51:31.000000000 +0200 -@@ -2224,9 +2224,13 @@ const SyscallTableEntry ML_(syscall_tabl - // LINX_(__NR_vmsplice, sys_ni_syscall), // 316 - // LINX_(__NR_move_pages, sys_ni_syscall), // 317 - // LINX_(__NR_getcpu, sys_ni_syscall), // 318 --// LINX_(__NR_epoll_pwait, sys_ni_syscall), // 319 -+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 319 - - LINX_(__NR_utimensat, sys_utimensat), // 320 -+ LINXY(__NR_signalfd, sys_signalfd), // 321 -+ LINXY(__NR_timerfd, sys_timerfd), // 322 -+ LINX_(__NR_eventfd, sys_eventfd), // 323 -+// LINX_(__NR_fallocate, sys_ni_syscall), // 324 - }; - - const UInt ML_(syscall_table_size) = ---- valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h.jj 2008-04-16 11:48:14.000000000 +0200 -+++ valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h 2008-04-16 14:49:09.000000000 +0200 -@@ -82,6 +82,8 @@ DECL_TEMPLATE(linux, sys_ppoll); - DECL_TEMPLATE(linux, sys_epoll_create); - DECL_TEMPLATE(linux, sys_epoll_ctl); - DECL_TEMPLATE(linux, sys_epoll_wait); -+DECL_TEMPLATE(linux, sys_epoll_pwait); -+DECL_TEMPLATE(linux, sys_eventfd); - - DECL_TEMPLATE(linux, sys_gettid); - DECL_TEMPLATE(linux, sys_set_tid_address); -@@ -124,6 +126,9 @@ DECL_TEMPLATE(linux, sys_timer_settime); - DECL_TEMPLATE(linux, sys_timer_gettime); - DECL_TEMPLATE(linux, sys_timer_getoverrun); - DECL_TEMPLATE(linux, sys_timer_delete); -+DECL_TEMPLATE(linux, sys_timerfd); -+ -+DECL_TEMPLATE(linux, sys_signalfd); - - DECL_TEMPLATE(linux, sys_capget); - DECL_TEMPLATE(linux, sys_capset); ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc32-linux.c.jj 2008-04-16 11:48:14.000000000 +0200 -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc32-linux.c 2008-04-16 15:49:43.000000000 +0200 -@@ -1823,6 +1823,15 @@ const SyscallTableEntry ML_(syscall_tabl - LINX_(__NR_faccessat, sys_faccessat), // 298 - LINX_(__NR_set_robust_list, sys_set_robust_list), // 299 - LINXY(__NR_get_robust_list, sys_get_robust_list), // 300 -+// LINX_(__NR_move_pages, sys_ni_syscall), // 301 -+// LINX_(__NR_getcpu, sys_ni_syscall), // 302 -+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 303 -+ LINX_(__NR_utimensat, sys_utimensat), // 304 -+ LINXY(__NR_signalfd, sys_signalfd), // 305 -+ LINXY(__NR_timerfd, sys_timerfd), // 306 -+ LINX_(__NR_eventfd, sys_eventfd), // 307 -+// LINX_(__NR_sync_file_range2, sys_ni_syscall), // 308 -+// LINX_(__NR_fallocate, sys_ni_syscall), // 309 - }; - - const UInt ML_(syscall_table_size) = ---- valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c.jj 2008-04-16 11:48:14.000000000 +0200 -+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c 2008-04-16 14:45:43.000000000 +0200 -@@ -1370,7 +1370,7 @@ const SyscallTableEntry ML_(syscall_tabl - LINX_(__NR_faccessat, sys_faccessat), // 269 - - LINX_(__NR_pselect6, sys_pselect6), // 270 --// LINXY(__NR_ppoll, sys_ni_syscall), // 271 -+ LINXY(__NR_ppoll, sys_ppoll), // 271 - // LINX_(__NR_unshare, sys_unshare), // 272 - LINX_(__NR_set_robust_list, sys_set_robust_list), // 273 - LINXY(__NR_get_robust_list, sys_get_robust_list), // 274 -@@ -1380,6 +1380,12 @@ const SyscallTableEntry ML_(syscall_tabl - LINX_(__NR_sync_file_range, sys_sync_file_range), // 277 - // LINX_(__NR_vmsplice, sys_ni_syscall), // 278 - // LINX_(__NR_move_pages, sys_ni_syscall), // 279 -+ LINX_(__NR_utimensat, sys_utimensat), // 280 -+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 281 -+ LINXY(__NR_signalfd, sys_signalfd), // 282 -+ LINXY(__NR_timerfd, sys_timerfd), // 283 -+ LINX_(__NR_eventfd, sys_eventfd), // 284 -+// LINX_(__NR_fallocate, sys_ni_syscall), // 285 - }; - - const UInt ML_(syscall_table_size) = diff --git a/valgrind-3.4.0-cachegrind-improvements.patch b/valgrind-3.4.0-cachegrind-improvements.patch new file mode 100644 index 0000000..4b0f3f6 --- /dev/null +++ b/valgrind-3.4.0-cachegrind-improvements.patch @@ -0,0 +1,66 @@ +--- valgrind-3.4.0/cachegrind/cg_sim.c.jj 2007-01-08 02:43:10.000000000 -0500 ++++ valgrind-3.4.0/cachegrind/cg_sim.c 2007-02-13 07:15:46.000000000 -0500 +@@ -42,29 +42,32 @@ typedef struct { + Int size; /* bytes */ + Int assoc; + Int line_size; /* bytes */ +- Int sets; + Int sets_min_1; + Int assoc_bits; + Int line_size_bits; + Int tag_shift; +- Char desc_line[128]; + UWord* tags; +-} cache_t2; ++ Char desc_line[128]; ++} cache_t2 ++#ifdef __GNUC__ ++__attribute__ ((aligned (8 * sizeof (Int)))) ++#endif ++; + + /* By this point, the size/assoc/line_size has been checked. */ + static void cachesim_initcache(cache_t config, cache_t2* c) + { +- Int i; ++ Int sets; + + c->size = config.size; + c->assoc = config.assoc; + c->line_size = config.line_size; + +- c->sets = (c->size / c->line_size) / c->assoc; +- c->sets_min_1 = c->sets - 1; ++ sets = (c->size / c->line_size) / c->assoc; ++ c->sets_min_1 = sets - 1; + c->assoc_bits = VG_(log2)(c->assoc); + c->line_size_bits = VG_(log2)(c->line_size); +- c->tag_shift = c->line_size_bits + VG_(log2)(c->sets); ++ c->tag_shift = c->line_size_bits + VG_(log2)(sets); + + if (c->assoc == 1) { + VG_(sprintf)(c->desc_line, "%d B, %d B, direct-mapped", +@@ -74,11 +77,8 @@ static void cachesim_initcache(cache_t c + c->size, c->line_size, c->assoc); + } + +- c->tags = VG_(malloc)("cg.sim.ci.1", +- sizeof(UWord) * c->sets * c->assoc); +- +- for (i = 0; i < c->sets * c->assoc; i++) +- c->tags[i] = 0; ++ c->tags = VG_(calloc)("cg.sim.ci.1", ++ sizeof(UWord), c->sets * c->assoc); + } + + /* This is done as a macro rather than by passing in the cache_t2 as an +@@ -141,8 +141,7 @@ void cachesim_##L##_doref(Addr a, UChar + return; \ + \ + /* Second case: word straddles two lines. */ \ +- /* Nb: this is a fast way of doing ((set1+1) % L.sets) */ \ +- } else if (((set1 + 1) & (L.sets-1)) == set2) { \ ++ } else if (((set1 + 1) & (L.sets_min_1)) == set2) { \ + set = &(L.tags[set1 << L.assoc_bits]); \ + if (tag == set[0]) { \ + goto block2; \ diff --git a/valgrind-3.4.0-openat.patch b/valgrind-3.4.0-openat.patch new file mode 100644 index 0000000..0a2d6a6 --- /dev/null +++ b/valgrind-3.4.0-openat.patch @@ -0,0 +1,38 @@ +Testcase: +#define _GNU_SOURCE +#include +#include + +int +main (void) +{ + int dfd = open ("/tmp", O_RDONLY); + int fd1 = openat (dfd, "abc", O_RDONLY); + int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY); + int fd3 = openat (AT_FDCWD, "abc", O_RDONLY); + /* This is the only one that should warn. */ + int fd4 = openat (0x12345678, "abc", O_RDONLY); + return 0; +} + +--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c.jj 2007-12-11 00:18:43.000000000 +0100 ++++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c 2008-03-03 11:35:15.000000000 +0100 +@@ -2455,10 +2455,15 @@ PRE(sys_openat) + int, dfd, const char *, filename, int, flags); + } + +- if (ARG1 != VKI_AT_FDCWD && !ML_(fd_allowed)(ARG1, "openat", tid, False)) ++ PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); ++ ++ /* For absolute filenames, dfd is ignored. If dfd is AT_FDCWD, ++ filename is relative to cwd. */ ++ if (ML_(safe_to_deref)( (void*)ARG2, 1 ) ++ && *(Char *)ARG2 != '/' ++ && ARG1 != VKI_AT_FDCWD ++ && !ML_(fd_allowed)(ARG1, "openat", tid, False)) + SET_STATUS_Failure( VKI_EBADF ); +- else +- PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); + + /* Handle the case where the open is of /proc/self/cmdline or + /proc//cmdline, and just give it a copy of the fd for the diff --git a/valgrind-3.4.0-pkg-config.patch b/valgrind-3.4.0-pkg-config.patch new file mode 100644 index 0000000..7258b59 --- /dev/null +++ b/valgrind-3.4.0-pkg-config.patch @@ -0,0 +1,71 @@ +--- valgrind-3.4.0/configure.in.jj 2007-01-29 14:42:52.000000000 -0500 ++++ valgrind-3.4.0/configure.in 2007-02-13 08:02:26.000000000 -0500 +@@ -289,6 +289,7 @@ case "${host_os}" in + AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.]) + ;; + esac ++VG_PLATFORM=`echo "$VG_PLATFORM_PRI" | LC_ALL=C tr A-Z_ a-z-` + + # If we are building on a 64 bit platform test to see if the system + # supports building 32 bit programs and disable 32 bit support if it +@@ -331,6 +332,7 @@ AC_MSG_CHECKING([for a supported CPU/OS + + AC_SUBST(VG_PLATFORM_PRI) + AC_SUBST(VG_PLATFORM_SEC) ++AC_SUBST(VG_PLATFORM) + AC_SUBST(VG_ARCH_PRI) + + # By default, the primary arch is the same as the "max" arch, as +--- valgrind-3.4.0/configure.jj 2007-01-29 14:45:30.000000000 -0500 ++++ valgrind-3.4.0/configure 2007-02-13 08:04:33.000000000 -0500 +@@ -311,7 +311,7 @@ ac_includes_default="\ + # include + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT VEX_DIR DISTCHECK_CONFIGURE_FLAGS LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB AR PERL GDB CCAS CCASFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VG_ARCH_MAX VG_ARCH_ALL VALT_LOAD_ADDRESS VG_OS VG_PLATFORM_PRI VG_PLATFORM_SEC VG_ARCH_PRI VGP_X86_LINUX_TRUE VGP_X86_LINUX_FALSE VGP_AMD64_LINUX_TRUE VGP_AMD64_LINUX_FALSE VGP_PPC32_LINUX_TRUE VGP_PPC32_LINUX_FALSE VGP_PPC64_LINUX_TRUE VGP_PPC64_LINUX_FALSE VGP_PPC32_AIX5_TRUE VGP_PPC32_AIX5_FALSE VGP_PPC64_AIX5_TRUE VGP_PPC64_AIX5_FALSE VGO_LINUX_TRUE VGO_LINUX_FALSE VGO_AIX5_TRUE VGO_AIX5_FALSE VGP_HAVE_SECONDARY_TRUE VGP_HAVE_SECONDARY_FALSE DEFAULT_SUPP EGREP GLIBC_VERSION HAS_ALTIVEC_TRUE HAS_ALTIVEC_FALSE HAVE_ALTIVEC_H_TRUE HAVE_ALTIVEC_H_FALSE FLAG_M32 FLAG_MAIX32 FLAG_M64 FLAG_MAIX64 FLAG_MMMX FLAG_MSSE PREFERRED_STACK_BOUNDARY FLAG_WDECL_AFTER_STMT FLAG_W_NO_FORMAT_ZERO_LENGTH FLAG_W_EXTRA FLAG_FNO_STACK_PROTECTOR FLAG_UNLIMITED_INLINE_UNIT_GROWTH BUILD_SSE3_TESTS_TRUE BUILD_SSE3_TESTS_FALSE BUILD_SSSE3_TESTS_TRUE BUILD_SSSE3_TESTS_FALSE LIBOBJS MPI_CC BUILD_MPIWRAP_PRI_TRUE BUILD_MPIWRAP_PRI_FALSE BUILD_MPIWRAP_SEC_TRUE BUILD_MPIWRAP_SEC_FALSE HAVE_QTCORE_TRUE HAVE_QTCORE_FALSE BOOST_CFLAGS BOOST_LIBS HAVE_BOOST_1_35_TRUE HAVE_BOOST_1_35_FALSE HAVE_OPENMP_TRUE HAVE_OPENMP_FALSE LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT VEX_DIR DISTCHECK_CONFIGURE_FLAGS LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RANLIB ac_ct_RANLIB AR PERL GDB CCAS CCASFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VG_ARCH_MAX VG_ARCH_ALL VALT_LOAD_ADDRESS VG_OS VG_PLATFORM_PRI VG_PLATFORM_SEC VG_PLATFORM VG_ARCH_PRI VGP_X86_LINUX_TRUE VGP_X86_LINUX_FALSE VGP_AMD64_LINUX_TRUE VGP_AMD64_LINUX_FALSE VGP_PPC32_LINUX_TRUE VGP_PPC32_LINUX_FALSE VGP_PPC64_LINUX_TRUE VGP_PPC64_LINUX_FALSE VGP_PPC32_AIX5_TRUE VGP_PPC32_AIX5_FALSE VGP_PPC64_AIX5_TRUE VGP_PPC64_AIX5_FALSE VGO_LINUX_TRUE VGO_LINUX_FALSE VGO_AIX5_TRUE VGO_AIX5_FALSE VGP_HAVE_SECONDARY_TRUE VGP_HAVE_SECONDARY_FALSE DEFAULT_SUPP EGREP GLIBC_VERSION HAS_ALTIVEC_TRUE HAS_ALTIVEC_FALSE HAVE_ALTIVEC_H_TRUE HAVE_ALTIVEC_H_FALSE FLAG_M32 FLAG_MAIX32 FLAG_M64 FLAG_MAIX64 FLAG_MMMX FLAG_MSSE PREFERRED_STACK_BOUNDARY FLAG_WDECL_AFTER_STMT FLAG_W_NO_FORMAT_ZERO_LENGTH FLAG_W_EXTRA FLAG_FNO_STACK_PROTECTOR FLAG_UNLIMITED_INLINE_UNIT_GROWTH BUILD_SSE3_TESTS_TRUE BUILD_SSE3_TESTS_FALSE BUILD_SSSE3_TESTS_TRUE BUILD_SSSE3_TESTS_FALSE LIBOBJS MPI_CC BUILD_MPIWRAP_PRI_TRUE BUILD_MPIWRAP_PRI_FALSE BUILD_MPIWRAP_SEC_TRUE BUILD_MPIWRAP_SEC_FALSE HAVE_QTCORE_TRUE HAVE_QTCORE_FALSE BOOST_CFLAGS BOOST_LIBS HAVE_BOOST_1_35_TRUE HAVE_BOOST_1_35_FALSE HAVE_OPENMP_TRUE HAVE_OPENMP_FALSE LTLIBOBJS' + ac_subst_files='' + + # Initialize some variables set by options. +@@ -4365,6 +4365,7 @@ echo "$as_me: error: Valgrind is operati + { (exit 1); exit 1; }; } + ;; + esac ++VG_PLATFORM=`echo "$VG_PLATFORM_PRI" | LC_ALL=C tr A-Z_ a-z-` + + # If we are building on a 64 bit platform test to see if the system + # supports building 32 bit programs and disable 32 bit support if it +@@ -4459,6 +4460,7 @@ echo $ECHO_N "checking for a supported C + + + ++ + # By default, the primary arch is the same as the "max" arch, as + # commented above (at the definition of VG_ARCH_MAX). We may choose + # to downgrade it in the big case statement just below here, in the +@@ -10043,6 +10045,7 @@ s,@VALT_LOAD_ADDRESS@,$VALT_LOAD_ADDRESS + s,@VG_OS@,$VG_OS,;t t + s,@VG_PLATFORM_PRI@,$VG_PLATFORM_PRI,;t t + s,@VG_PLATFORM_SEC@,$VG_PLATFORM_SEC,;t t ++s,@VG_PLATFORM@,$VG_PLATFORM,;t t + s,@VG_ARCH_PRI@,$VG_ARCH_PRI,;t t + s,@VGP_X86_LINUX_TRUE@,$VGP_X86_LINUX_TRUE,;t t + s,@VGP_X86_LINUX_FALSE@,$VGP_X86_LINUX_FALSE,;t t +--- valgrind-3.4.0/valgrind.pc.in.jj 2007-01-02 09:52:30.000000000 -0500 ++++ valgrind-3.4.0/valgrind.pc.in 2007-02-13 08:04:57.000000000 -0500 +@@ -4,13 +4,13 @@ libdir=@libdir@ + includedir=@includedir@/valgrind + arch=@VG_ARCH@ + os=@VG_OS@ +-platform=@VG_PLATFORM_PRI@ ++platform=@VG_PLATFORM@ + valt_load_address=@VALT_LOAD_ADDRESS@ + + Name: Valgrind + Description: A dynamic binary instrumentation framework + Version: @VERSION@ + Requires: +-Libs: -L${libdir}/valgrind/@VG_PLATFORM_PRI@ -lcoregrind -lvex -lgcc ++Libs: -L${libdir}/valgrind/@VG_PLATFORM@ -lcoregrind -lvex -lgcc + Cflags: -I${includedir} + diff --git a/valgrind-3.4.0-power5+-6.patch b/valgrind-3.4.0-power5+-6.patch new file mode 100644 index 0000000..48f884d --- /dev/null +++ b/valgrind-3.4.0-power5+-6.patch @@ -0,0 +1,781 @@ +--- valgrind-3.3.0/VEX/priv/guest-ppc/toIR.c.jj 2007-12-11 00:18:52.000000000 +0100 ++++ valgrind-3.3.0/VEX/priv/guest-ppc/toIR.c 2008-03-03 09:58:59.000000000 +0100 +@@ -333,6 +333,7 @@ typedef enum { + } PPC_GST; + + #define MASK_FPSCR_RN 0x3 ++#define MASK_FPSCR_FPRF 0x1F000 + #define MASK_VSCR_VALID 0x00010001 + + +@@ -2142,7 +2143,7 @@ static IRExpr* /* ::Ity_I32 */ getGST_ma + + /* We're only keeping track of the rounding mode, + so if the mask isn't asking for this, just return 0x0 */ +- if (mask & 0x3) { ++ if (mask & (MASK_FPSCR_RN|MASK_FPSCR_FPRF)) { + assign( val, IRExpr_Get( OFFB_FPROUND, Ity_I32 ) ); + } else { + assign( val, mkU32(0x0) ); +@@ -2271,7 +2272,7 @@ static void putGST_masked ( PPC_GST reg, + switch (reg) { + case PPC_GST_FPSCR: { + /* Allow writes to Rounding Mode */ +- if (mask & 0x3) { ++ if (mask & (MASK_FPSCR_RN|MASK_FPSCR_FPRF)) { + /* construct new fpround from new and old values as per mask: + new fpround = (src & (3 & mask)) | (fpround & (3 & ~mask)) */ + stmt( +@@ -2279,11 +2280,11 @@ static void putGST_masked ( PPC_GST reg, + OFFB_FPROUND, + binop( + Iop_Or32, +- binop(Iop_And32, src, mkU32(3 & mask)), ++ binop(Iop_And32, src, mkU32((MASK_FPSCR_RN|MASK_FPSCR_FPRF) & mask)), + binop( + Iop_And32, + IRExpr_Get(OFFB_FPROUND,Ity_I32), +- mkU32(3 & ~mask) ++ mkU32((MASK_FPSCR_RN|MASK_FPSCR_FPRF) & ~mask) + ) + ) + ) +@@ -3224,6 +3225,48 @@ static Bool dis_int_logic ( UInt theInst + // TODO: alternatively: assign(rA, verbose_Clz64(rS)); + break; + ++ case 0x1FC: // cmpb (Power6: compare bytes) ++ DIP("cmpb r%u,r%u,r%u\n", rA_addr, rS_addr, rB_addr); ++ ++ if (mode64) ++ assign( rA, unop( Iop_V128to64, ++ binop( Iop_CmpEQ8x16, ++ binop( Iop_64HLtoV128, mkU64(0), mkexpr(rS) ), ++ binop( Iop_64HLtoV128, mkU64(0), mkexpr(rB) ) ++ )) ); ++ else ++ assign( rA, unop( Iop_V128to32, ++ binop( Iop_CmpEQ8x16, ++ unop( Iop_32UtoV128, mkexpr(rS) ), ++ unop( Iop_32UtoV128, mkexpr(rB) ) ++ )) ); ++ break; ++ ++ case 0x2DF: { // mftgpr (move floating-point to general purpose register) ++ IRTemp frB = newTemp(Ity_F64); ++ DIP("mftgpr r%u,fr%u\n", rS_addr, rB_addr); ++ ++ assign( frB, getFReg(rB_addr)); // always F64 ++ if (mode64) ++ assign( rA, unop( Iop_ReinterpF64asI64, mkexpr(frB)) ); ++ else ++ assign( rA, unop( Iop_64to32, unop( Iop_ReinterpF64asI64, mkexpr(frB))) ); ++ ++ putIReg( rS_addr, mkexpr(rA)); ++ return True; ++ } ++ case 0x25F: { // mffgpr (move floating-point from general purpose register) ++ IRTemp frA = newTemp(Ity_F64); ++ DIP("mffgpr fr%u,r%u\n", rS_addr, rB_addr); ++ ++ if (mode64) ++ assign( frA, unop( Iop_ReinterpI64asF64, mkexpr(rB)) ); ++ else ++ assign( frA, unop( Iop_ReinterpI64asF64, unop( Iop_32Uto64, mkexpr(rB))) ); ++ ++ putFReg( rS_addr, mkexpr(frA)); ++ return True; ++ } + default: + vex_printf("dis_int_logic(ppc)(opc2)\n"); + return False; +@@ -6533,6 +6576,45 @@ static Bool dis_fp_round ( UInt theInstr + binop(Iop_I64toF64, rm, mkexpr(r_tmp64)) ); + break; + ++ case 0x188: case 0x1A8: case 0x1C8: case 0x1E8: // frin, friz, frip, frim ++ switch(opc2) { ++ case 0x188: // frin (Floating Round to Integer Nearest) ++ DIP("frin%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); ++ assign( r_tmp64, ++ binop(Iop_F64toI64, mkU32(Irrm_NEAREST), mkexpr(frB)) ); ++ break; ++ case 0x1A8: // friz (Floating Round to Integer Toward Zero) ++ DIP("friz%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); ++ assign( r_tmp64, ++ binop(Iop_F64toI64, mkU32(Irrm_ZERO), mkexpr(frB)) ); ++ break; ++ case 0x1C8: // frip (Floating Round to Integer Plus) ++ DIP("frip%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); ++ assign( r_tmp64, ++ binop(Iop_F64toI64, mkU32(Irrm_PosINF), mkexpr(frB)) ); ++ break; ++ case 0x1E8: // frim (Floating Round to Integer Minus) ++ DIP("frim%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr); ++ assign( r_tmp64, ++ binop(Iop_F64toI64, mkU32(Irrm_NegINF), mkexpr(frB)) ); ++ break; ++ } ++ ++ /* don't use the rounded integer if frB is outside -9e18..9e18 */ ++ /* F64 has only log10(2**52) significant digits anyway */ ++ /* need to preserve sign of zero */ ++ /* frD = (fabs(frB) > 9e18) ? frB : ++ (sign(frB)) ? -fabs((double)r_tmp64) : (double)r_tmp64 */ ++ assign( frD, IRExpr_Mux0X( unop( Iop_32to8, binop( Iop_CmpF64, ++ IRExpr_Const(IRConst_F64(9e18)), unop( Iop_AbsF64, mkexpr(frB)))), ++ IRExpr_Mux0X( unop( Iop_32to8, binop( Iop_Shr32, unop( Iop_64HIto32, ++ unop(Iop_ReinterpF64asI64, mkexpr(frB))), mkU8(31))), ++ binop( Iop_I64toF64, mkU32(0), mkexpr(r_tmp64) ), ++ unop( Iop_NegF64, unop( Iop_AbsF64, ++ binop(Iop_I64toF64, mkU32(0), mkexpr(r_tmp64)) )) ), ++ mkexpr(frB) )); ++ break; ++ + default: + vex_printf("dis_fp_round(ppc)(opc2)\n"); + return False; +@@ -9139,6 +9221,10 @@ DisResult disInstr_PPC_WRK ( + case 0x32E: // fctid + case 0x32F: // fctidz + case 0x34E: // fcfid ++ case 0x188: // frin (Power5+) ++ case 0x1A8: // friz (Power5+) ++ case 0x1C8: // frip (Power5+) ++ case 0x1E8: // frim (Power5+) + if (dis_fp_round(theInstr)) goto decode_success; + goto decode_failure; + +@@ -9216,6 +9302,10 @@ DisResult disInstr_PPC_WRK ( + if (dis_int_arith( theInstr )) goto decode_success; + goto decode_failure; + ++ case 0x1FC: // cmpb ++ if (dis_int_logic( theInstr )) goto decode_success; ++ goto decode_failure; ++ + default: + break; // Fall through... + } +@@ -9234,6 +9324,7 @@ DisResult disInstr_PPC_WRK ( + case 0x11C: case 0x3BA: case 0x39A: // eqv, extsb, extsh + case 0x1DC: case 0x07C: case 0x1BC: // nand, nor, or + case 0x19C: case 0x13C: // orc, xor ++ case 0x2DF: case 0x25F: // mftgpr, mffgpr + if (dis_int_logic( theInstr )) goto decode_success; + goto decode_failure; + +--- valgrind-3.3.0/none/tests/ppc32/Makefile.am.jj 2007-12-11 00:18:32.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc32/Makefile.am 2008-03-03 10:00:36.000000000 +0100 +@@ -19,13 +19,15 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ + testVMX.stderr.exp testVMX.stdout.exp testVMX.vgtest \ + twi.stderr.exp twi.stdout.exp twi.vgtest \ + tw.stderr.exp tw.stdout.exp tw.vgtest \ +- xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest ++ xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest \ ++ power5+_round.stderr.exp power5+_round.stdout.exp power5+_round.vgtest \ ++ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest + + check_PROGRAMS = \ + bug129390-ppc32 \ + bug139050-ppc32 \ + ldstrev lsw jm-insns mftocrf mcrfs round test_fx test_gx \ +- testVMX twi tw xlc_dbl_u32 ++ testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp + + AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ + @FLAG_M32@ +--- valgrind-3.3.0/none/tests/ppc32/power5+_round.c.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc32/power5+_round.c 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1,147 @@ ++/* Copyright (C) 2007 Pete Eberlein eberlein@us.ibm.com ++ ++ 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. ++*/ ++ ++ ++ ++#include ++#include ++#include ++#include ++ ++#define POS_NORMAL 0x4000 ++#define NEG_NORMAL 0x8000 ++#define POS_INF 0x5000 ++#define NEG_INF 0x9000 ++#define POS_ZERO 0x2000 ++#define NEG_ZERO 0x12000 ++#define POS_DENORMAL 0x14000 ++#define NEG_DENORMAL 0x18000 ++#define NAN 0x11000 ++#define FPRF_MASK 0x1F000 ++ ++ ++int main (int argc, char* argv[]) { ++ ++ double inf, neg0, nan; ++ union { ++ double d; ++ struct { unsigned int dummy, dummy2: 15, fprf:17; }; ++ } fpscr; ++ ++ inf = strtod("inf", NULL); ++ neg0 = copysign(0, -1); ++ nan = strtod("nan", NULL); ++ ++ ++ /* This set is disabled until fprf is implemented. */ ++ if (0) { ++ double set[] = {inf, 1.5, 0, neg0, -1.5, -inf, nan}; ++ int i, j, fprf; ++ for (i=0; i<7; ++i) { ++ for (j=0; j<7; ++j) { ++ asm ("fcmpu 1, %1, %2\n\t" \ ++ "mffs %0\n" \ ++ : "=f" (fpscr.d) \ ++ : "f" (set[i]), "f" (set[j]) \ ++ ); ++ ++ if (i == 6 || j == 6) { ++ fprf = 0x1000; // Unordered ++ } else if (i == j || (i==2 && j==3) || (i==3 && j==2)) { ++ fprf = 0x2000; // Equal ++ } else if (i < j) { ++ fprf = 0x4000; // Greater Than ++ } else if (i > j) { ++ fprf = 0x8000; // Less Than ++ } ++ ++ printf("fcmpu\t%.1f\t%.1f\t%x\t%s\n", set[i], set[j], fpscr.fprf, ++ fpscr.fprf == fprf ? "PASS" : "FAIL"); ++ } ++ } ++ } ++ ++ { ++ double set[] = {inf, 1.9, 1.1, 0, neg0, -1.1, -1.9, -inf, nan}; ++ double frin[] = {inf, 2.0, 1.0, 0, neg0, -1.0, -2.0, -inf, nan}; ++ double friz[] = {inf, 1.0, 1.0, 0, neg0, -1.0, -1.0, -inf, nan}; ++ double frip[] = {inf, 2.0, 2.0, 0, neg0, -1.0, -1.0, -inf, nan}; ++ double frim[] = {inf, 1.0, 1.0, 0, neg0, -2.0, -2.0, -inf, nan}; ++ int fprf[] = {POS_INF, POS_NORMAL, POS_NORMAL, POS_ZERO, NEG_ZERO, ++ NEG_NORMAL, NEG_NORMAL, NEG_INF, NAN}; ++ double set2[] = {0.9, 0.1, -0.1, -0.9, 1e-40, -1e-40}; ++ double frin2[] = {1.0, 0.0, -0.0, -1.0, 0.0, -0.0}; ++ int frin2rf[] = {POS_NORMAL,POS_ZERO,NEG_ZERO,NEG_NORMAL,POS_ZERO,NEG_ZERO}; ++ double friz2[] = {0.0, 0.0, -0.0, -0.0, 0.0, -0.0}; ++ int friz2rf[] = {POS_ZERO,POS_ZERO,NEG_ZERO,NEG_ZERO,POS_ZERO,NEG_ZERO}; ++ double frip2[] = {1.0, 1.0, -0.0, -0.0, 1.0, -0.0}; ++ int frip2rf[] = {POS_NORMAL,POS_NORMAL,NEG_ZERO,NEG_ZERO,POS_NORMAL,NEG_ZERO}; ++ double frim2[] = {0.0, 0.0, -1.0, -1.0, 0.0, -1.0}; ++ int frim2rf[] = {POS_ZERO,POS_ZERO,NEG_NORMAL,NEG_NORMAL,POS_ZERO,NEG_NORMAL}; ++ double ret; ++ int i; ++ ++#define DO_TEST(op,in,out,rf) for (i=0; i ++#include ++#include ++ ++#define CMPB(result,a,b) \ ++ asm __volatile ("cmpb %0, %1, %2\n" : "=r"(result) : "r"(a), "r"(b)) ++ ++ ++int main (int argc, char* argv[]) { ++ int i,j,k; ++ long mask; ++ for (i=1; i<16; i++) { ++ mask = 0; ++ if(i&1) mask+=0xff; ++ if(i&2) mask+=0xff00; ++ if(i&4) mask+=0xff0000; ++ if(i&8) mask+=0xff000000; ++ ++ for (j=0; j<256; j++) ++ for (k=0; k<256; k++) ++ if (j!=k) { ++ ++ long a, b, result; ++ a = (mask & (j*0x1010101)) + ((~mask) & (k*0x1010101)); ++ b = j*0x1010101; ++ CMPB(result, a, b); ++ if (result != mask) ++ printf("%8x %8x %8x %8x\n", mask, a, b, result); ++ exit(1); ++ } ++ ++ } ++ ++ return 0; ++} ++ +--- valgrind-3.3.0/none/tests/ppc32/power6_bcmp.stderr.exp.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc32/power6_bcmp.stderr.exp 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1,2 @@ ++ ++ +--- valgrind-3.3.0/none/tests/ppc32/power6_bcmp.vgtest.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc32/power6_bcmp.vgtest 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1 @@ ++prog: power6_bcmp +--- valgrind-3.3.0/none/tests/ppc64/Makefile.am.jj 2007-12-11 00:18:35.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/Makefile.am 2008-03-03 10:01:52.000000000 +0100 +@@ -9,10 +9,12 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ + std_reg_imm.vgtest std_reg_imm.stderr.exp std_reg_imm.stdout.exp \ + round.stderr.exp round.stdout.exp round.vgtest \ + twi_tdi.stderr.exp twi_tdi.stdout.exp twi_tdi.vgtest \ +- tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest ++ tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest \ ++ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \ ++ power6_mf_gpr.stderr.exp power6_mf_gpr.stdout.exp power6_mf_gpr.vgtest + + check_PROGRAMS = \ +- jm-insns lsw round std_reg_imm twi_tdi tw_td ++ jm-insns lsw round std_reg_imm twi_tdi tw_td power6_bcmp power6_mf_gpr + + AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ + @FLAG_M64@ +--- valgrind-3.3.0/none/tests/ppc64/power6_bcmp.c.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/power6_bcmp.c 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1,61 @@ ++/* Copyright (C) 2007 Pete Eberlein eberlein@us.ibm.com ++ ++ 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. ++*/ ++ ++ ++#include ++#include ++#include ++ ++#define CMPB(result,a,b) \ ++ asm ("cmpb %0, %1, %2\n" : "=r"(result) : "r"(a), "r"(b)) ++ ++ ++int main (int argc, char* argv[]) { ++ int i,j,k; ++ unsigned long mask; ++ for (i=1; i<256; i++) { ++ mask = 0; ++ if(i&1) mask+=0xff; ++ if(i&2) mask+=0xff00; ++ if(i&4) mask+=0xff0000; ++ if(i&8) mask+=0xff000000; ++ if(i&16) mask+=0xff00000000; ++ if(i&32) mask+=0xff0000000000; ++ if(i&64) mask+=0xff000000000000; ++ if(i&128) mask+=0xff00000000000000; ++ ++ for (j=0; j<256; j++) ++ for (k=0; k<256; k++) ++ if (j!=k) { ++ ++ unsigned long a, b, result; ++ a = (mask & (j*0x101010101010101)) + ((~mask) & (k*0x101010101010101)); ++ b = j*0x101010101010101; ++ CMPB(result, a, b); ++ if (result != mask) ++ printf("%8lx %8lx %8lx %8lx\n", mask, a, b, result); ++ exit(1); ++ } ++ ++ } ++ ++ return 0; ++} ++ +--- valgrind-3.3.0/none/tests/ppc64/power6_bcmp.stderr.exp.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/power6_bcmp.stderr.exp 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1,2 @@ ++ ++ +--- valgrind-3.3.0/none/tests/ppc64/power6_bcmp.vgtest.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/power6_bcmp.vgtest 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1 @@ ++prog: power6_bcmp +--- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.c.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.c 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1,47 @@ ++/* Copyright (C) 2007 Pete Eberlein eberlein@us.ibm.com ++ ++ 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. ++*/ ++ ++#include ++#include ++ ++ ++ ++int main (int argc, char* argv[]) ++{ ++ ++ long i; ++ double f; ++ ++ i = 0; ++ f = 100.0; ++ ++ printf("%lx %f\n", i, f); ++ ++ asm ("mftgpr %0, %1\n" : "=r"(i) : "f"(f)); ++ ++ f=0.0; ++ printf("%lx %f\n", i, f); ++ ++ asm ("mffgpr %0, %1\n" : "=f"(f) : "r"(i)); ++ ++ printf("%lx %f\n", i, f); ++ ++ return 0; ++} +--- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stderr.exp.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stderr.exp 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1,2 @@ ++ ++ +--- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stdout.exp.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.stdout.exp 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1,3 @@ ++0 100.000000 ++4059000000000000 0.000000 ++4059000000000000 100.000000 +--- valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.vgtest.jj 2008-03-03 09:58:59.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/power6_mf_gpr.vgtest 2008-03-03 09:58:59.000000000 +0100 +@@ -0,0 +1 @@ ++prog: power6_mf_gpr +--- valgrind-3.3.0/none/tests/ppc32/Makefile.in.jj 2007-12-11 00:23:53.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc32/Makefile.in 2008-03-03 10:02:14.000000000 +0100 +@@ -40,7 +40,8 @@ check_PROGRAMS = bug129390-ppc32$(EXEEXT + ldstrev$(EXEEXT) lsw$(EXEEXT) jm-insns$(EXEEXT) \ + mftocrf$(EXEEXT) mcrfs$(EXEEXT) round$(EXEEXT) \ + test_fx$(EXEEXT) test_gx$(EXEEXT) testVMX$(EXEEXT) \ +- twi$(EXEEXT) tw$(EXEEXT) xlc_dbl_u32$(EXEEXT) ++ twi$(EXEEXT) tw$(EXEEXT) xlc_dbl_u32$(EXEEXT) \ ++ power5+_round$(EXEEXT) power6_bcmp$(EXEEXT) + subdir = none/tests/ppc32 + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -71,6 +72,12 @@ mcrfs_LDADD = $(LDADD) + mftocrf_SOURCES = mftocrf.c + mftocrf_OBJECTS = mftocrf.$(OBJEXT) + mftocrf_LDADD = $(LDADD) ++power5__round_SOURCES = power5+_round.c ++power5__round_OBJECTS = power5+_round.$(OBJEXT) ++power5__round_LDADD = $(LDADD) ++power6_bcmp_SOURCES = power6_bcmp.c ++power6_bcmp_OBJECTS = power6_bcmp.$(OBJEXT) ++power6_bcmp_LDADD = $(LDADD) + round_SOURCES = round.c + round_OBJECTS = round.$(OBJEXT) + round_LDADD = $(LDADD) +@@ -101,11 +108,12 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUD + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + SOURCES = bug129390-ppc32.c bug139050-ppc32.c jm-insns.c ldstrev.c \ +- lsw.c mcrfs.c mftocrf.c round.c testVMX.c test_fx.c test_gx.c \ +- tw.c twi.c xlc_dbl_u32.c ++ lsw.c mcrfs.c mftocrf.c power5+_round.c power6_bcmp.c round.c \ ++ testVMX.c test_fx.c test_gx.c tw.c twi.c xlc_dbl_u32.c + DIST_SOURCES = bug129390-ppc32.c bug139050-ppc32.c jm-insns.c \ +- ldstrev.c lsw.c mcrfs.c mftocrf.c round.c testVMX.c test_fx.c \ +- test_gx.c tw.c twi.c xlc_dbl_u32.c ++ ldstrev.c lsw.c mcrfs.c mftocrf.c power5+_round.c \ ++ power6_bcmp.c round.c testVMX.c test_fx.c test_gx.c tw.c twi.c \ ++ xlc_dbl_u32.c + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +@@ -266,7 +275,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ + testVMX.stderr.exp testVMX.stdout.exp testVMX.vgtest \ + twi.stderr.exp twi.stdout.exp twi.vgtest \ + tw.stderr.exp tw.stdout.exp tw.vgtest \ +- xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest ++ xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest \ ++ power5+_round.stderr.exp power5+_round.stdout.exp power5+_round.vgtest \ ++ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest + + AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ + @FLAG_M32@ +@@ -335,6 +346,12 @@ mcrfs$(EXEEXT): $(mcrfs_OBJECTS) $(mcrfs + mftocrf$(EXEEXT): $(mftocrf_OBJECTS) $(mftocrf_DEPENDENCIES) + @rm -f mftocrf$(EXEEXT) + $(LINK) $(mftocrf_LDFLAGS) $(mftocrf_OBJECTS) $(mftocrf_LDADD) $(LIBS) ++power5+_round$(EXEEXT): $(power5__round_OBJECTS) $(power5__round_DEPENDENCIES) ++ @rm -f power5+_round$(EXEEXT) ++ $(LINK) $(power5__round_LDFLAGS) $(power5__round_OBJECTS) $(power5__round_LDADD) $(LIBS) ++power6_bcmp$(EXEEXT): $(power6_bcmp_OBJECTS) $(power6_bcmp_DEPENDENCIES) ++ @rm -f power6_bcmp$(EXEEXT) ++ $(LINK) $(power6_bcmp_LDFLAGS) $(power6_bcmp_OBJECTS) $(power6_bcmp_LDADD) $(LIBS) + round$(EXEEXT): $(round_OBJECTS) $(round_DEPENDENCIES) + @rm -f round$(EXEEXT) + $(LINK) $(round_LDFLAGS) $(round_OBJECTS) $(round_LDADD) $(LIBS) +@@ -370,6 +387,8 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsw.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcrfs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mftocrf.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power5+_round.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power6_bcmp.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVMX-testVMX.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_fx.Po@am__quote@ +--- valgrind-3.3.0/none/tests/ppc64/Makefile.in.jj 2007-12-11 00:23:55.000000000 +0100 ++++ valgrind-3.3.0/none/tests/ppc64/Makefile.in 2008-03-03 10:02:14.000000000 +0100 +@@ -37,7 +37,8 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + check_PROGRAMS = jm-insns$(EXEEXT) lsw$(EXEEXT) round$(EXEEXT) \ +- std_reg_imm$(EXEEXT) twi_tdi$(EXEEXT) tw_td$(EXEEXT) ++ std_reg_imm$(EXEEXT) twi_tdi$(EXEEXT) tw_td$(EXEEXT) \ ++ power6_bcmp$(EXEEXT) power6_mf_gpr$(EXEEXT) + subdir = none/tests/ppc64 + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -53,6 +54,12 @@ jm_insns_LDADD = $(LDADD) + lsw_SOURCES = lsw.c + lsw_OBJECTS = lsw.$(OBJEXT) + lsw_LDADD = $(LDADD) ++power6_bcmp_SOURCES = power6_bcmp.c ++power6_bcmp_OBJECTS = power6_bcmp.$(OBJEXT) ++power6_bcmp_LDADD = $(LDADD) ++power6_mf_gpr_SOURCES = power6_mf_gpr.c ++power6_mf_gpr_OBJECTS = power6_mf_gpr.$(OBJEXT) ++power6_mf_gpr_LDADD = $(LDADD) + round_SOURCES = round.c + round_OBJECTS = round.$(OBJEXT) + round_LDADD = $(LDADD) +@@ -73,9 +80,10 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUD + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-SOURCES = jm-insns.c lsw.c round.c std_reg_imm.c tw_td.c twi_tdi.c +-DIST_SOURCES = jm-insns.c lsw.c round.c std_reg_imm.c tw_td.c \ +- twi_tdi.c ++SOURCES = jm-insns.c lsw.c power6_bcmp.c power6_mf_gpr.c round.c \ ++ std_reg_imm.c tw_td.c twi_tdi.c ++DIST_SOURCES = jm-insns.c lsw.c power6_bcmp.c power6_mf_gpr.c round.c \ ++ std_reg_imm.c tw_td.c twi_tdi.c + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +@@ -226,7 +235,9 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ + std_reg_imm.vgtest std_reg_imm.stderr.exp std_reg_imm.stdout.exp \ + round.stderr.exp round.stdout.exp round.vgtest \ + twi_tdi.stderr.exp twi_tdi.stdout.exp twi_tdi.vgtest \ +- tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest ++ tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest \ ++ power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \ ++ power6_mf_gpr.stderr.exp power6_mf_gpr.stdout.exp power6_mf_gpr.vgtest + + AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include \ + @FLAG_M64@ +@@ -277,6 +288,12 @@ jm-insns$(EXEEXT): $(jm_insns_OBJECTS) $ + lsw$(EXEEXT): $(lsw_OBJECTS) $(lsw_DEPENDENCIES) + @rm -f lsw$(EXEEXT) + $(LINK) $(lsw_LDFLAGS) $(lsw_OBJECTS) $(lsw_LDADD) $(LIBS) ++power6_bcmp$(EXEEXT): $(power6_bcmp_OBJECTS) $(power6_bcmp_DEPENDENCIES) ++ @rm -f power6_bcmp$(EXEEXT) ++ $(LINK) $(power6_bcmp_LDFLAGS) $(power6_bcmp_OBJECTS) $(power6_bcmp_LDADD) $(LIBS) ++power6_mf_gpr$(EXEEXT): $(power6_mf_gpr_OBJECTS) $(power6_mf_gpr_DEPENDENCIES) ++ @rm -f power6_mf_gpr$(EXEEXT) ++ $(LINK) $(power6_mf_gpr_LDFLAGS) $(power6_mf_gpr_OBJECTS) $(power6_mf_gpr_LDADD) $(LIBS) + round$(EXEEXT): $(round_OBJECTS) $(round_DEPENDENCIES) + @rm -f round$(EXEEXT) + $(LINK) $(round_LDFLAGS) $(round_OBJECTS) $(round_LDADD) $(LIBS) +@@ -298,6 +315,8 @@ distclean-compile: + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jm_insns-jm-insns.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsw.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power6_bcmp.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/power6_mf_gpr.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/round.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/std_reg_imm.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tw_td.Po@am__quote@ diff --git a/valgrind.spec b/valgrind.spec index 4e50aff..7c558e4 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -1,18 +1,13 @@ Summary: Tool for finding memory management bugs in programs Name: valgrind -Version: 3.3.0 -Release: 3 +Version: 3.4.0 +Release: 1 Epoch: 1 Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2 -Patch1: valgrind-3.3.0-cachegrind-improvements.patch -Patch2: valgrind-3.3.0-pkg-config.patch -Patch3: valgrind-3.3.0-power5+-6.patch -Patch4: valgrind-3.3.0-openat.patch -Patch5: valgrind-3.3.0-helgrind-p_b_w.patch -Patch6: valgrind-3.3.0-glibc27-dlhack.patch -Patch7: valgrind-3.3.0-glibc28.patch -Patch8: valgrind-3.3.0-syscalls1.patch -Patch9: valgrind-3.3.0-syscalls2.patch +Patch1: valgrind-3.4.0-cachegrind-improvements.patch +Patch2: valgrind-3.4.0-pkg-config.patch +Patch3: valgrind-3.4.0-power5+-6.patch +Patch4: valgrind-3.4.0-openat.patch License: GPLv2 URL: http://www.valgrind.org/ Group: Development/Debuggers @@ -70,11 +65,6 @@ or valgrind plugins. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 %build %ifarch x86_64 ppc64 @@ -170,6 +160,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/* %changelog +* Sat Feb 7 2009 Jakub Jelinek 3.4.0-1 +- update to 3.4.0 + * Wed Apr 16 2008 Jakub Jelinek 3.3.0-3 - add suppressions for glibc 2.8 - add a bunch of syscall wrappers (#441709)