From fc26e0de2ef1a2addcf860eb029e84404b114fca Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Oct 30 2013 22:39:43 +0000 Subject: 3.9.0-0.1.TEST1 - Upgrade to valgrind 3.9.0.TEST1. --- diff --git a/.gitignore b/.gitignore index 86b12a3..0be23c4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /valgrind-3.8.0-TEST1.tar.bz2 /valgrind-3.8.0.tar.bz2 /valgrind-3.8.1.tar.bz2 +/valgrind-3.9.0.TEST1.tar.bz2 diff --git a/sources b/sources index 400b660..39d03a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -288758010b271119a0ffc0183f1d6e38 valgrind-3.8.1.tar.bz2 +c955bdb3f24379e8b225b3da2d1d30a1 valgrind-3.9.0.TEST1.tar.bz2 diff --git a/valgrind-3.8.1-abbrev-parsing.patch b/valgrind-3.8.1-abbrev-parsing.patch deleted file mode 100644 index 28ba51f..0000000 --- a/valgrind-3.8.1-abbrev-parsing.patch +++ /dev/null @@ -1,160 +0,0 @@ -commit 58d9ce4730d95103c9388be264a170ab852432a9 -Author: mjw -Date: Thu Apr 11 17:55:39 2013 +0000 - - read_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2. - - Bug #305513 contained a patch for some extra robustness checks. But - the real cause of crashing in the read_unitinfo_dwarf2 DWARF reader - seemed to have been this issue where DWARF version 2 DWZ partial_units - were read and DW_FORM_ref_addr had an unexpected size. This combination - is rare. DWARF version 4 is the current default version of GCC. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13367 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_debuginfo/readdwarf.c b/coregrind/m_debuginfo/readdwarf.c -index ce34bc7..52a9099 100644 ---- a/coregrind/m_debuginfo/readdwarf.c -+++ b/coregrind/m_debuginfo/readdwarf.c -@@ -991,7 +991,7 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, - UInt acode, abcode; - ULong atoffs, blklen; - Int level; -- /* UShort ver; */ -+ UShort ver; - - UChar addr_size; - UChar* p = unitblock_img; -@@ -1008,7 +1008,7 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, - p += ui->dw64 ? 12 : 4; - - /* version should be 2, 3 or 4 */ -- /* ver = ML_(read_UShort)(p); */ -+ ver = ML_(read_UShort)(p); - p += 2; - - /* get offset in abbrev */ -@@ -1122,7 +1122,7 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, - case 0x0c: /* FORM_flag */ p++; break; - case 0x0d: /* FORM_sdata */ read_leb128S( &p ); break; - case 0x0f: /* FORM_udata */ read_leb128U( &p ); break; -- case 0x10: /* FORM_ref_addr */ p += ui->dw64 ? 8 : 4; break; -+ case 0x10: /* FORM_ref_addr */ p += (ver == 2) ? addr_size : (ui->dw64 ? 8 : 4); break; - case 0x11: /* FORM_ref1 */ p++; break; - case 0x12: /* FORM_ref2 */ p += 2; break; - case 0x13: /* FORM_ref4 */ p += 4; break; - -commit 4c3b2379fb2cb97f762617df7770b042b1f8a59c -Author: mjw -Date: Wed Apr 17 13:48:29 2013 +0000 - - Simplify read_unitinfo_dwarf2. Only try to read the first DIE. - - Bug #305513. We should only read the first DIE of a compilation unit. - Each compilation unit header is followed by a single DW_TAG_compile_unit - (or DW_TAG_partial_unit, but those aren't important here) and its children. - There is no reason to read any of the children at this point. If the first - DIE isn't a DW_TAG_compile_unit we are done, none of the child DIEs will - provide any useful information. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13369 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_debuginfo/readdwarf.c b/coregrind/m_debuginfo/readdwarf.c -index 52a9099..764295c 100644 ---- a/coregrind/m_debuginfo/readdwarf.c -+++ b/coregrind/m_debuginfo/readdwarf.c -@@ -965,12 +965,14 @@ static UChar* lookup_abbrev( UChar* p, UInt acode ) - } - - /* Read general information for a particular compile unit block in -- * the .debug_info section. -+ * the .debug_info section. In particular read the name, compdir and -+ * stmt_list needed to parse the line number information. - * - * Input: - unitblock is the start of a compilation - * unit block in .debuginfo section - * - debugabbrev is start of .debug_abbrev section - * - debugstr is start of .debug_str section -+ * - debugstr_alt_img is start of .debug_str section in alt debug file - * - * Output: Fill members of ui pertaining to the compilation unit: - * - ui->name is the name of the compilation unit -@@ -990,7 +992,6 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, - { - UInt acode, abcode; - ULong atoffs, blklen; -- Int level; - UShort ver; - - UChar addr_size; -@@ -1021,39 +1022,32 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, - - end_img = unitblock_img - + blklen + (ui->dw64 ? 12 : 4); /* End of this block */ -- level = 0; /* Level in the abbrev tree */ - abbrev_img = debugabbrev_img - + atoffs; /* Abbreviation data for this block */ - -- /* Read the compilation unit entries */ -- while ( p < end_img ) { -- Bool has_child; -+ /* Read the compilation unit entry - this is always the first DIE. -+ * See DWARF4 para 7.5. */ -+ if ( p < end_img ) { - UInt tag; - - acode = read_leb128U( &p ); /* abbreviation code */ -- if ( acode == 0 ) { -- /* NULL entry used for padding - or last child for a sequence -- - see para 7.5.3 */ -- level--; -- continue; -- } - - /* Read abbreviation header */ - abcode = read_leb128U( &abbrev_img ); /* abbreviation code */ - if ( acode != abcode ) { -- /* We are in in children list, and must rewind to a -- * previously declared abbrev code. This code works but is -- * not triggered since we shortcut the parsing once we have -- * read the compile_unit block. This should only occur when -- * level > 0 */ -+ /* This isn't illegal, but somewhat unlikely. Normally the -+ * first abbrev describes the first DIE, the compile_unit. -+ * But maybe this abbrevation data is shared with another -+ * or it is a NULL entry used for padding. See para 7.5.3. */ - abbrev_img = lookup_abbrev( debugabbrev_img + atoffs, acode ); - } - - tag = read_leb128U( &abbrev_img ); -- has_child = *(abbrev_img++) == 1; /* DW_CHILDREN_yes */ - -- if ( has_child ) -- level++; -+ if ( tag != 0x0011 /*TAG_compile_unit*/ ) -+ return; /* Not a compile unit (might be partial) or broken DWARF. */ -+ -+ abbrev_img++; /* DW_CHILDREN_yes or DW_CHILDREN_no */ - - /* And loop on entries */ - for ( ; ; ) { -@@ -1151,16 +1145,9 @@ void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, - else if ( name == 0x10 ) ui->stmt_list = cval; /* DW_AT_stmt_list */ - } - } -- /* Shortcut the parsing once we have read the compile_unit block -- * That's enough info for us, and we are not gdb ! */ -- if ( tag == 0x0011 /*TAG_compile_unit*/ ) -- break; -- } /* Loop on each sub block */ -- -- /* This test would be valid if we were not shortcutting the parsing -- if (level != 0) -- VG_(printf)( "#### Exiting debuginfo block at level %d !!!\n", level ); -- */ -+ } /* Just read the first DIE, if that wasn't the compile_unit then -+ * this might have been a partial unit or broken DWARF info. -+ * That's enough info for us, and we are not gdb ! */ - } - - diff --git a/valgrind-3.8.1-af-bluetooth.patch b/valgrind-3.8.1-af-bluetooth.patch deleted file mode 100644 index d4dbde7..0000000 --- a/valgrind-3.8.1-af-bluetooth.patch +++ /dev/null @@ -1,288 +0,0 @@ -commit ada5ad79e5d8ecf47838319a46ea4671079e6291 -Author: mjw -Date: Wed May 22 10:21:10 2013 +0000 - - Support Linux kernel AF_BLUETOOTH for bind(). - - Bug #320116. sockaddr_rc might contain some padding which might not be - initialized. Explicitly check the sockaddr_rc fields are set. That also - produces better diagnostics about which field is unitialized. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13404 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c -index 40a4bbe..3a6ea82 100644 ---- a/coregrind/m_syswrap/syswrap-generic.c -+++ b/coregrind/m_syswrap/syswrap-generic.c -@@ -941,6 +941,7 @@ void pre_mem_read_sockaddr ( ThreadId tid, - struct vki_sockaddr_un* sun = (struct vki_sockaddr_un *)sa; - struct vki_sockaddr_in* sin = (struct vki_sockaddr_in *)sa; - struct vki_sockaddr_in6* sin6 = (struct vki_sockaddr_in6 *)sa; -+ struct vki_sockaddr_rc* rc = (struct vki_sockaddr_rc *)sa; - - /* NULL/zero-length sockaddrs are legal */ - if ( sa == NULL || salen == 0 ) return; -@@ -981,6 +982,13 @@ void pre_mem_read_sockaddr ( ThreadId tid, - (Addr) &sin6->sin6_scope_id, sizeof (sin6->sin6_scope_id) ); - break; - -+ case VKI_AF_BLUETOOTH: -+ VG_(sprintf) ( outmsg, description, "rc_bdaddr" ); -+ PRE_MEM_READ( outmsg, (Addr) &rc->rc_bdaddr, sizeof (rc->rc_bdaddr) ); -+ VG_(sprintf) ( outmsg, description, "rc_channel" ); -+ PRE_MEM_READ( outmsg, (Addr) &rc->rc_channel, sizeof (rc->rc_channel) ); -+ break; -+ - default: - VG_(sprintf) ( outmsg, description, "" ); - PRE_MEM_READ( outmsg, (Addr) sa, salen ); -diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h -index c57cabd..08ab138 100644 ---- a/include/vki/vki-linux.h -+++ b/include/vki/vki-linux.h -@@ -676,6 +676,7 @@ __KINLINE struct vki_cmsghdr * vki_cmsg_nxthdr (struct vki_msghdr *__msg, struct - #define VKI_AF_UNIX 1 /* Unix domain sockets */ - #define VKI_AF_INET 2 /* Internet IP Protocol */ - #define VKI_AF_INET6 10 /* IP version 6 */ -+#define VKI_AF_BLUETOOTH 31 /* Bluetooth sockets */ - - #define VKI_MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ - -@@ -2968,6 +2969,16 @@ struct vki_hci_inquiry_req { - }; - - //---------------------------------------------------------------------- -+// From linux-3.9.2/include/net/bluetooth/rfcomm.h -+//---------------------------------------------------------------------- -+ -+struct vki_sockaddr_rc { -+ vki_sa_family_t rc_family; -+ vki_bdaddr_t rc_bdaddr; -+ __vki_u8 rc_channel; -+}; -+ -+//---------------------------------------------------------------------- - // From linux-3.4/include/linux/kvm.h - //---------------------------------------------------------------------- - #define KVMIO 0xAE -diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am -index 4cc9113..9755f5c 100644 ---- a/memcheck/tests/linux/Makefile.am -+++ b/memcheck/tests/linux/Makefile.am -@@ -8,6 +8,7 @@ EXTRA_DIST = \ - capget.vgtest capget.stderr.exp capget.stderr.exp2 \ - lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \ - lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \ -+ rfcomm.vgtest rfcomm.stderr.exp \ - sigqueue.vgtest sigqueue.stderr.exp \ - stack_changes.stderr.exp stack_changes.stdout.exp \ - stack_changes.stdout.exp2 stack_changes.vgtest \ -@@ -26,6 +27,7 @@ check_PROGRAMS = \ - getregset \ - lsframe1 \ - lsframe2 \ -+ rfcomm \ - sigqueue \ - stack_changes \ - stack_switch \ -diff --git a/memcheck/tests/linux/rfcomm.c b/memcheck/tests/linux/rfcomm.c -new file mode 100644 -index 0000000..02dcd7e ---- /dev/null -+++ b/memcheck/tests/linux/rfcomm.c -@@ -0,0 +1,54 @@ -+#include -+#include -+#include -+#include -+#include -+ -+/* user space headers might not be there, define things ourselves. */ -+typedef struct { -+ uint8_t b[6]; -+} __attribute__((packed)) vui_bdaddr_t; -+ -+struct vui_sockaddr_rc { -+ sa_family_t rc_family; -+ vui_bdaddr_t rc_bdaddr; -+ uint8_t rc_channel; -+}; -+ -+#define VUI_AF_BLUETOOTH 31 -+#define VUI_BTPROTO_RFCOMM 3 -+ -+#define VUI_BDADDR_ANY (&(vui_bdaddr_t) {{0, 0, 0, 0, 0, 0}}) -+ -+int -+main (int argc, char **argv) -+{ -+ int nSocket; -+ -+ nSocket = socket(VUI_AF_BLUETOOTH, SOCK_STREAM, VUI_BTPROTO_RFCOMM); -+ -+ if (nSocket < 0) -+ { -+ // Not supported, nothing to test... -+ return 1; -+ } -+ -+ struct vui_sockaddr_rc aAddr; -+ // Ignore return values. -+ -+ // Missing family -+ bind(nSocket, (struct sockaddr *) &aAddr, sizeof(aAddr)); -+ -+ aAddr.rc_family = VUI_AF_BLUETOOTH; -+ // Missing bdaddr. -+ bind(nSocket, (struct sockaddr *) &aAddr, sizeof(aAddr)); -+ -+ aAddr.rc_bdaddr = *VUI_BDADDR_ANY; -+ // Missing channel. -+ bind(nSocket, (struct sockaddr *) &aAddr, sizeof(aAddr)); -+ -+ aAddr.rc_channel = 5; -+ bind(nSocket, (struct sockaddr *) &aAddr, sizeof(aAddr)); -+ -+ return 0; -+} -diff --git a/memcheck/tests/linux/rfcomm.stderr.exp b/memcheck/tests/linux/rfcomm.stderr.exp -new file mode 100644 -index 0000000..4df935b ---- /dev/null -+++ b/memcheck/tests/linux/rfcomm.stderr.exp -@@ -0,0 +1,21 @@ -+Syscall param socketcall.bind(my_addr.sa_family) points to uninitialised byte(s) -+ ... -+ by 0x........: main (rfcomm.c:40) -+ Address 0x........ is on thread 1's stack -+ Uninitialised value was created by a stack allocation -+ at 0x........: main (rfcomm.c:25) -+ -+Syscall param socketcall.bind(my_addr.rc_bdaddr) points to uninitialised byte(s) -+ ... -+ by 0x........: main (rfcomm.c:44) -+ Address 0x........ is on thread 1's stack -+ Uninitialised value was created by a stack allocation -+ at 0x........: main (rfcomm.c:25) -+ -+Syscall param socketcall.bind(my_addr.rc_channel) points to uninitialised byte(s) -+ ... -+ by 0x........: main (rfcomm.c:48) -+ Address 0x........ is on thread 1's stack -+ Uninitialised value was created by a stack allocation -+ at 0x........: main (rfcomm.c:25) -+ -diff --git a/memcheck/tests/linux/rfcomm.vgtest b/memcheck/tests/linux/rfcomm.vgtest -new file mode 100644 -index 0000000..490aef4 ---- /dev/null -+++ b/memcheck/tests/linux/rfcomm.vgtest -@@ -0,0 +1,5 @@ -+prog: rfcomm -+vgopts: -q --track-origins=yes -+ -+# Will exit -1 if AF_BLUETOOTH not supported -+prereq: ./rfcomm - -commit 4cb663fdaa2a63efc447f7251270446c4e8c9611 -Author: mjw -Date: Wed May 22 10:37:52 2013 +0000 - - Don't break platforms without AF_BLUETOOTH. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13405 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c -index 3a6ea82..b85fd9c 100644 ---- a/coregrind/m_syswrap/syswrap-generic.c -+++ b/coregrind/m_syswrap/syswrap-generic.c -@@ -941,7 +941,9 @@ void pre_mem_read_sockaddr ( ThreadId tid, - struct vki_sockaddr_un* sun = (struct vki_sockaddr_un *)sa; - struct vki_sockaddr_in* sin = (struct vki_sockaddr_in *)sa; - struct vki_sockaddr_in6* sin6 = (struct vki_sockaddr_in6 *)sa; -+#ifdef VKI_AF_BLUETOOTH - struct vki_sockaddr_rc* rc = (struct vki_sockaddr_rc *)sa; -+#endif - - /* NULL/zero-length sockaddrs are legal */ - if ( sa == NULL || salen == 0 ) return; -@@ -981,13 +983,15 @@ void pre_mem_read_sockaddr ( ThreadId tid, - PRE_MEM_READ( outmsg, - (Addr) &sin6->sin6_scope_id, sizeof (sin6->sin6_scope_id) ); - break; -- -+ -+#ifdef VKI_AF_BLUETOOTH - case VKI_AF_BLUETOOTH: - VG_(sprintf) ( outmsg, description, "rc_bdaddr" ); - PRE_MEM_READ( outmsg, (Addr) &rc->rc_bdaddr, sizeof (rc->rc_bdaddr) ); - VG_(sprintf) ( outmsg, description, "rc_channel" ); - PRE_MEM_READ( outmsg, (Addr) &rc->rc_channel, sizeof (rc->rc_channel) ); - break; -+#endif - - default: - VG_(sprintf) ( outmsg, description, "" ); ---- valgrind-3.8.1.orig/memcheck/tests/linux/Makefile.in 2013-07-08 15:15:20.579962577 +0200 -+++ valgrind-3.8.1/memcheck/tests/linux/Makefile.in 2013-07-08 16:12:36.353352626 +0200 -@@ -55,8 +55,8 @@ - @VGCONF_HAVE_PLATFORM_SEC_TRUE@ -DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 - - check_PROGRAMS = brk$(EXEEXT) capget$(EXEEXT) getregset$(EXEEXT) \ -- lsframe1$(EXEEXT) lsframe2$(EXEEXT) sigqueue$(EXEEXT) \ -- stack_changes$(EXEEXT) stack_switch$(EXEEXT) \ -+ lsframe1$(EXEEXT) lsframe2$(EXEEXT) rfcomm$(EXEEXT) \ -+ sigqueue$(EXEEXT) stack_changes$(EXEEXT) stack_switch$(EXEEXT) \ - syscalls-2007$(EXEEXT) syslog-syscall$(EXEEXT) \ - timerfd-syscall$(EXEEXT) proc-auxv$(EXEEXT) - subdir = memcheck/tests/linux -@@ -86,6 +86,9 @@ - proc_auxv_SOURCES = proc-auxv.c - proc_auxv_OBJECTS = proc-auxv.$(OBJEXT) - proc_auxv_LDADD = $(LDADD) -+rfcomm_SOURCES = rfcomm.c -+rfcomm_OBJECTS = rfcomm.$(OBJEXT) -+rfcomm_LDADD = $(LDADD) - sigqueue_SOURCES = sigqueue.c - sigqueue_OBJECTS = sigqueue.$(OBJEXT) - sigqueue_LDADD = $(LDADD) -@@ -114,10 +117,10 @@ - CCLD = $(CC) - LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - SOURCES = brk.c capget.c getregset.c lsframe1.c lsframe2.c proc-auxv.c \ -- sigqueue.c stack_changes.c stack_switch.c syscalls-2007.c \ -- syslog-syscall.c timerfd-syscall.c -+ rfcomm.c sigqueue.c stack_changes.c stack_switch.c \ -+ syscalls-2007.c syslog-syscall.c timerfd-syscall.c - DIST_SOURCES = brk.c capget.c getregset.c lsframe1.c lsframe2.c \ -- proc-auxv.c sigqueue.c stack_changes.c stack_switch.c \ -+ proc-auxv.c rfcomm.c sigqueue.c stack_changes.c stack_switch.c \ - syscalls-2007.c syslog-syscall.c timerfd-syscall.c - ETAGS = etags - CTAGS = ctags -@@ -405,6 +408,7 @@ - capget.vgtest capget.stderr.exp capget.stderr.exp2 \ - lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \ - lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \ -+ rfcomm.vgtest rfcomm.stderr.exp \ - sigqueue.vgtest sigqueue.stderr.exp \ - stack_changes.stderr.exp stack_changes.stdout.exp \ - stack_changes.stdout.exp2 stack_changes.vgtest \ -@@ -473,6 +477,9 @@ - proc-auxv$(EXEEXT): $(proc_auxv_OBJECTS) $(proc_auxv_DEPENDENCIES) - @rm -f proc-auxv$(EXEEXT) - $(LINK) $(proc_auxv_OBJECTS) $(proc_auxv_LDADD) $(LIBS) -+rfcomm$(EXEEXT): $(rfcomm_OBJECTS) $(rfcomm_DEPENDENCIES) -+ @rm -f rfcomm$(EXEEXT) -+ $(LINK) $(rfcomm_OBJECTS) $(rfcomm_LDADD) $(LIBS) - sigqueue$(EXEEXT): $(sigqueue_OBJECTS) $(sigqueue_DEPENDENCIES) - @rm -f sigqueue$(EXEEXT) - $(LINK) $(sigqueue_OBJECTS) $(sigqueue_LDADD) $(LIBS) -@@ -504,6 +511,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsframe1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsframe2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proc-auxv.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfcomm.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigqueue.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack_changes.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack_switch.Po@am__quote@ diff --git a/valgrind-3.8.1-aspacemgr_VG_N_SEGs.patch b/valgrind-3.8.1-aspacemgr_VG_N_SEGs.patch deleted file mode 100644 index 92e7785..0000000 --- a/valgrind-3.8.1-aspacemgr_VG_N_SEGs.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: valgrind/coregrind/m_aspacemgr/aspacemgr-linux.c -=================================================================== ---- valgrind/coregrind/m_aspacemgr/aspacemgr-linux.c (revision 13043) -+++ valgrind/coregrind/m_aspacemgr/aspacemgr-linux.c (working copy) -@@ -265,10 +265,10 @@ - /* ------ start of STATE for the address-space manager ------ */ - - /* Max number of segments we can track. */ --#define VG_N_SEGMENTS 5000 -+#define VG_N_SEGMENTS 50000 - - /* Max number of segment file names we can track. */ --#define VG_N_SEGNAMES 1000 -+#define VG_N_SEGNAMES 25000 - - /* Max length of a segment file name. */ - #define VG_MAX_SEGNAMELEN 1000 diff --git a/valgrind-3.8.1-avx2-bmi-fma.patch.gz b/valgrind-3.8.1-avx2-bmi-fma.patch.gz deleted file mode 100644 index ca79eb2..0000000 Binary files a/valgrind-3.8.1-avx2-bmi-fma.patch.gz and /dev/null differ diff --git a/valgrind-3.8.1-avx2-prereq.patch b/valgrind-3.8.1-avx2-prereq.patch deleted file mode 100644 index 2585091..0000000 --- a/valgrind-3.8.1-avx2-prereq.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- valgrind/none/tests/amd64/avx2-1.vgtest 2012-09-19 16:40:20.675627549 +0200 -+++ valgrind/none/tests/amd64/avx2-1.vgtest 2012-09-19 20:53:16.939765249 +0200 -@@ -1,3 +1,3 @@ - prog: avx2-1 --prereq: ../../../tests/x86_amd64_features amd64-avx -+prereq: test -x avx2-1 && ../../../tests/x86_amd64_features amd64-avx - vgopts: -q ---- valgrind/none/tests/amd64/bmi.vgtest 2012-09-19 16:40:20.368622951 +0200 -+++ valgrind/none/tests/amd64/bmi.vgtest 2012-09-19 20:54:31.168839454 +0200 -@@ -1,3 +1,3 @@ - prog: bmi --prereq: ../../../tests/x86_amd64_features amd64-avx -+prereq: test -x bmi && ../../../tests/x86_amd64_features amd64-avx - vgopts: -q ---- valgrind/none/tests/amd64/fma.vgtest 2012-09-19 16:40:20.755628747 +0200 -+++ valgrind/none/tests/amd64/fma.vgtest 2012-09-19 20:54:58.851240219 +0200 -@@ -1,3 +1,3 @@ - prog: fma --prereq: ../../../tests/x86_amd64_features amd64-avx -+prereq: test -x fma && ../../../tests/x86_amd64_features amd64-avx - vgopts: -q diff --git a/valgrind-3.8.1-bmi-conf-check.patch b/valgrind-3.8.1-bmi-conf-check.patch deleted file mode 100644 index a201cf7..0000000 --- a/valgrind-3.8.1-bmi-conf-check.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- valgrind/configure 2012-09-12 20:20:29.868427602 +0200 -+++ valgrind/configure 2012-09-13 18:28:42.354382238 +0200 -@@ -8389,9 +8389,9 @@ - - do { unsigned int h, l; - __asm__ __volatile__( -- "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); } -+ "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); - __asm__ __volatile__( -- "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "g" (0x7654321) : "edx" ); } -+ "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "rm" (0x7654321) : "edx" ); } - while (0) - - ; ---- valgrind/configure.in 2012-09-13 14:53:45.826948006 +0200 -+++ valgrind/configure.in 2012-09-13 18:28:20.725057751 +0200 -@@ -1822,9 +1822,9 @@ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ - do { unsigned int h, l; - __asm__ __volatile__( -- "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); } -+ "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); - __asm__ __volatile__( -- "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "g" (0x7654321) : "edx" ); } -+ "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "rm" (0x7654321) : "edx" ); } - while (0) - ]])], [ - ac_have_as_bmi=yes diff --git a/valgrind-3.8.1-cachegrind-improvements.patch b/valgrind-3.8.1-cachegrind-improvements.patch deleted file mode 100644 index f6f9a1f..0000000 --- a/valgrind-3.8.1-cachegrind-improvements.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- valgrind-3.8.1/cachegrind/cg_sim.c.jj 2011-10-26 23:24:32.000000000 +0200 -+++ valgrind-3.8.1/cachegrind/cg_sim.c 2011-12-09 17:31:19.256023683 +0100 -@@ -42,27 +42,30 @@ typedef struct { - Int size; /* bytes */ - Int assoc; - Int line_size; /* bytes */ -- Int sets; - Int sets_min_1; - 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->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", -@@ -72,11 +75,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), sets * c->assoc); - } - - /* This is done as a macro rather than by passing in the cache_t2 as an diff --git a/valgrind-3.8.1-capget.patch b/valgrind-3.8.1-capget.patch deleted file mode 100644 index 5c9e45d..0000000 --- a/valgrind-3.8.1-capget.patch +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include - -int -main (int c, char **argv) -{ - struct __user_cap_header_struct hdr; - hdr.version = _LINUX_CAPABILITY_VERSION; - hdr.pid = 0; - (void) capget(&hdr, NULL); - switch (hdr.version) { - case _LINUX_CAPABILITY_VERSION_1: - printf("Version 1\n"); - break; - case _LINUX_CAPABILITY_VERSION_2: - printf("Version 2\n"); - break; - default: - printf("Unknown version\n"); - break; - } - return 0; -} - ---- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2010-04-07 08:14:12.000000000 -0400 -+++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2010-04-12 07:24:12.838876000 -0400 -@@ -2212,8 +2212,9 @@ PRE(sys_capget) - vki_cap_user_header_t, header, vki_cap_user_data_t, data); - PRE_MEM_READ( "capget(header)", ARG1, - sizeof(struct __vki_user_cap_header_struct) ); -- PRE_MEM_WRITE( "capget(data)", ARG2, -- sizeof(struct __vki_user_cap_data_struct) ); -+ if (ARG2 != (Addr)NULL) -+ PRE_MEM_WRITE( "capget(data)", ARG2, -+ sizeof(struct __vki_user_cap_data_struct) ); - } - POST(sys_capget) - { ---- valgrind/memcheck/tests/x86-linux/scalar.c (revision 13010) -+++ valgrind/memcheck/tests/x86-linux/scalar.c (working copy) -@@ -813,7 +813,7 @@ - - // __NR_capget 184 - GO(__NR_capget, "2s 2m"); -- SY(__NR_capget, x0, x0); FAIL; -+ SY(__NR_capget, x0, x0+1); FAIL; - - // __NR_capset 185 - GO(__NR_capset, "2s 2m"); diff --git a/valgrind-3.8.1-cfi_dw_ops.patch b/valgrind-3.8.1-cfi_dw_ops.patch deleted file mode 100644 index 54e0eb6..0000000 --- a/valgrind-3.8.1-cfi_dw_ops.patch +++ /dev/null @@ -1,415 +0,0 @@ ------------------------------------------------------------------------- -r13008 | tom | 2012-09-21 10:57:46 +0200 (Fri, 21 Sep 2012) | 3 lines - -When processing DW_OP_plus_uconst make sure we record an add, not -whatever binary operation we happened to see last. - ------------------------------------------------------------------------- -r13009 | tom | 2012-09-21 11:04:27 +0200 (Fri, 21 Sep 2012) | 2 lines - -Rename CfiOp to CfiBinop in preparation for adding unary operators. - ------------------------------------------------------------------------- -r13010 | tom | 2012-09-21 11:12:30 +0200 (Fri, 21 Sep 2012) | 3 lines - -Implement some extra DW_OPs - more constants and some unary operators. -Patch from Mark Wielaard on BZ#307038. - ------------------------------------------------------------------------- - -Index: valgrind/coregrind/m_debuginfo/readdwarf.c -=================================================================== ---- valgrind/coregrind/m_debuginfo/readdwarf.c (revision 13007) -+++ valgrind/coregrind/m_debuginfo/readdwarf.c (working copy) -@@ -2728,12 +2728,13 @@ - sp--; \ - } while (0) - -- Int ix, ix2, reg; -- UChar opcode; -- Word sw; -- UWord uw; -- CfiOp op; -- HChar* opname; -+ Int ix, ix2, reg; -+ UChar opcode; -+ Word sw; -+ UWord uw; -+ CfiUnop uop; -+ CfiBinop bop; -+ HChar* opname; - - Int sp; /* # of top element: valid is -1 .. N_EXPR_STACK-1 */ - Int stack[N_EXPR_STACK]; /* indices into ctx->exprs */ -@@ -2752,7 +2753,7 @@ - if (ctxs->cfa_is_regoff) { - /* cfa is reg +/- offset */ - ix = ML_(CfiExpr_Binop)( dst, -- Cop_Add, -+ Cbinop_Add, - ML_(CfiExpr_DwReg)( dst, ctxs->cfa_reg ), - ML_(CfiExpr_Const)( dst, (UWord)(Word)ctxs->cfa_off ) - ); -@@ -2778,7 +2779,7 @@ - break; - } - -- op = 0; opname = NULL; /* excessively conservative */ -+ uop = 0; bop = 0; opname = NULL; /* excessively conservative */ - - opcode = *expr++; - switch (opcode) { -@@ -2798,7 +2799,7 @@ - vg_assert(reg >= 0 && reg <= 31); - sw = read_leb128S( &expr ); - ix = ML_(CfiExpr_Binop)( dst, -- Cop_Add, -+ Cbinop_Add, - ML_(CfiExpr_DwReg)( dst, reg ), - ML_(CfiExpr_Const)( dst, (UWord)sw ) - ); -@@ -2822,7 +2823,7 @@ - PUSH( ML_(CfiExpr_Const)( dst, uw ) ); - POP( ix ); - POP( ix2 ); -- PUSH( ML_(CfiExpr_Binop)( dst, op, ix2, ix ) ); -+ PUSH( ML_(CfiExpr_Binop)( dst, Cbinop_Add, ix2, ix ) ); - if (ddump_frames) - VG_(printf)("DW_OP_plus_uconst: %lu", uw); - break; -@@ -2836,6 +2837,15 @@ - VG_(printf)("DW_OP_const4s: %ld", sw); - break; - -+ case DW_OP_const2s: -+ /* push: 16-bit signed immediate */ -+ sw = read_le_s_encoded_literal( expr, 2 ); -+ expr += 2; -+ PUSH( ML_(CfiExpr_Const)( dst, (UWord)sw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const2s: %ld", sw); -+ break; -+ - case DW_OP_const1s: - /* push: 8-bit signed immediate */ - sw = read_le_s_encoded_literal( expr, 1 ); -@@ -2845,34 +2855,74 @@ - VG_(printf)("DW_OP_const1s: %ld", sw); - break; - -+ case DW_OP_const1u: -+ /* push: 8-bit unsigned immediate */ -+ uw = read_le_u_encoded_literal( expr, 1 ); -+ expr += 1; -+ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const1: %lu", uw); -+ break; -+ -+ case DW_OP_const2u: -+ /* push: 16-bit unsigned immediate */ -+ uw = read_le_u_encoded_literal( expr, 2 ); -+ expr += 2; -+ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const2: %lu", uw); -+ break; -+ -+ case DW_OP_const4u: -+ /* push: 32-bit unsigned immediate */ -+ uw = read_le_u_encoded_literal( expr, 4 ); -+ expr += 4; -+ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const4: %lu", uw); -+ break; -+ -+ case DW_OP_abs: -+ uop = Cunop_Abs; opname = "abs"; goto unop; -+ case DW_OP_neg: -+ uop = Cunop_Neg; opname = "neg"; goto unop; -+ case DW_OP_not: -+ uop = Cunop_Not; opname = "not"; goto unop; -+ unop: -+ POP( ix ); -+ PUSH( ML_(CfiExpr_Unop)( dst, uop, ix ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_%s", opname); -+ break; -+ - case DW_OP_minus: -- op = Cop_Sub; opname = "minus"; goto binop; -+ bop = Cbinop_Sub; opname = "minus"; goto binop; - case DW_OP_plus: -- op = Cop_Add; opname = "plus"; goto binop; -+ bop = Cbinop_Add; opname = "plus"; goto binop; - case DW_OP_and: -- op = Cop_And; opname = "and"; goto binop; -+ bop = Cbinop_And; opname = "and"; goto binop; - case DW_OP_mul: -- op = Cop_Mul; opname = "mul"; goto binop; -+ bop = Cbinop_Mul; opname = "mul"; goto binop; - case DW_OP_shl: -- op = Cop_Shl; opname = "shl"; goto binop; -+ bop = Cbinop_Shl; opname = "shl"; goto binop; - case DW_OP_shr: -- op = Cop_Shr; opname = "shr"; goto binop; -+ bop = Cbinop_Shr; opname = "shr"; goto binop; - case DW_OP_eq: -- op = Cop_Eq; opname = "eq"; goto binop; -+ bop = Cbinop_Eq; opname = "eq"; goto binop; - case DW_OP_ge: -- op = Cop_Ge; opname = "ge"; goto binop; -+ bop = Cbinop_Ge; opname = "ge"; goto binop; - case DW_OP_gt: -- op = Cop_Gt; opname = "gt"; goto binop; -+ bop = Cbinop_Gt; opname = "gt"; goto binop; - case DW_OP_le: -- op = Cop_Le; opname = "le"; goto binop; -+ bop = Cbinop_Le; opname = "le"; goto binop; - case DW_OP_lt: -- op = Cop_Lt; opname = "lt"; goto binop; -+ bop = Cbinop_Lt; opname = "lt"; goto binop; - case DW_OP_ne: -- op = Cop_Ne; opname = "ne"; goto binop; -+ bop = Cbinop_Ne; opname = "ne"; goto binop; - binop: - POP( ix ); - POP( ix2 ); -- PUSH( ML_(CfiExpr_Binop)( dst, op, ix2, ix ) ); -+ PUSH( ML_(CfiExpr_Binop)( dst, bop, ix2, ix ) ); - if (ddump_frames) - VG_(printf)("DW_OP_%s", opname); - break; -Index: coregrind/m_debuginfo/debuginfo.c -=================================================================== ---- valgrind/coregrind/m_debuginfo/debuginfo.c (revision 13007) -+++ valgrind/coregrind/m_debuginfo/debuginfo.c (working copy) -@@ -2051,30 +2051,40 @@ - UWord evalCfiExpr ( XArray* exprs, Int ix, - CfiExprEvalContext* eec, Bool* ok ) - { -- UWord wL, wR; -+ UWord w, wL, wR; - Addr a; - CfiExpr* e; - vg_assert(sizeof(Addr) == sizeof(UWord)); - e = VG_(indexXA)( exprs, ix ); - switch (e->tag) { -+ case Cex_Unop: -+ w = evalCfiExpr( exprs, e->Cex.Unop.ix, eec, ok ); -+ if (!(*ok)) return 0; -+ switch (e->Cex.Unop.op) { -+ case Cunop_Abs: return (Word) w < 0 ? - w : w; -+ case Cunop_Neg: return - (Word) w; -+ case Cunop_Not: return ~ w; -+ default: goto unhandled; -+ } -+ /*NOTREACHED*/ - case Cex_Binop: - wL = evalCfiExpr( exprs, e->Cex.Binop.ixL, eec, ok ); - if (!(*ok)) return 0; - wR = evalCfiExpr( exprs, e->Cex.Binop.ixR, eec, ok ); - if (!(*ok)) return 0; - switch (e->Cex.Binop.op) { -- case Cop_Add: return wL + wR; -- case Cop_Sub: return wL - wR; -- case Cop_And: return wL & wR; -- case Cop_Mul: return wL * wR; -- case Cop_Shl: return wL << wR; -- case Cop_Shr: return wL >> wR; -- case Cop_Eq: return wL == wR ? 1 : 0; -- case Cop_Ge: return (Word) wL >= (Word) wR ? 1 : 0; -- case Cop_Gt: return (Word) wL > (Word) wR ? 1 : 0; -- case Cop_Le: return (Word) wL <= (Word) wR ? 1 : 0; -- case Cop_Lt: return (Word) wL < (Word) wR ? 1 : 0; -- case Cop_Ne: return wL != wR ? 1 : 0; -+ case Cbinop_Add: return wL + wR; -+ case Cbinop_Sub: return wL - wR; -+ case Cbinop_And: return wL & wR; -+ case Cbinop_Mul: return wL * wR; -+ case Cbinop_Shl: return wL << wR; -+ case Cbinop_Shr: return wL >> wR; -+ case Cbinop_Eq: return wL == wR ? 1 : 0; -+ case Cbinop_Ge: return (Word) wL >= (Word) wR ? 1 : 0; -+ case Cbinop_Gt: return (Word) wL > (Word) wR ? 1 : 0; -+ case Cbinop_Le: return (Word) wL <= (Word) wR ? 1 : 0; -+ case Cbinop_Lt: return (Word) wL < (Word) wR ? 1 : 0; -+ case Cbinop_Ne: return wL != wR ? 1 : 0; - default: goto unhandled; - } - /*NOTREACHED*/ -Index: valgrind/coregrind/m_debuginfo/storage.c -=================================================================== ---- valgrind/coregrind/m_debuginfo/storage.c (revision 13007) -+++ valgrind/coregrind/m_debuginfo/storage.c (working copy) -@@ -585,10 +585,19 @@ - e.Cex.Const.con = con; - return (Int)VG_(addToXA)( dst, &e ); - } --Int ML_(CfiExpr_Binop)( XArray* dst, CfiOp op, Int ixL, Int ixR ) -+Int ML_(CfiExpr_Unop)( XArray* dst, CfiUnop op, Int ix ) - { - CfiExpr e; - VG_(memset)( &e, 0, sizeof(e) ); -+ e.tag = Cex_Unop; -+ e.Cex.Unop.op = op; -+ e.Cex.Unop.ix = ix; -+ return (Int)VG_(addToXA)( dst, &e ); -+} -+Int ML_(CfiExpr_Binop)( XArray* dst, CfiBinop op, Int ixL, Int ixR ) -+{ -+ CfiExpr e; -+ VG_(memset)( &e, 0, sizeof(e) ); - e.tag = Cex_Binop; - e.Cex.Binop.op = op; - e.Cex.Binop.ixL = ixL; -@@ -612,25 +621,35 @@ - return (Int)VG_(addToXA)( dst, &e ); - } - --static void ppCfiOp ( CfiOp op ) -+static void ppCfiUnop ( CfiUnop op ) - { - switch (op) { -- case Cop_Add: VG_(printf)("+"); break; -- case Cop_Sub: VG_(printf)("-"); break; -- case Cop_And: VG_(printf)("&"); break; -- case Cop_Mul: VG_(printf)("*"); break; -- case Cop_Shl: VG_(printf)("<<"); break; -- case Cop_Shr: VG_(printf)(">>"); break; -- case Cop_Eq: VG_(printf)("=="); break; -- case Cop_Ge: VG_(printf)(">="); break; -- case Cop_Gt: VG_(printf)(">"); break; -- case Cop_Le: VG_(printf)("<="); break; -- case Cop_Lt: VG_(printf)("<"); break; -- case Cop_Ne: VG_(printf)("!="); break; -- default: vg_assert(0); -+ case Cunop_Abs: VG_(printf)("abs"); break; -+ case Cunop_Neg: VG_(printf)("-"); break; -+ case Cunop_Not: VG_(printf)("~"); break; -+ default: vg_assert(0); - } - } - -+static void ppCfiBinop ( CfiBinop op ) -+{ -+ switch (op) { -+ case Cbinop_Add: VG_(printf)("+"); break; -+ case Cbinop_Sub: VG_(printf)("-"); break; -+ case Cbinop_And: VG_(printf)("&"); break; -+ case Cbinop_Mul: VG_(printf)("*"); break; -+ case Cbinop_Shl: VG_(printf)("<<"); break; -+ case Cbinop_Shr: VG_(printf)(">>"); break; -+ case Cbinop_Eq: VG_(printf)("=="); break; -+ case Cbinop_Ge: VG_(printf)(">="); break; -+ case Cbinop_Gt: VG_(printf)(">"); break; -+ case Cbinop_Le: VG_(printf)("<="); break; -+ case Cbinop_Lt: VG_(printf)("<"); break; -+ case Cbinop_Ne: VG_(printf)("!="); break; -+ default: vg_assert(0); -+ } -+} -+ - static void ppCfiReg ( CfiReg reg ) - { - switch (reg) { -@@ -664,11 +683,17 @@ - case Cex_Const: - VG_(printf)("0x%lx", e->Cex.Const.con); - break; -+ case Cex_Unop: -+ ppCfiUnop(e->Cex.Unop.op); -+ VG_(printf)("("); -+ ML_(ppCfiExpr)(src, e->Cex.Unop.ix); -+ VG_(printf)(")"); -+ break; - case Cex_Binop: - VG_(printf)("("); - ML_(ppCfiExpr)(src, e->Cex.Binop.ixL); - VG_(printf)(")"); -- ppCfiOp(e->Cex.Binop.op); -+ ppCfiBinop(e->Cex.Binop.op); - VG_(printf)("("); - ML_(ppCfiExpr)(src, e->Cex.Binop.ixR); - VG_(printf)(")"); -Index: valgrind/coregrind/m_debuginfo/priv_storage.h -=================================================================== ---- valgrind/coregrind/m_debuginfo/priv_storage.h (revision 13007) -+++ valgrind/coregrind/m_debuginfo/priv_storage.h (working copy) -@@ -279,23 +279,31 @@ - - typedef - enum { -- Cop_Add=0x321, -- Cop_Sub, -- Cop_And, -- Cop_Mul, -- Cop_Shl, -- Cop_Shr, -- Cop_Eq, -- Cop_Ge, -- Cop_Gt, -- Cop_Le, -- Cop_Lt, -- Cop_Ne -+ Cunop_Abs=0x231, -+ Cunop_Neg, -+ Cunop_Not - } -- CfiOp; -+ CfiUnop; - - typedef - enum { -+ Cbinop_Add=0x321, -+ Cbinop_Sub, -+ Cbinop_And, -+ Cbinop_Mul, -+ Cbinop_Shl, -+ Cbinop_Shr, -+ Cbinop_Eq, -+ Cbinop_Ge, -+ Cbinop_Gt, -+ Cbinop_Le, -+ Cbinop_Lt, -+ Cbinop_Ne -+ } -+ CfiBinop; -+ -+typedef -+ enum { - Creg_IA_SP=0x213, - Creg_IA_BP, - Creg_IA_IP, -@@ -313,6 +321,7 @@ - Cex_Undef=0x123, - Cex_Deref, - Cex_Const, -+ Cex_Unop, - Cex_Binop, - Cex_CfiReg, - Cex_DwReg -@@ -332,7 +341,11 @@ - UWord con; - } Const; - struct { -- CfiOp op; -+ CfiUnop op; -+ Int ix; -+ } Unop; -+ struct { -+ CfiBinop op; - Int ixL; - Int ixR; - } Binop; -@@ -350,7 +363,8 @@ - extern Int ML_(CfiExpr_Undef) ( XArray* dst ); - extern Int ML_(CfiExpr_Deref) ( XArray* dst, Int ixAddr ); - extern Int ML_(CfiExpr_Const) ( XArray* dst, UWord con ); --extern Int ML_(CfiExpr_Binop) ( XArray* dst, CfiOp op, Int ixL, Int ixR ); -+extern Int ML_(CfiExpr_Unop) ( XArray* dst, CfiUnop op, Int ix ); -+extern Int ML_(CfiExpr_Binop) ( XArray* dst, CfiBinop op, Int ixL, Int ixR ); - extern Int ML_(CfiExpr_CfiReg)( XArray* dst, CfiReg reg ); - extern Int ML_(CfiExpr_DwReg) ( XArray* dst, Int reg ); - diff --git a/valgrind-3.8.1-config_h.patch b/valgrind-3.8.1-config_h.patch deleted file mode 100644 index 47a498f..0000000 --- a/valgrind-3.8.1-config_h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- valgrind/include/pub_tool_basics.h.jj 2011-10-26 23:24:32.000000000 +0200 -+++ valgrind/include/pub_tool_basics.h 2011-12-09 17:42:50.828630546 +0100 -@@ -297,7 +297,7 @@ static inline Bool sr_EQ ( SysRes sr1, S - #define VG_BUGS_TO "www.valgrind.org" - - /* Branch prediction hints. */ --#if defined(__GNUC__) -+#if defined(__GNUC__) && (__GNUC__ >= 3) - # define LIKELY(x) __builtin_expect(!!(x), 1) - # define UNLIKELY(x) __builtin_expect(!!(x), 0) - #else diff --git a/valgrind-3.8.1-dwarf-anon-enum.patch b/valgrind-3.8.1-dwarf-anon-enum.patch deleted file mode 100644 index a29d0b9..0000000 --- a/valgrind-3.8.1-dwarf-anon-enum.patch +++ /dev/null @@ -1,71 +0,0 @@ -commit 9d82d0f293c83ff2b8c3ab07065d8454059452be -Author: mjw -Date: Fri Jun 28 14:03:58 2013 +0000 - - Bug 289360 parse_type_DIE confused by DW_TAG_enumeration_type. - - GCC allows incomplete enums as GNU extension. - http://gcc.gnu.org/onlinedocs/gcc/Incomplete-Enums.html - These are marked as DW_AT_declaration and won't have a size. - They can only be used in declaration or as pointer types. - You can't allocate variables or storage using such an enum type. - So don't require a size for such enum types. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13433 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c -index 8dbed5a..5e20ff0 100644 ---- a/coregrind/m_debuginfo/readdwarf3.c -+++ b/coregrind/m_debuginfo/readdwarf3.c -@@ -2501,6 +2501,7 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents, - VG_(memset)(&typeE, 0, sizeof(typeE)); - typeE.cuOff = posn; - typeE.tag = Te_TyEnum; -+ Bool is_decl = False; - typeE.Te.TyEnum.atomRs - = VG_(newXA)( ML_(dinfo_zalloc), "di.readdwarf3.ptD.enum_type.1", - ML_(dinfo_free), -@@ -2519,6 +2520,9 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents, - if (attr == DW_AT_byte_size && ctsSzB > 0) { - typeE.Te.TyEnum.szB = cts; - } -+ if (attr == DW_AT_declaration) { -+ is_decl = True; -+ } - } - - if (!typeE.Te.TyEnum.name) -@@ -2530,22 +2534,17 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents, - if (typeE.Te.TyEnum.szB == 0 - /* we must know the size */ - /* but not for Ada, which uses such dummy -- enumerations as helper for gdb ada mode. */ -- && parser->language != 'A') { -- /* GCC has been seen to put an odd DIE like this into -- .debug_types: -- -- <1>: DW_TAG_enumeration_type (in .debug_types) -- DW_AT_name : (indirect string, offset: 0x3374a): exec_direction_kind -- DW_AT_declaration : 1 -- -- It isn't clear what this means, but we accept it and -- assume that the enum is int-sized. */ -- if (cc->is_type_unit) { -- typeE.Te.TyEnum.szB = sizeof(int); -- } else { -- goto bad_DIE; -- } -+ enumerations as helper for gdb ada mode. -+ Also GCC allows incomplete enums as GNU extension. -+ http://gcc.gnu.org/onlinedocs/gcc/Incomplete-Enums.html -+ These are marked as DW_AT_declaration and won't have -+ a size. They can only be used in declaration or as -+ pointer types. You can't allocate variables or storage -+ using such an enum type. (Also GCC seems to have a bug -+ that will put such an enumeration_type into a .debug_types -+ unit which should only contain complete types.) */ -+ && (parser->language != 'A' && !is_decl)) { -+ goto bad_DIE; - } - - /* On't stack! */ diff --git a/valgrind-3.8.1-enable-armv5.patch b/valgrind-3.8.1-enable-armv5.patch deleted file mode 100644 index 18f463c..0000000 --- a/valgrind-3.8.1-enable-armv5.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- valgrind/configure.in 2012-03-05 15:16:23.000000000 -0500 -+++ valgrind/configure.in 2012-03-05 13:49:04.000000000 -0500 -@@ -186,7 +186,7 @@ case "${host_cpu}" in - ARCH_MAX="s390x" - ;; - -- armv7*) -+ armv[[57]]*) - AC_MSG_RESULT([ok (${host_cpu})]) - ARCH_MAX="arm" - ;; ---- valgrind/configure 2012-03-05 15:16:23.000000000 -0500 -+++ valgrind/configure 2012-03-05 13:49:04.000000000 -0500 -@@ -5335,7 +5335,7 @@ - ARCH_MAX="s390x" - ;; - -- armv7*) -+ armv[57]*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})" >&5 - $as_echo "ok (${host_cpu})" >&6; } - ARCH_MAX="arm" diff --git a/valgrind-3.8.1-filter_gdb.patch b/valgrind-3.8.1-filter_gdb.patch deleted file mode 100644 index 9d56185..0000000 --- a/valgrind-3.8.1-filter_gdb.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- valgrind/gdbserver_tests/filter_gdb (revision 13036) -+++ valgrind/gdbserver_tests/filter_gdb (working copy) -@@ -12,6 +12,8 @@ - # memcheck stuff - $dir/filter_memcheck_monitor "$@" | - -+# memcheck filter might leave some "..." lines, we are not interested -+sed -e '/^\ \ \ \ \.\.\.$/d' | - - # Anonymise or remove : - # delete the initial lines between the launch of vgdb and the diff --git a/valgrind-3.8.1-find-buildid.patch b/valgrind-3.8.1-find-buildid.patch deleted file mode 100644 index 078bdb0..0000000 --- a/valgrind-3.8.1-find-buildid.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- valgrind/coregrind/m_debuginfo/readelf.c (revision 12871) -+++ valgrind/coregrind/m_debuginfo/readelf.c (working copy) -@@ -888,7 +888,7 @@ - * http://fedoraproject.org/wiki/RolandMcGrath/BuildID - */ - static --Char *find_buildid(Addr image, UWord n_image, Bool rel_ok) -+Char *find_buildid(Addr image, UWord n_image, Bool rel_ok, Bool search_shdrs) - { - Char* buildid = NULL; - __attribute__((unused)) /* on Android, at least */ -@@ -930,7 +930,11 @@ - } - } - -- if (buildid || !rel_ok) -+ /* Normally we would only search shdrs for ET_REL files, but when -+ we search for a separate .debug file phdrs might not be there -+ (they are never loaded) or have been corrupted, so try again -+ against shdrs. */ -+ if (buildid || (!rel_ok && !search_shdrs)) - return buildid; - - for (i = 0; i < ehdr->e_shnum; i++) { -@@ -1074,7 +1078,7 @@ - return 0; - - if (buildid) { -- Char* debug_buildid = find_buildid(sr_Res(sres), *size, rel_ok); -+ Char* debug_buildid = find_buildid(sr_Res(sres), *size, rel_ok, True); - if (debug_buildid == NULL || VG_(strcmp)(buildid, debug_buildid) != 0) { - SysRes res = VG_(am_munmap_valgrind)(sr_Res(sres), *size); - vg_assert(!sr_isError(res)); -@@ -2274,7 +2278,7 @@ - vg_assert(dimage == 0 && n_dimage == 0); - - /* Look for a build-id */ -- buildid = find_buildid(oimage, n_oimage, False); -+ buildid = find_buildid(oimage, n_oimage, False, False); - - /* Look for a debug image */ - if (buildid != NULL || debuglink_img != NULL) { diff --git a/valgrind-3.8.1-gdbserver_exit.patch b/valgrind-3.8.1-gdbserver_exit.patch deleted file mode 100644 index 46a8da5..0000000 --- a/valgrind-3.8.1-gdbserver_exit.patch +++ /dev/null @@ -1,630 +0,0 @@ -Index: valgrind/coregrind/m_gdbserver/m_gdbserver.c -=================================================================== ---- valgrind/coregrind/m_gdbserver/m_gdbserver.c (revision 13036) -+++ valgrind/coregrind/m_gdbserver/m_gdbserver.c (working copy) -@@ -33,6 +33,8 @@ - #include "pub_core_libcproc.h" - #include "pub_core_libcprint.h" - #include "pub_core_mallocfree.h" -+#include "pub_tool_libcsetjmp.h" -+#include "pub_core_threadstate.h" - #include "pub_core_gdbserver.h" - #include "pub_core_options.h" - #include "pub_core_libcsetjmp.h" -@@ -68,7 +70,8 @@ - core_reason, // gdbserver invocation by core (e.g. error encountered) - break_reason, // break encountered - watch_reason, // watchpoint detected by tool -- signal_reason} // signal encountered -+ signal_reason, // signal encountered -+ exit_reason} // process terminated - CallReason; - - static char* ppCallReason(CallReason reason) -@@ -80,6 +83,7 @@ - case break_reason: return "break_reason"; - case watch_reason: return "watch_reason"; - case signal_reason: return "signal_reason"; -+ case exit_reason: return "exit_reason"; - default: vg_assert (0); - } - } -@@ -641,6 +645,14 @@ - VG_(getpid) (), tid, VG_(name_of_ThreadStatus)(tst->status), - tst->sched_jmpbuf_valid); - -+ /* If we are about to die, then just run server_main() once to get -+ the message out and return immediately because most of the state -+ of this tid and process is about to be torn down. */ -+ if (reason == exit_reason) { -+ server_main(); -+ return; -+ } -+ - vg_assert(VG_(is_valid_tid)(tid)); - saved_pc = VG_(get_IP) (tid); - -@@ -933,6 +945,29 @@ - } - } - -+void VG_(gdbserver_exit) (ThreadId tid, VgSchedReturnCode tids_schedretcode) -+{ -+ dlog(1, "VG core calling VG_(gdbserver_exit) tid %d will exit\n", tid); -+ if (remote_connected()) { -+ /* Make sure vgdb knows we are about to die and why. */ -+ if (tids_schedretcode == VgSrc_ExitThread -+ || tids_schedretcode == VgSrc_ExitProcess) { -+ gdbserver_process_exit ('W', VG_(threads)[tid].os_state.exitcode); -+ call_gdbserver (tid, exit_reason); -+ } -+ -+ if (tids_schedretcode == VgSrc_FatalSig) { -+ gdbserver_process_exit ('X', VG_(threads)[tid].os_state.fatalsig); -+ call_gdbserver (tid, exit_reason); -+ } -+ } else { -+ dlog(1, "not connected\n"); -+ } -+ -+ /* Tear down the connection if it still exists. */ -+ VG_(gdbserver) (0); -+} -+ - // Check if single_stepping or if there is a break requested at iaddr. - // If yes, call debugger - VG_REGPARM(1) -Index: valgrind/coregrind/m_gdbserver/server.c -=================================================================== ---- valgrind/coregrind/m_gdbserver/server.c (revision 13036) -+++ valgrind/coregrind/m_gdbserver/server.c (working copy) -@@ -765,6 +765,13 @@ - putpkt (own_buf); - } - -+ /* If we our status is terminal (exit or fatal signal) get out -+ as quickly as we can. We won't be able to handle any request -+ anymore. */ -+ if (status == 'W' || status == 'X') { -+ return; -+ } -+ - packet_len = getpkt (own_buf); - if (packet_len <= 0) - break; -Index: valgrind/coregrind/m_gdbserver/server.h -=================================================================== ---- valgrind/coregrind/m_gdbserver/server.h (revision 13036) -+++ valgrind/coregrind/m_gdbserver/server.h (working copy) -@@ -40,9 +40,9 @@ - #include "pub_tool_libcassert.h" - #include "pub_tool_libcbase.h" - #include "pub_tool_options.h" --#include "pub_core_gdbserver.h" - #include "pub_tool_libcsetjmp.h" - #include "pub_core_threadstate.h" -+#include "pub_core_gdbserver.h" - #include "pub_core_aspacemgr.h" - #include "pub_tool_vki.h" - #include "valgrind.h" -@@ -208,6 +208,9 @@ - to ignore the signal, so signal can be delivered to the guest. */ - extern Bool gdbserver_deliver_signal (Int vki_sigNo); - -+/* Called when a process is about to go with reason ('W' or 'X') and code. */ -+extern void gdbserver_process_exit (unsigned char status, Int code); -+ - /* To optimise signal handling, gdb can instruct gdbserver to - not stop on some signals. In the below, a 1 indicates the gdb_nr signal - has to be passed directly to the guest, without asking gdb. -Index: valgrind/coregrind/m_gdbserver/target.c -=================================================================== ---- valgrind/coregrind/m_gdbserver/target.c (revision 13036) -+++ valgrind/coregrind/m_gdbserver/target.c (working copy) -@@ -165,6 +165,14 @@ - return vki_sigNo == vki_signal_to_deliver; - } - -+static unsigned char exit_status_to_report; -+static int exit_code_to_report; -+void gdbserver_process_exit (unsigned char status, Int code) -+{ -+ exit_status_to_report = status; -+ exit_code_to_report = code; -+} -+ - static - char* sym (Addr addr) - { -@@ -248,6 +256,7 @@ - unsigned long wptid; - ThreadState *tst; - enum target_signal sig; -+ int code; - - pid = VG_(getpid) (); - dlog(1, "enter valgrind_wait pid %d\n", pid); -@@ -255,6 +264,24 @@ - regcache_invalidate(); - valgrind_update_threads(pid); - -+ /* First see if we are done with this process. */ -+ if (exit_status_to_report != 0) { -+ *ourstatus = exit_status_to_report; -+ exit_status_to_report = 0; -+ -+ if (*ourstatus == 'W') { -+ code = exit_code_to_report; -+ exit_code_to_report = 0; -+ return code; -+ } -+ -+ if (*ourstatus == 'X') { -+ sig = target_signal_from_host(exit_code_to_report); -+ exit_code_to_report = 0; -+ return sig; -+ } -+ } -+ - /* in valgrind, we consider that a wait always succeeds with STOPPED 'T' - and with a signal TRAP (i.e. a breakpoint), unless there is - a signal to report. */ -Index: valgrind/coregrind/m_libcprint.c -=================================================================== ---- valgrind/coregrind/m_libcprint.c (revision 13036) -+++ valgrind/coregrind/m_libcprint.c (working copy) -@@ -31,7 +31,6 @@ - #include "pub_core_basics.h" - #include "pub_core_vki.h" - #include "pub_core_debuglog.h" --#include "pub_core_gdbserver.h" - #include "pub_core_libcbase.h" - #include "pub_core_libcassert.h" - #include "pub_core_libcfile.h" // VG_(write)(), VG_(write_socket)() -Index: valgrind/coregrind/m_main.c -=================================================================== ---- valgrind/coregrind/m_main.c (revision 13036) -+++ valgrind/coregrind/m_main.c (working copy) -@@ -2543,7 +2543,7 @@ - - /* terminate gdbserver if ever it was started. We terminate it here so that it get - the output above if output was redirected to gdb */ -- VG_(gdbserver) (0); -+ VG_(gdbserver_exit) (tid, tids_schedretcode); - - /* Ok, finally exit in the os-specific way, according to the scheduler's - return code. In short, if the (last) thread exited by calling -Index: valgrind/coregrind/pub_core_gdbserver.h -=================================================================== ---- valgrind/coregrind/pub_core_gdbserver.h (revision 13036) -+++ valgrind/coregrind/pub_core_gdbserver.h (working copy) -@@ -48,7 +48,10 @@ - // to handle this incoming vgdb request. - extern Bool VG_(gdbserver_activity) (ThreadId tid); - -+// Called by low level when the process is about to exit and why. -+void VG_(gdbserver_exit) (ThreadId, VgSchedReturnCode); - -+ - /* Called by low level to insert or remove a break or watch point. - Break or watch point implementation is done using help from the tool. - break point support implies some (small) specific instrumentation -Index: valgrind/gdbserver_tests/Makefile.am -=================================================================== ---- valgrind/gdbserver_tests/Makefile.am (revision 13036) -+++ valgrind/gdbserver_tests/Makefile.am (working copy) -@@ -100,7 +100,22 @@ - nlsigvgdb.vgtest \ - nlsigvgdb.stderr.exp \ - nlsigvgdb.stderrB.exp \ -- nlsigvgdb.stdinB.gdb -+ nlsigvgdb.stdinB.gdb \ -+ gone_abrt.stderr.exp \ -+ gone_abrt.stderrB.exp \ -+ gone_abrt.stdinB.gdb \ -+ gone_abrt.stdoutB.exp \ -+ gone_abrt.vgtest \ -+ gone_exit.stderr.exp \ -+ gone_exit.stderrB.exp \ -+ gone_exit.stdinB.gdb \ -+ gone_exit.stdoutB.exp \ -+ gone_exit.vgtest \ -+ gone_return.stderr.exp \ -+ gone_return.stderrB.exp \ -+ gone_return.stdinB.gdb \ -+ gone_return.stdoutB.exp \ -+ gone_return.vgtest - - check_PROGRAMS = \ - clean_after_fork \ -@@ -109,7 +124,8 @@ - sleepers \ - main_pic \ - t \ -- watchpoints -+ watchpoints \ -+ gone - - AM_CFLAGS += $(AM_FLAG_M3264_PRI) - AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) -Index: valgrind/gdbserver_tests/filter_gdb -=================================================================== ---- valgrind/gdbserver_tests/filter_gdb (revision 13036) -+++ valgrind/gdbserver_tests/filter_gdb (working copy) -@@ -49,6 +51,8 @@ - # a.o. produced by gdb 7.2 on arm (same with standard gdbserver) - # delete empty lines (the last line (only made of prompts) sometimes - # finishes with a new line, sometimes not ???). -+# 'exited with code' and 'exited normally' are printed slightly -+# differently between gdb versions, normalize to "Program exited...". - sed -e '/Remote debugging using/,/vgdb launched process attached/d' \ - -e 's/^\[?1034hReading symbols/Reading symbols/' \ - -e '/^Missing separate debuginfo/d' \ -@@ -64,6 +68,8 @@ - -e '/^Loaded symbols for .*$/d' \ - -e '/^Current language.*/d' \ - -e '/^The current source language is.*/d' \ -+ -e 's/^.*\( exited with code [0-9]\+\).$/Program\1\./g' \ -+ -e 's/^.*\( exited normally\).$/Program\1\./g' \ - -e 's/(gdb) //g' \ - -e 's/^>[> ]*//' \ - -e '/^done\.$/d' \ -Index: valgrind/gdbserver_tests/gone.c -=================================================================== ---- valgrind/gdbserver_tests/gone.c (revision 0) -+++ valgrind/gdbserver_tests/gone.c (working copy) -@@ -0,0 +1,33 @@ -+#include -+#include -+#include -+#include -+#include -+ -+int -+main (int argc, char **argv) -+{ -+ fprintf(stderr, "starting ...\n"); -+ -+ // Three ways of going away... -+ if (argc > 1) -+ { -+ // Explicit exit() with exit code. -+ if (strcmp (argv[1], "exit") == 0) -+ { -+ fprintf(stderr, "exiting ...\n"); -+ exit (1); -+ } -+ -+ // Get killed by a signal. -+ if (strcmp (argv[1], "abort") == 0) -+ { -+ fprintf(stderr, "aborting ...\n"); -+ kill(getpid(), SIGABRT); -+ } -+ } -+ -+ // And finally, just return from main with success. -+ fprintf(stderr, "returning ...\n"); -+ return 0; -+} -Index: valgrind/gdbserver_tests/gone_abrt.stderr.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_abrt.stderr.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_abrt.stderr.exp (working copy) -@@ -0,0 +1,8 @@ -+Nulgrind, the minimal Valgrind tool -+ -+(action at startup) vgdb me ... -+ -+ -+starting ... -+aborting ... -+ -Index: valgrind/gdbserver_tests/gone_abrt.stderrB.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_abrt.stderrB.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_abrt.stderrB.exp (working copy) -@@ -0,0 +1 @@ -+relaying data between gdb and process .... -Index: valgrind/gdbserver_tests/gone_abrt.stdinB.gdb -=================================================================== ---- valgrind/gdbserver_tests/gone_abrt.stdinB.gdb (revision 0) -+++ valgrind/gdbserver_tests/gone_abrt.stdinB.gdb (working copy) -@@ -0,0 +1,9 @@ -+# connect gdb to Valgrind gdbserver: -+target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-gone-abrt -+echo vgdb launched process attached\n -+ -+continue -+# see process get a fatal signal -+continue -+# see program is gone -+quit -Index: valgrind/gdbserver_tests/gone_abrt.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_abrt.stdoutB.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_abrt.stdoutB.exp (working copy) -@@ -0,0 +1,7 @@ -+vgdb launched process attached -+Continuing. -+Program received signal SIGABRT, Aborted. -+0x........ in syscall ... -+Continuing. -+Program terminated with signal SIGABRT, Aborted. -+The program no longer exists. -Index: valgrind/gdbserver_tests/gone_abrt.vgtest -=================================================================== ---- valgrind/gdbserver_tests/gone_abrt.vgtest (revision 0) -+++ valgrind/gdbserver_tests/gone_abrt.vgtest (working copy) -@@ -0,0 +1,12 @@ -+# test that a fatal SIGABRT signal is properly passed on to gdb. -+ -+prog: gone -+args: abort -+vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-gone-abrt -+stderr_filter: filter_stderr -+prereq: test -e gdb -+progB: gdb -+argsB: --quiet -l 60 --nx ./gone -+stdinB: gone_abrt.stdinB.gdb -+stdoutB_filter: filter_gdb -+stderrB_filter: filter_gdb -Index: valgrind/gdbserver_tests/gone_exit.stderr.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_exit.stderr.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_exit.stderr.exp (working copy) -@@ -0,0 +1,8 @@ -+Nulgrind, the minimal Valgrind tool -+ -+(action at startup) vgdb me ... -+ -+ -+starting ... -+exiting ... -+ -Index: valgrind/gdbserver_tests/gone_exit.stderrB.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_exit.stderrB.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_exit.stderrB.exp (working copy) -@@ -0,0 +1 @@ -+relaying data between gdb and process .... -Index: valgrind/gdbserver_tests/gone_exit.stdinB.gdb -=================================================================== ---- valgrind/gdbserver_tests/gone_exit.stdinB.gdb (revision 0) -+++ valgrind/gdbserver_tests/gone_exit.stdinB.gdb (working copy) -@@ -0,0 +1,7 @@ -+# connect gdb to Valgrind gdbserver: -+target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-gone-exit -+echo vgdb launched process attached\n -+ -+continue -+# see program is gone with exit code -+quit -Index: valgrind/gdbserver_tests/gone_exit.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_exit.stdoutB.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_exit.stdoutB.exp (working copy) -@@ -0,0 +1,3 @@ -+vgdb launched process attached -+Continuing. -+Program exited with code 01. -Index: valgrind/gdbserver_tests/gone_exit.vgtest -=================================================================== ---- valgrind/gdbserver_tests/gone_exit.vgtest (revision 0) -+++ valgrind/gdbserver_tests/gone_exit.vgtest (working copy) -@@ -0,0 +1,12 @@ -+# test that an exit (with return value) is properly passed on to gdb. -+ -+prog: gone -+args: exit -+vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-gone-exit -+stderr_filter: filter_stderr -+prereq: test -e gdb -+progB: gdb -+argsB: --quiet -l 60 --nx ./gone -+stdinB: gone_exit.stdinB.gdb -+stdoutB_filter: filter_gdb -+stderrB_filter: filter_gdb -Index: valgrind/gdbserver_tests/gone_return.stderr.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_return.stderr.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_return.stderr.exp (working copy) -@@ -0,0 +1,8 @@ -+Nulgrind, the minimal Valgrind tool -+ -+(action at startup) vgdb me ... -+ -+ -+starting ... -+returning ... -+ -Index: valgrind/gdbserver_tests/gone_return.stderrB.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_return.stderrB.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_return.stderrB.exp (working copy) -@@ -0,0 +1 @@ -+relaying data between gdb and process .... -Index: valgrind/gdbserver_tests/gone_return.stdinB.gdb -=================================================================== ---- valgrind/gdbserver_tests/gone_return.stdinB.gdb (revision 0) -+++ valgrind/gdbserver_tests/gone_return.stdinB.gdb (working copy) -@@ -0,0 +1,7 @@ -+# connect gdb to Valgrind gdbserver: -+target remote | ./vgdb --wait=60 --vgdb-prefix=./vgdb-prefix-gone-return -+echo vgdb launched process attached\n -+ -+continue -+# see program is gone -+quit -Index: valgrind/gdbserver_tests/gone_return.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/gone_return.stdoutB.exp (revision 0) -+++ valgrind/gdbserver_tests/gone_return.stdoutB.exp (working copy) -@@ -0,0 +1,3 @@ -+vgdb launched process attached -+Continuing. -+Program exited normally. -Index: valgrind/gdbserver_tests/gone_return.vgtest -=================================================================== ---- valgrind/gdbserver_tests/gone_return.vgtest (revision 0) -+++ valgrind/gdbserver_tests/gone_return.vgtest (working copy) -@@ -0,0 +1,12 @@ -+# test that a normal (successful) return is properly passed on to gdb. -+ -+prog: gone -+args: return -+vgopts: --tool=none --vgdb=yes --vgdb-error=0 --vgdb-prefix=./vgdb-prefix-gone-return -+stderr_filter: filter_stderr -+prereq: test -e gdb -+progB: gdb -+argsB: --quiet -l 60 --nx ./gone -+stdinB: gone_return.stdinB.gdb -+stdoutB_filter: filter_gdb -+stderrB_filter: filter_gdb -Index: valgrind/gdbserver_tests/mcleak.stderrB.exp -=================================================================== ---- valgrind/gdbserver_tests/mcleak.stderrB.exp (revision 13036) -+++ valgrind/gdbserver_tests/mcleak.stderrB.exp (working copy) -@@ -95,4 +95,3 @@ - by 0x........: f (leak-delta.c:28) - by 0x........: main (leak-delta.c:60) - --Remote connection closed -Index: valgrind/gdbserver_tests/mcleak.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/mcleak.stdoutB.exp (revision 13036) -+++ valgrind/gdbserver_tests/mcleak.stdoutB.exp (working copy) -@@ -45,3 +45,4 @@ - #1 0x........ in f () at leak-delta.c:48 - 48 fprintf(stderr, "expecting details 32 (+32) bytes lost, 33 (-32) bytes reachable\n"); fflush(stderr); breakme(); - Continuing. -+Program exited normally. -Index: valgrind/gdbserver_tests/mcmain_pic.stderrB.exp -=================================================================== ---- valgrind/gdbserver_tests/mcmain_pic.stderrB.exp (revision 13036) -+++ valgrind/gdbserver_tests/mcmain_pic.stderrB.exp (working copy) -@@ -1,3 +1,2 @@ - relaying data between gdb and process .... - vgdb-error value changed from 0 to 999999 --Remote connection closed -Index: valgrind/gdbserver_tests/mcmain_pic.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/mcmain_pic.stdoutB.exp (revision 13036) -+++ valgrind/gdbserver_tests/mcmain_pic.stdoutB.exp (working copy) -@@ -6,3 +6,4 @@ - $2 = (int (*)(int, char **)) 0x........
- $3 = (void (*)(char *)) 0x........ - Continuing. -+Program exited normally. -Index: valgrind/gdbserver_tests/mcwatchpoints.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/mcwatchpoints.stdoutB.exp (revision 13036) -+++ valgrind/gdbserver_tests/mcwatchpoints.stdoutB.exp (working copy) -@@ -32,3 +32,4 @@ - 49 fprintf(stderr, "after writing 8\n"); - Delete all breakpoints? (y or n) [answered Y; input not from terminal] - Continuing. -+Program exited normally. -Index: valgrind/gdbserver_tests/nlcontrolc.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/nlcontrolc.stdoutB.exp (revision 13036) -+++ valgrind/gdbserver_tests/nlcontrolc.stdoutB.exp (working copy) -@@ -21,3 +21,4 @@ - $6 = 0 - $7 = 0 - Continuing. -+Program exited normally. -Index: valgrind/gdbserver_tests/nlpasssigalrm.stderrB.exp -=================================================================== ---- valgrind/gdbserver_tests/nlpasssigalrm.stderrB.exp (revision 13036) -+++ valgrind/gdbserver_tests/nlpasssigalrm.stderrB.exp (working copy) -@@ -1,3 +1,2 @@ - relaying data between gdb and process .... - vgdb-error value changed from 0 to 999999 --Remote connection closed -Index: valgrind/gdbserver_tests/nlpasssigalrm.stdoutB.exp -=================================================================== ---- valgrind/gdbserver_tests/nlpasssigalrm.stdoutB.exp (revision 13036) -+++ valgrind/gdbserver_tests/nlpasssigalrm.stdoutB.exp (working copy) -@@ -19,3 +19,4 @@ - Program received signal SIG34, Real-time event 34. - 0x........ in syscall ... - Continuing. -+Program exited normally. ---- valgrind-3.8.1/gdbserver_tests/Makefile.in.orig 2012-10-13 16:35:43.846865557 +0200 -+++ valgrind-3.8.1/gdbserver_tests/Makefile.in 2012-10-13 16:36:37.445641004 +0200 -@@ -56,7 +56,7 @@ - - check_PROGRAMS = clean_after_fork$(EXEEXT) fork_chain$(EXEEXT) \ - passsigalrm$(EXEEXT) sleepers$(EXEEXT) main_pic$(EXEEXT) \ -- t$(EXEEXT) watchpoints$(EXEEXT) -+ t$(EXEEXT) watchpoints$(EXEEXT) gone$(EXEEXT) - subdir = gdbserver_tests - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in -@@ -74,6 +74,10 @@ - fork_chain_OBJECTS = fork_chain.$(OBJEXT) - fork_chain_LDADD = $(LDADD) - fork_chain_DEPENDENCIES = -+gone_SOURCES = gone.c -+gone_OBJECTS = gone.$(OBJEXT) -+gone_LDADD = $(LDADD) -+gone_DEPENDENCIES = - main_pic_SOURCES = main_pic.c - main_pic_OBJECTS = main_pic-main_pic.$(OBJEXT) - main_pic_LDADD = $(LDADD) -@@ -105,9 +109,9 @@ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ --SOURCES = clean_after_fork.c fork_chain.c main_pic.c passsigalrm.c \ -- sleepers.c t.c watchpoints.c --DIST_SOURCES = clean_after_fork.c fork_chain.c main_pic.c \ -+SOURCES = clean_after_fork.c fork_chain.c gone.c main_pic.c \ -+ passsigalrm.c sleepers.c t.c watchpoints.c -+DIST_SOURCES = clean_after_fork.c fork_chain.c gone.c main_pic.c \ - passsigalrm.c sleepers.c t.c watchpoints.c - ETAGS = etags - CTAGS = ctags -@@ -487,7 +491,22 @@ - nlsigvgdb.vgtest \ - nlsigvgdb.stderr.exp \ - nlsigvgdb.stderrB.exp \ -- nlsigvgdb.stdinB.gdb -+ nlsigvgdb.stdinB.gdb \ -+ gone_abrt.stderr.exp \ -+ gone_abrt.stderrB.exp \ -+ gone_abrt.stdinB.gdb \ -+ gone_abrt.stdoutB.exp \ -+ gone_abrt.vgtest \ -+ gone_exit.stderr.exp \ -+ gone_exit.stderrB.exp \ -+ gone_exit.stdinB.gdb \ -+ gone_exit.stdoutB.exp \ -+ gone_exit.vgtest \ -+ gone_return.stderr.exp \ -+ gone_return.stderrB.exp \ -+ gone_return.stdinB.gdb \ -+ gone_return.stdoutB.exp \ -+ gone_return.vgtest - - LDADD = -lpthread - main_pic_LDFLAGS = -pie -@@ -535,6 +554,9 @@ - fork_chain$(EXEEXT): $(fork_chain_OBJECTS) $(fork_chain_DEPENDENCIES) - @rm -f fork_chain$(EXEEXT) - $(LINK) $(fork_chain_OBJECTS) $(fork_chain_LDADD) $(LIBS) -+gone$(EXEEXT): $(gone_OBJECTS) $(gone_DEPENDENCIES) -+ @rm -f gone$(EXEEXT) -+ $(LINK) $(gone_OBJECTS) $(gone_LDADD) $(LIBS) - main_pic$(EXEEXT): $(main_pic_OBJECTS) $(main_pic_DEPENDENCIES) - @rm -f main_pic$(EXEEXT) - $(main_pic_LINK) $(main_pic_OBJECTS) $(main_pic_LDADD) $(LIBS) -@@ -559,6 +581,7 @@ - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clean_after_fork.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork_chain.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gone.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_pic-main_pic.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passsigalrm.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleepers.Po@am__quote@ diff --git a/valgrind-3.8.1-gdbserver_tests-syscall-template-source.patch b/valgrind-3.8.1-gdbserver_tests-syscall-template-source.patch deleted file mode 100644 index 7488373..0000000 --- a/valgrind-3.8.1-gdbserver_tests-syscall-template-source.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- valgrind/gdbserver_tests/filter_gdb (revision 13010) -+++ valgrind/gdbserver_tests/filter_gdb (working copy) -@@ -85,6 +85,7 @@ - -e '/^[ ]*in \.\.\/sysdeps\/unix\/syscall-template\.S/d' \ - -e '/^[1-9][0-9]*[ ]*\.\.\/sysdeps\/unix\/syscall-template\.S/d' \ - -e '/^[1-9][0-9]*[ ]in *\.\.\/sysdeps\/unix\/syscall-template\.S/d' \ -+ -e '/^[1-9][0-9]*[ ]T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)/d' \ - -e 's/\(Could not write register \)".*"/\1 "xxx"/' \ - -e 's/\(ERROR changing register \).*$/\1 xxx regno y/' \ - -e 's/0x........ in \(main (argc=1, argv=0x........) at watchpoints.c:[24][3689]\)/\1/' \ diff --git a/valgrind-3.8.1-glibc-2.17-18.patch b/valgrind-3.8.1-glibc-2.17-18.patch deleted file mode 100644 index bd8e6eb..0000000 --- a/valgrind-3.8.1-glibc-2.17-18.patch +++ /dev/null @@ -1,151 +0,0 @@ -commit 3781ac11ff374b3517011c1710ec517d52f25cd2 -Author: tom -Date: Mon Jan 14 09:48:49 2013 +0000 - - Accept glibc 2.17 as valid. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13228 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/configure.in b/configure.in -index e0fb12d..0f3b3df 100644 ---- a/configure.in -+++ b/configure.in -@@ -906,6 +906,13 @@ case "${GLIBC_VERSION}" in - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; -+ 2.17) -+ AC_MSG_RESULT(2.17 family) -+ AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x]) -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; - darwin) - AC_MSG_RESULT(Darwin) - AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin]) -@@ -919,7 +926,7 @@ case "${GLIBC_VERSION}" in - - *) - AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) -- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16]) -+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17]) - AC_MSG_ERROR([or Darwin libc]) - ;; - esac -diff -ur valgrind-3.8.1/config.h.in valgrind-3.8.1/config.h.in ---- valgrind-3.8.1/config.h.in 2013-01-16 17:15:33.531018561 +0100 -+++ valgrind-3.8.1/config.h.in 2013-01-16 17:19:21.000000000 +0100 -@@ -48,6 +48,9 @@ - /* Define to 1 if you're using glibc 2.16.x */ - #undef GLIBC_2_16 - -+/* Define to 1 if you're using glibc 2.17.x */ -+#undef GLIBC_2_17 -+ - /* Define to 1 if you're using glibc 2.2.x */ - #undef GLIBC_2_2 - -diff -ur valgrind-3.8.1/configure valgrind-3.8.1/configure ---- valgrind-3.8.1/configure 2013-01-16 17:15:33.563018480 +0100 -+++ valgrind-3.8.1/configure 2013-01-16 17:19:21.373643238 +0100 -@@ -6610,6 +6610,16 @@ - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; -+ 2.17) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5 -+$as_echo "2.17 family" >&6; } -+ -+$as_echo "#define GLIBC_2_17 1" >>confdefs.h -+ -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; - darwin) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 - $as_echo "Darwin" >&6; } -@@ -6630,7 +6640,7 @@ - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5 - $as_echo "unsupported version ${GLIBC_VERSION}" >&6; } -- as_fn_error "Valgrind requires glibc version 2.2 - 2.16" "$LINENO" 5 -+ as_fn_error "Valgrind requires glibc version 2.2 - 2.17" "$LINENO" 5 - as_fn_error "or Darwin libc" "$LINENO" 5 - ;; - esac -commit 73f797992296ec0f23db6d97d15f48de8da1304c -Author: mjw -Date: Wed Aug 21 14:47:52 2013 +0000 - - Accept glibc 2.18 as valid. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13504 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/configure.in b/configure.in -index c51f465..58dc221 100644 ---- a/configure.in -+++ b/configure.in -@@ -906,6 +906,13 @@ case "${GLIBC_VERSION}" in - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; -+ 2.18) -+ AC_MSG_RESULT(2.18 family) -+ AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x]) -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; - darwin) - AC_MSG_RESULT(Darwin) - AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin]) -Only in valgrind-3.8.1: autom4te.cache -diff -ur valgrind-3.8.1.orig/config.h.in valgrind-3.8.1/config.h.in ---- valgrind-3.8.1.orig/config.h.in 2013-08-21 17:11:19.960147623 +0200 -+++ valgrind-3.8.1/config.h.in 2013-08-21 17:12:32.000000000 +0200 -@@ -51,6 +51,9 @@ - /* Define to 1 if you're using glibc 2.17.x */ - #undef GLIBC_2_17 - -+/* Define to 1 if you're using glibc 2.18.x */ -+#undef GLIBC_2_18 -+ - /* Define to 1 if you're using glibc 2.2.x */ - #undef GLIBC_2_2 - -Only in valgrind-3.8.1: config.h.in~ -diff -ur valgrind-3.8.1.orig/configure valgrind-3.8.1/configure ---- valgrind-3.8.1.orig/configure 2013-08-21 17:11:20.000147954 +0200 -+++ valgrind-3.8.1/configure 2013-08-21 17:12:37.875793204 +0200 -@@ -6623,6 +6623,16 @@ - DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; -+ 2.18) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.18 family" >&5 -+$as_echo "2.18 family" >&6; } -+ -+$as_echo "#define GLIBC_2_18 1" >>confdefs.h -+ -+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ ;; - darwin) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 - $as_echo "Darwin" >&6; } -diff -ur valgrind-3.8.1.orig/Makefile.in valgrind-3.8.1/Makefile.in ---- valgrind-3.8.1.orig/Makefile.in 2013-08-21 17:11:19.983147813 +0200 -+++ valgrind-3.8.1/Makefile.in 2013-08-21 17:12:37.559790584 +0200 -@@ -871,7 +871,7 @@ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac -- chmod -R a-w $(distdir); chmod a+w $(distdir) -+ chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) diff --git a/valgrind-3.8.1-helgrind-race-supp.patch b/valgrind-3.8.1-helgrind-race-supp.patch deleted file mode 100644 index 759d151..0000000 --- a/valgrind-3.8.1-helgrind-race-supp.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- valgrind/glibc-2.34567-NPTL-helgrind.supp.jj 2009-08-19 15:37:48.000000000 +0200 -+++ valgrind/glibc-2.34567-NPTL-helgrind.supp 2009-10-21 16:46:31.000000000 +0200 -@@ -88,6 +88,12 @@ - obj:*/lib*/libpthread-2.*so* - } - { -+ helgrind-glibc2X-102a -+ Helgrind:Race -+ fun:mythread_wrapper -+ obj:*vgpreload_helgrind*.so -+} -+{ - helgrind-glibc2X-103 - Helgrind:Race - fun:pthread_cond_*@@GLIBC_2.* diff --git a/valgrind-3.8.1-index-supp.patch b/valgrind-3.8.1-index-supp.patch deleted file mode 100644 index 454fca6..0000000 --- a/valgrind-3.8.1-index-supp.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- valgrind-3.8.1.orig/glibc-2.X.supp.in 2013-09-24 23:40:41.371195878 +0200 -+++ valgrind-3.8.1/glibc-2.X.supp.in 2013-09-26 21:30:44.232589496 +0200 -@@ -133,6 +133,13 @@ - fun:expand_dynamic_string_token - } - { -+# https://bugzilla.redhat.com/show_bug.cgi?id=1011713 -+ glibc-2.18.90-on-Fedora-21-index-expand -+ Memcheck:Value8 -+ fun:index -+ fun:expand_dynamic_string_token -+} -+{ - glibc-2.5.5-on-SuSE-10.2-(PPC)-2c - Memcheck:Addr4 - fun:index diff --git a/valgrind-3.8.1-initial-power-isa-207.patch b/valgrind-3.8.1-initial-power-isa-207.patch deleted file mode 100644 index d20c35c..0000000 --- a/valgrind-3.8.1-initial-power-isa-207.patch +++ /dev/null @@ -1,2782 +0,0 @@ -valgrind svn commit r13494, VEX svn commit r2750 - -Initial ISA 2.07 support for POWER8-tuned libc - -The IBM Power ISA 2.07 has been published on power.org, and IBM's new POWER8 -processor is under development to implement that ISA. This patch provides -initial VEX support for running Valgrind on POWER8 systems running a soon-to-be -released Linux distribution. This Linux distro will include a POWER8-tuned -libc that uses a subset of the new instructions from ISA 2.07. Since virtually -all applications link with libc, it would be impossible to run an application -under Valgrind on this distro without adding support for these new instructions -to Valgrind, so that's the intent of this patch. Note that applications built -on this distro will *not* employ new POWER8 instructions by default. There are -roughly 150 new instructions in the Power ISA 2.07, including hardware -transaction management (HTM). Support for these new instructions (modulo the -subset included in this bug) will be added to Valgrind in a phased approach, -similar to what we did for Power ISA 2.06. - -Bugzilla 322294 - - -diff -ur valgrind-3.8.1.orig/configure valgrind-3.8.1/configure ---- valgrind-3.8.1.orig/configure 2013-08-13 13:07:12.837887980 +0200 -+++ valgrind-3.8.1/configure 2013-08-13 13:28:33.188030564 +0200 -@@ -673,6 +673,8 @@ - FLAG_MMMX - FLAG_M64 - FLAG_M32 -+HAS_ISA_2_07_FALSE -+HAS_ISA_2_07_TRUE - HAVE_PTHREAD_CREATE_GLIBC_2_0_FALSE - HAVE_PTHREAD_CREATE_GLIBC_2_0_TRUE - HAS_DFP_FALSE -@@ -7321,6 +7323,47 @@ - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -+# isa 2.07 checking -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that assembler knows ISA 2.07 " >&5 -+$as_echo_n "checking that assembler knows ISA 2.07 ... " >&6; } -+ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+ -+int -+main () -+{ -+ -+ __asm__ __volatile__("mtvsrd 1,2 "); -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ -+ac_asm_have_isa_2_07=yes -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+else -+ -+ac_asm_have_isa_2_07=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+ if test x$ac_asm_have_isa_2_07 = xyes; then -+ HAS_ISA_2_07_TRUE= -+ HAS_ISA_2_07_FALSE='#' -+else -+ HAS_ISA_2_07_TRUE='#' -+ HAS_ISA_2_07_FALSE= -+fi -+ - - #---------------------------------------------------------------------------- - # Checking for supported compiler flags. -@@ -10411,6 +10454,10 @@ - as_fn_error "conditional \"HAVE_PTHREAD_CREATE_GLIBC_2_0\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi -+if test -z "${HAS_ISA_2_07_TRUE}" && test -z "${HAS_ISA_2_07_FALSE}"; then -+ as_fn_error "conditional \"HAS_ISA_2_07\" was never defined. -+Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+fi - if test -z "${DWARF4_TRUE}" && test -z "${DWARF4_FALSE}"; then - as_fn_error "conditional \"DWARF4\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 -diff -ur valgrind-3.8.1.orig/configure.in valgrind-3.8.1/configure.in ---- valgrind-3.8.1.orig/configure.in 2013-08-13 13:07:12.800887713 +0200 -+++ valgrind-3.8.1/configure.in 2013-08-13 13:10:17.485219043 +0200 -@@ -1303,6 +1303,21 @@ - AC_MSG_RESULT([no]) - ]) - -+# isa 2.07 checking -+AC_MSG_CHECKING([that assembler knows ISA 2.07 ]) -+ -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+]], [[ -+ __asm__ __volatile__("mtvsrd 1,2 "); -+]])], [ -+ac_asm_have_isa_2_07=yes -+AC_MSG_RESULT([yes]) -+], [ -+ac_asm_have_isa_2_07=no -+AC_MSG_RESULT([no]) -+]) -+ -+AM_CONDITIONAL(HAS_ISA_2_07, test x$ac_asm_have_isa_2_07 = xyes) - - #---------------------------------------------------------------------------- - # Checking for supported compiler flags. -diff -ur valgrind-3.8.1.orig/coregrind/m_machine.c valgrind-3.8.1/coregrind/m_machine.c ---- valgrind-3.8.1.orig/coregrind/m_machine.c 2013-08-13 13:07:12.780887570 +0200 -+++ valgrind-3.8.1/coregrind/m_machine.c 2013-08-13 13:10:17.487219057 +0200 -@@ -862,6 +862,7 @@ - vki_sigaction_toK_t tmp_sigill_act, tmp_sigfpe_act; - - volatile Bool have_F, have_V, have_FX, have_GX, have_VX, have_DFP; -+ volatile Bool have_isa_2_07; - Int r; - - /* This is a kludge. Really we ought to back-convert saved_act -@@ -956,6 +957,14 @@ - __asm__ __volatile__(".long 0xee4e8005"); /* dadd FRT,FRA, FRB */ - } - -+ /* Check for ISA 2.07 support. */ -+ have_isa_2_07 = True; -+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) { -+ have_isa_2_07 = False; -+ } else { -+ __asm__ __volatile__(".long 0x7c000166"); /* mtvsrd XT,RA */ -+ } -+ - /* determine dcbz/dcbzl sizes while we still have the signal - * handlers registered */ - find_ppc_dcbz_sz(&vai); -@@ -966,9 +975,10 @@ - vg_assert(r == 0); - r = VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL); - vg_assert(r == 0); -- VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d\n", -+ VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d ISA2.07 %d\n", - (Int)have_F, (Int)have_V, (Int)have_FX, -- (Int)have_GX, (Int)have_VX, (Int)have_DFP); -+ (Int)have_GX, (Int)have_VX, (Int)have_DFP, -+ (Int)have_isa_2_07); - /* Make FP a prerequisite for VMX (bogusly so), and for FX and GX. */ - if (have_V && !have_F) - have_V = False; -@@ -989,6 +999,7 @@ - if (have_GX) vai.hwcaps |= VEX_HWCAPS_PPC32_GX; - if (have_VX) vai.hwcaps |= VEX_HWCAPS_PPC32_VX; - if (have_DFP) vai.hwcaps |= VEX_HWCAPS_PPC32_DFP; -+ if (have_isa_2_07) vai.hwcaps |= VEX_HWCAPS_PPC32_ISA2_07; - - - /* But we're not done yet: VG_(machine_ppc32_set_clszB) must be -@@ -1004,6 +1015,7 @@ - vki_sigaction_toK_t tmp_sigill_act, tmp_sigfpe_act; - - volatile Bool have_F, have_V, have_FX, have_GX, have_VX, have_DFP; -+ volatile Bool have_isa_2_07; - Int r; - - /* This is a kludge. Really we ought to back-convert saved_act -@@ -1090,6 +1102,14 @@ - __asm__ __volatile__(".long 0xee4e8005"); /* dadd FRT,FRA, FRB */ - } - -+ /* Check for ISA 2.07 support. */ -+ have_isa_2_07 = True; -+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) { -+ have_isa_2_07 = False; -+ } else { -+ __asm__ __volatile__(".long 0x7c000166"); /* mtvsrd XT,RA */ -+ } -+ - /* determine dcbz/dcbzl sizes while we still have the signal - * handlers registered */ - find_ppc_dcbz_sz(&vai); -@@ -1097,9 +1117,10 @@ - VG_(sigaction)(VKI_SIGILL, &saved_sigill_act, NULL); - VG_(sigaction)(VKI_SIGFPE, &saved_sigfpe_act, NULL); - VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL); -- VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d\n", -+ VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d ISA2.07 %d\n", - (Int)have_F, (Int)have_V, (Int)have_FX, -- (Int)have_GX, (Int)have_VX, (Int)have_DFP); -+ (Int)have_GX, (Int)have_VX, (Int)have_DFP, -+ (Int)have_isa_2_07); - /* on ppc64, if we don't even have FP, just give up. */ - if (!have_F) - return False; -@@ -1114,6 +1135,7 @@ - if (have_GX) vai.hwcaps |= VEX_HWCAPS_PPC64_GX; - if (have_VX) vai.hwcaps |= VEX_HWCAPS_PPC64_VX; - if (have_DFP) vai.hwcaps |= VEX_HWCAPS_PPC64_DFP; -+ if (have_isa_2_07) vai.hwcaps |= VEX_HWCAPS_PPC64_ISA2_07; - - /* But we're not done yet: VG_(machine_ppc64_set_clszB) must be - called before we're ready to go. */ -diff -ur valgrind-3.8.1.orig/memcheck/mc_translate.c valgrind-3.8.1/memcheck/mc_translate.c ---- valgrind-3.8.1.orig/memcheck/mc_translate.c 2013-08-13 13:07:12.733887229 +0200 -+++ valgrind-3.8.1/memcheck/mc_translate.c 2013-08-13 13:10:17.490219078 +0200 -@@ -3223,6 +3223,7 @@ - than a data steering operation. */ - case Iop_NarrowBin32to16x8: - case Iop_NarrowBin16to8x16: -+ case Iop_NarrowBin64to32x4: - return assignNew('V', mce, Ity_V128, - binop(op, vatom1, vatom2)); - -diff -ur valgrind-3.8.1.orig/none/tests/ppc32/Makefile.am valgrind-3.8.1/none/tests/ppc32/Makefile.am ---- valgrind-3.8.1.orig/none/tests/ppc32/Makefile.am 2013-08-13 13:07:12.633886508 +0200 -+++ valgrind-3.8.1/none/tests/ppc32/Makefile.am 2013-08-13 13:10:17.493219099 +0200 -@@ -35,7 +35,10 @@ - test_dfp2.stdout.exp_Without_dcffix \ - test_dfp3.stderr.exp test_dfp3.stdout.exp test_dfp3.vgtest \ - test_dfp4.stderr.exp test_dfp4.stdout.exp test_dfp4.vgtest \ -- test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest -+ test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest \ -+ jm_vec_isa_2_07.stderr.exp jm_vec_isa_2_07.stdout.exp jm_vec_isa_2_07.vgtest \ -+ test_isa_2_07_part2.stderr.exp test_isa_2_07_part2.stdout.exp test_isa_2_07_part2.vgtest -+ - - check_PROGRAMS = \ - allexec \ -@@ -46,7 +49,9 @@ - test_isa_2_06_part1 \ - test_isa_2_06_part2 \ - test_isa_2_06_part3 \ -- test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 -+ test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \ -+ test_isa_2_07_part1 \ -+ test_isa_2_07_part2 - - - AM_CFLAGS += @FLAG_M32@ -@@ -77,6 +82,14 @@ - DFP_FLAG = - endif - -+if HAS_ISA_2_07 -+BUILD_FLAGS_ISA_2_07 = -mcpu=power8 -+ISA_2_07_FLAG = -DHAS_ISA_2_07 -+else -+BUILD_FLAGS_ISA_2_07 = -+ISA_2_07_FLAG = -+endif -+ - jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \ - @FLAG_M32@ $(ALTIVEC_FLAG) - -@@ -104,3 +117,9 @@ - - test_dfp5_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(DFP_FLAG) \ - @FLAG_M32@ $(BUILD_FLAGS_DFP) -+ -+test_isa_2_07_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07) -+ -+test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07) -diff -ur valgrind-3.8.1.orig/none/tests/ppc32/Makefile.in valgrind-3.8.1/none/tests/ppc32/Makefile.in ---- valgrind-3.8.1.orig/none/tests/ppc32/Makefile.in 2013-08-13 13:07:12.632886501 +0200 -+++ valgrind-3.8.1/none/tests/ppc32/Makefile.in 2013-08-13 13:28:32.372024756 +0200 -@@ -63,7 +63,8 @@ - test_isa_2_06_part1$(EXEEXT) test_isa_2_06_part2$(EXEEXT) \ - test_isa_2_06_part3$(EXEEXT) test_dfp1$(EXEEXT) \ - test_dfp2$(EXEEXT) test_dfp3$(EXEEXT) test_dfp4$(EXEEXT) \ -- test_dfp5$(EXEEXT) -+ test_dfp5$(EXEEXT) test_isa_2_07_part1$(EXEEXT) \ -+ test_isa_2_07_part2$(EXEEXT) - subdir = none/tests/ppc32 - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in -@@ -164,6 +165,18 @@ - test_isa_2_06_part3_LDADD = $(LDADD) - test_isa_2_06_part3_LINK = $(CCLD) $(test_isa_2_06_part3_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+test_isa_2_07_part1_SOURCES = test_isa_2_07_part1.c -+test_isa_2_07_part1_OBJECTS = \ -+ test_isa_2_07_part1-test_isa_2_07_part1.$(OBJEXT) -+test_isa_2_07_part1_LDADD = $(LDADD) -+test_isa_2_07_part1_LINK = $(CCLD) $(test_isa_2_07_part1_CFLAGS) \ -+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+test_isa_2_07_part2_SOURCES = test_isa_2_07_part2.c -+test_isa_2_07_part2_OBJECTS = \ -+ test_isa_2_07_part2-test_isa_2_07_part2.$(OBJEXT) -+test_isa_2_07_part2_LDADD = $(LDADD) -+test_isa_2_07_part2_LINK = $(CCLD) $(test_isa_2_07_part2_CFLAGS) \ -+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - tw_SOURCES = tw.c - tw_OBJECTS = tw.$(OBJEXT) - tw_LDADD = $(LDADD) -@@ -187,13 +200,15 @@ - power6_bcmp.c round.c testVMX.c test_dfp1.c test_dfp2.c \ - test_dfp3.c test_dfp4.c test_dfp5.c test_fx.c test_gx.c \ - test_isa_2_06_part1.c test_isa_2_06_part2.c \ -- test_isa_2_06_part3.c tw.c twi.c xlc_dbl_u32.c -+ test_isa_2_06_part3.c test_isa_2_07_part1.c \ -+ test_isa_2_07_part2.c tw.c twi.c xlc_dbl_u32.c - DIST_SOURCES = allexec.c bug129390-ppc32.c bug139050-ppc32.c \ - jm-insns.c ldstrev.c lsw.c mcrfs.c mftocrf.c power5+_round.c \ - power6_bcmp.c round.c testVMX.c test_dfp1.c test_dfp2.c \ - test_dfp3.c test_dfp4.c test_dfp5.c test_fx.c test_gx.c \ - test_isa_2_06_part1.c test_isa_2_06_part2.c \ -- test_isa_2_06_part3.c tw.c twi.c xlc_dbl_u32.c -+ test_isa_2_06_part3.c test_isa_2_07_part1.c \ -+ test_isa_2_07_part2.c tw.c twi.c xlc_dbl_u32.c - ETAGS = etags - CTAGS = ctags - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -@@ -507,7 +522,9 @@ - test_dfp2.stdout.exp_Without_dcffix \ - test_dfp3.stderr.exp test_dfp3.stdout.exp test_dfp3.vgtest \ - test_dfp4.stderr.exp test_dfp4.stdout.exp test_dfp4.vgtest \ -- test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest -+ test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest \ -+ jm_vec_isa_2_07.stderr.exp jm_vec_isa_2_07.stdout.exp jm_vec_isa_2_07.vgtest \ -+ test_isa_2_07_part2.stderr.exp test_isa_2_07_part2.stdout.exp test_isa_2_07_part2.vgtest - - allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ - @HAS_ALTIVEC_FALSE@ALTIVEC_FLAG = -@@ -520,6 +537,10 @@ - @HAS_DFP_TRUE@BUILD_FLAGS_DFP = -mhard-dfp -mcpu=power6 - @HAS_DFP_FALSE@DFP_FLAG = - @HAS_DFP_TRUE@DFP_FLAG = -DHAS_DFP -+@HAS_ISA_2_07_FALSE@BUILD_FLAGS_ISA_2_07 = -+@HAS_ISA_2_07_TRUE@BUILD_FLAGS_ISA_2_07 = -mcpu=power8 -+@HAS_ISA_2_07_FALSE@ISA_2_07_FLAG = -+@HAS_ISA_2_07_TRUE@ISA_2_07_FLAG = -DHAS_ISA_2_07 - jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \ - @FLAG_M32@ $(ALTIVEC_FLAG) - -@@ -550,6 +571,12 @@ - test_dfp5_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(DFP_FLAG) \ - @FLAG_M32@ $(BUILD_FLAGS_DFP) - -+test_isa_2_07_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07) -+ -+test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M32@ $(BUILD_FLAGS_ISA_2_07) -+ - all: all-am - - .SUFFIXES: -@@ -653,6 +680,12 @@ - test_isa_2_06_part3$(EXEEXT): $(test_isa_2_06_part3_OBJECTS) $(test_isa_2_06_part3_DEPENDENCIES) - @rm -f test_isa_2_06_part3$(EXEEXT) - $(test_isa_2_06_part3_LINK) $(test_isa_2_06_part3_OBJECTS) $(test_isa_2_06_part3_LDADD) $(LIBS) -+test_isa_2_07_part1$(EXEEXT): $(test_isa_2_07_part1_OBJECTS) $(test_isa_2_07_part1_DEPENDENCIES) -+ @rm -f test_isa_2_07_part1$(EXEEXT) -+ $(test_isa_2_07_part1_LINK) $(test_isa_2_07_part1_OBJECTS) $(test_isa_2_07_part1_LDADD) $(LIBS) -+test_isa_2_07_part2$(EXEEXT): $(test_isa_2_07_part2_OBJECTS) $(test_isa_2_07_part2_DEPENDENCIES) -+ @rm -f test_isa_2_07_part2$(EXEEXT) -+ $(test_isa_2_07_part2_LINK) $(test_isa_2_07_part2_OBJECTS) $(test_isa_2_07_part2_LDADD) $(LIBS) - tw$(EXEEXT): $(tw_OBJECTS) $(tw_DEPENDENCIES) - @rm -f tw$(EXEEXT) - $(LINK) $(tw_OBJECTS) $(tw_LDADD) $(LIBS) -@@ -691,6 +724,8 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_06_part1-test_isa_2_06_part1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_06_part2-test_isa_2_06_part2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_06_part3-test_isa_2_06_part3.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tw.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twi.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xlc_dbl_u32.Po@am__quote@ -@@ -863,6 +898,34 @@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_06_part3_CFLAGS) $(CFLAGS) -c -o test_isa_2_06_part3-test_isa_2_06_part3.obj `if test -f 'test_isa_2_06_part3.c'; then $(CYGPATH_W) 'test_isa_2_06_part3.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_06_part3.c'; fi` - -+test_isa_2_07_part1-test_isa_2_07_part1.o: test_isa_2_07_part1.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part1-test_isa_2_07_part1.o -MD -MP -MF $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo -c -o test_isa_2_07_part1-test_isa_2_07_part1.o `test -f 'test_isa_2_07_part1.c' || echo '$(srcdir)/'`test_isa_2_07_part1.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part1.c' object='test_isa_2_07_part1-test_isa_2_07_part1.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part1-test_isa_2_07_part1.o `test -f 'test_isa_2_07_part1.c' || echo '$(srcdir)/'`test_isa_2_07_part1.c -+ -+test_isa_2_07_part1-test_isa_2_07_part1.obj: test_isa_2_07_part1.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part1-test_isa_2_07_part1.obj -MD -MP -MF $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo -c -o test_isa_2_07_part1-test_isa_2_07_part1.obj `if test -f 'test_isa_2_07_part1.c'; then $(CYGPATH_W) 'test_isa_2_07_part1.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part1.c'; fi` -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part1.c' object='test_isa_2_07_part1-test_isa_2_07_part1.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part1-test_isa_2_07_part1.obj `if test -f 'test_isa_2_07_part1.c'; then $(CYGPATH_W) 'test_isa_2_07_part1.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part1.c'; fi` -+ -+test_isa_2_07_part2-test_isa_2_07_part2.o: test_isa_2_07_part2.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part2-test_isa_2_07_part2.o -MD -MP -MF $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo -c -o test_isa_2_07_part2-test_isa_2_07_part2.o `test -f 'test_isa_2_07_part2.c' || echo '$(srcdir)/'`test_isa_2_07_part2.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part2.c' object='test_isa_2_07_part2-test_isa_2_07_part2.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part2-test_isa_2_07_part2.o `test -f 'test_isa_2_07_part2.c' || echo '$(srcdir)/'`test_isa_2_07_part2.c -+ -+test_isa_2_07_part2-test_isa_2_07_part2.obj: test_isa_2_07_part2.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part2-test_isa_2_07_part2.obj -MD -MP -MF $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo -c -o test_isa_2_07_part2-test_isa_2_07_part2.obj `if test -f 'test_isa_2_07_part2.c'; then $(CYGPATH_W) 'test_isa_2_07_part2.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part2.c'; fi` -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part2.c' object='test_isa_2_07_part2-test_isa_2_07_part2.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part2-test_isa_2_07_part2.obj `if test -f 'test_isa_2_07_part2.c'; then $(CYGPATH_W) 'test_isa_2_07_part2.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part2.c'; fi` -+ - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ -diff -ur valgrind-3.8.1.orig/none/tests/ppc64/Makefile.am valgrind-3.8.1/none/tests/ppc64/Makefile.am ---- valgrind-3.8.1.orig/none/tests/ppc64/Makefile.am 2013-08-13 13:07:12.675886811 +0200 -+++ valgrind-3.8.1/none/tests/ppc64/Makefile.am 2013-08-13 13:10:17.496219122 +0200 -@@ -23,12 +23,16 @@ - test_dfp2.stdout.exp_Without_dcffix \ - test_dfp3.stderr.exp test_dfp3.stdout.exp test_dfp3.vgtest \ - test_dfp4.stderr.exp test_dfp4.stdout.exp test_dfp4.vgtest \ -- test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest -+ test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest \ -+ jm_vec_isa_2_07.stderr.exp jm_vec_isa_2_07.stdout.exp jm_vec_isa_2_07.vgtest \ -+ test_isa_2_07_part2.stderr.exp test_isa_2_07_part2.stdout.exp test_isa_2_07_part2.vgtest - - check_PROGRAMS = \ - allexec \ -- jm-insns lsw round std_reg_imm twi_tdi tw_td power6_bcmp power6_mf_gpr test_isa_2_06_part1 \ -- test_isa_2_06_part2 test_isa_2_06_part3 test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 -+ jm-insns lsw round std_reg_imm twi_tdi tw_td power6_bcmp \ -+ power6_mf_gpr test_isa_2_06_part1 test_isa_2_06_part2 \ -+ test_isa_2_06_part3 test_dfp1 test_dfp2 test_dfp3 test_dfp4 \ -+ test_dfp5 test_isa_2_07_part1 test_isa_2_07_part2 - - AM_CFLAGS += @FLAG_M64@ - AM_CXXFLAGS += @FLAG_M64@ -@@ -58,6 +62,14 @@ - DFP_FLAG = - endif - -+if HAS_ISA_2_07 -+BUILD_FLAGS_ISA_2_07 = -mcpu=power8 -+ISA_2_07_FLAG = -DHAS_ISA_2_07 -+else -+BUILD_FLAGS_ISA_2_07 = -+ISA_2_07_FLAG = -+endif -+ - test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \ - @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX) - -@@ -84,3 +96,8 @@ - test_dfp5_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(DFP_FLAG) \ - @FLAG_M64@ $(BUILD_FLAGS_DFP) - -+test_isa_2_07_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07) -+ -+test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07) -diff -ur valgrind-3.8.1.orig/none/tests/ppc64/Makefile.in valgrind-3.8.1/none/tests/ppc64/Makefile.in ---- valgrind-3.8.1.orig/none/tests/ppc64/Makefile.in 2013-08-13 13:07:12.674886804 +0200 -+++ valgrind-3.8.1/none/tests/ppc64/Makefile.in 2013-08-13 13:28:32.460025381 +0200 -@@ -60,7 +60,8 @@ - test_isa_2_06_part1$(EXEEXT) test_isa_2_06_part2$(EXEEXT) \ - test_isa_2_06_part3$(EXEEXT) test_dfp1$(EXEEXT) \ - test_dfp2$(EXEEXT) test_dfp3$(EXEEXT) test_dfp4$(EXEEXT) \ -- test_dfp5$(EXEEXT) -+ test_dfp5$(EXEEXT) test_isa_2_07_part1$(EXEEXT) \ -+ test_isa_2_07_part2$(EXEEXT) - subdir = none/tests/ppc64 - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in -@@ -138,6 +139,18 @@ - test_isa_2_06_part3_LDADD = $(LDADD) - test_isa_2_06_part3_LINK = $(CCLD) $(test_isa_2_06_part3_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+test_isa_2_07_part1_SOURCES = test_isa_2_07_part1.c -+test_isa_2_07_part1_OBJECTS = \ -+ test_isa_2_07_part1-test_isa_2_07_part1.$(OBJEXT) -+test_isa_2_07_part1_LDADD = $(LDADD) -+test_isa_2_07_part1_LINK = $(CCLD) $(test_isa_2_07_part1_CFLAGS) \ -+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+test_isa_2_07_part2_SOURCES = test_isa_2_07_part2.c -+test_isa_2_07_part2_OBJECTS = \ -+ test_isa_2_07_part2-test_isa_2_07_part2.$(OBJEXT) -+test_isa_2_07_part2_LDADD = $(LDADD) -+test_isa_2_07_part2_LINK = $(CCLD) $(test_isa_2_07_part2_CFLAGS) \ -+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - tw_td_SOURCES = tw_td.c - tw_td_OBJECTS = tw_td.$(OBJEXT) - tw_td_LDADD = $(LDADD) -@@ -156,11 +169,13 @@ - SOURCES = allexec.c jm-insns.c lsw.c power6_bcmp.c power6_mf_gpr.c \ - round.c std_reg_imm.c test_dfp1.c test_dfp2.c test_dfp3.c \ - test_dfp4.c test_dfp5.c test_isa_2_06_part1.c \ -- test_isa_2_06_part2.c test_isa_2_06_part3.c tw_td.c twi_tdi.c -+ test_isa_2_06_part2.c test_isa_2_06_part3.c \ -+ test_isa_2_07_part1.c test_isa_2_07_part2.c tw_td.c twi_tdi.c - DIST_SOURCES = allexec.c jm-insns.c lsw.c power6_bcmp.c \ - power6_mf_gpr.c round.c std_reg_imm.c test_dfp1.c test_dfp2.c \ - test_dfp3.c test_dfp4.c test_dfp5.c test_isa_2_06_part1.c \ -- test_isa_2_06_part2.c test_isa_2_06_part3.c tw_td.c twi_tdi.c -+ test_isa_2_06_part2.c test_isa_2_06_part3.c \ -+ test_isa_2_07_part1.c test_isa_2_07_part2.c tw_td.c twi_tdi.c - ETAGS = etags - CTAGS = ctags - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -@@ -462,7 +477,9 @@ - test_dfp2.stdout.exp_Without_dcffix \ - test_dfp3.stderr.exp test_dfp3.stdout.exp test_dfp3.vgtest \ - test_dfp4.stderr.exp test_dfp4.stdout.exp test_dfp4.vgtest \ -- test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest -+ test_dfp5.stderr.exp test_dfp5.stdout.exp test_dfp5.vgtest \ -+ jm_vec_isa_2_07.stderr.exp jm_vec_isa_2_07.stdout.exp jm_vec_isa_2_07.vgtest \ -+ test_isa_2_07_part2.stderr.exp test_isa_2_07_part2.stdout.exp test_isa_2_07_part2.vgtest - - allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ - @HAS_ALTIVEC_FALSE@ALTIVEC_FLAG = -@@ -475,6 +492,10 @@ - @HAS_DFP_TRUE@BUILD_FLAGS_DFP = -mhard-dfp -mcpu=power6 - @HAS_DFP_FALSE@DFP_FLAG = - @HAS_DFP_TRUE@DFP_FLAG = -DHAS_DFP -+@HAS_ISA_2_07_FALSE@BUILD_FLAGS_ISA_2_07 = -+@HAS_ISA_2_07_TRUE@BUILD_FLAGS_ISA_2_07 = -mcpu=power8 -+@HAS_ISA_2_07_FALSE@ISA_2_07_FLAG = -+@HAS_ISA_2_07_TRUE@ISA_2_07_FLAG = -DHAS_ISA_2_07 - test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \ - @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX) - -@@ -502,6 +523,12 @@ - test_dfp5_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(DFP_FLAG) \ - @FLAG_M64@ $(BUILD_FLAGS_DFP) - -+test_isa_2_07_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07) -+ -+test_isa_2_07_part2_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(ISA_2_07_FLAG) \ -+ @FLAG_M64@ $(BUILD_FLAGS_ISA_2_07) -+ - all: all-am - - .SUFFIXES: -@@ -584,6 +611,12 @@ - test_isa_2_06_part3$(EXEEXT): $(test_isa_2_06_part3_OBJECTS) $(test_isa_2_06_part3_DEPENDENCIES) - @rm -f test_isa_2_06_part3$(EXEEXT) - $(test_isa_2_06_part3_LINK) $(test_isa_2_06_part3_OBJECTS) $(test_isa_2_06_part3_LDADD) $(LIBS) -+test_isa_2_07_part1$(EXEEXT): $(test_isa_2_07_part1_OBJECTS) $(test_isa_2_07_part1_DEPENDENCIES) -+ @rm -f test_isa_2_07_part1$(EXEEXT) -+ $(test_isa_2_07_part1_LINK) $(test_isa_2_07_part1_OBJECTS) $(test_isa_2_07_part1_LDADD) $(LIBS) -+test_isa_2_07_part2$(EXEEXT): $(test_isa_2_07_part2_OBJECTS) $(test_isa_2_07_part2_DEPENDENCIES) -+ @rm -f test_isa_2_07_part2$(EXEEXT) -+ $(test_isa_2_07_part2_LINK) $(test_isa_2_07_part2_OBJECTS) $(test_isa_2_07_part2_LDADD) $(LIBS) - tw_td$(EXEEXT): $(tw_td_OBJECTS) $(tw_td_DEPENDENCIES) - @rm -f tw_td$(EXEEXT) - $(LINK) $(tw_td_OBJECTS) $(tw_td_LDADD) $(LIBS) -@@ -612,6 +645,8 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_06_part1-test_isa_2_06_part1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_06_part2-test_isa_2_06_part2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_06_part3-test_isa_2_06_part3.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tw_td.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twi_tdi.Po@am__quote@ - -@@ -769,6 +804,34 @@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_06_part3_CFLAGS) $(CFLAGS) -c -o test_isa_2_06_part3-test_isa_2_06_part3.obj `if test -f 'test_isa_2_06_part3.c'; then $(CYGPATH_W) 'test_isa_2_06_part3.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_06_part3.c'; fi` - -+test_isa_2_07_part1-test_isa_2_07_part1.o: test_isa_2_07_part1.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part1-test_isa_2_07_part1.o -MD -MP -MF $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo -c -o test_isa_2_07_part1-test_isa_2_07_part1.o `test -f 'test_isa_2_07_part1.c' || echo '$(srcdir)/'`test_isa_2_07_part1.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part1.c' object='test_isa_2_07_part1-test_isa_2_07_part1.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part1-test_isa_2_07_part1.o `test -f 'test_isa_2_07_part1.c' || echo '$(srcdir)/'`test_isa_2_07_part1.c -+ -+test_isa_2_07_part1-test_isa_2_07_part1.obj: test_isa_2_07_part1.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part1-test_isa_2_07_part1.obj -MD -MP -MF $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo -c -o test_isa_2_07_part1-test_isa_2_07_part1.obj `if test -f 'test_isa_2_07_part1.c'; then $(CYGPATH_W) 'test_isa_2_07_part1.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part1.c'; fi` -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Tpo $(DEPDIR)/test_isa_2_07_part1-test_isa_2_07_part1.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part1.c' object='test_isa_2_07_part1-test_isa_2_07_part1.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part1_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part1-test_isa_2_07_part1.obj `if test -f 'test_isa_2_07_part1.c'; then $(CYGPATH_W) 'test_isa_2_07_part1.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part1.c'; fi` -+ -+test_isa_2_07_part2-test_isa_2_07_part2.o: test_isa_2_07_part2.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part2-test_isa_2_07_part2.o -MD -MP -MF $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo -c -o test_isa_2_07_part2-test_isa_2_07_part2.o `test -f 'test_isa_2_07_part2.c' || echo '$(srcdir)/'`test_isa_2_07_part2.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part2.c' object='test_isa_2_07_part2-test_isa_2_07_part2.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part2-test_isa_2_07_part2.o `test -f 'test_isa_2_07_part2.c' || echo '$(srcdir)/'`test_isa_2_07_part2.c -+ -+test_isa_2_07_part2-test_isa_2_07_part2.obj: test_isa_2_07_part2.c -+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -MT test_isa_2_07_part2-test_isa_2_07_part2.obj -MD -MP -MF $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo -c -o test_isa_2_07_part2-test_isa_2_07_part2.obj `if test -f 'test_isa_2_07_part2.c'; then $(CYGPATH_W) 'test_isa_2_07_part2.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part2.c'; fi` -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Tpo $(DEPDIR)/test_isa_2_07_part2-test_isa_2_07_part2.Po -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_isa_2_07_part2.c' object='test_isa_2_07_part2-test_isa_2_07_part2.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_isa_2_07_part2_CFLAGS) $(CFLAGS) -c -o test_isa_2_07_part2-test_isa_2_07_part2.obj `if test -f 'test_isa_2_07_part2.c'; then $(CYGPATH_W) 'test_isa_2_07_part2.c'; else $(CYGPATH_W) '$(srcdir)/test_isa_2_07_part2.c'; fi` -+ - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ -diff -ur valgrind-3.8.1.orig/tests/check_isa-2_06_cap valgrind-3.8.1/tests/check_isa-2_06_cap ---- valgrind-3.8.1.orig/tests/check_isa-2_06_cap 2013-08-13 13:07:12.820887858 +0200 -+++ valgrind-3.8.1/tests/check_isa-2_06_cap 2013-08-13 13:10:17.500219150 +0200 -@@ -1,8 +1,9 @@ - #!/bin/sh - --# We use this script to check whether or not the processor supports Power ISA 2.06. -+# We use this script to check whether or not the processor supports Power ISA 2.06 or later. -+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -+LD_SHOW_AUXV=1 $DIR/true | grep arch_2_06 > /dev/null 2>&1 - --LD_SHOW_AUXV=1 /bin/true | grep arch_2_06 > /dev/null 2>&1 - if [ "$?" -ne "0" ]; then - exit 1 - else -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_ppc_toIR.c valgrind-3.8.1/VEX/priv/guest_ppc_toIR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_ppc_toIR.c 2013-08-13 13:07:12.730887208 +0200 -+++ valgrind-3.8.1/VEX/priv/guest_ppc_toIR.c 2013-08-13 13:10:17.465218898 +0200 -@@ -4918,11 +4918,17 @@ - case 0x3E: - switch ((b1<<1) | b0) { - case 0x0: // std (Store DWord, PPC64 p580) -+ if (!mode64) -+ return False; -+ - DIP("std r%u,%d(r%u)\n", rS_addr, simm16, rA_addr); - storeBE( mkexpr(EA), mkexpr(rS) ); - break; - - case 0x1: // stdu (Store DWord, Update, PPC64 p583) -+ if (!mode64) -+ return False; -+ - DIP("stdu r%u,%d(r%u)\n", rS_addr, simm16, rA_addr); - putIReg( rA_addr, mkexpr(EA) ); - storeBE( mkexpr(EA), mkexpr(rS) ); -@@ -6452,7 +6458,7 @@ - } - /* not decodable */ - return False; -- -+ - /* XFX-Form */ - case 0x153: // mfspr (Move from Special-Purpose Register, PPC32 p470) - -@@ -6620,7 +6626,79 @@ - return False; - } - break; -- -+ -+ case 0x33: // mfvsrd -+ { -+ UChar XS = ifieldRegXS( theInstr ); -+ UChar rA_addr = ifieldRegA(theInstr); -+ IRExpr * high64; -+ IRTemp vS = newTemp( Ity_V128 ); -+ DIP("mfvsrd r%u,vsr%d\n", rA_addr, (UInt)XS); -+ -+ /* XS = SX || S -+ * For SX=0, mfvsrd is treated as a Floating-Point -+ * instruction in terms of resource availability. -+ * For SX=1, mfvsrd is treated as a Vector instruction in -+ * terms of resource availability. -+ *NEED TO FIGURE OUT HOW TO IMPLEMENT THE RESOURCE AVAILABILITY PART -+ */ -+ assign( vS, getVSReg( XS ) ); -+ high64 = unop( Iop_V128HIto64, mkexpr( vS ) ); -+ putIReg( rA_addr, (mode64) ? high64 : -+ unop( Iop_64to32, high64 ) ); -+ break; -+ } -+ -+ case 0xB3: // mtvsrd -+ { -+ UChar XT = ifieldRegXT( theInstr ); -+ UChar rA_addr = ifieldRegA(theInstr); -+ IRTemp rA = newTemp(ty); -+ DIP("mtvsrd vsr%d,r%u\n", (UInt)XT, rA_addr); -+ /* XS = SX || S -+ * For SX=0, mfvsrd is treated as a Floating-Point -+ * instruction in terms of resource availability. -+ * For SX=1, mfvsrd is treated as a Vector instruction in -+ * terms of resource availability. -+ *NEED TO FIGURE OUT HOW TO IMPLEMENT THE RESOURCE AVAILABILITY PART -+ */ -+ assign( rA, getIReg(rA_addr) ); -+ -+ if (mode64) -+ putVSReg( XT, binop( Iop_64HLtoV128, mkexpr( rA ), mkU64( 0 ) ) ); -+ else -+ putVSReg( XT, binop( Iop_64HLtoV128, -+ binop( Iop_32HLto64, -+ mkU32( 0 ), -+ mkexpr( rA ) ), -+ mkU64( 0 ) ) ); -+ break; -+ } -+ -+ case 0xD3: // mtvsrwa -+ { -+ UChar XT = ifieldRegXT( theInstr ); -+ UChar rA_addr = ifieldRegA(theInstr); -+ IRTemp rA = newTemp( Ity_I32 ); -+ DIP("mtvsrwa vsr%d,r%u\n", (UInt)XT, rA_addr); -+ /* XS = SX || S -+ * For SX=0, mtvsrwa is treated as a Floating-Point -+ * instruction in terms of resource availability. -+ * For SX=1, mtvsrwa is treated as a Vector instruction in -+ * terms of resource availability. -+ *NEED TO FIGURE OUT HOW TO IMPLEMENT THE RESOURCE AVAILABILITY PART -+ */ -+ if (mode64) -+ assign( rA, unop( Iop_64to32, getIReg( rA_addr ) ) ); -+ else -+ assign( rA, getIReg(rA_addr) ); -+ -+ putVSReg( XT, binop( Iop_64HLtoV128, -+ unop( Iop_32Sto64, mkexpr( rA ) ), -+ mkU64( 0 ) ) ); -+ break; -+ } -+ - default: - vex_printf("dis_proc_ctl(ppc)(opc2)\n"); - return False; -@@ -11635,7 +11713,7 @@ - /* Create and assign temps only as needed for the given instruction. */ - switch (opc2) { - // scalar double-precision floating point argument -- case 0x2B0: case 0x0b0: case 0x290: case 0x212: case 0x090: -+ case 0x2B0: case 0x0b0: case 0x290: case 0x212: case 0x216: case 0x090: - xB = newTemp(Ity_F64); - assign( xB, - unop( Iop_ReinterpI64asF64, -@@ -11677,6 +11755,11 @@ - assign( xB, - unop( Iop_64HIto32, unop( Iop_V128HIto64, getVSReg( XB ) ) ) ); - break; -+ case 0x296: // xscvspdpn (non signaling version of xscvpdp) -+ xB = newTemp(Ity_I32); -+ assign( xB, -+ unop( Iop_64HIto32, unop( Iop_V128HIto64, getVSReg( XB ) ) ) ); -+ break; - - /* Certain instructions have their complete implementation in the main switch statement - * that follows this one; thus we have a "do nothing" case for those instructions here. -@@ -11824,6 +11907,18 @@ - mkU32( 0 ) ), - mkU64( 0ULL ) ) ); - break; -+ case 0x216: /* xscvdpspn (VSX Scalar convert scalar Single-Precision to -+ vector single Convert to Single-Precision non-signalling */ -+ DIP("xscvdpspn v%u,v%u\n", (UInt)XT, (UInt)XB); -+ putVSReg( XT, -+ binop( Iop_64HLtoV128, -+ binop( Iop_32HLto64, -+ unop( Iop_ReinterpF32asI32, -+ unop( Iop_TruncF64asF32, -+ mkexpr( xB ) ) ), -+ mkU32( 0 ) ), -+ mkU64( 0ULL ) ) ); -+ break; - case 0x090: // xscvdpuxws (VSX Scalar truncate Double-Precision to integer - // and Convert to Unsigned Integer Word format with Saturate) - DIP("xscvdpuxws v%u,v%u\n", (UInt)XT, (UInt)XB); -@@ -11845,6 +11940,15 @@ - unop( Iop_ReinterpI32asF32, mkexpr( xB ) ) ) ), - mkU64( 0ULL ) ) ); - break; -+ case 0x296: // xscvspdpn (VSX Scalar Convert Single-Precision to Double-Precision format Non signaling) -+ DIP("xscvspdpn v%u,v%u\n", (UInt)XT, (UInt)XB); -+ putVSReg( XT, -+ binop( Iop_64HLtoV128, -+ unop( Iop_ReinterpF64asI64, -+ unop( Iop_F32toF64, -+ unop( Iop_ReinterpI32asF32, mkexpr( xB ) ) ) ), -+ mkU64( 0ULL ) ) ); -+ break; - case 0x312: // xvcvdpsp (VSX Vector round Double-Precision to single-precision - // and Convert to Single-Precision format) - DIP("xvcvdpsp v%u,v%u\n", (UInt)XT, (UInt)XB); -@@ -14552,6 +14656,11 @@ - putVReg( vD_addr, binop(Iop_Add32x4, mkexpr(vA), mkexpr(vB)) ); - break; - -+ case 0x0C0: // vaddudm (Add Unsigned Double Word Modulo) -+ DIP("vaddudm v%d,v%d,v%d\n", vD_addr, vA_addr, vB_addr); -+ putVReg( vD_addr, binop(Iop_Add64x2, mkexpr(vA), mkexpr(vB)) ); -+ break; -+ - case 0x200: // vaddubs (Add Unsigned Byte Saturate, AV p142) - DIP("vaddubs v%d,v%d,v%d\n", vD_addr, vA_addr, vB_addr); - putVReg( vD_addr, binop(Iop_QAdd8Ux16, mkexpr(vA), mkexpr(vB)) ); -@@ -15824,6 +15933,12 @@ - return True; - } - -+ case 0x44E: // vpkudum (Pack Unsigned Double Word Unsigned Modulo) -+ DIP("vpkudum v%d,v%d,v%d\n", vD_addr, vA_addr, vB_addr); -+ putVReg( vD_addr, -+ binop(Iop_NarrowBin64to32x4, mkexpr(vA), mkexpr(vB)) ); -+ return True; -+ - default: - break; // Fall through... - } -@@ -16356,6 +16471,7 @@ - { 0x1f4, "xvtdivdp" }, - { 0x208, "xxland" }, - { 0x212, "xscvdpsp" }, -+ { 0x216, "xscvdpspn" }, - { 0x228, "xxlandc" }, - { 0x248 , "xxlor" }, - { 0x268, "xxlxor" }, -@@ -16364,6 +16480,7 @@ - { 0x288, "xxlnor" }, - { 0x290, "xscvdpuxds" }, - { 0x292, "xscvspdp" }, -+ { 0x296, "xscvspdpn" }, - { 0x2a0, "xsmindp" }, - { 0x2a4, "xsnmaddmdp" }, - { 0x2b0, "xscvdpsxds" }, -@@ -16412,7 +16529,8 @@ - { 0x3f0, "xvcvsxddp" }, - { 0x3f2, "xvnegdp" } - }; --#define VSX_ALL_LEN 135 -+#define VSX_ALL_LEN (sizeof vsx_all / sizeof *vsx_all) -+ - - // ATTENTION: This search function assumes vsx_all array is sorted. - static Int findVSXextOpCode(UInt opcode) -@@ -16490,6 +16608,7 @@ - Bool allow_GX = False; - Bool allow_VX = False; // Equates to "supports Power ISA 2.06 - Bool allow_DFP = False; -+ Bool allow_isa_2_07 = False; - UInt hwcaps = archinfo->hwcaps; - Long delta; - -@@ -16501,6 +16620,7 @@ - allow_GX = (0 != (hwcaps & VEX_HWCAPS_PPC64_GX)); - allow_VX = (0 != (hwcaps & VEX_HWCAPS_PPC64_VX)); - allow_DFP = (0 != (hwcaps & VEX_HWCAPS_PPC64_DFP)); -+ allow_isa_2_07 = (0 != (hwcaps & VEX_HWCAPS_PPC64_ISA2_07)); - } else { - allow_F = (0 != (hwcaps & VEX_HWCAPS_PPC32_F)); - allow_V = (0 != (hwcaps & VEX_HWCAPS_PPC32_V)); -@@ -16508,6 +16628,7 @@ - allow_GX = (0 != (hwcaps & VEX_HWCAPS_PPC32_GX)); - allow_VX = (0 != (hwcaps & VEX_HWCAPS_PPC32_VX)); - allow_DFP = (0 != (hwcaps & VEX_HWCAPS_PPC32_DFP)); -+ allow_isa_2_07 = (0 != (hwcaps & VEX_HWCAPS_PPC32_ISA2_07)); - } - - /* The running delta */ -@@ -16928,8 +17049,9 @@ - case 0x2B0: case 0x2F0: // xscvdpsxds, xscvsxddp - case 0x1b0: case 0x130: // xvcvdpsxws, xvcvspsxws - case 0x0b0: case 0x290: // xscvdpsxws, xscvdpuxds -- case 0x212: // xscvdpsp -- case 0x292: case 0x312: // xscvspdp, xvcvdpsp -+ case 0x212: case 0x216: // xscvdpsp, xscvdpspn -+ case 0x292: case 0x296: // xscvspdp, xscvspdpn -+ case 0x312: // xvcvdpsp - case 0x390: case 0x190: // xvcvdpuxds, xvcvdpuxws - case 0x3B0: case 0x310: // xvcvdpsxds, xvcvspuxds - case 0x392: case 0x330: // xvcvspdp, xvcvspsxds -@@ -16973,7 +17095,6 @@ - - /* 64bit Integer Stores */ - case 0x3E: // std, stdu -- if (!mode64) goto decode_failure; - if (dis_int_store( theInstr, abiinfo )) goto decode_success; - goto decode_failure; - -@@ -17008,7 +17129,7 @@ - if (!allow_GX) goto decode_noGX; - if (dis_fp_arith(theInstr)) goto decode_success; - goto decode_failure; -- -+ - default: - break; // Fall through - } -@@ -17358,6 +17479,8 @@ - goto decode_failure; - - /* Processor Control Instructions */ -+ case 0x33: // mfvsrd -+ case 0xB3: case 0xD3: // mtvsrd, mtvsrwa - case 0x200: case 0x013: case 0x153: // mcrxr, mfcr, mfspr - case 0x173: case 0x090: case 0x1D3: // mftb, mtcrf, mtspr - if (dis_proc_ctl( abiinfo, theInstr )) goto decode_success; -@@ -17564,6 +17687,11 @@ - if (dis_av_arith( theInstr )) goto decode_success; - goto decode_failure; - -+ case 0x0C0: // vaddudm -+ if (!allow_isa_2_07) goto decode_noP8; -+ if (dis_av_arith( theInstr )) goto decode_success; -+ goto decode_failure; -+ - /* AV Rotate, Shift */ - case 0x004: case 0x044: case 0x084: // vrlb, vrlh, vrlw - case 0x104: case 0x144: case 0x184: // vslb, vslh, vslw -@@ -17627,6 +17755,11 @@ - if (dis_av_pack( theInstr )) goto decode_success; - goto decode_failure; - -+ case 0x44E: // vpkudum -+ if (!allow_isa_2_07) goto decode_noP8; -+ if (dis_av_pack( theInstr )) goto decode_success; -+ goto decode_failure; -+ - default: - break; // Fall through... - } -@@ -17684,6 +17817,11 @@ - vex_printf("disInstr(ppc): " - "declined to decode a Decimal Floating Point insn.\n"); - goto decode_failure; -+ decode_noP8: -+ vassert(!allow_isa_2_07); -+ vex_printf("disInstr(ppc): " -+ "declined to decode a Power 8 insn.\n"); -+ goto decode_failure; - - - decode_failure: -@@ -17772,10 +17910,11 @@ - /* do some sanity checks */ - mask32 = VEX_HWCAPS_PPC32_F | VEX_HWCAPS_PPC32_V - | VEX_HWCAPS_PPC32_FX | VEX_HWCAPS_PPC32_GX | VEX_HWCAPS_PPC32_VX -- | VEX_HWCAPS_PPC32_DFP; -+ | VEX_HWCAPS_PPC32_DFP | VEX_HWCAPS_PPC32_ISA2_07; - - mask64 = VEX_HWCAPS_PPC64_V | VEX_HWCAPS_PPC64_FX -- | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX | VEX_HWCAPS_PPC64_DFP; -+ | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX | VEX_HWCAPS_PPC64_DFP -+ | VEX_HWCAPS_PPC64_ISA2_07; - - if (mode64) { - vassert((hwcaps_guest & mask32) == 0); -diff -ur valgrind-3.8.1.orig/VEX/priv/host_ppc_defs.c valgrind-3.8.1/VEX/priv/host_ppc_defs.c ---- valgrind-3.8.1.orig/VEX/priv/host_ppc_defs.c 2013-08-13 13:07:12.726887180 +0200 -+++ valgrind-3.8.1/VEX/priv/host_ppc_defs.c 2013-08-13 13:10:17.466218906 +0200 -@@ -674,7 +674,7 @@ - case Pav_UNPCKLPIX: return "vupklpx"; - - /* Integer binary */ -- case Pav_ADDU: return "vaddu_m"; // b,h,w -+ case Pav_ADDU: return "vaddu_m"; // b,h,w,dw - case Pav_QADDU: return "vaddu_s"; // b,h,w - case Pav_QADDS: return "vadds_s"; // b,h,w - -@@ -708,7 +708,7 @@ - case Pav_ROTL: return "vrl"; // b,h,w - - /* Pack */ -- case Pav_PACKUU: return "vpku_um"; // h,w -+ case Pav_PACKUU: return "vpku_um"; // h,w,dw - case Pav_QPACKUU: return "vpku_us"; // h,w - case Pav_QPACKSU: return "vpks_us"; // h,w - case Pav_QPACKSS: return "vpks_ss"; // h,w -@@ -1346,6 +1346,17 @@ - i->Pin.AvBin32x4.srcR = srcR; - return i; - } -+PPCInstr* PPCInstr_AvBin64x2 ( PPCAvOp op, HReg dst, -+ HReg srcL, HReg srcR ) { -+ PPCInstr* i = LibVEX_Alloc(sizeof(PPCInstr)); -+ i->tag = Pin_AvBin64x2; -+ i->Pin.AvBin64x2.op = op; -+ i->Pin.AvBin64x2.dst = dst; -+ i->Pin.AvBin64x2.srcL = srcL; -+ i->Pin.AvBin64x2.srcR = srcR; -+ return i; -+} -+ - PPCInstr* PPCInstr_AvBin32Fx4 ( PPCAvFpOp op, HReg dst, - HReg srcL, HReg srcR ) { - PPCInstr* i = LibVEX_Alloc(sizeof(PPCInstr)); -@@ -1879,6 +1890,14 @@ - vex_printf(","); - ppHRegPPC(i->Pin.AvBin32x4.srcR); - return; -+ case Pin_AvBin64x2: -+ vex_printf("%s(w) ", showPPCAvOp(i->Pin.AvBin64x2.op)); -+ ppHRegPPC(i->Pin.AvBin64x2.dst); -+ vex_printf(","); -+ ppHRegPPC(i->Pin.AvBin64x2.srcL); -+ vex_printf(","); -+ ppHRegPPC(i->Pin.AvBin64x2.srcR); -+ return; - case Pin_AvBin32Fx4: - vex_printf("%s ", showPPCAvFpOp(i->Pin.AvBin32Fx4.op)); - ppHRegPPC(i->Pin.AvBin32Fx4.dst); -@@ -2360,6 +2379,11 @@ - addHRegUse(u, HRmRead, i->Pin.AvBin32x4.srcL); - addHRegUse(u, HRmRead, i->Pin.AvBin32x4.srcR); - return; -+ case Pin_AvBin64x2: -+ addHRegUse(u, HRmWrite, i->Pin.AvBin64x2.dst); -+ addHRegUse(u, HRmRead, i->Pin.AvBin64x2.srcL); -+ addHRegUse(u, HRmRead, i->Pin.AvBin64x2.srcR); -+ return; - case Pin_AvBin32Fx4: - addHRegUse(u, HRmWrite, i->Pin.AvBin32Fx4.dst); - addHRegUse(u, HRmRead, i->Pin.AvBin32Fx4.srcL); -@@ -2666,6 +2690,11 @@ - mapReg(m, &i->Pin.AvBin32x4.srcL); - mapReg(m, &i->Pin.AvBin32x4.srcR); - return; -+ case Pin_AvBin64x2: -+ mapReg(m, &i->Pin.AvBin64x2.dst); -+ mapReg(m, &i->Pin.AvBin64x2.srcL); -+ mapReg(m, &i->Pin.AvBin64x2.srcR); -+ return; - case Pin_AvBin32Fx4: - mapReg(m, &i->Pin.AvBin32Fx4.dst); - mapReg(m, &i->Pin.AvBin32Fx4.srcL); -@@ -4771,6 +4800,24 @@ - goto done; - } - -+ case Pin_AvBin64x2: { -+ UInt v_dst = vregNo(i->Pin.AvBin64x2.dst); -+ UInt v_srcL = vregNo(i->Pin.AvBin64x2.srcL); -+ UInt v_srcR = vregNo(i->Pin.AvBin64x2.srcR); -+ UInt opc2; -+ switch (i->Pin.AvBin64x2.op) { -+ case Pav_ADDU: opc2 = 192; break; // vaddudm vector double add -+ case Pav_PACKUU: opc2 = 1102; break; // vpkudum -+ // FIXME: We currently don't have a vector compare equal double word, so it's a hack -+ // to use vcmpequw, but it works. -+ case Pav_CMPEQU: opc2 = 134; break; // vcmpequw -+ default: -+ goto bad; -+ } -+ p = mkFormVX( p, 4, v_dst, v_srcL, v_srcR, opc2 ); -+ goto done; -+ } -+ - case Pin_AvBin32Fx4: { - UInt v_dst = vregNo(i->Pin.AvBin32Fx4.dst); - UInt v_srcL = vregNo(i->Pin.AvBin32Fx4.srcL); -diff -ur valgrind-3.8.1.orig/VEX/priv/host_ppc_defs.h valgrind-3.8.1/VEX/priv/host_ppc_defs.h ---- valgrind-3.8.1.orig/VEX/priv/host_ppc_defs.h 2013-08-13 13:07:12.724887166 +0200 -+++ valgrind-3.8.1/VEX/priv/host_ppc_defs.h 2013-08-13 13:10:17.469218928 +0200 -@@ -488,6 +488,7 @@ - Pin_AvBin8x16, /* AV binary, 8x4 */ - Pin_AvBin16x8, /* AV binary, 16x4 */ - Pin_AvBin32x4, /* AV binary, 32x4 */ -+ Pin_AvBin64x2, /* AV binary, 64x2 */ - - Pin_AvBin32Fx4, /* AV FP binary, 32Fx4 */ - Pin_AvUn32Fx4, /* AV FP unary, 32Fx4 */ -@@ -790,6 +791,13 @@ - HReg srcL; - HReg srcR; - } AvBin32x4; -+ /* Can only be generated for CPUs capable of ISA 2.07 or above */ -+ struct { -+ PPCAvOp op; -+ HReg dst; -+ HReg srcL; -+ HReg srcR; -+ } AvBin64x2; - struct { - PPCAvFpOp op; - HReg dst; -@@ -1008,6 +1016,7 @@ - extern PPCInstr* PPCInstr_AvBin8x16 ( PPCAvOp op, HReg dst, HReg srcL, HReg srcR ); - extern PPCInstr* PPCInstr_AvBin16x8 ( PPCAvOp op, HReg dst, HReg srcL, HReg srcR ); - extern PPCInstr* PPCInstr_AvBin32x4 ( PPCAvOp op, HReg dst, HReg srcL, HReg srcR ); -+extern PPCInstr* PPCInstr_AvBin64x2 ( PPCAvOp op, HReg dst, HReg srcL, HReg srcR ); - extern PPCInstr* PPCInstr_AvBin32Fx4 ( PPCAvFpOp op, HReg dst, HReg srcL, HReg srcR ); - extern PPCInstr* PPCInstr_AvUn32Fx4 ( PPCAvFpOp op, HReg dst, HReg src ); - extern PPCInstr* PPCInstr_AvPerm ( HReg dst, HReg srcL, HReg srcR, HReg ctl ); -diff -ur valgrind-3.8.1.orig/VEX/priv/host_ppc_isel.c valgrind-3.8.1/VEX/priv/host_ppc_isel.c ---- valgrind-3.8.1.orig/VEX/priv/host_ppc_isel.c 2013-08-13 13:07:12.732887222 +0200 -+++ valgrind-3.8.1/VEX/priv/host_ppc_isel.c 2013-08-13 13:10:17.474218963 +0200 -@@ -4325,6 +4325,16 @@ - return dst; - } - -+ case Iop_CmpNEZ64x2: { -+ HReg arg = iselVecExpr(env, e->Iex.Unop.arg); -+ HReg zero = newVRegV(env); -+ HReg dst = newVRegV(env); -+ addInstr(env, PPCInstr_AvBinary(Pav_XOR, zero, zero, zero)); -+ addInstr(env, PPCInstr_AvBin64x2(Pav_CMPEQU, dst, arg, zero)); -+ addInstr(env, PPCInstr_AvUnary(Pav_NOT, dst, dst)); -+ return dst; -+ } -+ - case Iop_Recip32Fx4: fpop = Pavfp_RCPF; goto do_32Fx4_unary; - case Iop_RSqrt32Fx4: fpop = Pavfp_RSQRTF; goto do_32Fx4_unary; - case Iop_I32UtoFx4: fpop = Pavfp_CVTU2F; goto do_32Fx4_unary; -@@ -4589,6 +4599,16 @@ - return dst; - } - -+ case Iop_NarrowBin64to32x4: op = Pav_PACKUU; goto do_AvBin64x2; -+ case Iop_Add64x2: op = Pav_ADDU; goto do_AvBin64x2; -+ do_AvBin64x2: { -+ HReg arg1 = iselVecExpr(env, e->Iex.Binop.arg1); -+ HReg arg2 = iselVecExpr(env, e->Iex.Binop.arg2); -+ HReg dst = newVRegV(env); -+ addInstr(env, PPCInstr_AvBin64x2(op, dst, arg1, arg2)); -+ return dst; -+ } -+ - case Iop_ShlN8x16: op = Pav_SHL; goto do_AvShift8x16; - case Iop_SarN8x16: op = Pav_SAR; goto do_AvShift8x16; - do_AvShift8x16: { -@@ -5233,10 +5253,12 @@ - /* do some sanity checks */ - mask32 = VEX_HWCAPS_PPC32_F | VEX_HWCAPS_PPC32_V - | VEX_HWCAPS_PPC32_FX | VEX_HWCAPS_PPC32_GX | VEX_HWCAPS_PPC32_VX -- | VEX_HWCAPS_PPC32_DFP; -+ | VEX_HWCAPS_PPC32_DFP | VEX_HWCAPS_PPC32_ISA2_07; -+ - - mask64 = VEX_HWCAPS_PPC64_V | VEX_HWCAPS_PPC64_FX -- | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX | VEX_HWCAPS_PPC64_DFP; -+ | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX | VEX_HWCAPS_PPC64_DFP -+ | VEX_HWCAPS_PPC64_ISA2_07; - - if (mode64) { - vassert((hwcaps_host & mask32) == 0); -diff -ur valgrind-3.8.1.orig/VEX/priv/ir_defs.c valgrind-3.8.1/VEX/priv/ir_defs.c ---- valgrind-3.8.1.orig/VEX/priv/ir_defs.c 2013-08-13 13:07:12.728887194 +0200 -+++ valgrind-3.8.1/VEX/priv/ir_defs.c 2013-08-13 13:10:17.477218984 +0200 -@@ -523,6 +523,7 @@ - case Iop_QNarrowBin32Sto16Sx4: vex_printf("QNarrowBin32Sto16Sx4"); return; - case Iop_NarrowBin16to8x8: vex_printf("NarrowBin16to8x8"); return; - case Iop_NarrowBin32to16x4: vex_printf("NarrowBin32to16x4"); return; -+ case Iop_NarrowBin64to32x4: vex_printf("NarrowBin64to32x4"); return; - case Iop_InterleaveHI8x8: vex_printf("InterleaveHI8x8"); return; - case Iop_InterleaveHI16x4: vex_printf("InterleaveHI16x4"); return; - case Iop_InterleaveHI32x2: vex_printf("InterleaveHI32x2"); return; -@@ -2650,6 +2651,7 @@ - case Iop_QNarrowBin16Sto8Sx16: case Iop_QNarrowBin32Sto16Sx8: - case Iop_QNarrowBin16Uto8Ux16: case Iop_QNarrowBin32Uto16Ux8: - case Iop_NarrowBin16to8x16: case Iop_NarrowBin32to16x8: -+ case Iop_NarrowBin64to32x4: - case Iop_InterleaveHI8x16: case Iop_InterleaveHI16x8: - case Iop_InterleaveHI32x4: case Iop_InterleaveHI64x2: - case Iop_InterleaveLO8x16: case Iop_InterleaveLO16x8: -diff -ur valgrind-3.8.1.orig/VEX/priv/main_main.c valgrind-3.8.1/VEX/priv/main_main.c ---- valgrind-3.8.1.orig/VEX/priv/main_main.c 2013-08-13 13:07:12.732887222 +0200 -+++ valgrind-3.8.1/VEX/priv/main_main.c 2013-08-13 13:10:17.479218998 +0200 -@@ -1164,6 +1164,7 @@ - const UInt GX = VEX_HWCAPS_PPC32_GX; - const UInt VX = VEX_HWCAPS_PPC32_VX; - const UInt DFP = VEX_HWCAPS_PPC32_DFP; -+ const UInt ISA2_07 = VEX_HWCAPS_PPC32_ISA2_07; - UInt c = hwcaps; - if (c == 0) return "ppc32-int"; - if (c == F) return "ppc32-int-flt"; -@@ -1176,6 +1177,9 @@ - if (c == (F|V|FX|GX)) return "ppc32-int-flt-vmx-FX-GX"; - if (c == (F|V|FX|GX|DFP)) return "ppc32-int-flt-vmx-FX-GX-DFP"; - if (c == (F|V|FX|GX|VX|DFP)) return "ppc32-int-flt-vmx-FX-GX-VX-DFP"; -+ if (c == (F|V|FX|GX|VX|DFP|ISA2_07)) -+ return "ppc32-int-flt-vmx-FX-GX-VX-DFP-ISA2_07"; -+ - return NULL; - } - -@@ -1188,6 +1192,7 @@ - const UInt GX = VEX_HWCAPS_PPC64_GX; - const UInt VX = VEX_HWCAPS_PPC64_VX; - const UInt DFP = VEX_HWCAPS_PPC64_DFP; -+ const UInt ISA2_07 = VEX_HWCAPS_PPC64_ISA2_07; - UInt c = hwcaps; - if (c == 0) return "ppc64-int-flt"; - if (c == FX) return "ppc64-int-flt-FX"; -@@ -1199,6 +1204,8 @@ - if (c == (V|FX|GX)) return "ppc64-int-flt-vmx-FX-GX"; - if (c == (V|FX|GX|DFP)) return "ppc64-int-flt-vmx-FX-GX-DFP"; - if (c == (V|FX|GX|VX|DFP)) return "ppc64-int-flt-vmx-FX-GX-VX-DFP"; -+ if (c == (V|FX|GX|VX|DFP|ISA2_07)) -+ return "ppc64-int-flt-vmx-FX-GX-VX-DFP-ISA2_07"; - return NULL; - } - -diff -ur valgrind-3.8.1.orig/VEX/pub/libvex.h valgrind-3.8.1/VEX/pub/libvex.h ---- valgrind-3.8.1.orig/VEX/pub/libvex.h 2013-08-13 13:07:12.724887166 +0200 -+++ valgrind-3.8.1/VEX/pub/libvex.h 2013-08-13 13:10:17.481219013 +0200 -@@ -93,6 +93,7 @@ - (fres,frsqrte,fsel,stfiwx) */ - #define VEX_HWCAPS_PPC32_VX (1<<12) /* Vector-scalar floating-point (VSX); implies ISA 2.06 or higher */ - #define VEX_HWCAPS_PPC32_DFP (1<<17) /* Decimal Floating Point (DFP) -- e.g., dadd */ -+#define VEX_HWCAPS_PPC32_ISA2_07 (1<<19) /* ISA 2.07 -- e.g., mtvsrd */ - - /* ppc64: baseline capability is integer and basic FP insns */ - #define VEX_HWCAPS_PPC64_V (1<<13) /* Altivec (VMX) */ -@@ -101,6 +102,7 @@ - (fres,frsqrte,fsel,stfiwx) */ - #define VEX_HWCAPS_PPC64_VX (1<<16) /* Vector-scalar floating-point (VSX); implies ISA 2.06 or higher */ - #define VEX_HWCAPS_PPC64_DFP (1<<18) /* Decimal Floating Point (DFP) -- e.g., dadd */ -+#define VEX_HWCAPS_PPC64_ISA2_07 (1<<20) /* ISA 2.07 -- e.g., mtvsrd */ - - /* s390x: Hardware capability encoding - -diff -ur valgrind-3.8.1.orig/VEX/pub/libvex_ir.h valgrind-3.8.1/VEX/pub/libvex_ir.h ---- valgrind-3.8.1.orig/VEX/pub/libvex_ir.h 2013-08-13 13:07:12.724887166 +0200 -+++ valgrind-3.8.1/VEX/pub/libvex_ir.h 2013-08-13 13:10:17.482219021 +0200 -@@ -1354,6 +1354,7 @@ - Iop_QNarrowBin16Sto8Sx16, Iop_QNarrowBin32Sto16Sx8, - Iop_QNarrowBin16Uto8Ux16, Iop_QNarrowBin32Uto16Ux8, - Iop_NarrowBin16to8x16, Iop_NarrowBin32to16x8, -+ Iop_NarrowBin64to32x4, - - /* NARROWING (unary) -- narrow V128 into I64 */ - Iop_NarrowUn16to8x8, Iop_NarrowUn32to16x4, Iop_NarrowUn64to32x2, - -diff --git a/none/tests/ppc32/jm_vec_isa_2_07.stderr.exp b/none/tests/ppc32/jm_vec_isa_2_07.stderr.exp -new file mode 100644 -index 0000000..139597f ---- /dev/null -+++ b/none/tests/ppc32/jm_vec_isa_2_07.stderr.exp -@@ -0,0 +1,2 @@ -+ -+ -diff --git a/none/tests/ppc32/jm_vec_isa_2_07.stdout.exp b/none/tests/ppc32/jm_vec_isa_2_07.stdout.exp -new file mode 100644 -index 0000000..a2d83e6 ---- /dev/null -+++ b/none/tests/ppc32/jm_vec_isa_2_07.stdout.exp -@@ -0,0 +1,34 @@ -+mfvsrd: 0102030405060708 => 0000000005060708 -+mfvsrd: 090a0b0c0e0d0e0f => 000000000e0d0e0f -+mfvsrd: f1f2f3f4f5f6f7f8 => 00000000f5f6f7f8 -+mfvsrd: f9fafbfcfefdfeff => 00000000fefdfeff -+ -+mtvsrd: 0102030405060708 => 0000000005060708 -+mtvsrd: 090a0b0c0e0d0e0f => 000000000e0d0e0f -+mtvsrd: f1f2f3f4f5f6f7f8 => 00000000f5f6f7f8 -+mtvsrd: f9fafbfcfefdfeff => 00000000fefdfeff -+ -+mtfprwa: 05060708 => 0000000005060708 -+mtfprwa: 0e0d0e0f => 000000000e0d0e0f -+mtfprwa: f5f6f7f8 => fffffffff5f6f7f8 -+mtfprwa: fefdfeff => fffffffffefdfeff -+ -+vaddudm: 0102030405060708 @@ 0102030405060708, ==> 020406080a0c0e10 -+ 090a0b0c0e0d0e0f @@ 090a0b0c0e0d0e0f, ==> 121416181c1a1c1e -+vaddudm: 0102030405060708 @@ f1f2f3f4f5f6f7f8, ==> f2f4f6f8fafcff00 -+ 090a0b0c0e0d0e0f @@ f9fafbfcfefdfeff, ==> 030507090d0b0d0e -+vaddudm: f1f2f3f4f5f6f7f8 @@ 0102030405060708, ==> f2f4f6f8fafcff00 -+ f9fafbfcfefdfeff @@ 090a0b0c0e0d0e0f, ==> 030507090d0b0d0e -+vaddudm: f1f2f3f4f5f6f7f8 @@ f1f2f3f4f5f6f7f8, ==> e3e5e7e9ebedeff0 -+ f9fafbfcfefdfeff @@ f9fafbfcfefdfeff, ==> f3f5f7f9fdfbfdfe -+ -+vpkudum: Inputs: 05060708 0e0d0e0f 05060708 0e0d0e0f -+ Output: 05060708 0e0d0e0f 05060708 0e0d0e0f -+vpkudum: Inputs: 05060708 0e0d0e0f f5f6f7f8 fefdfeff -+ Output: 05060708 0e0d0e0f f5f6f7f8 fefdfeff -+vpkudum: Inputs: f5f6f7f8 fefdfeff 05060708 0e0d0e0f -+ Output: f5f6f7f8 fefdfeff 05060708 0e0d0e0f -+vpkudum: Inputs: f5f6f7f8 fefdfeff f5f6f7f8 fefdfeff -+ Output: f5f6f7f8 fefdfeff f5f6f7f8 fefdfeff -+ -+All done. Tested 5 different instructions -diff --git a/none/tests/ppc32/jm_vec_isa_2_07.vgtest b/none/tests/ppc32/jm_vec_isa_2_07.vgtest -new file mode 100644 -index 0000000..a93060a ---- /dev/null -+++ b/none/tests/ppc32/jm_vec_isa_2_07.vgtest -@@ -0,0 +1,2 @@ -+prereq: ../../../tests/check_isa-2_07_cap -+prog: test_isa_2_07_part1 -a -diff --git a/none/tests/ppc32/test_isa_2_07_part1.c b/none/tests/ppc32/test_isa_2_07_part1.c -new file mode 120000 -index 0000000..b258517 ---- /dev/null -+++ b/none/tests/ppc32/test_isa_2_07_part1.c -@@ -0,0 +1 @@ -+../ppc64/test_isa_2_07_part1.c -\ No newline at end of file -diff --git a/none/tests/ppc32/test_isa_2_07_part2.c b/none/tests/ppc32/test_isa_2_07_part2.c -new file mode 120000 -index 0000000..3eb5caf ---- /dev/null -+++ b/none/tests/ppc32/test_isa_2_07_part2.c -@@ -0,0 +1 @@ -+../ppc64/test_isa_2_07_part2.c -\ No newline at end of file -diff --git a/none/tests/ppc32/test_isa_2_07_part2.stderr.exp b/none/tests/ppc32/test_isa_2_07_part2.stderr.exp -new file mode 100644 -index 0000000..139597f ---- /dev/null -+++ b/none/tests/ppc32/test_isa_2_07_part2.stderr.exp -@@ -0,0 +1,2 @@ -+ -+ -diff --git a/none/tests/ppc32/test_isa_2_07_part2.stdout.exp b/none/tests/ppc32/test_isa_2_07_part2.stdout.exp -new file mode 100644 -index 0000000..c65c574 ---- /dev/null -+++ b/none/tests/ppc32/test_isa_2_07_part2.stdout.exp -@@ -0,0 +1,44 @@ -+Test VSX vector and scalar single argument instructions -+#0: xscvdpspn conv(3fd8000000000000) = 3ec0000000000000 -+#1: xscvdpspn conv(404f000000000000) = 4278000000000000 -+#2: xscvdpspn conv(0018000000b77501) = 0000000000000000 -+#3: xscvdpspn conv(7fe800000000051b) = 7f40000000000000 -+#4: xscvdpspn conv(0123214569900000) = 0000000000000000 -+#5: xscvdpspn conv(0000000000000000) = 0000000000000000 -+#6: xscvdpspn conv(8000000000000000) = 8000000000000000 -+#7: xscvdpspn conv(7ff0000000000000) = 7f80000000000000 -+#8: xscvdpspn conv(fff0000000000000) = ff80000000000000 -+#9: xscvdpspn conv(7ff7ffffffffffff) = 7fbfffff00000000 -+#10: xscvdpspn conv(fff7ffffffffffff) = ffbfffff00000000 -+#11: xscvdpspn conv(7ff8000000000000) = 7fc0000000000000 -+#12: xscvdpspn conv(fff8000000000000) = ffc0000000000000 -+#13: xscvdpspn conv(8008340000078000) = 8000000000000000 -+#14: xscvdpspn conv(c0d0650f5a07b353) = c683287a00000000 -+#15: xscvdpspn conv(41232585a9900000) = 49192c2d00000000 -+#16: xscvdpspn conv(41382511a2000000) = 49c1288d00000000 -+#17: xscvdpspn conv(40312ef5a9300000) = 418977ad00000000 -+#18: xscvdpspn conv(40514bf5d2300000) = 428a5fae00000000 -+#19: xscvdpspn conv(40976bf982440000) = 44bb5fcc00000000 -+ -+#0: xscvspdpn conv(3ec00000) = 3fd8000000000000 -+#1: xscvspdpn conv(42780000) = 404f000000000000 -+#2: xscvspdpn conv(00000000) = 0000000000000000 -+#3: xscvspdpn conv(7f800000) = 7ff0000000000000 -+#4: xscvspdpn conv(00000000) = 0000000000000000 -+#5: xscvspdpn conv(00000000) = 0000000000000000 -+#6: xscvspdpn conv(80000000) = 8000000000000000 -+#7: xscvspdpn conv(7f800000) = 7ff0000000000000 -+#8: xscvspdpn conv(ff800000) = fff0000000000000 -+#9: xscvspdpn conv(7fffffff) = 7fffffffe0000000 -+#10: xscvspdpn conv(ffffffff) = ffffffffe0000000 -+#11: xscvspdpn conv(7fc00000) = 7ff8000000000000 -+#12: xscvspdpn conv(ffc00000) = fff8000000000000 -+#13: xscvspdpn conv(80000000) = 8000000000000000 -+#14: xscvspdpn conv(c683287b) = c0d0650f60000000 -+#15: xscvspdpn conv(49192c2d) = 41232585a0000000 -+#16: xscvspdpn conv(49c1288d) = 41382511a0000000 -+#17: xscvspdpn conv(418977ad) = 40312ef5a0000000 -+#18: xscvspdpn conv(428a5faf) = 40514bf5e0000000 -+#19: xscvspdpn conv(44bb5fcc) = 40976bf980000000 -+ -+Testcase PASSED -diff --git a/none/tests/ppc32/test_isa_2_07_part2.vgtest b/none/tests/ppc32/test_isa_2_07_part2.vgtest -new file mode 100644 -index 0000000..a4649be ---- /dev/null -+++ b/none/tests/ppc32/test_isa_2_07_part2.vgtest -@@ -0,0 +1,2 @@ -+prereq: ../../../tests/check_isa-2_07_cap -+prog: test_isa_2_07_part2 -diff --git a/none/tests/ppc64/jm_vec_isa_2_07.stderr.exp b/none/tests/ppc64/jm_vec_isa_2_07.stderr.exp -new file mode 100755 -index 0000000..139597f ---- /dev/null -+++ b/none/tests/ppc64/jm_vec_isa_2_07.stderr.exp -@@ -0,0 +1,2 @@ -+ -+ -diff --git a/none/tests/ppc64/jm_vec_isa_2_07.stdout.exp b/none/tests/ppc64/jm_vec_isa_2_07.stdout.exp -new file mode 100644 -index 0000000..2568739 ---- /dev/null -+++ b/none/tests/ppc64/jm_vec_isa_2_07.stdout.exp -@@ -0,0 +1,34 @@ -+mfvsrd: 0102030405060708 => 0102030405060708 -+mfvsrd: 090a0b0c0e0d0e0f => 090a0b0c0e0d0e0f -+mfvsrd: f1f2f3f4f5f6f7f8 => f1f2f3f4f5f6f7f8 -+mfvsrd: f9fafbfcfefdfeff => f9fafbfcfefdfeff -+ -+mtvsrd: 0102030405060708 => 0102030405060708 -+mtvsrd: 090a0b0c0e0d0e0f => 090a0b0c0e0d0e0f -+mtvsrd: f1f2f3f4f5f6f7f8 => f1f2f3f4f5f6f7f8 -+mtvsrd: f9fafbfcfefdfeff => f9fafbfcfefdfeff -+ -+mtfprwa: 05060708 => 0000000005060708 -+mtfprwa: 0e0d0e0f => 000000000e0d0e0f -+mtfprwa: f5f6f7f8 => fffffffff5f6f7f8 -+mtfprwa: fefdfeff => fffffffffefdfeff -+ -+vaddudm: 0102030405060708 @@ 0102030405060708, ==> 020406080a0c0e10 -+ 090a0b0c0e0d0e0f @@ 090a0b0c0e0d0e0f, ==> 121416181c1a1c1e -+vaddudm: 0102030405060708 @@ f1f2f3f4f5f6f7f8, ==> f2f4f6f8fafcff00 -+ 090a0b0c0e0d0e0f @@ f9fafbfcfefdfeff, ==> 030507090d0b0d0e -+vaddudm: f1f2f3f4f5f6f7f8 @@ 0102030405060708, ==> f2f4f6f8fafcff00 -+ f9fafbfcfefdfeff @@ 090a0b0c0e0d0e0f, ==> 030507090d0b0d0e -+vaddudm: f1f2f3f4f5f6f7f8 @@ f1f2f3f4f5f6f7f8, ==> e3e5e7e9ebedeff0 -+ f9fafbfcfefdfeff @@ f9fafbfcfefdfeff, ==> f3f5f7f9fdfbfdfe -+ -+vpkudum: Inputs: 05060708 0e0d0e0f 05060708 0e0d0e0f -+ Output: 05060708 0e0d0e0f 05060708 0e0d0e0f -+vpkudum: Inputs: 05060708 0e0d0e0f f5f6f7f8 fefdfeff -+ Output: 05060708 0e0d0e0f f5f6f7f8 fefdfeff -+vpkudum: Inputs: f5f6f7f8 fefdfeff 05060708 0e0d0e0f -+ Output: f5f6f7f8 fefdfeff 05060708 0e0d0e0f -+vpkudum: Inputs: f5f6f7f8 fefdfeff f5f6f7f8 fefdfeff -+ Output: f5f6f7f8 fefdfeff f5f6f7f8 fefdfeff -+ -+All done. Tested 5 different instructions -diff --git a/none/tests/ppc64/jm_vec_isa_2_07.vgtest b/none/tests/ppc64/jm_vec_isa_2_07.vgtest -new file mode 100644 -index 0000000..a93060a ---- /dev/null -+++ b/none/tests/ppc64/jm_vec_isa_2_07.vgtest -@@ -0,0 +1,2 @@ -+prereq: ../../../tests/check_isa-2_07_cap -+prog: test_isa_2_07_part1 -a -diff --git a/none/tests/ppc64/test_isa_2_07_part1.c b/none/tests/ppc64/test_isa_2_07_part1.c -new file mode 100644 -index 0000000..8606c62 ---- /dev/null -+++ b/none/tests/ppc64/test_isa_2_07_part1.c -@@ -0,0 +1,746 @@ -+ -+/* HOW TO COMPILE: -+ -+ * 32bit build: -+ gcc -Winline -Wall -g -O -mregnames -maltivec -+ * 64bit build: -+ gcc -Winline -Wall -g -O -mregnames -maltivec -m64 -+ -+ -+ * jm_insns_isa_2_07.c: -+ * PPC tests for the ISA 2.07. This file is based on the -+ * jm-insns.c file for the new instructions in the ISA 2.07. The -+ * test structure has been kept the same as the original file to -+ * the extent possible. -+ * -+ * Copyright (C) 2013 IBM -+ * -+ * Authors: Carl Love -+ * Maynard Johnson -+ * -+ * 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 -+ * -+ */ -+ -+/* -+ * Operation details -+ * ----------------- -+ * -+ * The 'loops' (e.g. int_loops) do the actual work: -+ * - loops over as many arguments as the insn needs (regs | imms) -+ * - sets up the environment (reset cr,xer, assign src regs...) -+ * - maybe modifies the asm instn to test different imm args -+ * - calls the test function -+ * - retrieves relevant register data (rD,cr,xer,...) -+ * - prints argument and result data. -+ * -+ * More specifically... -+ * -+ * all_tests[i] holds insn tests -+ * - of which each holds: {instn_test_arr[], description, flags} -+ * -+ * flags hold 3 instn classifiers: {family, type, arg_type} -+ * -+ * // The main test loop: -+ * do_tests( user_ctl_flags ) { -+ * foreach(curr_test = all_test[i]) { -+ * -+ * // flags are used to control what tests are run: -+ * if (curr_test->flags && !user_ctl_flags) -+ * continue; -+ * -+ * // a 'loop_family_arr' is chosen based on the 'family' flag... -+ * switch(curr_test->flags->family) { -+ * case x: loop_family_arr = int_loops; -+ * ... -+ * } -+ * -+ * // ...and the actual test_loop to run is found by indexing into -+ * // the loop_family_arr with the 'arg_type' flag: -+ * test_loop = loop_family[curr_test->flags->arg_type] -+ * -+ * // finally, loop over all instn tests for this test: -+ * foreach (instn_test = curr_test->instn_test_arr[i]) { -+ * -+ * // and call the test_loop with the current instn_test function,name -+ * test_loop( instn_test->func, instn_test->name ) -+ * } -+ * } -+ * } -+ * -+ */ -+ -+ -+/**********************************************************************/ -+ -+/* Uncomment to enable output of CR flags for float tests */ -+//#define TEST_FLOAT_FLAGS -+ -+/* Uncomment to enable debug output */ -+//#define DEBUG_ARGS_BUILD -+//#define DEBUG_FILTER -+ -+/**********************************************************************/ -+#include -+ -+#ifdef HAS_ISA_2_07 -+ -+#include "config.h" -+#include -+#include -+ -+#include -+#include // isspace -+#include -+#include -+#include // getopt -+ -+#if !defined (__TEST_PPC_H__) -+#define __TEST_PPC_H__ -+ -+#include "tests/sys_mman.h" -+#include "tests/malloc.h" // memalign16 -+ -+#define STATIC_ASSERT(e) sizeof(struct { int:-!(e); }) -+ -+/* Something of the same size as void*, so can be safely be coerced -+ * to/from a pointer type. Also same size as the host's gp registers. -+ * According to the AltiVec section of the GCC manual, the syntax does -+ * not allow the use of a typedef name as a type specifier in conjunction -+ * with the vector keyword, so typedefs uint[32|64]_t are #undef'ed here -+ * and redefined using #define. -+ */ -+#undef uint32_t -+#undef uint64_t -+#define uint32_t unsigned int -+#define uint64_t unsigned long long int -+ -+#ifndef __powerpc64__ -+typedef uint32_t HWord_t; -+#else -+typedef uint64_t HWord_t; -+#endif /* __powerpc64__ */ -+ -+typedef uint64_t Word_t; -+ -+enum { -+ compile_time_test1 = STATIC_ASSERT(sizeof(uint32_t) == 4), -+ compile_time_test2 = STATIC_ASSERT(sizeof(uint64_t) == 8), -+}; -+ -+#define ALLCR "cr0","cr1","cr2","cr3","cr4","cr5","cr6","cr7" -+ -+#define SET_CR(_arg) \ -+ __asm__ __volatile__ ("mtcr %0" : : "b"(_arg) : ALLCR ); -+ -+#define SET_XER(_arg) \ -+ __asm__ __volatile__ ("mtxer %0" : : "b"(_arg) : "xer" ); -+ -+#define GET_CR(_lval) \ -+ __asm__ __volatile__ ("mfcr %0" : "=b"(_lval) ) -+ -+#define GET_XER(_lval) \ -+ __asm__ __volatile__ ("mfxer %0" : "=b"(_lval) ) -+ -+#define GET_CR_XER(_lval_cr,_lval_xer) \ -+ do { GET_CR(_lval_cr); GET_XER(_lval_xer); } while (0) -+ -+#define SET_CR_ZERO \ -+ SET_CR(0) -+ -+#define SET_XER_ZERO \ -+ SET_XER(0) -+ -+#define SET_CR_XER_ZERO \ -+ do { SET_CR_ZERO; SET_XER_ZERO; } while (0) -+ -+#define SET_FPSCR_ZERO \ -+ do { double _d = 0.0; \ -+ __asm__ __volatile__ ("mtfsf 0xFF, %0" : : "f"(_d) ); \ -+ } while (0) -+ -+#define DEFAULT_VSCR 0x0 -+ -+static vector unsigned long long vec_out, vec_inA, vec_inB; -+ -+/* XXXX these must all be callee-save regs! */ -+register double f14 __asm__ ("fr14"); -+register double f15 __asm__ ("fr15"); -+register double f16 __asm__ ("fr16"); -+register double f17 __asm__ ("fr17"); -+register HWord_t r14 __asm__ ("r14"); -+register HWord_t r17 __asm__ ("r17"); -+ -+typedef void (*test_func_t) (void); -+typedef struct _test test_t; -+typedef struct _test_table test_table_t; -+struct _test { -+ test_func_t func; -+ const char *name; -+}; -+ -+struct _test_table { -+ test_t *tests; -+ const char *name; -+ uint32_t flags; -+}; -+ -+typedef void (*test_loop_t) (const char *name, test_func_t func, -+ uint32_t flags); -+ -+enum test_flags { -+ /* Nb arguments */ -+ PPC_ONE_ARG = 0x00000001, -+ PPC_TWO_ARGS = 0x00000002, -+ PPC_THREE_ARGS = 0x00000003, -+ PPC_CMP_ARGS = 0x00000004, // family: compare -+ PPC_CMPI_ARGS = 0x00000005, // family: compare -+ PPC_TWO_I16 = 0x00000006, // family: arith/logical -+ PPC_SPECIAL = 0x00000007, // family: logical -+ PPC_LD_ARGS = 0x00000008, // family: ldst -+ PPC_LDX_ARGS = 0x00000009, // family: ldst -+ PPC_ST_ARGS = 0x0000000A, // family: ldst -+ PPC_STX_ARGS = 0x0000000B, // family: ldst -+ PPC_STQ_ARGS = 0x0000000C, // family: ldst, two args, imm -+ PPC_LDQ_ARGS = 0x0000000D, // family: ldst, two args, imm -+ PPC_STQX_ARGS = 0x0000000E, // family: ldst, three args -+ PPC_LDQX_ARGS = 0x0000000F, // family: ldst, three_args -+ PPC_NB_ARGS = 0x0000000F, -+ /* Type */ -+ PPC_ARITH = 0x00000100, -+ PPC_LOGICAL = 0x00000200, -+ PPC_COMPARE = 0x00000300, -+ PPC_CROP = 0x00000400, -+ PPC_LDST = 0x00000500, -+ PPC_POPCNT = 0x00000600, -+ PPC_MOV = 0x00000A00, -+ PPC_TYPE = 0x00000F00, -+ /* Family */ -+ PPC_INTEGER = 0x00010000, -+ PPC_FLOAT = 0x00020000, -+ PPC_405 = 0x00030000, // Leave so we keep numbering consistent -+ PPC_ALTIVEC = 0x00040000, -+ PPC_FALTIVEC = 0x00050000, -+ PPC_FAMILY = 0x000F0000, -+ /* Flags: these may be combined, so use separate bitfields. */ -+ PPC_CR = 0x01000000, -+ PPC_XER_CA = 0x02000000, -+}; -+ -+#endif /* !defined (__TEST_PPC_H__) */ -+ -+/* -------------- END #include "test-ppc.h" -------------- */ -+ -+ -+#if defined (DEBUG_ARGS_BUILD) -+#define AB_DPRINTF(fmt, args...) do { fprintf(stderr, fmt , ##args); } while (0) -+#else -+#define AB_DPRINTF(fmt, args...) do { } while (0) -+#endif -+ -+#if defined (DEBUG_FILTER) -+#define FDPRINTF(fmt, args...) do { fprintf(stderr, fmt , ##args); } while (0) -+#else -+#define FDPRINTF(fmt, args...) do { } while (0) -+#endif -+ -+#define unused __attribute__ (( unused )) -+ -+typedef struct special { -+ const char *name; -+ void (*test_cb)(const char* name, test_func_t func, -+ unused uint32_t test_flags); -+} special_t; -+ -+ -+// VSX move instructions -+static void test_mfvsrd (void) -+{ -+ __asm__ __volatile__ ("mfvsrd %0,%x1" : "=r" (r14) : "ws" (vec_inA)); -+}; -+ -+static void test_mtvsrd (void) -+{ -+ __asm__ __volatile__ ("mtvsrd %x0,%1" : "=ws" (vec_out) : "r" (r14)); -+}; -+ -+static void test_mtfprwa (void) -+{ -+ __asm__ __volatile__ ("mtfprwa %x0,%1" : "=ws" (vec_out) : "r" (r14)); -+}; -+ -+static test_t tests_move_ops_spe[] = { -+ { &test_mfvsrd , "mfvsrd" }, -+ { &test_mtvsrd , "mtvsrd" }, -+ { &test_mtfprwa , "mtfprwa" }, -+ { NULL, NULL } -+}; -+ -+/* Vector Double Word tests. -+ * NOTE: Since these are "vector" instructions versus VSX, we must use -+ * vector constraints. */ -+static void test_vaddudm (void) -+{ -+ __asm__ __volatile__ ("vaddudm %0, %1, %2" : "=v" (vec_out): "v" (vec_inA),"v" (vec_inB)); -+} -+ -+static void test_vpkudum (void) -+{ -+ __asm__ __volatile__ ("vpkudum %0, %1, %2" : "=v" (vec_out): "v" (vec_inA),"v" (vec_inB)); -+} -+ -+static test_t tests_aa_dbl_ops_two[] = { -+ { &test_vaddudm , "vaddudm", }, -+ { &test_vpkudum , "vpkudum", }, -+ { NULL, NULL, }, -+}; -+ -+static int verbose = 0; -+static int arg_list_size = 0; -+static unsigned long long * vdargs = NULL; -+#define NB_VDARGS 4 -+ -+static void build_vdargs_table (void) -+{ -+ // Each VSX register holds two doubleword integer values -+ vdargs = memalign16(NB_VDARGS * sizeof(unsigned long long)); -+ vdargs[0] = 0x0102030405060708ULL; -+ vdargs[1] = 0x090A0B0C0E0D0E0FULL; -+ vdargs[2] = 0xF1F2F3F4F5F6F7F8ULL; -+ vdargs[3] = 0xF9FAFBFCFEFDFEFFULL; -+} -+ -+static int check_filter (char *filter) -+{ -+ char *c; -+ int ret = 1; -+ -+ if (filter != NULL) { -+ c = strchr(filter, '*'); -+ if (c != NULL) { -+ *c = '\0'; -+ ret = 0; -+ } -+ } -+ return ret; -+} -+ -+static int check_name (const char* name, const char *filter, -+ int exact) -+{ -+ int nlen, flen; -+ int ret = 0; -+ -+ if (filter != NULL) { -+ for (; isspace(*name); name++) -+ continue; -+ FDPRINTF("Check '%s' againt '%s' (%s match)\n", -+ name, filter, exact ? "exact" : "starting"); -+ nlen = strlen(name); -+ flen = strlen(filter); -+ if (exact) { -+ if (nlen == flen && memcmp(name, filter, flen) == 0) -+ ret = 1; -+ } else { -+ if (flen <= nlen && memcmp(name, filter, flen) == 0) -+ ret = 1; -+ } -+ } else { -+ ret = 1; -+ } -+ return ret; -+} -+ -+ -+typedef struct insn_sel_flags_t_struct { -+ int one_arg, two_args, three_args; -+ int arith, logical, compare, ldst; -+ int integer, floats, altivec, faltivec; -+ int cr; -+} insn_sel_flags_t; -+ -+ -+static void mfvs(const char* name, test_func_t func, -+ unused uint32_t test_flags) -+{ -+ /* This test is for move instructions where the input is a scalar register -+ * and the destination is a vector register. -+ */ -+ int i; -+ volatile Word_t result; -+ -+ for (i=0; i < NB_VDARGS; i++) { -+ r14 = 0ULL; -+ vec_inA = (vector unsigned long long){ vdargs[i], 0ULL }; -+ -+ (*func)(); -+ result = r14; -+ printf("%s: %016llx => %016llx\n", name, vdargs[i], result); -+ } -+} -+ -+static void mtvs(const char* name, test_func_t func, -+ unused uint32_t test_flags) -+{ -+ /* This test is for move instructions where the input is a scalar register -+ * and the destination is a vector register. -+ */ -+ unsigned long long *dst; -+ int i; -+ -+ for (i=0; i < NB_VDARGS; i++) { -+ r14 = vdargs[i]; -+ vec_out = (vector unsigned long long){ 0ULL, 0ULL }; -+ -+ (*func)(); -+ dst = (unsigned long long *) &vec_out; -+ printf("%s: %016llx => %016llx\n", name, vdargs[i], *dst); -+ } -+} -+ -+static void mtvs2s(const char* name, test_func_t func, -+ unused uint32_t test_flags) -+{ -+ /* This test is the mtvsrwa instruction. -+ */ -+ unsigned long long *dst; -+ int i; -+ -+ for (i=0; i < NB_VDARGS; i++) { -+ // Only the lower half of the vdarg doubleword arg will be used as input by mtvsrwa -+ unsigned int * src = (unsigned int *)&vdargs[i]; -+ src++; -+ r14 = vdargs[i]; -+ vec_out = (vector unsigned long long){ 0ULL, 0ULL }; -+ -+ (*func)(); -+ // Only doubleword 0 is used in output -+ dst = (unsigned long long *) &vec_out; -+ printf("%s: %08x => %016llx\n", name, *src, *dst); -+ } -+} -+ -+static void test_special (special_t *table, -+ const char* name, test_func_t func, -+ unused uint32_t test_flags) -+{ -+ const char *tmp; -+ int i; -+ -+ for (tmp = name; isspace(*tmp); tmp++) -+ continue; -+ for (i=0; table[i].name != NULL; i++) { -+ if (strcmp(table[i].name, tmp) == 0) { -+ (*table[i].test_cb)(name, func, test_flags); -+ return; -+ } -+ } -+ fprintf(stderr, "ERROR: no test found for op '%s'\n", name); -+} -+ -+static special_t special_move_ops[] = { -+ { -+ "mfvsrd", /* move from vector to scalar reg */ -+ &mfvs, -+ }, -+ { -+ "mtvsrd", /* move from scalar to vector reg */ -+ &mtvs, -+ }, -+ { -+ "mtfprwa", /* (extended mnemonic for mtvsrwa) move from scalar to vector reg with two’s-complement */ -+ &mtvs2s, -+ }, -+}; -+ -+static void test_move_special(const char* name, test_func_t func, -+ uint32_t test_flags) -+{ -+ test_special(special_move_ops, name, func, test_flags); -+} -+ -+/* Vector Double Word tests */ -+ -+static void test_av_dint_two_args (const char* name, test_func_t func, -+ unused uint32_t test_flags) -+{ -+ -+ unsigned long long * dst; -+ unsigned int * dst_int; -+ int i,j; -+ int is_vpkudum; -+ if (strcmp(name, "vpkudum") == 0) -+ is_vpkudum = 1; -+ else -+ is_vpkudum = 0; -+ -+ for (i = 0; i < NB_VDARGS; i+=2) { -+ vec_inA = (vector unsigned long long){ vdargs[i], vdargs[i+1] }; -+ for (j = 0; j < NB_VDARGS; j+=2) { -+ vec_inB = (vector unsigned long long){ vdargs[j], vdargs[j+1] }; -+ vec_out = (vector unsigned long long){ 0,0 }; -+ -+ (*func)(); -+ dst_int = (unsigned int *)&vec_out; -+ dst = (unsigned long long*)&vec_out; -+ -+ printf("%s: ", name); -+ -+ if (is_vpkudum) { -+ printf("Inputs: %08llx %08llx %08llx %08llx\n", vdargs[i] & 0x00000000ffffffffULL, -+ vdargs[i+1] & 0x00000000ffffffffULL, vdargs[j] & 0x00000000ffffffffULL, -+ vdargs[j+1] & 0x00000000ffffffffULL); -+ printf(" Output: %08x %08x %08x %08x\n", dst_int[0], dst_int[1], -+ dst_int[2], dst_int[3]); -+ } else { -+ printf("%016llx @@ %016llx, ", vdargs[i], vdargs[j]); -+ printf(" ==> %016llx\n", dst[0]); -+ printf("\t%016llx @@ %016llx, ", vdargs[i+1], vdargs[j+1]); -+ printf(" ==> %016llx\n", dst[1]); -+ } -+ } -+ } -+} -+ -+/* Used in do_tests, indexed by flags->nb_args -+ Elements correspond to enum test_flags::num args -+*/ -+static test_loop_t altivec_mov_loops[] = { -+ &test_move_special, -+ NULL -+}; -+ -+static test_loop_t altivec_dint_loops[] = { -+ &test_av_dint_two_args, -+ NULL -+}; -+ -+static test_table_t all_tests[] = { -+ { -+ tests_move_ops_spe, -+ "PPC VSR special move insns", -+ PPC_ALTIVEC | PPC_MOV | PPC_ONE_ARG, -+ }, -+ { -+ tests_aa_dbl_ops_two, -+ "PC altivec double word integer insns with two args", -+ PPC_ALTIVEC | PPC_ARITH | PPC_TWO_ARGS, -+ }, -+ { NULL, NULL, 0x00000000, }, -+}; -+ -+static void do_tests ( insn_sel_flags_t seln_flags, -+ char *filter) -+{ -+ test_loop_t *loop; -+ test_t *tests; -+ int nb_args, type, family; -+ int i, j, n; -+ int exact; -+ -+ exact = check_filter(filter); -+ n = 0; -+ for (i=0; all_tests[i].name != NULL; i++) { -+ nb_args = all_tests[i].flags & PPC_NB_ARGS; -+ -+ /* Check number of arguments */ -+ if ((nb_args == 1 && !seln_flags.one_arg) || -+ (nb_args == 2 && !seln_flags.two_args) || -+ (nb_args == 3 && !seln_flags.three_args)){ -+ continue; -+ } -+ /* Check instruction type */ -+ type = all_tests[i].flags & PPC_TYPE; -+ if ((type == PPC_ARITH && !seln_flags.arith) || -+ (type == PPC_LOGICAL && !seln_flags.logical) || -+ (type == PPC_COMPARE && !seln_flags.compare) || -+ (type == PPC_LDST && !seln_flags.ldst) || -+ (type == PPC_MOV && !seln_flags.ldst) || -+ (type == PPC_POPCNT && !seln_flags.arith)) { -+ continue; -+ } -+ -+ /* Check instruction family */ -+ family = all_tests[i].flags & PPC_FAMILY; -+ if ((family == PPC_INTEGER && !seln_flags.integer) || -+ (family == PPC_FLOAT && !seln_flags.floats) || -+ (family == PPC_ALTIVEC && !seln_flags.altivec) || -+ (family == PPC_FALTIVEC && !seln_flags.faltivec)) { -+ continue; -+ } -+ /* Check flags update */ -+ if (((all_tests[i].flags & PPC_CR) && seln_flags.cr == 0) || -+ (!(all_tests[i].flags & PPC_CR) && seln_flags.cr == 1)) -+ continue; -+ -+ /* All passed, do the tests */ -+ tests = all_tests[i].tests; -+ -+ loop = NULL; -+ -+ /* Select the test loop */ -+ switch (family) { -+ case PPC_INTEGER: -+ printf("Currently there are no integer tests enabled in this testsuite.\n"); -+ break; -+ -+ case PPC_FLOAT: -+ printf("Currently there are no float tests enabled in this testsuite.\n"); -+ break; -+ -+ case PPC_ALTIVEC: -+ switch (type) { -+ case PPC_MOV: -+ loop = &altivec_mov_loops[0]; -+ break; -+ case PPC_ARITH: -+ loop = &altivec_dint_loops[0]; -+ break; -+ default: -+ printf("No altivec test defined for type %x\n", type); -+ } -+ break; -+ -+ case PPC_FALTIVEC: -+ printf("Currently there are no floating altivec tests in this testsuite.\n"); -+ break; -+ -+ default: -+ printf("ERROR: unknown insn family %08x\n", family); -+ continue; -+ } -+ if (1 || verbose > 0) -+ for (j=0; tests[j].name != NULL; j++) { -+ if (check_name(tests[j].name, filter, exact)) { -+ if (verbose > 1) -+ printf("Test instruction %s\n", tests[j].name); -+ if (loop != NULL) -+ (*loop)(tests[j].name, tests[j].func, all_tests[i].flags); -+ printf("\n"); -+ n++; -+ } -+ } -+ if (verbose) printf("\n"); -+ } -+ printf("All done. Tested %d different instructions\n", n); -+} -+ -+ -+static void usage (void) -+{ -+ fprintf(stderr, -+ "Usage: jm-insns [OPTION]\n" -+ "\t-i: test integer instructions (default)\n" -+ "\t-f: test floating point instructions\n" -+ "\t-a: test altivec instructions\n" -+ "\t-A: test all (int, fp, altivec) instructions\n" -+ "\t-v: be verbose\n" -+ "\t-h: display this help and exit\n" -+ ); -+} -+ -+#endif -+ -+int main (int argc, char **argv) -+{ -+#ifdef HAS_ISA_2_07 -+ /* Simple usage: -+ ./jm-insns -i => int insns -+ ./jm-insns -f => fp insns -+ ./jm-insns -a => av insns -+ ./jm-insns -A => int, fp and avinsns -+ */ -+ char *filter = NULL; -+ insn_sel_flags_t flags; -+ int c; -+ -+ // Args -+ flags.one_arg = 1; -+ flags.two_args = 1; -+ flags.three_args = 1; -+ // Type -+ flags.arith = 1; -+ flags.logical = 1; -+ flags.compare = 1; -+ flags.ldst = 1; -+ // Family -+ flags.integer = 0; -+ flags.floats = 0; -+ flags.altivec = 0; -+ flags.faltivec = 0; -+ // Flags -+ flags.cr = 2; -+ -+ while ((c = getopt(argc, argv, "ifahvA")) != -1) { -+ switch (c) { -+ case 'i': -+ flags.integer = 1; -+ break; -+ case 'f': -+ flags.floats = 1; -+ break; -+ case 'a': -+ flags.altivec = 1; -+ flags.faltivec = 1; -+ break; -+ case 'A': -+ flags.integer = 1; -+ flags.floats = 1; -+ flags.altivec = 1; -+ flags.faltivec = 1; -+ break; -+ case 'h': -+ usage(); -+ return 0; -+ case 'v': -+ verbose++; -+ break; -+ default: -+ usage(); -+ fprintf(stderr, "Unknown argument: '%c'\n", c); -+ return 1; -+ } -+ } -+ -+ arg_list_size = 0; -+ -+ build_vdargs_table(); -+ if (verbose > 1) { -+ printf("\nInstruction Selection:\n"); -+ printf(" n_args: \n"); -+ printf(" one_arg = %d\n", flags.one_arg); -+ printf(" two_args = %d\n", flags.two_args); -+ printf(" three_args = %d\n", flags.three_args); -+ printf(" type: \n"); -+ printf(" arith = %d\n", flags.arith); -+ printf(" logical = %d\n", flags.logical); -+ printf(" compare = %d\n", flags.compare); -+ printf(" ldst = %d\n", flags.ldst); -+ printf(" family: \n"); -+ printf(" integer = %d\n", flags.integer); -+ printf(" floats = %d\n", flags.floats); -+ printf(" altivec = %d\n", flags.altivec); -+ printf(" faltivec = %d\n", flags.faltivec); -+ printf(" cr update: \n"); -+ printf(" cr = %d\n", flags.cr); -+ printf("\n"); -+ } -+ -+ do_tests( flags, filter ); -+#else -+ printf("NO ISA 2.07 SUPPORT\n"); -+#endif -+ return 0; -+} -diff --git a/none/tests/ppc64/test_isa_2_07_part2.c b/none/tests/ppc64/test_isa_2_07_part2.c -new file mode 100644 -index 0000000..92e190c ---- /dev/null -+++ b/none/tests/ppc64/test_isa_2_07_part2.c -@@ -0,0 +1,526 @@ -+/* Copyright (C) 2013 IBM -+ -+ Authors: Carl Love -+ Maynard Johnson -+ -+ 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. -+ -+ This program is based heavily on the test_isa_2_06_part*.c source files. -+ */ -+ -+#include -+ -+#ifdef HAS_ISA_2_07 -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#ifndef __powerpc64__ -+typedef uint32_t HWord_t; -+#else -+typedef uint64_t HWord_t; -+#endif /* __powerpc64__ */ -+ -+static int errors; -+register HWord_t r14 __asm__ ("r14"); -+register HWord_t r15 __asm__ ("r15"); -+register HWord_t r16 __asm__ ("r16"); -+register HWord_t r17 __asm__ ("r17"); -+register double f14 __asm__ ("fr14"); -+register double f15 __asm__ ("fr15"); -+register double f16 __asm__ ("fr16"); -+register double f17 __asm__ ("fr17"); -+ -+static volatile unsigned int cond_reg; -+ -+#define True 1 -+#define False 0 -+ -+#define ALLCR "cr0","cr1","cr2","cr3","cr4","cr5","cr6","cr7" -+ -+#define SET_CR(_arg) \ -+ __asm__ __volatile__ ("mtcr %0" : : "b"(_arg) : ALLCR ); -+ -+#define SET_XER(_arg) \ -+ __asm__ __volatile__ ("mtxer %0" : : "b"(_arg) : "xer" ); -+ -+#define GET_CR(_lval) \ -+ __asm__ __volatile__ ("mfcr %0" : "=b"(_lval) ) -+ -+#define GET_XER(_lval) \ -+ __asm__ __volatile__ ("mfxer %0" : "=b"(_lval) ) -+ -+#define GET_CR_XER(_lval_cr,_lval_xer) \ -+ do { GET_CR(_lval_cr); GET_XER(_lval_xer); } while (0) -+ -+#define SET_CR_ZERO \ -+ SET_CR(0) -+ -+#define SET_XER_ZERO \ -+ SET_XER(0) -+ -+#define SET_CR_XER_ZERO \ -+ do { SET_CR_ZERO; SET_XER_ZERO; } while (0) -+ -+#define SET_FPSCR_ZERO \ -+ do { double _d = 0.0; \ -+ __asm__ __volatile__ ("mtfsf 0xFF, %0" : : "f"(_d) ); \ -+ } while (0) -+ -+ -+typedef void (*test_func_t)(void); -+typedef struct vsx_logic_test logic_test_t; -+typedef struct ldst_test ldst_test_t; -+typedef struct xs_conv_test xs_conv_test_t; -+typedef struct vx_fp_test vx_fp_test_t; -+typedef struct vx_fp_test2 vx_fp_test2_t; -+typedef struct test_table test_table_t; -+ -+typedef unsigned char Bool; -+ -+ -+/* These functions below that construct a table of floating point -+ * values were lifted from none/tests/ppc32/jm-insns.c. -+ */ -+ -+#if defined (DEBUG_ARGS_BUILD) -+#define AB_DPRINTF(fmt, args...) do { fprintf(stderr, fmt , ##args); } while (0) -+#else -+#define AB_DPRINTF(fmt, args...) do { } while (0) -+#endif -+ -+static inline void register_farg (void *farg, -+ int s, uint16_t _exp, uint64_t mant) -+{ -+ uint64_t tmp; -+ -+ tmp = ((uint64_t)s << 63) | ((uint64_t)_exp << 52) | mant; -+ *(uint64_t *)farg = tmp; -+ AB_DPRINTF("%d %03x %013llx => %016llx %0e\n", -+ s, _exp, mant, *(uint64_t *)farg, *(double *)farg); -+} -+ -+ -+typedef struct fp_test_args { -+ int fra_idx; -+ int frb_idx; -+ int cr_flags; -+ unsigned long long dp_bin_result; -+} fp_test_args_t; -+ -+static int nb_special_fargs; -+static double * spec_fargs; -+static float * spec_sp_fargs; -+ -+static void build_special_fargs_table(void) -+{ -+ /* The special floating point values created below are for -+ * use in the ftdiv tests for setting the fe_flag and fg_flag, -+ * but they can also be used for other tests (e.g., xscmpudp). -+ * -+ * Note that fl_flag is 'always '1' on ppc64 Linux. -+ * -+ Entry Sign Exp fraction Special value -+ 0 0 3fd 0x8000000000000ULL Positive finite number -+ 1 0 404 0xf000000000000ULL ... -+ 2 0 001 0x8000000b77501ULL ... -+ 3 0 7fe 0x800000000051bULL ... -+ 4 0 012 0x3214569900000ULL ... -+ 5 0 000 0x0000000000000ULL +0.0 (+zero) -+ 6 1 000 0x0000000000000ULL -0.0 (-zero) -+ 7 0 7ff 0x0000000000000ULL +infinity -+ 8 1 7ff 0x0000000000000ULL -infinity -+ 9 0 7ff 0x7FFFFFFFFFFFFULL +QNaN -+ 10 1 7ff 0x7FFFFFFFFFFFFULL -QNaN -+ 11 0 7ff 0x8000000000000ULL +SNaN -+ 12 1 7ff 0x8000000000000ULL -SNaN -+ 13 1 000 0x8340000078000ULL Denormalized val (zero exp and non-zero fraction) -+ 14 1 40d 0x0650f5a07b353ULL Negative finite number -+ */ -+ -+ uint64_t mant; -+ uint16_t _exp; -+ int s; -+ int j, i = 0; -+ -+ if (spec_fargs) -+ return; -+ -+ spec_fargs = malloc( 20 * sizeof(double) ); -+ spec_sp_fargs = malloc( 20 * sizeof(float) ); -+ -+ // #0 -+ s = 0; -+ _exp = 0x3fd; -+ mant = 0x8000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #1 -+ s = 0; -+ _exp = 0x404; -+ mant = 0xf000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #2 -+ s = 0; -+ _exp = 0x001; -+ mant = 0x8000000b77501ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #3 -+ s = 0; -+ _exp = 0x7fe; -+ mant = 0x800000000051bULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #4 -+ s = 0; -+ _exp = 0x012; -+ mant = 0x3214569900000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* Special values */ -+ /* +0.0 : 0 0x000 0x0000000000000 */ -+ // #5 -+ s = 0; -+ _exp = 0x000; -+ mant = 0x0000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* -0.0 : 1 0x000 0x0000000000000 */ -+ // #6 -+ s = 1; -+ _exp = 0x000; -+ mant = 0x0000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* +infinity : 0 0x7FF 0x0000000000000 */ -+ // #7 -+ s = 0; -+ _exp = 0x7FF; -+ mant = 0x0000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* -infinity : 1 0x7FF 0x0000000000000 */ -+ // #8 -+ s = 1; -+ _exp = 0x7FF; -+ mant = 0x0000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* +QNaN : 0 0x7FF 0x7FFFFFFFFFFFF */ -+ // #9 -+ s = 0; -+ _exp = 0x7FF; -+ mant = 0x7FFFFFFFFFFFFULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* -QNaN : 1 0x7FF 0x7FFFFFFFFFFFF */ -+ // #10 -+ s = 1; -+ _exp = 0x7FF; -+ mant = 0x7FFFFFFFFFFFFULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* +SNaN : 0 0x7FF 0x8000000000000 */ -+ // #11 -+ s = 0; -+ _exp = 0x7FF; -+ mant = 0x8000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* -SNaN : 1 0x7FF 0x8000000000000 */ -+ // #12 -+ s = 1; -+ _exp = 0x7FF; -+ mant = 0x8000000000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* denormalized value */ -+ // #13 -+ s = 1; -+ _exp = 0x000; -+ mant = 0x8340000078000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* Negative finite number */ -+ // #14 -+ s = 1; -+ _exp = 0x40d; -+ mant = 0x0650f5a07b353ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ /* A few positive finite numbers ... */ -+ // #15 -+ s = 0; -+ _exp = 0x412; -+ mant = 0x32585a9900000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #16 -+ s = 0; -+ _exp = 0x413; -+ mant = 0x82511a2000000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #17 -+ s = 0; -+ _exp = 0x403; -+ mant = 0x12ef5a9300000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #18 -+ s = 0; -+ _exp = 0x405; -+ mant = 0x14bf5d2300000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ // #19 -+ s = 0; -+ _exp = 0x409; -+ mant = 0x76bf982440000ULL; -+ register_farg(&spec_fargs[i++], s, _exp, mant); -+ -+ -+ nb_special_fargs = i; -+ for (j = 0; j < i; j++) { -+ spec_sp_fargs[j] = spec_fargs[j]; -+ } -+} -+ -+struct test_table -+{ -+ test_func_t test_category; -+ char * name; -+}; -+ -+ -+typedef enum { -+ SINGLE_TEST, -+ DOUBLE_TEST, -+ DOUBLE_TEST_SINGLE_RES -+} precision_type_t; -+ -+typedef enum { -+ VX_FP_SMAS, // multiply add single precision result -+ VX_FP_SMSS, // multiply sub single precision result -+ VX_FP_SNMAS, // negative multiply add single precision result -+ VX_FP_SNMSS, // negative multiply sub single precision result -+ VX_FP_OTHER, -+ VX_CONV_WORD, -+ VX_ESTIMATE, -+ VX_CONV_TO_SINGLE, -+ VX_CONV_TO_DOUBLE, -+ VX_SCALAR_CONV_TO_WORD, -+ VX_DEFAULT -+} vx_fp_test_type; -+ -+ -+struct vx_fp_test2 -+{ -+ test_func_t test_func; -+ const char *name; -+ fp_test_args_t * targs; -+ int num_tests; -+ precision_type_t precision; -+ vx_fp_test_type test_type; -+ const char * op; -+}; -+ -+static vector unsigned int vec_out, vec_inB; -+ -+static void test_xscvdpspn(void) -+{ -+ __asm__ __volatile__ ("xscvdpspn %x0, %x1" : "=wa" (vec_out): "wa" (vec_inB)); -+} -+ -+static void test_xscvspdpn(void) -+{ -+ __asm__ __volatile__ ("xscvspdpn %x0, %x1" : "=wa" (vec_out): "wa" (vec_inB)); -+} -+static vx_fp_test2_t -+vsx_one_fp_arg_tests[] = { -+ { &test_xscvdpspn, "xscvdpspn", NULL, 20, DOUBLE_TEST, VX_CONV_TO_SINGLE, "conv"}, -+ { &test_xscvspdpn, "xscvspdpn", NULL, 20, SINGLE_TEST, VX_CONV_TO_DOUBLE, "conv"}, -+ { NULL, NULL, NULL, 0, 0, 0, NULL} -+}; -+ -+ -+static void test_vsx_one_fp_arg(void) -+{ -+ test_func_t func; -+ int k; -+ k = 0; -+ build_special_fargs_table(); -+ -+ while ((func = vsx_one_fp_arg_tests[k].test_func)) { -+ int idx, i; -+ vx_fp_test2_t test_group = vsx_one_fp_arg_tests[k]; -+ /* size of source operands */ -+ Bool dp = ((test_group.precision == DOUBLE_TEST) || -+ (test_group.precision == DOUBLE_TEST_SINGLE_RES)) ? True : False; -+ /* size of result */ -+ Bool is_sqrt = (strstr(test_group.name, "sqrt")) ? True : False; -+ Bool is_scalar = (strstr(test_group.name, "xs")) ? True : False; -+ Bool sparse_sp = False; -+ int stride = dp ? 2 : 4; -+ int loops = is_scalar ? 1 : stride; -+ stride = is_scalar ? 1: stride; -+ -+ /* For conversions of single to double, the 128-bit input register is sparsely populated: -+ * |___ SP___|_Unused_|___SP___|__Unused__| // for vector op -+ * or -+ * |___ SP___|_Unused_|_Unused_|__Unused__| // for scalar op -+ * -+ * For the vector op case, we need to adjust stride from '4' to '2', since -+ * we'll only be loading two values per loop into the input register. -+ */ -+ if (!dp && !is_scalar && test_group.test_type == VX_CONV_TO_DOUBLE) { -+ sparse_sp = True; -+ stride = 2; -+ } -+ -+ for (i = 0; i < test_group.num_tests; i+=stride) { -+ unsigned int * pv; -+ void * inB; -+ -+ pv = (unsigned int *)&vec_out; -+ // clear vec_out -+ for (idx = 0; idx < 4; idx++, pv++) -+ *pv = 0; -+ -+ if (dp) { -+ int j; -+ unsigned long long * frB_dp, *dst_dp; -+ for (j = 0; j < loops; j++) { -+ inB = (void *)&spec_fargs[i + j]; -+ // copy double precision FP into vector element i -+ memcpy(((void *)&vec_inB) + (j * 8), inB, 8); -+ } -+ // execute test insn -+ (*func)(); -+ dst_dp = (unsigned long long *) &vec_out; -+ printf("#%d: %s ", i/stride, test_group.name); -+ for (j = 0; j < loops; j++) { -+ if (j) -+ printf("; "); -+ frB_dp = (unsigned long long *)&spec_fargs[i + j]; -+ printf("%s(%016llx)", test_group.op, *frB_dp); -+ vx_fp_test_type type = test_group.test_type; -+ switch (type) { -+ case VX_SCALAR_CONV_TO_WORD: -+ printf(" = %016llx", dst_dp[j] & 0x00000000ffffffffULL); -+ break; -+ case VX_CONV_TO_SINGLE: -+ printf(" = %016llx", dst_dp[j] & 0xffffffff00000000ULL); -+ break; -+ default: // For VX_CONV_TO_DOUBLE and non-convert instructions . . . -+ printf(" = %016llx", dst_dp[j]); -+ } -+ } -+ printf("\n"); -+ } else { -+ int j, skip_slot; -+ unsigned int * frB_sp, * dst_sp = NULL; -+ unsigned long long * dst_dp = NULL; -+ if (sparse_sp) { -+ skip_slot = 1; -+ loops = 2; -+ } else { -+ skip_slot = 0; -+ } -+ for (j = 0; j < loops; j++) { -+ inB = (void *)&spec_sp_fargs[i + j]; -+ // copy single precision FP into vector element i -+ -+ if (skip_slot && j > 0) -+ memcpy(((void *)&vec_inB) + ((j + j) * 4), inB, 4); -+ else -+ memcpy(((void *)&vec_inB) + (j * 4), inB, 4); -+ } -+ // execute test insn -+ (*func)(); -+ if (test_group.test_type == VX_CONV_TO_DOUBLE) -+ dst_dp = (unsigned long long *) &vec_out; -+ else -+ dst_sp = (unsigned int *) &vec_out; -+ // print result -+ printf("#%d: %s ", i/stride, test_group.name); -+ for (j = 0; j < loops; j++) { -+ if (j) -+ printf("; "); -+ frB_sp = (unsigned int *)&spec_sp_fargs[i + j]; -+ printf("%s(%08x)", test_group.op, *frB_sp); -+ if (test_group.test_type == VX_CONV_TO_DOUBLE) -+ printf(" = %016llx", dst_dp[j]); -+ else -+ /* Special case: Current VEX implementation for fsqrts (single precision) -+ * uses the same implementation as that used for double precision fsqrt. -+ * However, I've found that for xvsqrtsp, the result from that implementation -+ * may be off by the two LSBs. Generally, even this small inaccuracy can cause the -+ * output to appear very different if you end up with a carry. But for the given -+ * inputs in this testcase, we can simply mask out these bits. -+ */ -+ printf(" = %08x", is_sqrt ? (dst_sp[j] & 0xfffffffc) : dst_sp[j]); -+ } -+ printf("\n"); -+ } -+ } -+ k++; -+ printf( "\n" ); -+ } -+} -+ -+//---------------------------------------------------------- -+ -+static test_table_t all_tests[] = { -+ { &test_vsx_one_fp_arg, -+ "Test VSX vector and scalar single argument instructions"} , -+ { NULL, NULL } -+}; -+ -+#endif -+ -+int main(int argc, char *argv[]) -+{ -+ -+#ifdef HAS_ISA_2_07 -+ test_table_t aTest; -+ test_func_t func; -+ int i = 0; -+ -+ while ((func = all_tests[i].test_category)) { -+ aTest = all_tests[i]; -+ printf( "%s\n", aTest.name ); -+ (*func)(); -+ i++; -+ } -+ if (errors) -+ printf("Testcase FAILED with %d errors \n", errors); -+ else -+ printf("Testcase PASSED\n"); -+ -+#else -+ printf("NO ISA 2.07 SUPPORT\n"); -+#endif -+ return 0; -+} -diff --git a/none/tests/ppc64/test_isa_2_07_part2.stderr.exp b/none/tests/ppc64/test_isa_2_07_part2.stderr.exp -new file mode 100644 -index 0000000..139597f ---- /dev/null -+++ b/none/tests/ppc64/test_isa_2_07_part2.stderr.exp -@@ -0,0 +1,2 @@ -+ -+ -diff --git a/none/tests/ppc64/test_isa_2_07_part2.stdout.exp b/none/tests/ppc64/test_isa_2_07_part2.stdout.exp -new file mode 100644 -index 0000000..c65c574 ---- /dev/null -+++ b/none/tests/ppc64/test_isa_2_07_part2.stdout.exp -@@ -0,0 +1,44 @@ -+Test VSX vector and scalar single argument instructions -+#0: xscvdpspn conv(3fd8000000000000) = 3ec0000000000000 -+#1: xscvdpspn conv(404f000000000000) = 4278000000000000 -+#2: xscvdpspn conv(0018000000b77501) = 0000000000000000 -+#3: xscvdpspn conv(7fe800000000051b) = 7f40000000000000 -+#4: xscvdpspn conv(0123214569900000) = 0000000000000000 -+#5: xscvdpspn conv(0000000000000000) = 0000000000000000 -+#6: xscvdpspn conv(8000000000000000) = 8000000000000000 -+#7: xscvdpspn conv(7ff0000000000000) = 7f80000000000000 -+#8: xscvdpspn conv(fff0000000000000) = ff80000000000000 -+#9: xscvdpspn conv(7ff7ffffffffffff) = 7fbfffff00000000 -+#10: xscvdpspn conv(fff7ffffffffffff) = ffbfffff00000000 -+#11: xscvdpspn conv(7ff8000000000000) = 7fc0000000000000 -+#12: xscvdpspn conv(fff8000000000000) = ffc0000000000000 -+#13: xscvdpspn conv(8008340000078000) = 8000000000000000 -+#14: xscvdpspn conv(c0d0650f5a07b353) = c683287a00000000 -+#15: xscvdpspn conv(41232585a9900000) = 49192c2d00000000 -+#16: xscvdpspn conv(41382511a2000000) = 49c1288d00000000 -+#17: xscvdpspn conv(40312ef5a9300000) = 418977ad00000000 -+#18: xscvdpspn conv(40514bf5d2300000) = 428a5fae00000000 -+#19: xscvdpspn conv(40976bf982440000) = 44bb5fcc00000000 -+ -+#0: xscvspdpn conv(3ec00000) = 3fd8000000000000 -+#1: xscvspdpn conv(42780000) = 404f000000000000 -+#2: xscvspdpn conv(00000000) = 0000000000000000 -+#3: xscvspdpn conv(7f800000) = 7ff0000000000000 -+#4: xscvspdpn conv(00000000) = 0000000000000000 -+#5: xscvspdpn conv(00000000) = 0000000000000000 -+#6: xscvspdpn conv(80000000) = 8000000000000000 -+#7: xscvspdpn conv(7f800000) = 7ff0000000000000 -+#8: xscvspdpn conv(ff800000) = fff0000000000000 -+#9: xscvspdpn conv(7fffffff) = 7fffffffe0000000 -+#10: xscvspdpn conv(ffffffff) = ffffffffe0000000 -+#11: xscvspdpn conv(7fc00000) = 7ff8000000000000 -+#12: xscvspdpn conv(ffc00000) = fff8000000000000 -+#13: xscvspdpn conv(80000000) = 8000000000000000 -+#14: xscvspdpn conv(c683287b) = c0d0650f60000000 -+#15: xscvspdpn conv(49192c2d) = 41232585a0000000 -+#16: xscvspdpn conv(49c1288d) = 41382511a0000000 -+#17: xscvspdpn conv(418977ad) = 40312ef5a0000000 -+#18: xscvspdpn conv(428a5faf) = 40514bf5e0000000 -+#19: xscvspdpn conv(44bb5fcc) = 40976bf980000000 -+ -+Testcase PASSED -diff --git a/none/tests/ppc64/test_isa_2_07_part2.vgtest b/none/tests/ppc64/test_isa_2_07_part2.vgtest -new file mode 100644 -index 0000000..a4649be ---- /dev/null -+++ b/none/tests/ppc64/test_isa_2_07_part2.vgtest -@@ -0,0 +1,2 @@ -+prereq: ../../../tests/check_isa-2_07_cap -+prog: test_isa_2_07_part2 -diff --git a/tests/check_isa-2_07_cap b/tests/check_isa-2_07_cap -new file mode 100755 -index 0000000..ee777c1 ---- /dev/null -+++ b/tests/check_isa-2_07_cap -@@ -0,0 +1,12 @@ -+#!/bin/sh -+ -+# We use this script to check whether or not the processor supports -+# Power ISA 2.07. -+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -+LD_SHOW_AUXV=1 $DIR/true | grep arch_2_07 > /dev/null 2>&1 -+ -+if [ "$?" -ne "0" ]; then -+ exit 1 -+else -+ exit 0 -+fi diff --git a/valgrind-3.8.1-manpages.patch b/valgrind-3.8.1-manpages.patch deleted file mode 100644 index 57799eb..0000000 --- a/valgrind-3.8.1-manpages.patch +++ /dev/null @@ -1,485 +0,0 @@ -commit a02e2677ab02bcded6111d74320d4c1f4f062798 -Author: philippe -Date: Wed Mar 6 22:39:18 2013 +0000 - - Fix 316144 (valgrind.1 manpage contains ??? strings for references) - Patch by Mark Wielaard. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13314 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/docs/xml/manual-core-adv.xml b/docs/xml/manual-core-adv.xml -index 2a022a0..00376a1 100644 ---- a/docs/xml/manual-core-adv.xml -+++ b/docs/xml/manual-core-adv.xml -@@ -293,9 +293,9 @@ tool-specific macros). - - - -- -- -+ -+ - Debugging your program using Valgrind gdbserver and GDB - - A program running under Valgrind is not executed directly by the -@@ -381,7 +381,7 @@ and gives the results back to GDB. - GDB can use various kinds of channels (TCP/IP, serial line, etc) - to communicate with the gdbserver. In the case of Valgrind's - gdbserver, communication is done via a pipe and a small helper program --called , which acts as an -+called , which acts as an - intermediary. If no GDB is in use, vgdb can also be - used to send monitor commands to the Valgrind gdbserver from a shell - command line. -@@ -1105,8 +1105,9 @@ $5 = 36 - - - -- -+ -+ - vgdb command line options - Usage: vgdb [OPTION]... [[-c] COMMAND]... - -@@ -1254,8 +1255,9 @@ vgdb v.set log_output -c leak_check any - - - -- -+ -+ - Valgrind monitor commands - - This section describes the Valgrind monitor commands, available -diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml -index 70b0989..a60c3a4 100644 ---- a/docs/xml/manual-core.xml -+++ b/docs/xml/manual-core.xml -@@ -152,7 +152,8 @@ likely. - - - -- -+ -+ - The Commentary - - Valgrind tools write a commentary, a stream of text, detailing -@@ -857,7 +858,7 @@ in most cases. We group the available options by rough categories. - be used in conjunction with the - valgrind-listener program. For - further details, see -- the commentary -+ the commentary - in the manual. - - -@@ -1755,7 +1756,7 @@ need to use them. - between fairness and performance. For more details about the - Valgrind thread serialisation scheme and its impact on - performance and thread scheduling, see -- . -+ . - - - The value -@@ -2084,7 +2085,8 @@ everything is shared (a thread) or nothing is shared (fork-like); partial - sharing will fail. - - -- -+ -+ - Scheduling and Multi-Thread Performance - - A thread executes code only when it holds the abovementioned -diff --git a/docs/xml/valgrind-manpage.xml b/docs/xml/valgrind-manpage.xml -index 8f2f630..bd4b924 100644 ---- a/docs/xml/valgrind-manpage.xml -+++ b/docs/xml/valgrind-manpage.xml -@@ -240,7 +240,22 @@ callgrind_annotate(1), - callgrind_control(1), - ms_print(1), - &vg-docs-path; or --&vg-docs-url;. -+&vg-docs-url;, -+&vg-gdbserver-label; -+&vg-vgdb-label;, -+&vg-monitor-label;, -+&vg-comment-label;, -+&vg-pthreads-perf-sched-label;. - - - -diff --git a/docs/xml/vg-entities.xml b/docs/xml/vg-entities.xml -index e65ed3e..f5994c1 100644 ---- a/docs/xml/vg-entities.xml -+++ b/docs/xml/vg-entities.xml -@@ -23,4 +23,38 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - -commit 90285ba7ed34f3fdef235d2976399bcd360d4515 -Author: philippe -Date: Sun Mar 10 16:20:10 2013 +0000 - - fix 315959 valgrind man page has bogus SGCHECK (and no BBV) OPTIONS section - PAtch from Mark Wielaard. - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13323 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/exp-sgcheck/docs/sg-manual.xml b/exp-sgcheck/docs/sg-manual.xml -index 8632199..8b717e8 100644 ---- a/exp-sgcheck/docs/sg-manual.xml -+++ b/exp-sgcheck/docs/sg-manual.xml -@@ -31,7 +31,7 @@ observation about the likely forms of stack and global array accesses. - - SGCheck Command-line Options - --There are no SGCheck-specific command-line options at present. -+There are no SGCheck-specific command-line options at present. - -+ - Cachegrind: a cache and branch-prediction profiler - - To use this tool, you must specify -diff --git a/callgrind/docs/cl-manual.xml b/callgrind/docs/cl-manual.xml -index ab8d9bb..2f08ac8 100644 ---- a/callgrind/docs/cl-manual.xml -+++ b/callgrind/docs/cl-manual.xml -@@ -88,7 +88,7 @@ optimization opportunities depend on changing code in the callers, in - particular by reducing the call count. - - Callgrind's cache simulation is based on that of Cachegrind. --Read the documentation for first. The material -+Read the documentation for first. The material - below describes the features supported in addition to Cachegrind's - features. - -@@ -936,7 +936,7 @@ Also see . - Cache misses on instruction reads ("I1mr"/"ILmr"), - data read accesses ("Dr") and related cache misses ("D1mr"/"DLmr"), - data write accesses ("Dw") and related cache misses ("D1mw"/"DLmw"). -- For more information, see . -+ For more information, see . - - - -diff --git a/docs/xml/valgrind-manpage.xml b/docs/xml/valgrind-manpage.xml -index bd4b924..a4b84ff 100644 ---- a/docs/xml/valgrind-manpage.xml -+++ b/docs/xml/valgrind-manpage.xml -@@ -255,7 +255,10 @@ ms_print(1), - url="&vg-comment-url;">&vg-comment-label;, - &vg-pthreads-perf-sched-label;. -+ url="&vg-pthreads-perf-sched-url;">&vg-pthreads-perf-sched-label;, -+&vg-cg-manual-label;. - - - -diff --git a/docs/xml/vg-entities.xml b/docs/xml/vg-entities.xml -index f5994c1..29a337f 100644 ---- a/docs/xml/vg-entities.xml -+++ b/docs/xml/vg-entities.xml -@@ -58,3 +58,7 @@ - - - -+ -+ -+ -+ -diff -ur valgrind-3.8.1.orig/docs/callgrind_annotate.1 valgrind-3.8.1/docs/callgrind_annotate.1 ---- valgrind-3.8.1.orig/docs/callgrind_annotate.1 2013-03-12 14:42:11.627471322 +0100 -+++ valgrind-3.8.1/docs/callgrind_annotate.1 2013-03-12 14:42:28.762370486 +0100 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: Callgrind Annotate - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.75.2 --.\" Date: 09/18/2012 -+.\" Generator: DocBook XSL Stylesheets v1.77.1 -+.\" Date: 03/12/2013 - .\" Manual: Release 3.8.0 - .\" Source: Release 3.8.0 - .\" Language: English - .\" --.TH "CALLGRIND ANNOTATE" "1" "09/18/2012" "Release 3.8.0" "Release 3.8.0" -+.TH "CALLGRIND ANNOTATE" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -diff -ur valgrind-3.8.1.orig/docs/callgrind_control.1 valgrind-3.8.1/docs/callgrind_control.1 ---- valgrind-3.8.1.orig/docs/callgrind_control.1 2013-03-12 14:42:11.630471305 +0100 -+++ valgrind-3.8.1/docs/callgrind_control.1 2013-03-12 14:42:28.778370392 +0100 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: Callgrind Control - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.75.2 --.\" Date: 09/18/2012 -+.\" Generator: DocBook XSL Stylesheets v1.77.1 -+.\" Date: 03/12/2013 - .\" Manual: Release 3.8.0 - .\" Source: Release 3.8.0 - .\" Language: English - .\" --.TH "CALLGRIND CONTROL" "1" "09/18/2012" "Release 3.8.0" "Release 3.8.0" -+.TH "CALLGRIND CONTROL" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -diff -ur valgrind-3.8.1.orig/docs/cg_annotate.1 valgrind-3.8.1/docs/cg_annotate.1 ---- valgrind-3.8.1.orig/docs/cg_annotate.1 2013-03-12 14:42:11.627471322 +0100 -+++ valgrind-3.8.1/docs/cg_annotate.1 2013-03-12 14:42:28.745370586 +0100 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: cg_annotate - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.75.2 --.\" Date: 09/18/2012 -+.\" Generator: DocBook XSL Stylesheets v1.77.1 -+.\" Date: 03/12/2013 - .\" Manual: Release 3.8.0 - .\" Source: Release 3.8.0 - .\" Language: English - .\" --.TH "CG_ANNOTATE" "1" "09/18/2012" "Release 3.8.0" "Release 3.8.0" -+.TH "CG_ANNOTATE" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -diff -ur valgrind-3.8.1.orig/docs/ms_print.1 valgrind-3.8.1/docs/ms_print.1 ---- valgrind-3.8.1.orig/docs/ms_print.1 2013-03-12 14:42:11.627471322 +0100 -+++ valgrind-3.8.1/docs/ms_print.1 2013-03-12 14:42:28.793370304 +0100 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: ms_print - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.75.2 --.\" Date: 09/18/2012 -+.\" Generator: DocBook XSL Stylesheets v1.77.1 -+.\" Date: 03/12/2013 - .\" Manual: Release 3.8.0 - .\" Source: Release 3.8.0 - .\" Language: English - .\" --.TH "MS_PRINT" "1" "09/18/2012" "Release 3.8.0" "Release 3.8.0" -+.TH "MS_PRINT" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -diff -ur valgrind-3.8.1.orig/docs/valgrind.1 valgrind-3.8.1/docs/valgrind.1 ---- valgrind-3.8.1.orig/docs/valgrind.1 2013-03-12 14:42:11.626471328 +0100 -+++ valgrind-3.8.1/docs/valgrind.1 2013-03-12 14:42:28.728370686 +0100 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: VALGRIND - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.75.2 --.\" Date: 09/18/2012 -+.\" Generator: DocBook XSL Stylesheets v1.77.1 -+.\" Date: 03/12/2013 - .\" Manual: Release 3.8.0 - .\" Source: Release 3.8.0 - .\" Language: English - .\" --.TH "VALGRIND" "1" "09/18/2012" "Release 3.8.0" "Release 3.8.0" -+.TH "VALGRIND" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -@@ -134,13 +134,13 @@ - is specified\&. This allows an external GNU GDB debugger to control and debug your program when it runs on Valgrind\&. - \fB\-\-vgdb=full\fR - incurs significant performance overheads, but provides more precise breakpoints and watchpoints\&. See --??? -+Debugging your program using Valgrind's gdbserver and GDB - for a detailed description\&. - .sp - If the embedded gdbserver is enabled but no gdb is currently being used, the --??? -+vgdb - command line utility can send "monitor commands" to Valgrind from a shell\&. The Valgrind core provides a set of --???\&. A tool can optionally provide tool specific monitor commands, which are documented in the tool specific chapter\&. -+Valgrind monitor commands\&. A tool can optionally provide tool specific monitor commands, which are documented in the tool specific chapter\&. - .RE - .PP - \fB\-\-vgdb\-error= [default: 999999999] \fR -@@ -300,6 +300,15 @@ - Specifies an alternative exit code to return if Valgrind reported any errors in the run\&. When set to the default value (zero), the return value from Valgrind will always be the return value of the process being simulated\&. When set to a nonzero value, that value is returned instead, if Valgrind detects any errors\&. This is useful for using Valgrind as part of an automated test suite, since it makes it easy to detect test cases for which Valgrind has reported errors, just by inspecting return codes\&. - .RE - .PP -+\fB\-\-sigill\-diagnostics= [default: yes] \fR -+.RS 4 -+Enable/disable printing of illegal instruction diagnostics\&. Enabled by default, but defaults to disabled when -+\fB\-\-quiet\fR -+is given\&. The default can always be explicitly overridden by giving this option\&. -+.sp -+When enabled a warning message will be printed with some diagnostics whenever some instruction is encountered that valgrind cannot decode or translate before the program is given a SIGILL signal\&. Often an illegal instruction indicates a bug in the program or missing support for the particular instruction in Valgrind\&. But some programs do deliberately try to execute an instruction that might be missing and trap the SIGILL signal to detect processor features\&. -+.RE -+.PP - \fB\-\-show\-below\-main= [default: no] \fR - .RS 4 - By default, stack traces for errors do not show any functions that appear beneath -@@ -755,7 +764,7 @@ - The - \fB\-\-fair\-sched\fR - option controls the locking mechanism used by Valgrind to serialise thread execution\&. The locking mechanism controls the way the threads are scheduled, and different settings give different trade\-offs between fairness and performance\&. For more details about the Valgrind thread serialisation scheme and its impact on performance and thread scheduling, see --???\&. -+Scheduling and Multi-Thread Performance\&. - .sp - .RS 4 - .ie n \{\ -@@ -1242,7 +1251,7 @@ - \fB\-\-cache\-sim= [default: no] \fR - .RS 4 - Specify if you want to do full cache simulation\&. By default, only instruction read accesses will be counted ("Ir")\&. With cache simulation, further event counters are enabled: Cache misses on instruction reads ("I1mr"/"ILmr"), data read accesses ("Dr") and related cache misses ("D1mr"/"DLmr"), data write accesses ("Dw") and related cache misses ("D1mw"/"DLmw")\&. For more information, see --???\&. -+Cachegrind: a cache and branch-prediction profiler\&. - .RE - .PP - \fB\-\-branch\-sim= [default: no] \fR -@@ -1568,7 +1577,9 @@ - \fB--log-file\fR\&. - .RE - .SH "SGCHECK OPTIONS" --.SH "BBV OPTIONS" -+.PP -+There are no SGCheck\-specific command\-line options at present\&. -+.SH "BBV OPTIONS" - .PP - \fB\-\-bb\-out\-file= [default: bb\&.out\&.%p] \fR - .RS 4 -@@ -1705,9 +1716,46 @@ - cg_annotate(1), callgrind_annotate(1), callgrind_control(1), ms_print(1), - $INSTALL/share/doc/valgrind/html/index\&.html - or --http://www\&.valgrind\&.org/docs/manual/index\&.html\&. -+http://www\&.valgrind\&.org/docs/manual/index\&.html, -+\m[blue]\fBDebugging your program using Valgrind\*(Aqs gdbserver and GDB\fR\m[]\&\s-2\u[1]\d\s+2 -+\m[blue]\fBvgdb\fR\m[]\&\s-2\u[2]\d\s+2, -+\m[blue]\fBValgrind monitor commands\fR\m[]\&\s-2\u[3]\d\s+2, -+\m[blue]\fBThe Commentary\fR\m[]\&\s-2\u[4]\d\s+2, -+\m[blue]\fBScheduling and Multi\-Thread Performance\fR\m[]\&\s-2\u[5]\d\s+2, -+\m[blue]\fBCachegrind: a cache and branch\-prediction profiler\fR\m[]\&\s-2\u[6]\d\s+2\&. - .SH "AUTHOR" - .PP - The Valgrind developers\&. - .PP - This manpage was written by Andres Roldan and the Valgrind developers\&. -+.SH "NOTES" -+.IP " 1." 4 -+Debugging your program using Valgrind's gdbserver and GDB -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver -+.RE -+.IP " 2." 4 -+vgdb -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.vgdb -+.RE -+.IP " 3." 4 -+Valgrind monitor commands -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.valgrind-monitor-commands -+.RE -+.IP " 4." 4 -+The Commentary -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core.html#manual-core.comment -+.RE -+.IP " 5." 4 -+Scheduling and Multi-Thread Performance -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core.html#manual-core.pthreads_perf_sched -+.RE -+.IP " 6." 4 -+Cachegrind: a cache and branch-prediction profiler -+.RS 4 -+\%http://www.valgrind.org/docs/manual/cg-manual.html -+.RE diff --git a/valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch b/valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch deleted file mode 100644 index 5a6390b..0000000 --- a/valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- valgrind/memcheck/mc_translate.c (revision 12883) -+++ valgrind/memcheck/mc_translate.c (revision 12884) -@@ -3313,6 +3313,8 @@ - case Iop_DivModS128to64: - return mkLazy2(mce, Ity_I128, vatom1, vatom2); - -+ case Iop_8HLto16: -+ return assignNew('V', mce, Ity_I16, binop(op, vatom1, vatom2)); - case Iop_16HLto32: - return assignNew('V', mce, Ity_I32, binop(op, vatom1, vatom2)); - case Iop_32HLto64: diff --git a/valgrind-3.8.1-mmxext.patch b/valgrind-3.8.1-mmxext.patch deleted file mode 100644 index 5c88907..0000000 --- a/valgrind-3.8.1-mmxext.patch +++ /dev/null @@ -1,975 +0,0 @@ -commit a4b7b67db47021c424c18a5729f250016d34df27 -Author: mjw -Date: Tue Aug 27 10:19:03 2013 +0000 - - Support mmxext (integer sse) subset on i386 (athlon). - - Some processors like the AMD Athlon "Classic" support mmxext, - a sse1 subset. This subset is not properly detected by VEX. - The subset uses the same encoding as the sse1 instructions. - - The subset is described at: - http://support.amd.com/us/Embedded_TechDocs/22466.pdf - https://en.wikipedia.org/wiki/3DNow!#3DNow.21_extensions - - This introduces a new VEX_HWCAPS_X86_MMXEXT that sits between - the baseline (0) and VEX_HWCAPS_X86_SSE1. There is also a new - x86g_dirtyhelper_CPUID_mmxext to mimics a Athlon "Classic" - (Model 2, K75 "Pluto/Orion"). - - Groups all mmxext instructions together in one block. - - git-svn-id: svn://svn.valgrind.org/vex/trunk@2745 8f6e269a-dfd6-0310-a8e1-e2731360e62c - -diff --git a/VEX/priv/guest_x86_defs.h b/VEX/priv/guest_x86_defs.h -index 389e6bb..1a16a0b 100644 ---- a/VEX/priv/guest_x86_defs.h -+++ b/VEX/priv/guest_x86_defs.h -@@ -144,6 +144,7 @@ extern ULong x86g_dirtyhelper_loadF80le ( UInt ); - extern void x86g_dirtyhelper_storeF80le ( UInt, ULong ); - - extern void x86g_dirtyhelper_CPUID_sse0 ( VexGuestX86State* ); -+extern void x86g_dirtyhelper_CPUID_mmxext ( VexGuestX86State* ); - extern void x86g_dirtyhelper_CPUID_sse1 ( VexGuestX86State* ); - extern void x86g_dirtyhelper_CPUID_sse2 ( VexGuestX86State* ); - -diff --git a/VEX/priv/guest_x86_helpers.c b/VEX/priv/guest_x86_helpers.c -index 9c26794..e87e89f 100644 ---- a/VEX/priv/guest_x86_helpers.c -+++ b/VEX/priv/guest_x86_helpers.c -@@ -2207,6 +2207,63 @@ void x86g_dirtyhelper_CPUID_sse0 ( VexGuestX86State* st ) - - /* CALLED FROM GENERATED CODE */ - /* DIRTY HELPER (modifies guest state) */ -+/* Claim to be a Athlon "Classic" (Model 2, K75 "Pluto/Orion") */ -+/* But without 3DNow support (weird, but we really don't support it). */ -+void x86g_dirtyhelper_CPUID_mmxext ( VexGuestX86State* st ) -+{ -+ switch (st->guest_EAX) { -+ /* vendor ID */ -+ case 0: -+ st->guest_EAX = 0x1; -+ st->guest_EBX = 0x68747541; -+ st->guest_ECX = 0x444d4163; -+ st->guest_EDX = 0x69746e65; -+ break; -+ /* feature bits */ -+ case 1: -+ st->guest_EAX = 0x621; -+ st->guest_EBX = 0x0; -+ st->guest_ECX = 0x0; -+ st->guest_EDX = 0x183f9ff; -+ break; -+ /* Highest Extended Function Supported (0x80000004 brand string) */ -+ case 0x80000000: -+ st->guest_EAX = 0x80000004; -+ st->guest_EBX = 0x68747541; -+ st->guest_ECX = 0x444d4163; -+ st->guest_EDX = 0x69746e65; -+ break; -+ /* Extended Processor Info and Feature Bits */ -+ case 0x80000001: -+ st->guest_EAX = 0x721; -+ st->guest_EBX = 0x0; -+ st->guest_ECX = 0x0; -+ st->guest_EDX = 0x1c3f9ff; /* Note no 3DNow. */ -+ break; -+ /* Processor Brand String "AMD Athlon(tm) Processor" */ -+ case 0x80000002: -+ st->guest_EAX = 0x20444d41; -+ st->guest_EBX = 0x6c687441; -+ st->guest_ECX = 0x74286e6f; -+ st->guest_EDX = 0x5020296d; -+ break; -+ case 0x80000003: -+ st->guest_EAX = 0x65636f72; -+ st->guest_EBX = 0x726f7373; -+ st->guest_ECX = 0x0; -+ st->guest_EDX = 0x0; -+ break; -+ default: -+ st->guest_EAX = 0x0; -+ st->guest_EBX = 0x0; -+ st->guest_ECX = 0x0; -+ st->guest_EDX = 0x0; -+ break; -+ } -+} -+ -+/* CALLED FROM GENERATED CODE */ -+/* DIRTY HELPER (modifies guest state) */ - /* Claim to be the following SSE1-capable CPU: - vendor_id : GenuineIntel - cpu family : 6 -diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c -index 90499b0..e98f19c 100644 ---- a/VEX/priv/guest_x86_toIR.c -+++ b/VEX/priv/guest_x86_toIR.c -@@ -8318,7 +8318,18 @@ DisResult disInstr_X86_WRK ( - guest subarchitecture. */ - if (archinfo->hwcaps == 0/*baseline, no sse at all*/) - goto after_sse_decoders; -- -+ -+ /* With mmxext only some extended MMX instructions are recognized. -+ The mmxext instructions are MASKMOVQ MOVNTQ PAVGB PAVGW PMAXSW -+ PMAXUB PMINSW PMINUB PMULHUW PSADBW PSHUFW PEXTRW PINSRW PMOVMSKB -+ PREFETCHNTA PREFETCHT0 PREFETCHT1 PREFETCHT2 SFENCE -+ -+ http://support.amd.com/us/Embedded_TechDocs/22466.pdf -+ https://en.wikipedia.org/wiki/3DNow!#3DNow.21_extensions */ -+ -+ if (archinfo->hwcaps == VEX_HWCAPS_X86_MMXEXT/*integer only sse1 subset*/) -+ goto mmxext; -+ - /* Otherwise we must be doing sse1 or sse2, so we can at least try - for SSE1 here. */ - -@@ -8627,6 +8638,11 @@ DisResult disInstr_X86_WRK ( - goto decode_success; - } - -+ -+ /* mmxext sse1 subset starts here. mmxext only arches will parse -+ only this subset of the sse1 instructions. */ -+ mmxext: -+ - /* ***--- this is an MMX class insn introduced in SSE1 ---*** */ - /* 0F F7 = MASKMOVQ -- 8x8 masked store */ - if (sz == 4 && insn[0] == 0x0F && insn[1] == 0xF7) { -@@ -8637,203 +8653,6 @@ DisResult disInstr_X86_WRK ( - goto decode_success; - } - -- /* 0F 5F = MAXPS -- max 32Fx4 from R/M to R */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x5F) { -- delta = dis_SSE_E_to_G_all( sorb, delta+2, "maxps", Iop_Max32Fx4 ); -- goto decode_success; -- } -- -- /* F3 0F 5F = MAXSS -- max 32F0x4 from R/M to R */ -- if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x5F) { -- vassert(sz == 4); -- delta = dis_SSE_E_to_G_lo32( sorb, delta+3, "maxss", Iop_Max32F0x4 ); -- goto decode_success; -- } -- -- /* 0F 5D = MINPS -- min 32Fx4 from R/M to R */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x5D) { -- delta = dis_SSE_E_to_G_all( sorb, delta+2, "minps", Iop_Min32Fx4 ); -- goto decode_success; -- } -- -- /* F3 0F 5D = MINSS -- min 32F0x4 from R/M to R */ -- if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x5D) { -- vassert(sz == 4); -- delta = dis_SSE_E_to_G_lo32( sorb, delta+3, "minss", Iop_Min32F0x4 ); -- goto decode_success; -- } -- -- /* 0F 28 = MOVAPS -- move from E (mem or xmm) to G (xmm). */ -- /* 0F 10 = MOVUPS -- move from E (mem or xmm) to G (xmm). */ -- if (sz == 4 && insn[0] == 0x0F && (insn[1] == 0x28 || insn[1] == 0x10)) { -- modrm = getIByte(delta+2); -- if (epartIsReg(modrm)) { -- putXMMReg( gregOfRM(modrm), -- getXMMReg( eregOfRM(modrm) )); -- DIP("mov[ua]ps %s,%s\n", nameXMMReg(eregOfRM(modrm)), -- nameXMMReg(gregOfRM(modrm))); -- delta += 2+1; -- } else { -- addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -- if (insn[1] == 0x28/*movaps*/) -- gen_SEGV_if_not_16_aligned( addr ); -- putXMMReg( gregOfRM(modrm), -- loadLE(Ity_V128, mkexpr(addr)) ); -- DIP("mov[ua]ps %s,%s\n", dis_buf, -- nameXMMReg(gregOfRM(modrm))); -- delta += 2+alen; -- } -- goto decode_success; -- } -- -- /* 0F 29 = MOVAPS -- move from G (xmm) to E (mem or xmm). */ -- /* 0F 11 = MOVUPS -- move from G (xmm) to E (mem or xmm). */ -- if (sz == 4 && insn[0] == 0x0F -- && (insn[1] == 0x29 || insn[1] == 0x11)) { -- modrm = getIByte(delta+2); -- if (epartIsReg(modrm)) { -- /* fall through; awaiting test case */ -- } else { -- addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -- if (insn[1] == 0x29/*movaps*/) -- gen_SEGV_if_not_16_aligned( addr ); -- storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) ); -- DIP("mov[ua]ps %s,%s\n", nameXMMReg(gregOfRM(modrm)), -- dis_buf ); -- delta += 2+alen; -- goto decode_success; -- } -- } -- -- /* 0F 16 = MOVHPS -- move from mem to high half of XMM. */ -- /* 0F 16 = MOVLHPS -- move from lo half to hi half of XMM. */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x16) { -- modrm = getIByte(delta+2); -- if (epartIsReg(modrm)) { -- delta += 2+1; -- putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/, -- getXMMRegLane64( eregOfRM(modrm), 0 ) ); -- DIP("movhps %s,%s\n", nameXMMReg(eregOfRM(modrm)), -- nameXMMReg(gregOfRM(modrm))); -- } else { -- addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -- delta += 2+alen; -- putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/, -- loadLE(Ity_I64, mkexpr(addr)) ); -- DIP("movhps %s,%s\n", dis_buf, -- nameXMMReg( gregOfRM(modrm) )); -- } -- goto decode_success; -- } -- -- /* 0F 17 = MOVHPS -- move from high half of XMM to mem. */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x17) { -- if (!epartIsReg(insn[2])) { -- delta += 2; -- addr = disAMode ( &alen, sorb, delta, dis_buf ); -- delta += alen; -- storeLE( mkexpr(addr), -- getXMMRegLane64( gregOfRM(insn[2]), -- 1/*upper lane*/ ) ); -- DIP("movhps %s,%s\n", nameXMMReg( gregOfRM(insn[2]) ), -- dis_buf); -- goto decode_success; -- } -- /* else fall through */ -- } -- -- /* 0F 12 = MOVLPS -- move from mem to low half of XMM. */ -- /* OF 12 = MOVHLPS -- from from hi half to lo half of XMM. */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x12) { -- modrm = getIByte(delta+2); -- if (epartIsReg(modrm)) { -- delta += 2+1; -- putXMMRegLane64( gregOfRM(modrm), -- 0/*lower lane*/, -- getXMMRegLane64( eregOfRM(modrm), 1 )); -- DIP("movhlps %s, %s\n", nameXMMReg(eregOfRM(modrm)), -- nameXMMReg(gregOfRM(modrm))); -- } else { -- addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -- delta += 2+alen; -- putXMMRegLane64( gregOfRM(modrm), 0/*lower lane*/, -- loadLE(Ity_I64, mkexpr(addr)) ); -- DIP("movlps %s, %s\n", -- dis_buf, nameXMMReg( gregOfRM(modrm) )); -- } -- goto decode_success; -- } -- -- /* 0F 13 = MOVLPS -- move from low half of XMM to mem. */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x13) { -- if (!epartIsReg(insn[2])) { -- delta += 2; -- addr = disAMode ( &alen, sorb, delta, dis_buf ); -- delta += alen; -- storeLE( mkexpr(addr), -- getXMMRegLane64( gregOfRM(insn[2]), -- 0/*lower lane*/ ) ); -- DIP("movlps %s, %s\n", nameXMMReg( gregOfRM(insn[2]) ), -- dis_buf); -- goto decode_success; -- } -- /* else fall through */ -- } -- -- /* 0F 50 = MOVMSKPS - move 4 sign bits from 4 x F32 in xmm(E) -- to 4 lowest bits of ireg(G) */ -- if (insn[0] == 0x0F && insn[1] == 0x50) { -- modrm = getIByte(delta+2); -- if (sz == 4 && epartIsReg(modrm)) { -- Int src; -- t0 = newTemp(Ity_I32); -- t1 = newTemp(Ity_I32); -- t2 = newTemp(Ity_I32); -- t3 = newTemp(Ity_I32); -- delta += 2+1; -- src = eregOfRM(modrm); -- assign( t0, binop( Iop_And32, -- binop(Iop_Shr32, getXMMRegLane32(src,0), mkU8(31)), -- mkU32(1) )); -- assign( t1, binop( Iop_And32, -- binop(Iop_Shr32, getXMMRegLane32(src,1), mkU8(30)), -- mkU32(2) )); -- assign( t2, binop( Iop_And32, -- binop(Iop_Shr32, getXMMRegLane32(src,2), mkU8(29)), -- mkU32(4) )); -- assign( t3, binop( Iop_And32, -- binop(Iop_Shr32, getXMMRegLane32(src,3), mkU8(28)), -- mkU32(8) )); -- putIReg(4, gregOfRM(modrm), -- binop(Iop_Or32, -- binop(Iop_Or32, mkexpr(t0), mkexpr(t1)), -- binop(Iop_Or32, mkexpr(t2), mkexpr(t3)) -- ) -- ); -- DIP("movmskps %s,%s\n", nameXMMReg(src), -- nameIReg(4, gregOfRM(modrm))); -- goto decode_success; -- } -- /* else fall through */ -- } -- -- /* 0F 2B = MOVNTPS -- for us, just a plain SSE store. */ -- /* 66 0F 2B = MOVNTPD -- for us, just a plain SSE store. */ -- if (insn[0] == 0x0F && insn[1] == 0x2B) { -- modrm = getIByte(delta+2); -- if (!epartIsReg(modrm)) { -- addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -- gen_SEGV_if_not_16_aligned( addr ); -- storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) ); -- DIP("movntp%s %s,%s\n", sz==2 ? "d" : "s", -- dis_buf, -- nameXMMReg(gregOfRM(modrm))); -- delta += 2+alen; -- goto decode_success; -- } -- /* else fall through */ -- } -- - /* ***--- this is an MMX class insn introduced in SSE1 ---*** */ - /* 0F E7 = MOVNTQ -- for us, just a plain MMX store. Note, the - Intel manual does not say anything about the usual business of -@@ -8854,70 +8673,6 @@ DisResult disInstr_X86_WRK ( - /* else fall through */ - } - -- /* F3 0F 10 = MOVSS -- move 32 bits from E (mem or lo 1/4 xmm) to G -- (lo 1/4 xmm). If E is mem, upper 3/4 of G is zeroed out. */ -- if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x10) { -- vassert(sz == 4); -- modrm = getIByte(delta+3); -- if (epartIsReg(modrm)) { -- putXMMRegLane32( gregOfRM(modrm), 0, -- getXMMRegLane32( eregOfRM(modrm), 0 )); -- DIP("movss %s,%s\n", nameXMMReg(eregOfRM(modrm)), -- nameXMMReg(gregOfRM(modrm))); -- delta += 3+1; -- } else { -- addr = disAMode ( &alen, sorb, delta+3, dis_buf ); -- /* zero bits 127:64 */ -- putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) ); -- /* zero bits 63:32 */ -- putXMMRegLane32( gregOfRM(modrm), 1, mkU32(0) ); -- /* write bits 31:0 */ -- putXMMRegLane32( gregOfRM(modrm), 0, -- loadLE(Ity_I32, mkexpr(addr)) ); -- DIP("movss %s,%s\n", dis_buf, -- nameXMMReg(gregOfRM(modrm))); -- delta += 3+alen; -- } -- goto decode_success; -- } -- -- /* F3 0F 11 = MOVSS -- move 32 bits from G (lo 1/4 xmm) to E (mem -- or lo 1/4 xmm). */ -- if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x11) { -- vassert(sz == 4); -- modrm = getIByte(delta+3); -- if (epartIsReg(modrm)) { -- /* fall through, we don't yet have a test case */ -- } else { -- addr = disAMode ( &alen, sorb, delta+3, dis_buf ); -- storeLE( mkexpr(addr), -- getXMMRegLane32(gregOfRM(modrm), 0) ); -- DIP("movss %s,%s\n", nameXMMReg(gregOfRM(modrm)), -- dis_buf); -- delta += 3+alen; -- goto decode_success; -- } -- } -- -- /* 0F 59 = MULPS -- mul 32Fx4 from R/M to R */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x59) { -- delta = dis_SSE_E_to_G_all( sorb, delta+2, "mulps", Iop_Mul32Fx4 ); -- goto decode_success; -- } -- -- /* F3 0F 59 = MULSS -- mul 32F0x4 from R/M to R */ -- if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x59) { -- vassert(sz == 4); -- delta = dis_SSE_E_to_G_lo32( sorb, delta+3, "mulss", Iop_Mul32F0x4 ); -- goto decode_success; -- } -- -- /* 0F 56 = ORPS -- G = G and E */ -- if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x56) { -- delta = dis_SSE_E_to_G_all( sorb, delta+2, "orps", Iop_OrV128 ); -- goto decode_success; -- } -- - /* ***--- this is an MMX class insn introduced in SSE1 ---*** */ - /* 0F E0 = PAVGB -- 8x8 unsigned Packed Average, with rounding */ - if (sz == 4 && insn[0] == 0x0F && insn[1] == 0xE0) { -@@ -9173,6 +8928,284 @@ DisResult disInstr_X86_WRK ( - goto decode_success; - } - -+ /* 0F AE /7 = SFENCE -- flush pending operations to memory */ -+ if (insn[0] == 0x0F && insn[1] == 0xAE -+ && epartIsReg(insn[2]) && gregOfRM(insn[2]) == 7) { -+ vassert(sz == 4); -+ delta += 3; -+ /* Insert a memory fence. It's sometimes important that these -+ are carried through to the generated code. */ -+ stmt( IRStmt_MBE(Imbe_Fence) ); -+ DIP("sfence\n"); -+ goto decode_success; -+ } -+ -+ /* End of mmxext sse1 subset. No more sse parsing for mmxext only arches. */ -+ if (archinfo->hwcaps == VEX_HWCAPS_X86_MMXEXT/*integer only sse1 subset*/) -+ goto after_sse_decoders; -+ -+ -+ /* 0F 5F = MAXPS -- max 32Fx4 from R/M to R */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x5F) { -+ delta = dis_SSE_E_to_G_all( sorb, delta+2, "maxps", Iop_Max32Fx4 ); -+ goto decode_success; -+ } -+ -+ /* F3 0F 5F = MAXSS -- max 32F0x4 from R/M to R */ -+ if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x5F) { -+ vassert(sz == 4); -+ delta = dis_SSE_E_to_G_lo32( sorb, delta+3, "maxss", Iop_Max32F0x4 ); -+ goto decode_success; -+ } -+ -+ /* 0F 5D = MINPS -- min 32Fx4 from R/M to R */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x5D) { -+ delta = dis_SSE_E_to_G_all( sorb, delta+2, "minps", Iop_Min32Fx4 ); -+ goto decode_success; -+ } -+ -+ /* F3 0F 5D = MINSS -- min 32F0x4 from R/M to R */ -+ if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x5D) { -+ vassert(sz == 4); -+ delta = dis_SSE_E_to_G_lo32( sorb, delta+3, "minss", Iop_Min32F0x4 ); -+ goto decode_success; -+ } -+ -+ /* 0F 28 = MOVAPS -- move from E (mem or xmm) to G (xmm). */ -+ /* 0F 10 = MOVUPS -- move from E (mem or xmm) to G (xmm). */ -+ if (sz == 4 && insn[0] == 0x0F && (insn[1] == 0x28 || insn[1] == 0x10)) { -+ modrm = getIByte(delta+2); -+ if (epartIsReg(modrm)) { -+ putXMMReg( gregOfRM(modrm), -+ getXMMReg( eregOfRM(modrm) )); -+ DIP("mov[ua]ps %s,%s\n", nameXMMReg(eregOfRM(modrm)), -+ nameXMMReg(gregOfRM(modrm))); -+ delta += 2+1; -+ } else { -+ addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -+ if (insn[1] == 0x28/*movaps*/) -+ gen_SEGV_if_not_16_aligned( addr ); -+ putXMMReg( gregOfRM(modrm), -+ loadLE(Ity_V128, mkexpr(addr)) ); -+ DIP("mov[ua]ps %s,%s\n", dis_buf, -+ nameXMMReg(gregOfRM(modrm))); -+ delta += 2+alen; -+ } -+ goto decode_success; -+ } -+ -+ /* 0F 29 = MOVAPS -- move from G (xmm) to E (mem or xmm). */ -+ /* 0F 11 = MOVUPS -- move from G (xmm) to E (mem or xmm). */ -+ if (sz == 4 && insn[0] == 0x0F -+ && (insn[1] == 0x29 || insn[1] == 0x11)) { -+ modrm = getIByte(delta+2); -+ if (epartIsReg(modrm)) { -+ /* fall through; awaiting test case */ -+ } else { -+ addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -+ if (insn[1] == 0x29/*movaps*/) -+ gen_SEGV_if_not_16_aligned( addr ); -+ storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) ); -+ DIP("mov[ua]ps %s,%s\n", nameXMMReg(gregOfRM(modrm)), -+ dis_buf ); -+ delta += 2+alen; -+ goto decode_success; -+ } -+ } -+ -+ /* 0F 16 = MOVHPS -- move from mem to high half of XMM. */ -+ /* 0F 16 = MOVLHPS -- move from lo half to hi half of XMM. */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x16) { -+ modrm = getIByte(delta+2); -+ if (epartIsReg(modrm)) { -+ delta += 2+1; -+ putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/, -+ getXMMRegLane64( eregOfRM(modrm), 0 ) ); -+ DIP("movhps %s,%s\n", nameXMMReg(eregOfRM(modrm)), -+ nameXMMReg(gregOfRM(modrm))); -+ } else { -+ addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -+ delta += 2+alen; -+ putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/, -+ loadLE(Ity_I64, mkexpr(addr)) ); -+ DIP("movhps %s,%s\n", dis_buf, -+ nameXMMReg( gregOfRM(modrm) )); -+ } -+ goto decode_success; -+ } -+ -+ /* 0F 17 = MOVHPS -- move from high half of XMM to mem. */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x17) { -+ if (!epartIsReg(insn[2])) { -+ delta += 2; -+ addr = disAMode ( &alen, sorb, delta, dis_buf ); -+ delta += alen; -+ storeLE( mkexpr(addr), -+ getXMMRegLane64( gregOfRM(insn[2]), -+ 1/*upper lane*/ ) ); -+ DIP("movhps %s,%s\n", nameXMMReg( gregOfRM(insn[2]) ), -+ dis_buf); -+ goto decode_success; -+ } -+ /* else fall through */ -+ } -+ -+ /* 0F 12 = MOVLPS -- move from mem to low half of XMM. */ -+ /* OF 12 = MOVHLPS -- from from hi half to lo half of XMM. */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x12) { -+ modrm = getIByte(delta+2); -+ if (epartIsReg(modrm)) { -+ delta += 2+1; -+ putXMMRegLane64( gregOfRM(modrm), -+ 0/*lower lane*/, -+ getXMMRegLane64( eregOfRM(modrm), 1 )); -+ DIP("movhlps %s, %s\n", nameXMMReg(eregOfRM(modrm)), -+ nameXMMReg(gregOfRM(modrm))); -+ } else { -+ addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -+ delta += 2+alen; -+ putXMMRegLane64( gregOfRM(modrm), 0/*lower lane*/, -+ loadLE(Ity_I64, mkexpr(addr)) ); -+ DIP("movlps %s, %s\n", -+ dis_buf, nameXMMReg( gregOfRM(modrm) )); -+ } -+ goto decode_success; -+ } -+ -+ /* 0F 13 = MOVLPS -- move from low half of XMM to mem. */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x13) { -+ if (!epartIsReg(insn[2])) { -+ delta += 2; -+ addr = disAMode ( &alen, sorb, delta, dis_buf ); -+ delta += alen; -+ storeLE( mkexpr(addr), -+ getXMMRegLane64( gregOfRM(insn[2]), -+ 0/*lower lane*/ ) ); -+ DIP("movlps %s, %s\n", nameXMMReg( gregOfRM(insn[2]) ), -+ dis_buf); -+ goto decode_success; -+ } -+ /* else fall through */ -+ } -+ -+ /* 0F 50 = MOVMSKPS - move 4 sign bits from 4 x F32 in xmm(E) -+ to 4 lowest bits of ireg(G) */ -+ if (insn[0] == 0x0F && insn[1] == 0x50) { -+ modrm = getIByte(delta+2); -+ if (sz == 4 && epartIsReg(modrm)) { -+ Int src; -+ t0 = newTemp(Ity_I32); -+ t1 = newTemp(Ity_I32); -+ t2 = newTemp(Ity_I32); -+ t3 = newTemp(Ity_I32); -+ delta += 2+1; -+ src = eregOfRM(modrm); -+ assign( t0, binop( Iop_And32, -+ binop(Iop_Shr32, getXMMRegLane32(src,0), mkU8(31)), -+ mkU32(1) )); -+ assign( t1, binop( Iop_And32, -+ binop(Iop_Shr32, getXMMRegLane32(src,1), mkU8(30)), -+ mkU32(2) )); -+ assign( t2, binop( Iop_And32, -+ binop(Iop_Shr32, getXMMRegLane32(src,2), mkU8(29)), -+ mkU32(4) )); -+ assign( t3, binop( Iop_And32, -+ binop(Iop_Shr32, getXMMRegLane32(src,3), mkU8(28)), -+ mkU32(8) )); -+ putIReg(4, gregOfRM(modrm), -+ binop(Iop_Or32, -+ binop(Iop_Or32, mkexpr(t0), mkexpr(t1)), -+ binop(Iop_Or32, mkexpr(t2), mkexpr(t3)) -+ ) -+ ); -+ DIP("movmskps %s,%s\n", nameXMMReg(src), -+ nameIReg(4, gregOfRM(modrm))); -+ goto decode_success; -+ } -+ /* else fall through */ -+ } -+ -+ /* 0F 2B = MOVNTPS -- for us, just a plain SSE store. */ -+ /* 66 0F 2B = MOVNTPD -- for us, just a plain SSE store. */ -+ if (insn[0] == 0x0F && insn[1] == 0x2B) { -+ modrm = getIByte(delta+2); -+ if (!epartIsReg(modrm)) { -+ addr = disAMode ( &alen, sorb, delta+2, dis_buf ); -+ gen_SEGV_if_not_16_aligned( addr ); -+ storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) ); -+ DIP("movntp%s %s,%s\n", sz==2 ? "d" : "s", -+ dis_buf, -+ nameXMMReg(gregOfRM(modrm))); -+ delta += 2+alen; -+ goto decode_success; -+ } -+ /* else fall through */ -+ } -+ -+ /* F3 0F 10 = MOVSS -- move 32 bits from E (mem or lo 1/4 xmm) to G -+ (lo 1/4 xmm). If E is mem, upper 3/4 of G is zeroed out. */ -+ if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x10) { -+ vassert(sz == 4); -+ modrm = getIByte(delta+3); -+ if (epartIsReg(modrm)) { -+ putXMMRegLane32( gregOfRM(modrm), 0, -+ getXMMRegLane32( eregOfRM(modrm), 0 )); -+ DIP("movss %s,%s\n", nameXMMReg(eregOfRM(modrm)), -+ nameXMMReg(gregOfRM(modrm))); -+ delta += 3+1; -+ } else { -+ addr = disAMode ( &alen, sorb, delta+3, dis_buf ); -+ /* zero bits 127:64 */ -+ putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) ); -+ /* zero bits 63:32 */ -+ putXMMRegLane32( gregOfRM(modrm), 1, mkU32(0) ); -+ /* write bits 31:0 */ -+ putXMMRegLane32( gregOfRM(modrm), 0, -+ loadLE(Ity_I32, mkexpr(addr)) ); -+ DIP("movss %s,%s\n", dis_buf, -+ nameXMMReg(gregOfRM(modrm))); -+ delta += 3+alen; -+ } -+ goto decode_success; -+ } -+ -+ /* F3 0F 11 = MOVSS -- move 32 bits from G (lo 1/4 xmm) to E (mem -+ or lo 1/4 xmm). */ -+ if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x11) { -+ vassert(sz == 4); -+ modrm = getIByte(delta+3); -+ if (epartIsReg(modrm)) { -+ /* fall through, we don't yet have a test case */ -+ } else { -+ addr = disAMode ( &alen, sorb, delta+3, dis_buf ); -+ storeLE( mkexpr(addr), -+ getXMMRegLane32(gregOfRM(modrm), 0) ); -+ DIP("movss %s,%s\n", nameXMMReg(gregOfRM(modrm)), -+ dis_buf); -+ delta += 3+alen; -+ goto decode_success; -+ } -+ } -+ -+ /* 0F 59 = MULPS -- mul 32Fx4 from R/M to R */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x59) { -+ delta = dis_SSE_E_to_G_all( sorb, delta+2, "mulps", Iop_Mul32Fx4 ); -+ goto decode_success; -+ } -+ -+ /* F3 0F 59 = MULSS -- mul 32F0x4 from R/M to R */ -+ if (insn[0] == 0xF3 && insn[1] == 0x0F && insn[2] == 0x59) { -+ vassert(sz == 4); -+ delta = dis_SSE_E_to_G_lo32( sorb, delta+3, "mulss", Iop_Mul32F0x4 ); -+ goto decode_success; -+ } -+ -+ /* 0F 56 = ORPS -- G = G and E */ -+ if (sz == 4 && insn[0] == 0x0F && insn[1] == 0x56) { -+ delta = dis_SSE_E_to_G_all( sorb, delta+2, "orps", Iop_OrV128 ); -+ goto decode_success; -+ } -+ - /* 0F 53 = RCPPS -- approx reciprocal 32Fx4 from R/M to R */ - if (insn[0] == 0x0F && insn[1] == 0x53) { - vassert(sz == 4); -@@ -9205,18 +9238,6 @@ DisResult disInstr_X86_WRK ( - goto decode_success; - } - -- /* 0F AE /7 = SFENCE -- flush pending operations to memory */ -- if (insn[0] == 0x0F && insn[1] == 0xAE -- && epartIsReg(insn[2]) && gregOfRM(insn[2]) == 7) { -- vassert(sz == 4); -- delta += 3; -- /* Insert a memory fence. It's sometimes important that these -- are carried through to the generated code. */ -- stmt( IRStmt_MBE(Imbe_Fence) ); -- DIP("sfence\n"); -- goto decode_success; -- } -- - /* 0F C6 /r ib = SHUFPS -- shuffle packed F32s */ - if (sz == 4 && insn[0] == 0x0F && insn[1] == 0xC6) { - Int select; -@@ -14674,6 +14695,11 @@ DisResult disInstr_X86_WRK ( - fAddr = &x86g_dirtyhelper_CPUID_sse1; - } - else -+ if (archinfo->hwcaps & VEX_HWCAPS_X86_MMXEXT) { -+ fName = "x86g_dirtyhelper_CPUID_mmxext"; -+ fAddr = &x86g_dirtyhelper_CPUID_mmxext; -+ } -+ else - if (archinfo->hwcaps == 0/*no SSE*/) { - fName = "x86g_dirtyhelper_CPUID_sse0"; - fAddr = &x86g_dirtyhelper_CPUID_sse0; -diff --git a/VEX/priv/host_x86_defs.c b/VEX/priv/host_x86_defs.c -index 21a05a9..693eaa2 100644 ---- a/VEX/priv/host_x86_defs.c -+++ b/VEX/priv/host_x86_defs.c -@@ -727,7 +727,8 @@ X86Instr* X86Instr_MFence ( UInt hwcaps ) { - X86Instr* i = LibVEX_Alloc(sizeof(X86Instr)); - i->tag = Xin_MFence; - i->Xin.MFence.hwcaps = hwcaps; -- vassert(0 == (hwcaps & ~(VEX_HWCAPS_X86_SSE1 -+ vassert(0 == (hwcaps & ~(VEX_HWCAPS_X86_MMXEXT -+ |VEX_HWCAPS_X86_SSE1 - |VEX_HWCAPS_X86_SSE2 - |VEX_HWCAPS_X86_SSE3 - |VEX_HWCAPS_X86_LZCNT))); -@@ -2695,7 +2696,7 @@ Int emit_X86Instr ( /*MB_MOD*/Bool* is_profInc, - *p++ = 0x0F; *p++ = 0xAE; *p++ = 0xF0; - goto done; - } -- if (i->Xin.MFence.hwcaps & VEX_HWCAPS_X86_SSE1) { -+ if (i->Xin.MFence.hwcaps & VEX_HWCAPS_X86_MMXEXT) { - /* sfence */ - *p++ = 0x0F; *p++ = 0xAE; *p++ = 0xF8; - /* lock addl $0,0(%esp) */ -diff --git a/VEX/priv/host_x86_defs.h b/VEX/priv/host_x86_defs.h -index f810ab4..e03becf 100644 ---- a/VEX/priv/host_x86_defs.h -+++ b/VEX/priv/host_x86_defs.h -@@ -360,7 +360,7 @@ typedef - Xin_Store, /* store 16/8 bit value in memory */ - Xin_Set32, /* convert condition code to 32-bit value */ - Xin_Bsfr32, /* 32-bit bsf/bsr */ -- Xin_MFence, /* mem fence (not just sse2, but sse0 and 1 too) */ -+ Xin_MFence, /* mem fence (not just sse2, but sse0 and 1/mmxext too) */ - Xin_ACAS, /* 8/16/32-bit lock;cmpxchg */ - Xin_DACAS, /* lock;cmpxchg8b (doubleword ACAS, 2 x 32-bit only) */ - -@@ -508,13 +508,13 @@ typedef - HReg src; - HReg dst; - } Bsfr32; -- /* Mem fence (not just sse2, but sse0 and 1 too). In short, -- an insn which flushes all preceding loads and stores as -- much as possible before continuing. On SSE2 we emit a -- real "mfence", on SSE1 "sfence ; lock addl $0,0(%esp)" and -- on SSE0 "lock addl $0,0(%esp)". This insn therefore -- carries the host's hwcaps so the assembler knows what to -- emit. */ -+ /* Mem fence (not just sse2, but sse0 and sse1/mmxext too). -+ In short, an insn which flushes all preceding loads and -+ stores as much as possible before continuing. On SSE2 -+ we emit a real "mfence", on SSE1 or the MMXEXT subset -+ "sfence ; lock addl $0,0(%esp)" and on SSE0 -+ "lock addl $0,0(%esp)". This insn therefore carries the -+ host's hwcaps so the assembler knows what to emit. */ - struct { - UInt hwcaps; - } MFence; -diff --git a/VEX/priv/host_x86_isel.c b/VEX/priv/host_x86_isel.c -index 086aefc..90bc563 100644 ---- a/VEX/priv/host_x86_isel.c -+++ b/VEX/priv/host_x86_isel.c -@@ -3251,7 +3251,8 @@ static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e ) - { - - # define REQUIRE_SSE1 \ -- do { if (env->hwcaps == 0/*baseline, no sse*/) \ -+ do { if (env->hwcaps == 0/*baseline, no sse*/ \ -+ || env->hwcaps == VEX_HWCAPS_X86_MMXEXT /*Integer SSE*/) \ - goto vec_fail; \ - } while (0) - -@@ -4388,7 +4389,8 @@ HInstrArray* iselSB_X86 ( IRSB* bb, - /* sanity ... */ - vassert(arch_host == VexArchX86); - vassert(0 == (hwcaps_host -- & ~(VEX_HWCAPS_X86_SSE1 -+ & ~(VEX_HWCAPS_X86_MMXEXT -+ | VEX_HWCAPS_X86_SSE1 - | VEX_HWCAPS_X86_SSE2 - | VEX_HWCAPS_X86_SSE3 - | VEX_HWCAPS_X86_LZCNT))); -diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c -index e425950..5bb762f 100644 ---- a/VEX/priv/main_main.c -+++ b/VEX/priv/main_main.c -@@ -1086,23 +1086,25 @@ - - static HChar* show_hwcaps_x86 ( UInt hwcaps ) - { -- /* Monotonic, SSE3 > SSE2 > SSE1 > baseline. */ -+ /* Monotonic, LZCNT > SSE3 > SSE2 > SSE1 > MMXEXT > baseline. */ - switch (hwcaps) { - case 0: - return "x86-sse0"; -- case VEX_HWCAPS_X86_SSE1: -- return "x86-sse1"; -- case VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2: -- return "x86-sse1-sse2"; -- case VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2 -+ case VEX_HWCAPS_X86_MMXEXT: -+ return "x86-mmxext"; -+ case VEX_HWCAPS_X86_MMXEXT | VEX_HWCAPS_X86_SSE1: -+ return "x86-mmxext-sse1"; -+ case VEX_HWCAPS_X86_MMXEXT | VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2: -+ return "x86-mmxext-sse1-sse2"; -+ case VEX_HWCAPS_X86_MMXEXT | VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2 - | VEX_HWCAPS_X86_LZCNT: -- return "x86-sse1-sse2-lzcnt"; -- case VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2 -+ return "x86-mmxext-sse1-sse2-lzcnt"; -+ case VEX_HWCAPS_X86_MMXEXT | VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2 - | VEX_HWCAPS_X86_SSE3: -- return "x86-sse1-sse2-sse3"; -- case VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2 -+ return "x86-mmxext-sse1-sse2-sse3"; -+ case VEX_HWCAPS_X86_MMXEXT | VEX_HWCAPS_X86_SSE1 | VEX_HWCAPS_X86_SSE2 - | VEX_HWCAPS_X86_SSE3 | VEX_HWCAPS_X86_LZCNT: -- return "x86-sse1-sse2-sse3-lzcnt"; -+ return "x86-mmxext-sse1-sse2-sse3-lzcnt"; - default: - return NULL; - } -diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h -index 4b36727..c8b5892 100644 ---- a/VEX/pub/libvex.h -+++ b/VEX/pub/libvex.h -@@ -71,11 +71,12 @@ typedef - combinations. */ - - /* x86: baseline capability is Pentium-1 (FPU, MMX, but no SSE), with -- cmpxchg8b. */ --#define VEX_HWCAPS_X86_SSE1 (1<<1) /* SSE1 support (Pentium III) */ --#define VEX_HWCAPS_X86_SSE2 (1<<2) /* SSE2 support (Pentium 4) */ --#define VEX_HWCAPS_X86_SSE3 (1<<3) /* SSE3 support (>= Prescott) */ --#define VEX_HWCAPS_X86_LZCNT (1<<4) /* SSE4a LZCNT insn */ -+ cmpxchg8b. MMXEXT is a special AMD only subset of SSE1 (Integer SSE). */ -+#define VEX_HWCAPS_X86_MMXEXT (1<<1) /* A subset of SSE1 on early AMD */ -+#define VEX_HWCAPS_X86_SSE1 (1<<2) /* SSE1 support (Pentium III) */ -+#define VEX_HWCAPS_X86_SSE2 (1<<3) /* SSE2 support (Pentium 4) */ -+#define VEX_HWCAPS_X86_SSE3 (1<<4) /* SSE3 support (>= Prescott) */ -+#define VEX_HWCAPS_X86_LZCNT (1<<5) /* SSE4a LZCNT insn */ - - /* amd64: baseline capability is SSE2, with cmpxchg8b but not - cmpxchg16b. */ -commit 4c6f0638553e69b7f70c17a64a8f60114d6f6230 -Author: mjw -Date: Tue Aug 27 10:23:23 2013 +0000 - - Support mmxext (integer sse) subset on i386 (athlon). Bug #323713 - - Some processors like the AMD Athlon "Classic" support mmxext, - a sse1 subset. This subset is not properly detected by VEX. - The subset uses the same encoding as the sse1 instructions. - - The subset is described at: - http://support.amd.com/us/Embedded_TechDocs/22466.pdf - https://en.wikipedia.org/wiki/3DNow!#3DNow.21_extensions - - Detects mmxext subset from cpuid information (and enables it - when full sse1 is found). Also fixes the prereq of - none/tests/x86/insn_mmxext.vgtest so that it also runs when - full sse1 (and not just the mmxext subset) is found. - It already passed on such configurations. With the VEX patch - (r2745) it also passes with just the mmxext subset. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13515 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c -index 353c05b..2fd5f07 100644 ---- a/coregrind/m_machine.c -+++ b/coregrind/m_machine.c -@@ -685,7 +685,7 @@ - LibVEX_default_VexArchInfo(&vai); - - #if defined(VGA_x86) -- { Bool have_sse1, have_sse2, have_cx8, have_lzcnt; -+ { Bool have_sse1, have_sse2, have_cx8, have_lzcnt, have_mmxext; - UInt eax, ebx, ecx, edx, max_extended; - UChar vstr[13]; - vstr[0] = 0; -@@ -722,17 +722,27 @@ - if (!have_cx8) - return False; - -- /* Figure out if this is an AMD that can do LZCNT. */ -+ /* Figure out if this is an AMD that can do mmxext and/or LZCNT. */ -+ have_mmxext = False; - have_lzcnt = False; - if (0 == VG_(strcmp)(vstr, "AuthenticAMD") - && max_extended >= 0x80000001) { - VG_(cpuid)(0x80000001, 0, &eax, &ebx, &ecx, &edx); - have_lzcnt = (ecx & (1<<5)) != 0; /* True => have LZCNT */ -+ -+ /* Some older AMD processors support a sse1 subset (Integer SSE). */ -+ have_mmxext = !have_sse1 && ((edx & (1<<22)) != 0); - } - -- if (have_sse2 && have_sse1) { -+ /* Intel processors don't define the mmxext extension, but since it -+ is just a sse1 subset always define it when we have sse1. */ -+ if (have_sse1) -+ have_mmxext = True; -+ -+ if (have_sse2 && have_sse1 && have_mmxext) { - va = VexArchX86; -- vai.hwcaps = VEX_HWCAPS_X86_SSE1; -+ vai.hwcaps = VEX_HWCAPS_X86_MMXEXT; -+ vai.hwcaps |= VEX_HWCAPS_X86_SSE1; - vai.hwcaps |= VEX_HWCAPS_X86_SSE2; - if (have_lzcnt) - vai.hwcaps |= VEX_HWCAPS_X86_LZCNT; -@@ -740,13 +750,21 @@ - return True; - } - -- if (have_sse1) { -+ if (have_sse1 && have_mmxext) { - va = VexArchX86; -- vai.hwcaps = VEX_HWCAPS_X86_SSE1; -+ vai.hwcaps = VEX_HWCAPS_X86_MMXEXT; -+ vai.hwcaps |= VEX_HWCAPS_X86_SSE1; - VG_(machine_x86_have_mxcsr) = 1; - return True; - } - -+ if (have_mmxext) { -+ va = VexArchX86; -+ vai.hwcaps = VEX_HWCAPS_X86_MMXEXT; -+ VG_(machine_x86_have_mxcsr) = 0; -+ return True; -+ } -+ - va = VexArchX86; - vai.hwcaps = 0; /*baseline - no sse at all*/ - VG_(machine_x86_have_mxcsr) = 0; -diff --git a/none/tests/x86/insn_mmxext.vgtest b/none/tests/x86/insn_mmxext.vgtest -index ad48b6e..e3627d6 100644 ---- a/none/tests/x86/insn_mmxext.vgtest -+++ b/none/tests/x86/insn_mmxext.vgtest -@@ -1,3 +1,4 @@ - prog: ../../../none/tests/x86/insn_mmxext --prereq: ../../../tests/x86_amd64_features x86-mmxext -+# mmxext is an old AMD subset of sse1, so either will do. -+prereq: ../../../tests/x86_amd64_features x86-mmxext || ../../../tests/x86_amd64_features x86-sse - vgopts: -q diff --git a/valgrind-3.8.1-movntdqa.patch b/valgrind-3.8.1-movntdqa.patch deleted file mode 100644 index 079bbe9..0000000 --- a/valgrind-3.8.1-movntdqa.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit 6c07dca0af0527226ec9784fbb703526887f09c0 -Author: sewardj -Date: Tue Mar 26 10:27:39 2013 +0000 - - Implement SSE4 MOVNTDQA insn. Fixes #316503. - (Patrick J. LoPresti, lopresti@gmail.com) - - - git-svn-id: svn://svn.valgrind.org/vex/trunk@2700 8f6e269a-dfd6-0310-a8e1-e2731360e62c - -diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c -index 1034971..7e98e76 100644 ---- a/VEX/priv/guest_amd64_toIR.c -+++ b/VEX/priv/guest_amd64_toIR.c -@@ -16378,6 +16378,25 @@ Long dis_ESC_0F38__SSE4 ( Bool* decode_OK, - } - break; - -+ case 0x2A: -+ /* 66 0F 38 2A = MOVNTDQA -+ "non-temporal" "streaming" load -+ Handle like MOVDQA but only memory operand is allowed */ -+ if (have66noF2noF3(pfx) && sz == 2) { -+ modrm = getUChar(delta); -+ if (!epartIsReg(modrm)) { -+ addr = disAMode ( &alen, vbi, pfx, delta, dis_buf, 0 ); -+ gen_SEGV_if_not_16_aligned( addr ); -+ putXMMReg( gregOfRexRM(pfx,modrm), -+ loadLE(Ity_V128, mkexpr(addr)) ); -+ DIP("movntdqa %s,%s\n", dis_buf, -+ nameXMMReg(gregOfRexRM(pfx,modrm))); -+ delta += alen; -+ goto decode_success; -+ } -+ } -+ break; -+ - case 0x2B: - /* 66 0f 38 2B /r = PACKUSDW xmm1, xmm2/m128 - 2x 32x4 S->U saturating narrow from xmm2/m128 to xmm1 */ diff --git a/valgrind-3.8.1-new-manpages.patch b/valgrind-3.8.1-new-manpages.patch deleted file mode 100644 index 41dd7d3..0000000 --- a/valgrind-3.8.1-new-manpages.patch +++ /dev/null @@ -1,1397 +0,0 @@ -commit 2be51225ab0155c384bc0366c34bcdb6e69def15 -Author: mjw -Date: Fri Apr 5 13:19:12 2013 +0000 - - Fix double 'the the' in documentation. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13363 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/cachegrind/docs/cg-manual.xml b/cachegrind/docs/cg-manual.xml -index 13331d8..f45bda8 100644 ---- a/cachegrind/docs/cg-manual.xml -+++ b/cachegrind/docs/cg-manual.xml -@@ -352,7 +352,7 @@ a column contains only a dot it means the function never performs - that event (e.g. the third row shows that - strcmp() contains no - instructions that write to memory). The name --??? is used if the the file name -+??? is used if the file name - and/or function name could not be determined from debugging - information. If most of the entries have the form - ???:??? the program probably -@@ -1367,7 +1367,7 @@ shortcomings: - - - Another thing worth noting is that results are very sensitive. --Changing the size of the the executable being profiled, or the sizes -+Changing the size of the executable being profiled, or the sizes - of any of the shared libraries it uses, or even the length of their - file names, can perturb the results. Variations will be small, but - don't expect perfectly repeatable results if your program changes at -diff --git a/docs/xml/manual-core-adv.xml b/docs/xml/manual-core-adv.xml -index 73bdb5a..ff17351 100644 ---- a/docs/xml/manual-core-adv.xml -+++ b/docs/xml/manual-core-adv.xml -@@ -1542,7 +1542,7 @@ that wildcards are allowed for both sonames and function names. - The details are discussed below. - - VALGRIND_GET_ORIG_FN: --once in the the wrapper, the first priority is -+once in the wrapper, the first priority is - to get hold of the address of the original (and any other supporting - information needed). This is stored in a value of opaque - type OrigFn. -diff --git a/drd/docs/drd-manual.xml b/drd/docs/drd-manual.xml -index a94d612..7e20d99 100644 ---- a/drd/docs/drd-manual.xml -+++ b/drd/docs/drd-manual.xml -@@ -497,7 +497,7 @@ behavior of the DRD tool itself: - Print stack usage at thread exit time. When a program creates a large - number of threads it becomes important to limit the amount of virtual - memory allocated for thread stacks. This option makes it possible to -- observe how much stack memory has been used by each thread of the the -+ observe how much stack memory has been used by each thread of the - client program. Note: the DRD tool itself allocates some temporary - data on the client thread stack. The space necessary for this - temporary data must be allocated by the client program when it -diff --git a/exp-sgcheck/docs/sg-manual.xml b/exp-sgcheck/docs/sg-manual.xml -index 8b717e8..a8ee313 100644 ---- a/exp-sgcheck/docs/sg-manual.xml -+++ b/exp-sgcheck/docs/sg-manual.xml -@@ -217,7 +217,7 @@ of. - - - -- Coverage: SGCheck does not check whether the the areas read -+ Coverage: SGCheck does not check whether the areas read - or written by system calls do overrun stack or global arrays. This - would be easy to add. - -diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml -index 7a22401..c007759 100644 ---- a/memcheck/docs/mc-manual.xml -+++ b/memcheck/docs/mc-manual.xml -@@ -821,7 +821,7 @@ is - bytes are marked as initialised. - - Note that code that behaves in this way is in violation of -- the the ISO C/C++ standards, and should be considered broken. If -+ the ISO C/C++ standards, and should be considered broken. If - at all possible, such code should be fixed. This option should be - used only as a last resort. - -diff --git a/memcheck/docs/mc-tech-docs.xml b/memcheck/docs/mc-tech-docs.xml -index 1de368e..94911d0 100644 ---- a/memcheck/docs/mc-tech-docs.xml -+++ b/memcheck/docs/mc-tech-docs.xml -@@ -848,7 +848,7 @@ turn maintained by - Introduction to UCode - - UCode lies at the heart of the x86-to-x86 JITter. The --basic premise is that dealing the the x86 instruction set head-on -+basic premise is that dealing with the x86 instruction set head-on - is just too darn complicated, so we do the traditional - compiler-writer's trick and translate it into a simpler, - easier-to-deal-with form. - -commit b0bd2e9aca5eab4f1c8e6e2cb15d2ee325200e63 -Author: mjw -Date: Wed Jul 3 10:00:19 2013 +0000 - - Bug 321738 Add manpages for vgdb and valgrind-listener. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13443 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am -index a9f4b03..7cb0308 100644 ---- a/auxprogs/Makefile.am -+++ b/auxprogs/Makefile.am -@@ -11,6 +11,7 @@ dist_noinst_SCRIPTS = \ - posixtestsuite-1.5.1-diff-results - - EXTRA_DIST = \ -+ docs/valgrind-listener-manpage.xml \ - DotToScc.hs \ - Merge3Way.hs \ - gsl16-badfree.patch \ -diff --git a/auxprogs/docs/valgrind-listener-manpage.xml b/auxprogs/docs/valgrind-listener-manpage.xml -new file mode 100644 -index 0000000..da761b1 ---- /dev/null -+++ b/auxprogs/docs/valgrind-listener-manpage.xml -@@ -0,0 +1,74 @@ -+ -+ %vg-entities; ]> -+ -+ -+ -+ -+ -+ valgrind-listener -+ 1 -+ Release &rel-version; -+ -+ -+ -+ valgrind-listener -+ listens on a socket for Valgrind commentary -+ -+ -+ -+ -+ valgrind-listener -+ options -+ -+ -+ -+ -+ -+Description -+ -+valgrind-listener accepts (multiple) connections -+from valgrind processes that use the -+ option on the specified port and copies the -+commentary it is sent to stdout. -+ -+ -+ -+ -+ -+ -+ -+Options -+ -+ -+ -+ -+ -+ -+ -+ -+ -+See Also -+ -+ -+valgrind(1), -+&vg-docs-path; or -+&vg-docs-url;. -+ -+ -+ -+ -+ -+ -+Author -+ -+Julian Seward. -+ -+ -+ -+ -+ -+ -+ -diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am -index 6d0fe83..32b0286 100644 ---- a/coregrind/Makefile.am -+++ b/coregrind/Makefile.am -@@ -24,7 +24,8 @@ endif - EXTRA_DIST = \ - m_debuginfo/UNUSED_STABS.txt \ - m_debuginfo/README.txt \ -- m_gdbserver/README_DEVELOPERS -+ m_gdbserver/README_DEVELOPERS \ -+ docs/vgdb-manpage.xml - - #---------------------------------------------------------------------------- - # The launcher. Built for the primary target only. -diff --git a/coregrind/docs/vgdb-manpage.xml b/coregrind/docs/vgdb-manpage.xml -new file mode 100644 -index 0000000..85a62aa ---- /dev/null -+++ b/coregrind/docs/vgdb-manpage.xml -@@ -0,0 +1,84 @@ -+ -+ %vg-entities; ]> -+ -+ -+ -+ -+ -+ vgdb -+ 1 -+ Release &rel-version; -+ -+ -+ -+ vgdb -+ intermediary between Valgrind and GDB or a shell -+ -+ -+ -+ -+ vgdb -+ options -+ -+ -+ -+ -+ -+Description -+ -+vgdb ("Valgrind to GDB") is used as an -+intermediary between Valgrind and GDB or a shell. It has two usage modes: -+ -+ -+ -+ -+ -+ -+ -+Options -+ -+ -+ -+ -+ -+ -+ -+ -+ -+See Also -+ -+ -+valgrind(1), -+&vg-docs-path; or -+&vg-docs-url;, -+&vg-gdbserver-label; -+&vg-vgdb-label;, -+&vg-monitor-label;. -+ -+ -+ -+ -+ -+ -+Author -+ -+Philippe Waroquiers. -+ -+ -+ -+ -+ -+ -+ -diff --git a/docs/xml/manpages-index.xml b/docs/xml/manpages-index.xml -index a1a8979..7d774e5 100644 ---- a/docs/xml/manpages-index.xml -+++ b/docs/xml/manpages-index.xml -@@ -35,5 +35,13 @@ - - -+ -+ -+ -+ -+ -+ - - -diff --git a/docs/xml/manual-core-adv.xml b/docs/xml/manual-core-adv.xml -index 870996f..23b88fe 100644 ---- a/docs/xml/manual-core-adv.xml -+++ b/docs/xml/manual-core-adv.xml -@@ -1102,7 +1102,8 @@ $5 = 36 - intermediary between Valgrind and GDB or a shell. - Therefore, it has two usage modes: - -- -+ -+ - - As a standalone utility, it is used from a shell command - line to send monitor commands to a process running under -@@ -1121,28 +1122,33 @@ Therefore, it has two usage modes: - - - -+ - - vgdb accepts the following - options: -- -- -- : specifies the PID of -+ -+ -+ -+ -+ Specifies the PID of - the process to which vgdb must connect to. This option is useful - in case more than one Valgrind gdbserver can be connected to. If - the argument is not given and multiple - Valgrind gdbserver processes are running, vgdb will report the -- list of such processes and then exit. -- -+ list of such processes and then exit. -+ - -- -- must be given to both -+ -+ -+ Must be given to both - Valgrind and vgdb if you want to change the default prefix for the - FIFOs (named pipes) used for communication between the Valgrind -- gdbserver and vgdb. -- -+ gdbserver and vgdb. -+ - -- -- instructs vgdb to -+ -+ -+ Instructs vgdb to - search for available Valgrind gdbservers for the specified number - of seconds. This makes it possible start a vgdb process - before starting the Valgrind gdbserver with which you intend the -@@ -1153,11 +1159,12 @@ options: - "target remote" command, you must set the GDB remotetimeout to a - value bigger than the --wait argument value. See option - (just below) -- for an example of setting the remotetimeout value. -- -+ for an example of setting the remotetimeout value. -+ - -- -- gives the -+ -+ -+ Gives the - number of milliseconds after which vgdb will force the invocation - of gdbserver embedded in Valgrind. The default value is 100 - milliseconds. A value of 0 disables forced invocation. The forced -@@ -1175,18 +1182,20 @@ options: - -- -- -+ -+ - -- -- instructs a -+ -+ -+ Instructs a - standalone vgdb to exit if the Valgrind gdbserver it is connected - to does not process a command in the specified number of seconds. -- The default value is to never time out. -- -+ The default value is to never time out. -+ - -- -- instructs vgdb to -+ -+ -+ Instructs vgdb to - use tcp/ip and listen for GDB on the specified port nr rather than - to use a pipe to communicate with GDB. Using tcp/ip allows to have - GDB running on one computer and debugging a Valgrind process -@@ -1204,41 +1213,46 @@ gdb prog - (gdb) target remote targetip:1234 - ]]> - where targetip is the ip address or hostname of the target computer. -- -- -+ -+ - -- -- To give more than one command to a -+ -+ -+ To give more than one command to a - standalone vgdb, separate the commands by an - option . Example: - -- -+]]> -+ - -- -- instructs a standalone vgdb to report -+ -+ -+ Instructs a standalone vgdb to report - the list of the Valgrind gdbserver processes running and then -- exit. -- -+ exit. -+ - -- -- instructs a standalone vgdb to show the -+ -+ -+ Instructs a standalone vgdb to show the - state of the shared memory used by the Valgrind gdbserver. vgdb - will exit after having shown the Valgrind gdbserver shared memory -- state. -- -+ state. -+ - -- -- instructs vgdb to produce debugging -+ -+ -+ Instructs vgdb to produce debugging - output. Give multiple args to increase the - verbosity. When giving to a relay vgdb, you better - redirect the standard error (stderr) of vgdb to a file to avoid -- interaction between GDB and vgdb debugging output. -- -+ interaction between GDB and vgdb debugging output. -+ - -- -- -+ -+ -+ - - - -diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml -index e489fd6..9e2708a 100644 ---- a/docs/xml/manual-core.xml -+++ b/docs/xml/manual-core.xml -@@ -237,21 +237,27 @@ re-run, passing the option to Valgrind. A second - - valgrind-listener accepts two - command-line options: -- -- -- or : -- when the number of connected processes falls back to zero, -- exit. Without this, it will run forever, that is, until you -- send it Control-C. -- -- -- : changes the port it listens -- on from the default (1500). The specified port must be in the -- range 1024 to 65535. The same restriction applies to port -- numbers specified by a to -- Valgrind itself. -- -- -+ -+ -+ -+ -+ -+ When the number of connected processes falls back to zero, -+ exit. Without this, it will run forever, that is, until you -+ send it Control-C. -+ -+ -+ -+ -+ -+ Changes the port it listens on from the default (1500). -+ The specified port must be in the range 1024 to 65535. -+ The same restriction applies to port numbers specified by a -+ to Valgrind itself. -+ -+ -+ -+ - - If a Valgrinded process fails to connect to a listener, for - whatever reason (the listener isn't running, invalid or unreachable - -commit c6dba7749d99a509ab06d930be7090a99deb65ae -Author: mjw -Date: Wed Jul 3 10:00:17 2013 +0000 - - Bug 321730 Add cg_merge and cg_diff man pages. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13442 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am -index 43a44af..ef29961 100644 ---- a/cachegrind/Makefile.am -+++ b/cachegrind/Makefile.am -@@ -2,7 +2,9 @@ include $(top_srcdir)/Makefile.tool.am - - EXTRA_DIST = \ - docs/cg-manual.xml \ -- docs/cg_annotate-manpage.xml -+ docs/cg_annotate-manpage.xml \ -+ docs/cg_diff-manpage.xml \ -+ docs/cg_merge-manpage.xml - - #---------------------------------------------------------------------------- - # Headers, etc -diff --git a/cachegrind/docs/cg-manual.xml b/cachegrind/docs/cg-manual.xml -index f45bda8..0f61e0a 100644 ---- a/cachegrind/docs/cg-manual.xml -+++ b/cachegrind/docs/cg-manual.xml -@@ -112,7 +112,7 @@ information, and then run cg_annotate to get a detailed presentation of that - information. As an optional intermediate step, you can use cg_merge to sum - together the outputs of multiple Cachegrind runs into a single file which - you then use as the input for cg_annotate. Alternatively, you can use --cg_diff to difference the outputs of two Cachegrind runs into a signel file -+cg_diff to difference the outputs of two Cachegrind runs into a single file - which you then use as the input for cg_annotate. - - -@@ -1001,6 +1001,29 @@ small differences like these; it works in the same way as - - - -+ -+cg_merge Command-line Options -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Write the profile data to outfile -+ rather than to standard output. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - cg_diff Command-line Options - -diff --git a/cachegrind/docs/cg_diff-manpage.xml b/cachegrind/docs/cg_diff-manpage.xml -new file mode 100644 -index 0000000..4823db0 ---- /dev/null -+++ b/cachegrind/docs/cg_diff-manpage.xml -@@ -0,0 +1,75 @@ -+ -+ %vg-entities; ]> -+ -+ -+ -+ -+ -+ cg_diff -+ 1 -+ Release &rel-version; -+ -+ -+ -+ cg_diff -+ compares two Cachegrind output files -+ -+ -+ -+ -+ cg_diff -+ options -+ cachegrind-out-file1 -+ cachegrind-out-file2 -+ -+ -+ -+ -+ -+Description -+ -+cg_diff takes two output files produced by the -+Valgrind tool Cachegrind, computes the difference and prints the result -+in the same format that Cachegrinds outputs. -+ -+ -+ -+ -+ -+ -+ -+Options -+ -+ -+ -+ -+ -+ -+ -+ -+ -+See Also -+ -+ -+cg_annotate(1), valgrind(1), -+&vg-docs-path; or -+&vg-docs-url;. -+ -+ -+ -+ -+ -+ -+Author -+ -+Nicholas Nethercote. -+ -+ -+ -+ -+ -+ -+ -diff --git a/cachegrind/docs/cg_merge-manpage.xml b/cachegrind/docs/cg_merge-manpage.xml -new file mode 100644 -index 0000000..5e733d2 ---- /dev/null -+++ b/cachegrind/docs/cg_merge-manpage.xml -@@ -0,0 +1,73 @@ -+ -+ %vg-entities; ]> -+ -+ -+ -+ -+ -+ cg_merge -+ 1 -+ Release &rel-version; -+ -+ -+ -+ cg_merge -+ merges multiple Cachegrind output files into one -+ -+ -+ -+ -+ cg_merge -+ options -+ cachegrind-out-files -+ -+ -+ -+ -+ -+Description -+ -+cg_merge sums together the outputs of multiple -+Cachegrind runs into a single output file. -+ -+ -+ -+ -+ -+ -+ -+Options -+ -+ -+ -+ -+ -+ -+ -+ -+ -+See Also -+ -+ -+cg_annotate(1), valgrind(1), -+&vg-docs-path; or -+&vg-docs-url;. -+ -+ -+ -+ -+ -+ -+Author -+ -+Nicholas Nethercote. -+ -+ -+ -+ -+ -+ -+ -diff --git a/docs/xml/manpages-index.xml b/docs/xml/manpages-index.xml -index b02fc9c..a1a8979 100644 ---- a/docs/xml/manpages-index.xml -+++ b/docs/xml/manpages-index.xml -@@ -15,6 +15,14 @@ - - -+ -+ -+ -+ -+ -+ - - ---- valgrind-3.8.1.orig/docs/callgrind_annotate.1 2013-07-08 15:15:20.681963472 +0200 -+++ valgrind-3.8.1/docs/callgrind_annotate.1 2013-07-08 15:29:31.000000000 +0200 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: Callgrind Annotate - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.77.1 --.\" Date: 03/12/2013 --.\" Manual: Release 3.8.0 --.\" Source: Release 3.8.0 -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 - .\" Language: English - .\" --.TH "CALLGRIND ANNOTATE" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" -+.TH "CALLGRIND ANNOTATE" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- ---- valgrind-3.8.1.orig/docs/callgrind_control.1 2013-07-08 15:15:20.668963358 +0200 -+++ valgrind-3.8.1/docs/callgrind_control.1 2013-07-08 15:29:31.000000000 +0200 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: Callgrind Control - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.77.1 --.\" Date: 03/12/2013 --.\" Manual: Release 3.8.0 --.\" Source: Release 3.8.0 -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 - .\" Language: English - .\" --.TH "CALLGRIND CONTROL" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" -+.TH "CALLGRIND CONTROL" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -@@ -34,7 +34,6 @@ - \fBcallgrind_control\fR [\fIoptions\fR] [\fIpid|program\-name\fR...] - .SH "DESCRIPTION" - .PP -- - \fBcallgrind_control\fR - controls programs being run by the Valgrind tool Callgrind\&. When a - \fBpid/program name\fR ---- valgrind-3.8.1.orig/docs/cg_annotate.1 2013-07-08 15:15:20.675963418 +0200 -+++ valgrind-3.8.1/docs/cg_annotate.1 2013-07-08 15:29:31.000000000 +0200 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: cg_annotate - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.77.1 --.\" Date: 03/12/2013 --.\" Manual: Release 3.8.0 --.\" Source: Release 3.8.0 -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 - .\" Language: English - .\" --.TH "CG_ANNOTATE" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" -+.TH "CG_ANNOTATE" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -diff -urN valgrind-3.8.1.orig/docs/cg_diff.1 docs/cg_diff.1 ---- valgrind-3.8.1.orig/docs/cg_diff.1 1970-01-01 01:00:00.000000000 +0100 -+++ valgrind-3.8.1/docs/cg_diff.1 2013-07-08 15:29:31.000000000 +0200 -@@ -0,0 +1,69 @@ -+'\" t -+.\" Title: cg_diff -+.\" Author: [see the "Author" section] -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 -+.\" Language: English -+.\" -+.TH "CG_DIFF" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" -+.\" ----------------------------------------------------------------- -+.\" * Define some portability stuff -+.\" ----------------------------------------------------------------- -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.\" http://bugs.debian.org/507673 -+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.ie \n(.g .ds Aq \(aq -+.el .ds Aq ' -+.\" ----------------------------------------------------------------- -+.\" * set default formatting -+.\" ----------------------------------------------------------------- -+.\" disable hyphenation -+.nh -+.\" disable justification (adjust text to left margin only) -+.ad l -+.\" ----------------------------------------------------------------- -+.\" * MAIN CONTENT STARTS HERE * -+.\" ----------------------------------------------------------------- -+.SH "NAME" -+cg_diff \- compares two Cachegrind output files -+.SH "SYNOPSIS" -+.HP \w'\fBcg_diff\fR\ 'u -+\fBcg_diff\fR [\fIoptions\fR] \fIcachegrind\-out\-file1\fR \fIcachegrind\-out\-file2\fR -+.SH "DESCRIPTION" -+.PP -+\fBcg_diff\fR -+takes two output files produced by the Valgrind tool Cachegrind, computes the difference and prints the result in the same format that Cachegrinds outputs\&. -+.SH "OPTIONS" -+.PP -+\fB\-h \-\-help \fR -+.RS 4 -+Show the help message\&. -+.RE -+.PP -+\fB\-\-version \fR -+.RS 4 -+Show the version number\&. -+.RE -+.PP -+\fB\-\-mod\-filename= [default: none]\fR -+.RS 4 -+Specifies a Perl search\-and\-replace expression that is applied to all filenames\&. Useful for removing minor differences in paths between two different versions of a program that are sitting in different directories\&. -+.RE -+.PP -+\fB\-\-mod\-funcname= [default: none]\fR -+.RS 4 -+Like -+\fB\-\-mod\-filename\fR, but for filenames\&. Useful for removing minor differences in randomized names of auto\-generated functions generated by some compilers\&. -+.RE -+.SH "SEE ALSO" -+.PP -+cg_annotate(1), valgrind(1), -+$INSTALL/share/doc/valgrind/html/index\&.html -+or -+http://www\&.valgrind\&.org/docs/manual/index\&.html\&. -+.SH "AUTHOR" -+.PP -+Nicholas Nethercote\&. ---- valgrind-3.8.1.orig/docs/cg_merge.1 1970-01-01 01:00:00.000000000 +0100 -+++ valgrind-3.8.1/docs/cg_merge.1 2013-07-08 15:29:31.000000000 +0200 -@@ -0,0 +1,55 @@ -+'\" t -+.\" Title: cg_merge -+.\" Author: [see the "Author" section] -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 -+.\" Language: English -+.\" -+.TH "CG_MERGE" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" -+.\" ----------------------------------------------------------------- -+.\" * Define some portability stuff -+.\" ----------------------------------------------------------------- -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.\" http://bugs.debian.org/507673 -+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.ie \n(.g .ds Aq \(aq -+.el .ds Aq ' -+.\" ----------------------------------------------------------------- -+.\" * set default formatting -+.\" ----------------------------------------------------------------- -+.\" disable hyphenation -+.nh -+.\" disable justification (adjust text to left margin only) -+.ad l -+.\" ----------------------------------------------------------------- -+.\" * MAIN CONTENT STARTS HERE * -+.\" ----------------------------------------------------------------- -+.SH "NAME" -+cg_merge \- merges multiple Cachegrind output files into one -+.SH "SYNOPSIS" -+.HP \w'\fBcg_merge\fR\ 'u -+\fBcg_merge\fR [\fIoptions\fR] [\fIcachegrind\-out\-files\fR...] -+.SH "DESCRIPTION" -+.PP -+\fBcg_merge\fR -+sums together the outputs of multiple Cachegrind runs into a single output file\&. -+.SH "OPTIONS" -+.PP -+\fB\-o outfile\fR -+.RS 4 -+Write the profile data to -+outfile -+rather than to standard output\&. -+.RE -+.SH "SEE ALSO" -+.PP -+cg_annotate(1), valgrind(1), -+$INSTALL/share/doc/valgrind/html/index\&.html -+or -+http://www\&.valgrind\&.org/docs/manual/index\&.html\&. -+.SH "AUTHOR" -+.PP -+Nicholas Nethercote\&. ---- valgrind-3.8.1.orig/docs/ms_print.1 2013-07-08 15:15:20.680963463 +0200 -+++ valgrind-3.8.1/docs/ms_print.1 2013-07-08 15:29:31.000000000 +0200 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: ms_print - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.77.1 --.\" Date: 03/12/2013 --.\" Manual: Release 3.8.0 --.\" Source: Release 3.8.0 -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 - .\" Language: English - .\" --.TH "MS_PRINT" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" -+.TH "MS_PRINT" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -diff -urN valgrind-3.8.1.orig/docs/valgrind.1 docs/valgrind.1 ---- valgrind-3.8.1.orig/docs/valgrind.1 2013-07-08 15:15:20.681963472 +0200 -+++ valgrind-3.8.1/docs/valgrind.1 2013-07-08 15:29:31.000000000 +0200 -@@ -1,13 +1,13 @@ - '\" t - .\" Title: VALGRIND - .\" Author: [see the "Author" section] --.\" Generator: DocBook XSL Stylesheets v1.77.1 --.\" Date: 03/12/2013 --.\" Manual: Release 3.8.0 --.\" Source: Release 3.8.0 -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 - .\" Language: English - .\" --.TH "VALGRIND" "1" "03/12/2013" "Release 3.8.1" "Release 3.8.1" -+.TH "VALGRIND" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -@@ -427,8 +427,7 @@ - causes Valgrind to start a debugger for the program at this point\&. When you have finished with the debugger, quit from it, and the program will continue\&. Trying to continue from inside the debugger doesn\*(Aqt work\&. - .sp - Note: if you use GDB, more powerful debugging support is provided by the --\fB\-\-vgdb=\fR --\fIyes\fR -+\fB\-\-vgdb=\fR\fIyes\fR - or - \fIfull\fR - value\&. This activates Valgrind\*(Aqs internal gdbserver, which provides more\-or\-less full GDB\-style control of the application: insertion of breakpoints, continuing from inside GDB, inferior function calls, and much more\&. -@@ -1010,7 +1009,7 @@ - When - \fIno\fR, loads from partially invalid addresses are treated the same as loads from completely invalid addresses: an illegal\-address error is issued, and the resulting bytes are marked as initialised\&. - .sp --Note that code that behaves in this way is in violation of the the ISO C/C++ standards, and should be considered broken\&. If at all possible, such code should be fixed\&. This option should be used only as a last resort\&. -+Note that code that behaves in this way is in violation of the ISO C/C++ standards, and should be considered broken\&. If at all possible, such code should be fixed\&. This option should be used only as a last resort\&. - .RE - .PP - \fB\-\-freelist\-vol= [default: 20000000] \fR -@@ -1400,7 +1399,7 @@ - .PP - \fB\-\-show\-stack\-usage= [default: no]\fR - .RS 4 --Print stack usage at thread exit time\&. When a program creates a large number of threads it becomes important to limit the amount of virtual memory allocated for thread stacks\&. This option makes it possible to observe how much stack memory has been used by each thread of the the client program\&. Note: the DRD tool itself allocates some temporary data on the client thread stack\&. The space necessary for this temporary data must be allocated by the client program when it allocates stack memory, but is not included in stack usage reported by DRD\&. -+Print stack usage at thread exit time\&. When a program creates a large number of threads it becomes important to limit the amount of virtual memory allocated for thread stacks\&. This option makes it possible to observe how much stack memory has been used by each thread of the client program\&. Note: the DRD tool itself allocates some temporary data on the client thread stack\&. The space necessary for this temporary data must be allocated by the client program when it allocates stack memory, but is not included in stack usage reported by DRD\&. - .RE - .PP - \fB\-\-trace\-addr=
[default: none]\fR -@@ -1717,8 +1716,7 @@ - $INSTALL/share/doc/valgrind/html/index\&.html - or - http://www\&.valgrind\&.org/docs/manual/index\&.html, --\m[blue]\fBDebugging your program using Valgrind\*(Aqs gdbserver and GDB\fR\m[]\&\s-2\u[1]\d\s+2 --\m[blue]\fBvgdb\fR\m[]\&\s-2\u[2]\d\s+2, -+\m[blue]\fBDebugging your program using Valgrind\*(Aqs gdbserver and GDB\fR\m[]\&\s-2\u[1]\d\s+2\m[blue]\fBvgdb\fR\m[]\&\s-2\u[2]\d\s+2, - \m[blue]\fBValgrind monitor commands\fR\m[]\&\s-2\u[3]\d\s+2, - \m[blue]\fBThe Commentary\fR\m[]\&\s-2\u[4]\d\s+2, - \m[blue]\fBScheduling and Multi\-Thread Performance\fR\m[]\&\s-2\u[5]\d\s+2, -diff -urN valgrind-3.8.1.orig/docs/valgrind-listener.1 docs/valgrind-listener.1 ---- valgrind-3.8.1.orig/docs/valgrind-listener.1 1970-01-01 01:00:00.000000000 +0100 -+++ valgrind-3.8.1/docs/valgrind-listener.1 2013-07-08 15:29:31.000000000 +0200 -@@ -0,0 +1,64 @@ -+'\" t -+.\" Title: valgrind-listener -+.\" Author: [see the "Author" section] -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 -+.\" Language: English -+.\" -+.TH "VALGRIND\-LISTENER" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" -+.\" ----------------------------------------------------------------- -+.\" * Define some portability stuff -+.\" ----------------------------------------------------------------- -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.\" http://bugs.debian.org/507673 -+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.ie \n(.g .ds Aq \(aq -+.el .ds Aq ' -+.\" ----------------------------------------------------------------- -+.\" * set default formatting -+.\" ----------------------------------------------------------------- -+.\" disable hyphenation -+.nh -+.\" disable justification (adjust text to left margin only) -+.ad l -+.\" ----------------------------------------------------------------- -+.\" * MAIN CONTENT STARTS HERE * -+.\" ----------------------------------------------------------------- -+.SH "NAME" -+valgrind-listener \- listens on a socket for Valgrind commentary -+.SH "SYNOPSIS" -+.HP \w'\fBvalgrind\-listener\fR\ 'u -+\fBvalgrind\-listener\fR [\fIoptions\fR] -+.SH "DESCRIPTION" -+.PP -+\fBvalgrind\-listener\fR -+accepts (multiple) connections from -+\fBvalgrind\fR -+processes that use the -+\fB\-\-log\-socket\fR -+option on the specified port and copies the commentary it is sent to stdout\&. -+.SH "OPTIONS" -+.PP -+\fB\-e \-\-exit\-at\-zero\fR -+.RS 4 -+When the number of connected processes falls back to zero, exit\&. Without this, it will run forever, that is, until you send it Control\-C\&. -+.RE -+.PP -+\fBportnumber\fR -+.RS 4 -+Changes the port it listens on from the default (1500)\&. The specified port must be in the range 1024 to 65535\&. The same restriction applies to port numbers specified by a -+\fB\-\-log\-socket\fR -+to Valgrind itself\&. -+.RE -+.SH "SEE ALSO" -+.PP -+valgrind(1), -+$INSTALL/share/doc/valgrind/html/index\&.html -+or -+http://www\&.valgrind\&.org/docs/manual/index\&.html\&. -+.SH "AUTHOR" -+.PP -+Julian Seward\&. -diff -urN valgrind-3.8.1.orig/docs/vgdb.1 docs/vgdb.1 ---- valgrind-3.8.1.orig/docs/vgdb.1 1970-01-01 01:00:00.000000000 +0100 -+++ valgrind-3.8.1/docs/vgdb.1 2013-07-08 15:29:31.000000000 +0200 -@@ -0,0 +1,208 @@ -+'\" t -+.\" Title: vgdb -+.\" Author: [see the "Author" section] -+.\" Generator: DocBook XSL Stylesheets v1.78.1 -+.\" Date: 07/08/2013 -+.\" Manual: Release 3.8.1 -+.\" Source: Release 3.8.1 -+.\" Language: English -+.\" -+.TH "VGDB" "1" "07/08/2013" "Release 3.8.1" "Release 3.8.1" -+.\" ----------------------------------------------------------------- -+.\" * Define some portability stuff -+.\" ----------------------------------------------------------------- -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.\" http://bugs.debian.org/507673 -+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.ie \n(.g .ds Aq \(aq -+.el .ds Aq ' -+.\" ----------------------------------------------------------------- -+.\" * set default formatting -+.\" ----------------------------------------------------------------- -+.\" disable hyphenation -+.nh -+.\" disable justification (adjust text to left margin only) -+.ad l -+.\" ----------------------------------------------------------------- -+.\" * MAIN CONTENT STARTS HERE * -+.\" ----------------------------------------------------------------- -+.SH "NAME" -+vgdb \- intermediary between Valgrind and GDB or a shell -+.SH "SYNOPSIS" -+.HP \w'\fBvgdb\fR\ 'u -+\fBvgdb\fR [\fIoptions\fR] -+.SH "DESCRIPTION" -+.PP -+\fBvgdb\fR -+("Valgrind to GDB") is used as an intermediary between Valgrind and GDB or a shell\&. It has two usage modes: -+.sp -+.RS 4 -+.ie n \{\ -+\h'-04' 1.\h'+01'\c -+.\} -+.el \{\ -+.sp -1 -+.IP " 1." 4.2 -+.\} -+As a standalone utility, it is used from a shell command line to send monitor commands to a process running under Valgrind\&. For this usage, the vgdb OPTION(s) must be followed by the monitor command to send\&. To send more than one command, separate them with the -+\fB\-c\fR -+option\&. -+.RE -+.sp -+.RS 4 -+.ie n \{\ -+\h'-04' 2.\h'+01'\c -+.\} -+.el \{\ -+.sp -1 -+.IP " 2." 4.2 -+.\} -+In combination with GDB "target remote |" command, it is used as the relay application between GDB and the Valgrind gdbserver\&. For this usage, only OPTION(s) can be given, but no COMMAND can be given\&. -+.RE -+.SH "OPTIONS" -+.PP -+\fB\-\-pid=\fR -+.RS 4 -+Specifies the PID of the process to which vgdb must connect to\&. This option is useful in case more than one Valgrind gdbserver can be connected to\&. If the -+\fB\-\-pid\fR -+argument is not given and multiple Valgrind gdbserver processes are running, vgdb will report the list of such processes and then exit\&. -+.RE -+.PP -+\fB\-\-vgdb\-prefix\fR -+.RS 4 -+Must be given to both Valgrind and vgdb if you want to change the default prefix for the FIFOs (named pipes) used for communication between the Valgrind gdbserver and vgdb\&. -+.RE -+.PP -+\fB\-\-wait=\fR -+.RS 4 -+Instructs vgdb to search for available Valgrind gdbservers for the specified number of seconds\&. This makes it possible start a vgdb process before starting the Valgrind gdbserver with which you intend the vgdb to communicate\&. This option is useful when used in conjunction with a -+\fB\-\-vgdb\-prefix\fR -+that is unique to the process you want to wait for\&. Also, if you use the -+\fB\-\-wait\fR -+argument in the GDB "target remote" command, you must set the GDB remotetimeout to a value bigger than the \-\-wait argument value\&. See option -+\fB\-\-max\-invoke\-ms\fR -+(just below) for an example of setting the remotetimeout value\&. -+.RE -+.PP -+\fB\-\-max\-invoke\-ms=\fR -+.RS 4 -+Gives the number of milliseconds after which vgdb will force the invocation of gdbserver embedded in Valgrind\&. The default value is 100 milliseconds\&. A value of 0 disables forced invocation\&. The forced invocation is used when vgdb is connected to a Valgrind gdbserver, and the Valgrind process has all its threads blocked in a system call\&. -+.sp -+If you specify a large value, you might need to increase the GDB "remotetimeout" value from its default value of 2 seconds\&. You should ensure that the timeout (in seconds) is bigger than the -+\fB\-\-max\-invoke\-ms\fR -+value\&. For example, for -+\fB\-\-max\-invoke\-ms=5000\fR, the following GDB command is suitable: -+.sp -+.if n \{\ -+.RS 4 -+.\} -+.nf -+ (gdb) set remotetimeout 6 -+ -+.fi -+.if n \{\ -+.RE -+.\} -+.sp -+.RE -+.PP -+\fB\-\-cmd\-time\-out=\fR -+.RS 4 -+Instructs a standalone vgdb to exit if the Valgrind gdbserver it is connected to does not process a command in the specified number of seconds\&. The default value is to never time out\&. -+.RE -+.PP -+\fB\-\-port=\fR -+.RS 4 -+Instructs vgdb to use tcp/ip and listen for GDB on the specified port nr rather than to use a pipe to communicate with GDB\&. Using tcp/ip allows to have GDB running on one computer and debugging a Valgrind process running on another target computer\&. Example: -+.sp -+.if n \{\ -+.RS 4 -+.\} -+.nf -+# On the target computer, start your program under valgrind using -+valgrind \-\-vgdb\-error=0 prog -+# and then in another shell, run: -+vgdb \-\-port=1234 -+.fi -+.if n \{\ -+.RE -+.\} -+.sp -+On the computer which hosts GDB, execute the command: -+.sp -+.if n \{\ -+.RS 4 -+.\} -+.nf -+gdb prog -+(gdb) target remote targetip:1234 -+.fi -+.if n \{\ -+.RE -+.\} -+.sp -+where targetip is the ip address or hostname of the target computer\&. -+.RE -+.PP -+\fB\-c\fR -+.RS 4 -+To give more than one command to a standalone vgdb, separate the commands by an option -+\fB\-c\fR\&. Example: -+.sp -+.if n \{\ -+.RS 4 -+.\} -+.nf -+vgdb v\&.set log_output \-c leak_check any -+.fi -+.if n \{\ -+.RE -+.\} -+.RE -+.PP -+\fB\-l\fR -+.RS 4 -+Instructs a standalone vgdb to report the list of the Valgrind gdbserver processes running and then exit\&. -+.RE -+.PP -+\fB\-D\fR -+.RS 4 -+Instructs a standalone vgdb to show the state of the shared memory used by the Valgrind gdbserver\&. vgdb will exit after having shown the Valgrind gdbserver shared memory state\&. -+.RE -+.PP -+\fB\-d\fR -+.RS 4 -+Instructs vgdb to produce debugging output\&. Give multiple -+\fB\-d\fR -+args to increase the verbosity\&. When giving -+\fB\-d\fR -+to a relay vgdb, you better redirect the standard error (stderr) of vgdb to a file to avoid interaction between GDB and vgdb debugging output\&. -+.RE -+.SH "SEE ALSO" -+.PP -+valgrind(1), -+$INSTALL/share/doc/valgrind/html/index\&.html -+or -+http://www\&.valgrind\&.org/docs/manual/index\&.html, -+\m[blue]\fBDebugging your program using Valgrind\*(Aqs gdbserver and GDB\fR\m[]\&\s-2\u[1]\d\s+2\m[blue]\fBvgdb\fR\m[]\&\s-2\u[2]\d\s+2, -+\m[blue]\fBValgrind monitor commands\fR\m[]\&\s-2\u[3]\d\s+2\&. -+.SH "AUTHOR" -+.PP -+Philippe Waroquiers\&. -+.SH "NOTES" -+.IP " 1." 4 -+Debugging your program using Valgrind's gdbserver and GDB -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.gdbserver -+.RE -+.IP " 2." 4 -+vgdb -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.vgdb -+.RE -+.IP " 3." 4 -+Valgrind monitor commands -+.RS 4 -+\%http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.valgrind-monitor-commands -+.RE -diff -urN valgrind-3.8.1.orig/docs/xml/vg-entities.xml docs/xml/vg-entities.xml ---- valgrind-3.8.1.orig/docs/xml/vg-entities.xml 2013-07-08 15:15:20.675963418 +0200 -+++ valgrind-3.8.1/docs/xml/vg-entities.xml 2013-07-08 15:29:23.000000000 +0200 -@@ -6,7 +6,7 @@ - - - -- -+ - - - -diff -ur valgrind-3.8.1.orig/auxprogs/Makefile.in valgrind-3.8.1/auxprogs/Makefile.in ---- valgrind-3.8.1.orig/auxprogs/Makefile.in 2013-08-14 18:06:17.416639326 +0200 -+++ valgrind-3.8.1/auxprogs/Makefile.in 2013-08-14 18:06:23.286621135 +0200 -@@ -356,6 +356,7 @@ - posixtestsuite-1.5.1-diff-results - - EXTRA_DIST = \ -+ docs/valgrind-listener-manpage.xml \ - DotToScc.hs \ - Merge3Way.hs \ - gsl16-badfree.patch \ -diff -ur valgrind-3.8.1.orig/cachegrind/Makefile.in valgrind-3.8.1/cachegrind/Makefile.in ---- valgrind-3.8.1.orig/cachegrind/Makefile.in 2013-08-14 18:06:17.458639197 +0200 -+++ valgrind-3.8.1/cachegrind/Makefile.in 2013-08-14 18:06:23.389620812 +0200 -@@ -589,7 +589,9 @@ - - EXTRA_DIST = \ - docs/cg-manual.xml \ -- docs/cg_annotate-manpage.xml -+ docs/cg_annotate-manpage.xml \ -+ docs/cg_diff-manpage.xml \ -+ docs/cg_merge-manpage.xml - - - #---------------------------------------------------------------------------- -diff -ur valgrind-3.8.1.orig/coregrind/Makefile.in valgrind-3.8.1/coregrind/Makefile.in ---- valgrind-3.8.1.orig/coregrind/Makefile.in 2013-08-14 18:06:17.470639160 +0200 -+++ valgrind-3.8.1/coregrind/Makefile.in 2013-08-14 18:06:24.403617627 +0200 -@@ -935,8 +935,8 @@ - - # so as to make sure these get copied into the tarball - EXTRA_DIST = m_debuginfo/UNUSED_STABS.txt m_debuginfo/README.txt \ -- m_gdbserver/README_DEVELOPERS $(GDBSERVER_XML_FILES) \ -- fixup_macho_loadcmds.c -+ m_gdbserver/README_DEVELOPERS docs/vgdb-manpage.xml \ -+ $(GDBSERVER_XML_FILES) fixup_macho_loadcmds.c - @VGCONF_OS_IS_DARWIN_TRUE@valgrind_SOURCES = \ - @VGCONF_OS_IS_DARWIN_TRUE@ launcher-darwin.c \ - @VGCONF_OS_IS_DARWIN_TRUE@ m_debuglog.c diff --git a/valgrind-3.8.1-openat.patch b/valgrind-3.8.1-openat.patch deleted file mode 100644 index cb3a433..0000000 --- a/valgrind-3.8.1-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.8.1/coregrind/m_syswrap/syswrap-linux.c.jj 2007-12-11 00:18:43.000000000 +0100 -+++ valgrind-3.8.1/coregrind/m_syswrap/syswrap-linux.c 2008-03-03 11:35:15.000000000 +0100 -@@ -3308,10 +3308,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.8.1-overlap_memcpy_filter.patch b/valgrind-3.8.1-overlap_memcpy_filter.patch deleted file mode 100644 index fe92d92..0000000 --- a/valgrind-3.8.1-overlap_memcpy_filter.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- valgrind/memcheck/tests/filter_memcpy (revision 0) -+++ valgrind/memcheck/tests/filter_memcpy (working copy) -@@ -0,0 +1,5 @@ -+#! /bin/sh -+ -+# mc_replace_strmem.c intercepts various memcpy glibc versions. -+./filter_stderr "$@" | -+perl -p -e "s/: memcpy\@\@?GLIBC_[.1-9]+ \(mc_replace_strmem.c:...\)/: memcpy \(mc_replace_strmem.c:...\)/" - ---- valgrind/memcheck/tests/overlap.vgtest (revision 13010) -+++ valgrind/memcheck/tests/overlap.vgtest (working copy) -@@ -1,2 +1,3 @@ - prog: overlap - vgopts: -q -+stderr_filter: filter_memcpy ---- valgrind/memcheck/tests/Makefile.am 2012-09-25 10:02:30.798819187 +0200 -+++ valgrind/memcheck/tests/Makefile.am 2012-09-25 10:03:00.358251560 +0200 -@@ -44,7 +44,8 @@ - filter_leak_cases_possible \ - filter_stderr filter_xml \ - filter_varinfo3 \ -- filter_memcheck -+ filter_memcheck \ -+ filter_memcpy - - noinst_HEADERS = leak.h - ---- valgrind/memcheck/tests/Makefile.in 2012-09-25 10:02:30.797819171 +0200 -+++ valgrind/memcheck/tests/Makefile.in 2012-09-25 10:03:28.620664967 +0200 -@@ -971,7 +971,8 @@ - filter_leak_cases_possible \ - filter_stderr filter_xml \ - filter_varinfo3 \ -- filter_memcheck -+ filter_memcheck \ -+ filter_memcpy - - noinst_HEADERS = leak.h - EXTRA_DIST = \ diff --git a/valgrind-3.8.1-pie.patch b/valgrind-3.8.1-pie.patch deleted file mode 100644 index 26c976b..0000000 --- a/valgrind-3.8.1-pie.patch +++ /dev/null @@ -1,40 +0,0 @@ -From eb8d355b64e72bfdf1c8dd2534b1625d5d0118e0 Mon Sep 17 00:00:00 2001 -From: Dodji Seketeli -Date: Thu, 13 Jan 2011 16:04:39 +0100 -Subject: [PATCH] Fix crash loading certain binaries on ppc64 - -Increase the space left for VDSO on ppc64 compiled with 64KB page -size. the size of VDSO is at least 2 pages: one for the code and one -for the data. We ought to leave more than two page space then. The -patch leaves 8 pages space to comply with what is done already for 4KB -page sizes. ---- - coregrind/m_ume/elf.c | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) - ---- valgrind/coregrind/m_ume/elf.c -+++ valgrind/coregrind/m_ume/elf.c -@@ -327,6 +327,7 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) - /* The kernel maps position-independent executables at TASK_SIZE*2/3; - duplicate this behavior as close as we can. */ - if (e->e.e_type == ET_DYN && ebase == 0) { -+ ESZ(Addr) hacky_load_address; - ebase = VG_PGROUNDDN(info->exe_base - + (info->exe_end - info->exe_base) * 2 / 3); - /* We really don't want to load PIEs at zero or too close. It -@@ -336,10 +337,11 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) - nonpointers. So, hackily, move it above 1MB. */ - /* Later .. is appears ppc32-linux tries to put [vdso] at 1MB, - which totally screws things up, because nothing else can go -- there. So bump the hacky load addess along by 0x8000, to -- 0x108000. */ -- if (ebase < 0x108000) -- ebase = 0x108000; -+ there. The size of [vdso] is around 2 or 3 pages, so bump -+ the hacky load addess along by 8 * VKI_PAGE_SIZE to be safe. */ -+ hacky_load_address = 0x100000 + 8 * VKI_PAGE_SIZE; -+ if (ebase < hacky_load_address) -+ ebase = hacky_load_address; - } - - info->phnum = e->e.e_phnum; diff --git a/valgrind-3.8.1-pkg-config.patch b/valgrind-3.8.1-pkg-config.patch deleted file mode 100644 index e06df64..0000000 --- a/valgrind-3.8.1-pkg-config.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- valgrind/valgrind.pc.in (revision 13016) -+++ valgrind/valgrind.pc.in (working copy) -@@ -5,7 +5,7 @@ - arch=@VGCONF_ARCH_PRI@ - os=@VGCONF_OS@ - platform=@VGCONF_ARCH_PRI@-@VGCONF_OS@ --valt_load_address=@VALT_LOAD_ADDRESS@ -+valt_load_address=@VALT_LOAD_ADDRESS_PRI@ - - Name: Valgrind - Description: A dynamic binary instrumentation framework diff --git a/valgrind-3.8.1-power-isa-205-deprecation.patch b/valgrind-3.8.1-power-isa-205-deprecation.patch deleted file mode 100644 index c00a957..0000000 --- a/valgrind-3.8.1-power-isa-205-deprecation.patch +++ /dev/null @@ -1,602 +0,0 @@ -commit 13b3c5c25500879aad0a682c6cced934def56e53 -Author: carll -Date: Fri Aug 9 21:55:45 2013 +0000 - - The following instructions were introduced in the Power ISA 2.05 - (i.e., POWER6) - lfdp - stfdp - lfdpx - stfdpx These instructions were promptly - deprecated (phased out) in ISA 2.06 (i.e., POWER7). Recent updates in binutils - no longer supports these instructions unless the assembler is invoked with - '-mpower6'. When 'make check' is run on valgrind when using such a newer - binutils and running on a ppc64 system newer than POWER6, you get the - following build error: - y - pc64_linux=1 -DVGPV_ppc64_linux_vanilla=1 -DVGA_SEC_ppc32=1 -DVGP_SEC_ppc64_linux=1 -Winline -Wall -Wshadow -g -Winline -Wall -Wshadow -g -I../../../include -m64 -Wno-long-long -Wwrite-strings -fno-stack-protector -Wno-write-strings -MT power_ISA2_05-power_ISA2_05.o -MD -MP -MF .deps/power_ISA2_05-power_ISA2_05.Tpo -c -o power_ISA2_05-power_ISA2_05.o `test -f 'power_ISA2_05.c' || echo './'`power_ISA2_05.c - /tmp/cciGIkGG.s:Assembler messages: - /tmp/cciGIkGG.s:387: Error: operand out of domain (31 is not a multiple of 4) - /tmp/cciGIkGG.s:387: Error: syntax error; found `,', expected `(' - /tmp/cciGIkGG.s:387: Error: junk at end of line: `,9' - /tmp/cciGIkGG.s:478: Error: operand out of domain (31 is not a multiple of 4) - /tmp/cciGIkGG.s:478: Error: syntax error; found `,', expected `(' - /tmp/cciGIkGG.s:478: Error: junk at end of line: `,9' - make[2]: *** [power_ISA2_05-power_ISA2_05.o] Error 1 - make[2]: Leaving directory `/tmp/Valgrind_review/valgrind_ISA2_05/memcheck/tests/ppc64' - make[1]: *** [check-am] Error 2 - make[1]: Leaving directory `/tmp/Valgrind_review/valgrind_ISA2_05/memcheck/tests/ppc64' make: *** [check-recursive] Error 1 - - This patch fixes the problem by adding a configure check to determine if these - phased out instructions are supported by the binutils, and the result of that - configure check is used to decide whether or not to compile in the source for - testing these instructions. - - Bugzilla 323116 - - committed by Carl Love, carll@us.ibm.com - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13490 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/configure.in b/configure.in -index 6ac32b0..5cf28a1 100644 ---- a/configure.in -+++ b/configure.in -@@ -1771,6 +1771,28 @@ if test x$ac_have_as_ppc_mftocrf = xyes ; then - fi - - -+# does the ppc assembler support "lfdp" and other phased out floating point insns? -+AC_MSG_CHECKING([if ppc32/64 asm supports phased out floating point instructions]) -+ -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ -+ do { typedef struct { -+ double hi; -+ double lo; -+ } dbl_pair_t; -+ dbl_pair_t dbl_pair[3]; -+ __asm__ volatile ("lfdp 10, %0"::"m" (dbl_pair[0])); -+ } while (0) -+]])], [ -+ac_have_as_ppc_fpPO=yes -+AC_MSG_RESULT([yes]) -+], [ -+ac_have_as_ppc_fpPO=no -+AC_MSG_RESULT([no]) -+]) -+if test x$ac_have_as_ppc_fpPO = xyes ; then -+ AC_DEFINE(HAVE_AS_PPC_FPPO, 1, [Define to 1 if as supports floating point phased out category.]) -+fi -+ - CFLAGS=$safe_CFLAGS - - # does the x86/amd64 assembler understand SSE3 instructions? -diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am -index 40033fc..bd70eea 100644 ---- a/memcheck/tests/ppc32/Makefile.am -+++ b/memcheck/tests/ppc32/Makefile.am -@@ -4,7 +4,8 @@ include $(top_srcdir)/Makefile.tool-tests.am - dist_noinst_SCRIPTS = filter_stderr - - EXTRA_DIST = $(noinst_SCRIPTS) \ -- power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest -+ power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ -+ power_ISA2_05.stdout.exp_Without_FPPO - - check_PROGRAMS = \ - power_ISA2_05 -diff --git a/memcheck/tests/ppc32/power_ISA2_05.c b/memcheck/tests/ppc32/power_ISA2_05.c -index 0178452..3736c27 100644 ---- a/memcheck/tests/ppc32/power_ISA2_05.c -+++ b/memcheck/tests/ppc32/power_ISA2_05.c -@@ -1,4 +1,5 @@ - #include -+#include - - double foo = -1.0; - double FRT1; -@@ -65,9 +66,15 @@ void test_lfiwax() - ** FPp = leftmost 64 bits stored at DS(RA) - ** FPp+1= rightmost 64 bits stored at DS(RA) - ** FPp must be an even float register -+** -+** The [st|l]fdp[x] instructions were put into the "Floating-Point.Phased-Out" -+** category in ISA 2.06 (i.e., POWER7 timeframe). If valgrind and its -+** testsuite are built with -mcpu=power7 (or later), then the assembler will -+** not recognize those phased out instructions. - */ - void test_double_pair_instrs() - { -+#ifdef HAVE_AS_PPC_FPPO - typedef struct { - double hi; - double lo; -@@ -122,6 +129,7 @@ void test_double_pair_instrs() - __asm__ volatile ("stfdpx 10, 20, 21"); - printf("stfdpx (%f, %f) => F_hi=%f, F_lo=%f\n", - FRT1, FRT2, dbl_pair[2].hi, dbl_pair[2].lo); -+#endif - } - - -diff --git a/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO b/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO -new file mode 120000 -index 0000000..da5c109 ---- /dev/null -+++ b/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO -@@ -0,0 +1 @@ -+../ppc64/power_ISA2_05.stdout.exp_Without_FPPO -\ No newline at end of file -diff --git a/memcheck/tests/ppc64/Makefile.am b/memcheck/tests/ppc64/Makefile.am -index a18afd7..96eb576 100644 ---- a/memcheck/tests/ppc64/Makefile.am -+++ b/memcheck/tests/ppc64/Makefile.am -@@ -4,7 +4,8 @@ include $(top_srcdir)/Makefile.tool-tests.am - dist_noinst_SCRIPTS = filter_stderr - - EXTRA_DIST = $(noinst_SCRIPTS) \ -- power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest -+ power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ -+ power_ISA2_05.stdout.exp_Without_FPPO - - check_PROGRAMS = \ - power_ISA2_05 -diff --git a/memcheck/tests/ppc64/power_ISA2_05.c b/memcheck/tests/ppc64/power_ISA2_05.c -index 8c0eab9..f552dc4 100644 ---- a/memcheck/tests/ppc64/power_ISA2_05.c -+++ b/memcheck/tests/ppc64/power_ISA2_05.c -@@ -1,4 +1,5 @@ - #include -+#include - - double foo = -1.0; - double FRT1; -@@ -63,9 +64,16 @@ void test_lfiwax() - ** FPp = leftmost 64 bits stored at DS(RA) - ** FPp+1= rightmost 64 bits stored at DS(RA) - ** FPp must be an even float register -+** -+** The [st|l]fdp[x] instructions were put into the "Floating-Point.Phased-Out" -+** category in ISA 2.06 (i.e., POWER7 timeframe). If valgrind and its -+** testsuite are built with -mcpu=power7 (or later), then the assembler will -+** not recognize those phased out instructions. -+** - */ - void test_double_pair_instrs() - { -+#ifdef HAVE_AS_PPC_FPPO - typedef struct { - double hi; - double lo; -@@ -120,6 +128,7 @@ void test_double_pair_instrs() - __asm__ volatile ("stfdpx 10, 20, 21"); - printf("stfdpx (%f, %f) => F_hi=%f, F_lo=%f\n", - FRT1, FRT2, dbl_pair[2].hi, dbl_pair[2].lo); -+#endif - } - - -diff --git a/memcheck/tests/ppc64/power_ISA2_05.stdout.exp_Without_FPPO b/memcheck/tests/ppc64/power_ISA2_05.stdout.exp_Without_FPPO -new file mode 100644 -index 0000000..1945526 ---- /dev/null -+++ b/memcheck/tests/ppc64/power_ISA2_05.stdout.exp_Without_FPPO -@@ -0,0 +1,119 @@ -+lwarx => 0 -+ldarx => bad0beef -+fcpsgn sign=10.101010, base=11.111111 => 11.111111 -+fcpsgn sign=10.101010, base=-0.000000 => 0.000000 -+fcpsgn sign=10.101010, base=0.000000 => 0.000000 -+fcpsgn sign=10.101010, base=-11.111111 => 11.111111 -+fcpsgn sign=-0.000000, base=11.111111 => -11.111111 -+fcpsgn sign=-0.000000, base=-0.000000 => -0.000000 -+fcpsgn sign=-0.000000, base=0.000000 => -0.000000 -+fcpsgn sign=-0.000000, base=-11.111111 => -11.111111 -+fcpsgn sign=0.000000, base=11.111111 => 11.111111 -+fcpsgn sign=0.000000, base=-0.000000 => 0.000000 -+fcpsgn sign=0.000000, base=0.000000 => 0.000000 -+fcpsgn sign=0.000000, base=-11.111111 => 11.111111 -+fcpsgn sign=-10.101010, base=11.111111 => -11.111111 -+fcpsgn sign=-10.101010, base=-0.000000 => -0.000000 -+fcpsgn sign=-10.101010, base=0.000000 => -0.000000 -+fcpsgn sign=-10.101010, base=-11.111111 => -11.111111 -+lfiwax (-1024.000000) => FRT=(ffffffff, c0900000) -+prtyd (0) => parity=0 -+prtyw (0) => parity=0 -+prtyd (1) => parity=1 -+prtyw (1) => parity=1 -+prtyd (2) => parity=0 -+prtyw (2) => parity=0 -+prtyd (3) => parity=1 -+prtyw (3) => parity=1 -+prtyd (4) => parity=0 -+prtyw (4) => parity=0 -+prtyd (5) => parity=1 -+prtyw (5) => parity=1 -+prtyd (6) => parity=0 -+prtyw (6) => parity=0 -+prtyd (7) => parity=1 -+prtyw (7) => parity=1 -+prtyd (8) => parity=0 -+prtyw (8) => parity=0 -+prtyd (9) => parity=1 -+prtyw (9) => parity=1 -+prtyd (a) => parity=0 -+prtyw (a) => parity=0 -+prtyd (b) => parity=1 -+prtyw (b) => parity=1 -+prtyd (c) => parity=0 -+prtyw (c) => parity=0 -+prtyd (d) => parity=1 -+prtyw (d) => parity=1 -+prtyd (e) => parity=0 -+prtyw (e) => parity=0 -+prtyd (f) => parity=1 -+prtyw (f) => parity=1 -+prtyd (10) => parity=0 -+prtyw (10) => parity=0 -+prtyd (11) => parity=1 -+prtyw (11) => parity=1 -+prtyd (12) => parity=0 -+prtyw (12) => parity=0 -+prtyd (13) => parity=1 -+prtyw (13) => parity=1 -+prtyd (14) => parity=0 -+prtyw (14) => parity=0 -+prtyd (15) => parity=1 -+prtyw (15) => parity=1 -+prtyd (16) => parity=0 -+prtyw (16) => parity=0 -+prtyd (17) => parity=1 -+prtyw (17) => parity=1 -+prtyd (18) => parity=0 -+prtyw (18) => parity=0 -+prtyd (19) => parity=1 -+prtyw (19) => parity=1 -+prtyd (1a) => parity=0 -+prtyw (1a) => parity=0 -+prtyd (1b) => parity=1 -+prtyw (1b) => parity=1 -+prtyd (1c) => parity=0 -+prtyw (1c) => parity=0 -+prtyd (1d) => parity=1 -+prtyw (1d) => parity=1 -+prtyd (1e) => parity=0 -+prtyw (1e) => parity=0 -+prtyd (1f) => parity=1 -+prtyw (1f) => parity=1 -+prtyd (20) => parity=0 -+prtyw (20) => parity=0 -+prtyd (21) => parity=1 -+prtyw (21) => parity=1 -+prtyd (22) => parity=0 -+prtyw (22) => parity=0 -+prtyd (23) => parity=1 -+prtyw (23) => parity=1 -+prtyd (24) => parity=0 -+prtyw (24) => parity=0 -+prtyd (25) => parity=1 -+prtyw (25) => parity=1 -+prtyd (26) => parity=0 -+prtyw (26) => parity=0 -+prtyd (27) => parity=1 -+prtyw (27) => parity=1 -+prtyd (28) => parity=0 -+prtyw (28) => parity=0 -+prtyd (29) => parity=1 -+prtyw (29) => parity=1 -+prtyd (2a) => parity=0 -+prtyw (2a) => parity=0 -+prtyd (2b) => parity=1 -+prtyw (2b) => parity=1 -+prtyd (2c) => parity=0 -+prtyw (2c) => parity=0 -+prtyd (2d) => parity=1 -+prtyw (2d) => parity=1 -+prtyd (2e) => parity=0 -+prtyw (2e) => parity=0 -+prtyd (2f) => parity=1 -+prtyw (2f) => parity=1 -+prtyd (30) => parity=0 -+prtyw (30) => parity=0 -+prtyd (31) => parity=1 -+prtyw (31) => parity=1 -diff -ur valgrind-3.8.1.orig/config.h.in valgrind-3.8.1/config.h.in ---- valgrind-3.8.1.orig/config.h.in 2013-08-14 17:58:25.970210332 +0200 -+++ valgrind-3.8.1/config.h.in 2013-08-14 17:59:26.000000000 +0200 -@@ -81,6 +81,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_ASM_UNISTD_H - -+/* Define to 1 if as supports floating point phased out category. */ -+#undef HAVE_AS_PPC_FPPO -+ - /* Define to 1 if as supports mtocrf/mfocrf. */ - #undef HAVE_AS_PPC_MFTOCRF - -Only in valgrind-3.8.1: config.h.in~ -diff -ur valgrind-3.8.1.orig/configure valgrind-3.8.1/configure ---- valgrind-3.8.1.orig/configure 2013-08-14 17:58:25.970210332 +0200 -+++ valgrind-3.8.1/configure 2013-08-14 17:59:32.537941678 +0200 -@@ -8134,6 +8134,49 @@ - fi - - -+# does the ppc assembler support "lfdp" and other phased out floating point insns? -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ppc32/64 asm supports phased out floating point instructions" >&5 -+$as_echo_n "checking if ppc32/64 asm supports phased out floating point instructions... " >&6; } -+ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ do { typedef struct { -+ double hi; -+ double lo; -+ } dbl_pair_t; -+ dbl_pair_t dbl_pair[3]; -+ __asm__ volatile ("lfdp 10, %0"::"m" (dbl_pair[0])); -+ } while (0) -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ -+ac_have_as_ppc_fpPO=yes -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+else -+ -+ac_have_as_ppc_fpPO=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+if test x$ac_have_as_ppc_fpPO = xyes ; then -+ -+$as_echo "#define HAVE_AS_PPC_FPPO 1" >>confdefs.h -+ -+fi -+ - CFLAGS=$safe_CFLAGS - - # does the x86/amd64 assembler understand SSE3 instructions? -diff -ur valgrind-3.8.1.orig/memcheck/tests/ppc32/Makefile.in valgrind-3.8.1/memcheck/tests/ppc32/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/ppc32/Makefile.in 2013-08-14 17:58:25.794211043 +0200 -+++ valgrind-3.8.1/memcheck/tests/ppc32/Makefile.in 2013-08-14 17:59:30.729948971 +0200 -@@ -362,7 +362,8 @@ - @VGCONF_OS_IS_DARWIN_TRUE@noinst_DSYMS = $(check_PROGRAMS) - dist_noinst_SCRIPTS = filter_stderr - EXTRA_DIST = $(noinst_SCRIPTS) \ -- power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest -+ power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ -+ power_ISA2_05.stdout.exp_Without_FPPO - - power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \ - -I$(top_srcdir)/include @FLAG_M32@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/ppc64/Makefile.in valgrind-3.8.1/memcheck/tests/ppc64/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/ppc64/Makefile.in 2013-08-14 17:58:25.789211063 +0200 -+++ valgrind-3.8.1/memcheck/tests/ppc64/Makefile.in 2013-08-14 17:59:30.785948745 +0200 -@@ -362,7 +362,8 @@ - @VGCONF_OS_IS_DARWIN_TRUE@noinst_DSYMS = $(check_PROGRAMS) - dist_noinst_SCRIPTS = filter_stderr - EXTRA_DIST = $(noinst_SCRIPTS) \ -- power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest -+ power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ -+ power_ISA2_05.stdout.exp_Without_FPPO - - power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \ - -I$(top_srcdir)/include @FLAG_M64@ -commit 5d0d52118210671d3eeff94fd3f5cc3807bd2a44 -Author: sewardj -Date: Tue Jan 29 22:14:01 2013 +0000 - - test_reservation(), test_double_pair_instrs(): Fix broken inline assembly - causing segfaults with gcc-4.7. The inline assembly still isn't right, - but it's better than it was before. - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13279 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/ppc32/power_ISA2_05.c b/memcheck/tests/ppc32/power_ISA2_05.c -index a95f427..0178452 100644 ---- a/memcheck/tests/ppc32/power_ISA2_05.c -+++ b/memcheck/tests/ppc32/power_ISA2_05.c -@@ -103,8 +103,8 @@ void test_double_pair_instrs() - FRT2 = -1.0; - base = (unsigned long) &dbl_pair; - offset = (unsigned long) &dbl_pair[1] - base; -- __asm__ volatile ("or 20, 0, %0"::"r" (base)); -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 20, %0, 0"::"r" (base)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("lfdpx 10, 20, 21"); - __asm__ volatile ("fmr %0, 10":"=f" (FRT1)); - __asm__ volatile ("fmr %0, 11":"=f" (FRT2)); -@@ -115,8 +115,8 @@ void test_double_pair_instrs() - FRT2 = -16.1024; - base = (unsigned long) &dbl_pair; - offset = (unsigned long) &dbl_pair[2] - base; -- __asm__ volatile ("or 20, 0, %0"::"r" (base)); -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 20, %0, 0"::"r" (base)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("fmr %0, 10":"=f" (FRT1)); - __asm__ volatile ("fmr %0, 11":"=f" (FRT2)); - __asm__ volatile ("stfdpx 10, 20, 21"); -@@ -168,14 +168,14 @@ void test_reservation() - - base = (unsigned long) &arr; - offset = (unsigned long) &arr[1] - base; -- __asm__ volatile ("or 20, 0, %0"::"r" (base)); -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 20, %0, 0"::"r" (base)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("lwarx %0, 20, 21, 1":"=r" (RT)); - printf("lwarx => %x\n", RT); - - #ifdef __powerpc64__ - offset = (unsigned long) &arr[1] - base; -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("ldarx %0, 20, 21, 1":"=r" (RT)); - printf("ldarx => %x\n", RT); - #endif -diff --git a/memcheck/tests/ppc64/power_ISA2_05.c b/memcheck/tests/ppc64/power_ISA2_05.c -index dcf0e7a..8c0eab9 100644 ---- a/memcheck/tests/ppc64/power_ISA2_05.c -+++ b/memcheck/tests/ppc64/power_ISA2_05.c -@@ -101,8 +101,8 @@ void test_double_pair_instrs() - FRT2 = -1.0; - base = (unsigned long) &dbl_pair; - offset = (unsigned long) &dbl_pair[1] - base; -- __asm__ volatile ("or 20, 0, %0"::"r" (base)); -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 20, %0, 0"::"r" (base)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("lfdpx 10, 20, 21"); - __asm__ volatile ("fmr %0, 10":"=f" (FRT1)); - __asm__ volatile ("fmr %0, 11":"=f" (FRT2)); -@@ -113,8 +113,8 @@ void test_double_pair_instrs() - FRT2 = -16.1024; - base = (unsigned long) &dbl_pair; - offset = (unsigned long) &dbl_pair[2] - base; -- __asm__ volatile ("or 20, 0, %0"::"r" (base)); -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 20, %0, 0"::"r" (base)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("fmr %0, 10":"=f" (FRT1)); - __asm__ volatile ("fmr %0, 11":"=f" (FRT2)); - __asm__ volatile ("stfdpx 10, 20, 21"); -@@ -166,14 +166,14 @@ void test_reservation() - - base = (unsigned long) &arr; - offset = (unsigned long) &arr[1] - base; -- __asm__ volatile ("or 20, 0, %0"::"r" (base)); -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 20, %0, 0"::"r" (base)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("lwarx %0, 20, 21, 1":"=r" (RT)); - printf("lwarx => %x\n", RT); - - #ifdef __powerpc64__ - offset = (unsigned long) &arr[1] - base; -- __asm__ volatile ("or 21, 0, %0"::"r" (offset)); -+ __asm__ volatile ("ori 21, %0, 0"::"r" (offset)); - __asm__ volatile ("ldarx %0, 20, 21, 1":"=r" (RT)); - printf("ldarx => %x\n", RT); - #endif -commit 28b37cc93e8b7a851f005a217752073bb8ac7dca -Author: carll -Date: Wed Aug 21 19:46:50 2013 +0000 - - The file tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO was a link - to file tests/ppc64/power_ISA2_05.stdout.exp_Without_FPPO. That was a - commit error as the output for ppc32 and ppc64 are different. Remove - the file and commit to remove the link. - - See bugzilla 81535. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13505 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO b/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO -deleted file mode 120000 -index da5c109..0000000 ---- a/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO -+++ /dev/null -@@ -1 +0,0 @@ --../ppc64/power_ISA2_05.stdout.exp_Without_FPPO -\ No newline at end of file - -commit bfde541a949ff59db394b0ce26f370215e94e30a -Author: carll -Date: Wed Aug 21 19:47:19 2013 +0000 - - The file tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO was a link - to file tests/ppc64/power_ISA2_05.stdout.exp_Without_FPPO. That was a - commit error as the output for ppc32 and ppc64 are different. Replaced - the link with the correct real file of expected results. See bugzilla - 81535. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13506 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO b/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO -new file mode 100644 -index 0000000..f9e934e ---- /dev/null -+++ b/memcheck/tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO -@@ -0,0 +1,68 @@ -+lwarx => bad0beef -+fcpsgn sign=10.101010, base=11.111111 => 11.111111 -+fcpsgn sign=10.101010, base=-0.000000 => 0.000000 -+fcpsgn sign=10.101010, base=0.000000 => 0.000000 -+fcpsgn sign=10.101010, base=-11.111111 => 11.111111 -+fcpsgn sign=-0.000000, base=11.111111 => -11.111111 -+fcpsgn sign=-0.000000, base=-0.000000 => -0.000000 -+fcpsgn sign=-0.000000, base=0.000000 => -0.000000 -+fcpsgn sign=-0.000000, base=-11.111111 => -11.111111 -+fcpsgn sign=0.000000, base=11.111111 => 11.111111 -+fcpsgn sign=0.000000, base=-0.000000 => 0.000000 -+fcpsgn sign=0.000000, base=0.000000 => 0.000000 -+fcpsgn sign=0.000000, base=-11.111111 => 11.111111 -+fcpsgn sign=-10.101010, base=11.111111 => -11.111111 -+fcpsgn sign=-10.101010, base=-0.000000 => -0.000000 -+fcpsgn sign=-10.101010, base=0.000000 => -0.000000 -+fcpsgn sign=-10.101010, base=-11.111111 => -11.111111 -+lfiwax (-1024.000000) => FRT=(ffffffff, c0900000) -+prtyw (0) => parity=0 -+prtyw (1) => parity=1 -+prtyw (2) => parity=0 -+prtyw (3) => parity=1 -+prtyw (4) => parity=0 -+prtyw (5) => parity=1 -+prtyw (6) => parity=0 -+prtyw (7) => parity=1 -+prtyw (8) => parity=0 -+prtyw (9) => parity=1 -+prtyw (a) => parity=0 -+prtyw (b) => parity=1 -+prtyw (c) => parity=0 -+prtyw (d) => parity=1 -+prtyw (e) => parity=0 -+prtyw (f) => parity=1 -+prtyw (10) => parity=0 -+prtyw (11) => parity=1 -+prtyw (12) => parity=0 -+prtyw (13) => parity=1 -+prtyw (14) => parity=0 -+prtyw (15) => parity=1 -+prtyw (16) => parity=0 -+prtyw (17) => parity=1 -+prtyw (18) => parity=0 -+prtyw (19) => parity=1 -+prtyw (1a) => parity=0 -+prtyw (1b) => parity=1 -+prtyw (1c) => parity=0 -+prtyw (1d) => parity=1 -+prtyw (1e) => parity=0 -+prtyw (1f) => parity=1 -+prtyw (20) => parity=0 -+prtyw (21) => parity=1 -+prtyw (22) => parity=0 -+prtyw (23) => parity=1 -+prtyw (24) => parity=0 -+prtyw (25) => parity=1 -+prtyw (26) => parity=0 -+prtyw (27) => parity=1 -+prtyw (28) => parity=0 -+prtyw (29) => parity=1 -+prtyw (2a) => parity=0 -+prtyw (2b) => parity=1 -+prtyw (2c) => parity=0 -+prtyw (2d) => parity=1 -+prtyw (2e) => parity=0 -+prtyw (2f) => parity=1 -+prtyw (30) => parity=0 -+prtyw (31) => parity=1 diff --git a/valgrind-3.8.1-ppc-32-mode-64-bit-instr.patch b/valgrind-3.8.1-ppc-32-mode-64-bit-instr.patch deleted file mode 100644 index 3b1c681..0000000 --- a/valgrind-3.8.1-ppc-32-mode-64-bit-instr.patch +++ /dev/null @@ -1,260 +0,0 @@ -commit 12053bd517d2c5ab55de4ffaa4833ef9a865d8d5 -Author: carll -Date: Mon Oct 29 20:23:41 2012 +0000 - - Valgrind, ppc: Fix missing checks for 64-bit instructions operating in 32-bit mode, Bugzilla 308573 - - A number of the POWER instructions are only intended to run on 64-bit - hardware. These instructions will give a SIGILL instruction on 32-bit - hardware. The check for 32-bit mode on some of these instructions is - missing. Although, the 64-bit hardware will execute these instructions - on 64-bit hardware without generating a SIGILL the use of these - instructions in 32-bit mode on 64-bit hardware is typically indicative of - a programming error. There are cases where these instructions are used - to determine if the code is running on 32-bit hardware or not. In these - cases, the instruction needs to generate a SIGILL for the error handler - to properly determine the hardware is running in 32-bit mode. - - This patch adds the 32-bit mode check for those 64-bit instructions that - do not have the check. If the check fails, the instruction is flagged - as an unsupported instruction and a SIGILL message is generated. - - This patch fixes the bug reported in: - Bug 308573 - Internal Valgrind error on 64-bit instruction executed in - 32-bit mode - - Note, there is an accompaning fix to memcheck/tests/ppc32/power_ISA2_05.c - to only execute the 64-bit instruction prtyd test in 64-bit mode. - - Carl Love cel@us.ibm.com - - git-svn-id: svn://svn.valgrind.org/vex/trunk@2558 8f6e269a-dfd6-0310-a8e1-e2731360e62c - -diff --git a/priv/guest_ppc_toIR.c b/priv/guest_ppc_toIR.c -index 800f8ef..565bfe5 100644 ---- a/VEX/priv/guest_ppc_toIR.c -+++ b/VEX/priv/guest_ppc_toIR.c -@@ -16653,6 +16653,7 @@ DisResult disInstr_PPC_WRK ( - - /* 64bit Integer Rotate Instructions */ - case 0x1E: // rldcl, rldcr, rldic, rldicl, rldicr, rldimi -+ if (!mode64) goto decode_failure; - if (dis_int_rot( theInstr )) goto decode_success; - goto decode_failure; - -@@ -16687,7 +16688,12 @@ DisResult disInstr_PPC_WRK ( - goto decode_failure; - - /* Trap Instructions */ -- case 0x02: case 0x03: // tdi, twi -+ case 0x02: // tdi -+ if (!mode64) goto decode_failure; -+ if (dis_trapi(theInstr, &dres)) goto decode_success; -+ goto decode_failure; -+ -+ case 0x03: // twi - if (dis_trapi(theInstr, &dres)) goto decode_success; - goto decode_failure; - -@@ -17288,7 +17294,12 @@ DisResult disInstr_PPC_WRK ( - goto decode_failure; - - /* 64bit Integer Parity Instructions */ -- case 0xba: case 0x9a: // prtyd, prtyw -+ case 0xba: // prtyd -+ if (!mode64) goto decode_failure; -+ if (dis_int_parity( theInstr )) goto decode_success; -+ goto decode_failure; -+ -+ case 0x9a: // prtyw - if (dis_int_parity( theInstr )) goto decode_success; - goto decode_failure; - -@@ -17333,9 +17344,13 @@ DisResult disInstr_PPC_WRK ( - goto decode_failure; - - /* Integer Load and Store with Byte Reverse Instructions */ -- case 0x316: case 0x216: case 0x396: // lhbrx, lwbrx, sthbrx -- case 0x296: case 0x214: // stwbrx, ldbrx -- case 0x294: // stdbrx -+ case 0x214: case 0x294: // ldbrx, stdbrx -+ if (!mode64) goto decode_failure; -+ if (dis_int_ldst_rev( theInstr )) goto decode_success; -+ goto decode_failure; -+ -+ case 0x216: case 0x316: case 0x296: // lwbrx, lhbrx, stwbrx -+ case 0x396: // sthbrx - if (dis_int_ldst_rev( theInstr )) goto decode_success; - goto decode_failure; - -@@ -17385,7 +17400,12 @@ DisResult disInstr_PPC_WRK ( - //zz goto decode_failure; - - /* Trap Instructions */ -- case 0x004: case 0x044: // tw, td -+ case 0x004: // tw -+ if (dis_trap(theInstr, &dres)) goto decode_success; -+ goto decode_failure; -+ -+ case 0x044: // td -+ if (!mode64) goto decode_failure; - if (dis_trap(theInstr, &dres)) goto decode_success; - goto decode_failure; - -@@ -17479,6 +17499,7 @@ DisResult disInstr_PPC_WRK ( - goto decode_failure; - - case 0x0FC: // bpermd -+ if (!mode64) goto decode_failure; - if (dis_int_logic( theInstr )) goto decode_success; - goto decode_failure; - -commit 1fe353c602722e727fe4497037d2b9c1d646b9b7 -Author: carll -Date: Mon Oct 29 20:39:18 2012 +0000 - - Valgrind, ppc: Fix test for 32-bit testsuite. - - The 32-bit testsuite executes the 64-bit class instruction prtyd. This - instruction should not be tested in 32-bit mode. The change also updates - the expected output for the test. Note, 32-bit HW will generate a SIGILL - when the prtyd instruction is executed. However, the 64-bit HW executing - a 32-bit application does execute the instruction but only the lower 32-bits - of the result are valid. In general, the 64-bit class instructions should - not be executed in 32-bit binaries. - - This fix accompanies the VEX fix in revision 2558 to add the 64-bit mode test - to make sure the 64-bit class instructions are only executed in 64-bit mode. - The VEX bugzilla is: - - Bug 308573 - Internal Valgrind error on 64-bit instruction executed in - 32-bit mode - - Carl Love cel@us.ibm.com - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13091 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/ppc32/power_ISA2_05.c b/memcheck/tests/ppc32/power_ISA2_05.c -index f85b547..0cc60f6 100644 ---- a/memcheck/tests/ppc32/power_ISA2_05.c -+++ b/memcheck/tests/ppc32/power_ISA2_05.c -@@ -29,9 +29,11 @@ void test_parity_instrs() - - for (i = 0; i < 50; i++) { - word = base256(i); -+#ifdef __powerpc64__ - long_word = word; - __asm__ volatile ("prtyd %0, %1":"=r" (parity):"r"(long_word)); - printf("prtyd (%x) => parity=%x\n", i, parity); -+#endif - __asm__ volatile ("prtyw %0, %1":"=r" (parity):"r"(word)); - printf("prtyw (%x) => parity=%x\n", i, parity); - } -diff --git a/memcheck/tests/ppc32/power_ISA2_05.stdout.exp b/memcheck/tests/ppc32/power_ISA2_05.stdout.exp -index 5513960..e4975fb 100644 ---- a/memcheck/tests/ppc32/power_ISA2_05.stdout.exp -+++ b/memcheck/tests/ppc32/power_ISA2_05.stdout.exp -@@ -20,103 +20,53 @@ stfdp (2.204800, -4.102400) => F_hi=2.204800, F_lo=-4.102400 - lfdpx (2.204800, -4.102400) => F_hi=2.204800, F_lo=-4.102400 - stfdpx (2.204800, 2.204800) => F_hi=2.204800, F_lo=2.204800 - lfiwax (-1024.000000) => FRT=(ffffffff, c0900000) --prtyd (0) => parity=0 - prtyw (0) => parity=0 --prtyd (1) => parity=1 - prtyw (1) => parity=1 --prtyd (2) => parity=0 - prtyw (2) => parity=0 --prtyd (3) => parity=1 - prtyw (3) => parity=1 --prtyd (4) => parity=0 - prtyw (4) => parity=0 --prtyd (5) => parity=1 - prtyw (5) => parity=1 --prtyd (6) => parity=0 - prtyw (6) => parity=0 --prtyd (7) => parity=1 - prtyw (7) => parity=1 --prtyd (8) => parity=0 - prtyw (8) => parity=0 --prtyd (9) => parity=1 - prtyw (9) => parity=1 --prtyd (a) => parity=0 - prtyw (a) => parity=0 --prtyd (b) => parity=1 - prtyw (b) => parity=1 --prtyd (c) => parity=0 - prtyw (c) => parity=0 --prtyd (d) => parity=1 - prtyw (d) => parity=1 --prtyd (e) => parity=0 - prtyw (e) => parity=0 --prtyd (f) => parity=1 - prtyw (f) => parity=1 --prtyd (10) => parity=0 - prtyw (10) => parity=0 --prtyd (11) => parity=1 - prtyw (11) => parity=1 --prtyd (12) => parity=0 - prtyw (12) => parity=0 --prtyd (13) => parity=1 - prtyw (13) => parity=1 --prtyd (14) => parity=0 - prtyw (14) => parity=0 --prtyd (15) => parity=1 - prtyw (15) => parity=1 --prtyd (16) => parity=0 - prtyw (16) => parity=0 --prtyd (17) => parity=1 - prtyw (17) => parity=1 --prtyd (18) => parity=0 - prtyw (18) => parity=0 --prtyd (19) => parity=1 - prtyw (19) => parity=1 --prtyd (1a) => parity=0 - prtyw (1a) => parity=0 --prtyd (1b) => parity=1 - prtyw (1b) => parity=1 --prtyd (1c) => parity=0 - prtyw (1c) => parity=0 --prtyd (1d) => parity=1 - prtyw (1d) => parity=1 --prtyd (1e) => parity=0 - prtyw (1e) => parity=0 --prtyd (1f) => parity=1 - prtyw (1f) => parity=1 --prtyd (20) => parity=0 - prtyw (20) => parity=0 --prtyd (21) => parity=1 - prtyw (21) => parity=1 --prtyd (22) => parity=0 - prtyw (22) => parity=0 --prtyd (23) => parity=1 - prtyw (23) => parity=1 --prtyd (24) => parity=0 - prtyw (24) => parity=0 --prtyd (25) => parity=1 - prtyw (25) => parity=1 --prtyd (26) => parity=0 - prtyw (26) => parity=0 --prtyd (27) => parity=1 - prtyw (27) => parity=1 --prtyd (28) => parity=0 - prtyw (28) => parity=0 --prtyd (29) => parity=1 - prtyw (29) => parity=1 --prtyd (2a) => parity=0 - prtyw (2a) => parity=0 --prtyd (2b) => parity=1 - prtyw (2b) => parity=1 --prtyd (2c) => parity=0 - prtyw (2c) => parity=0 --prtyd (2d) => parity=1 - prtyw (2d) => parity=1 --prtyd (2e) => parity=0 - prtyw (2e) => parity=0 --prtyd (2f) => parity=1 - prtyw (2f) => parity=1 --prtyd (30) => parity=0 - prtyw (30) => parity=0 --prtyd (31) => parity=1 - prtyw (31) => parity=1 diff --git a/valgrind-3.8.1-ppc-setxattr.patch b/valgrind-3.8.1-ppc-setxattr.patch deleted file mode 100644 index 7e2c8ca..0000000 --- a/valgrind-3.8.1-ppc-setxattr.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 2f456f6524ad5edb7af6bdff8d2766738f3c76cc -Author: mjw -Date: Fri Jul 5 09:50:26 2013 +0000 - - Bug 321969. Support [lf]setxattr on ppc32 and ppc64 linux kernel. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13449 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c -index c866fae..cf714cb 100644 ---- a/coregrind/m_syswrap/syswrap-ppc32-linux.c -+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c -@@ -1130,9 +1130,9 @@ static SyscallTableEntry syscall_table[] = { - GENXY(__NR_mincore, sys_mincore), // 206 - LINX_(__NR_gettid, sys_gettid), // 207 - //.. LINX_(__NR_tkill, sys_tkill), // 208 */Linux --//.. LINX_(__NR_setxattr, sys_setxattr), // 209 --//.. LINX_(__NR_lsetxattr, sys_lsetxattr), // 210 --//.. LINX_(__NR_fsetxattr, sys_fsetxattr), // 211 -+ LINX_(__NR_setxattr, sys_setxattr), // 209 -+ LINX_(__NR_lsetxattr, sys_lsetxattr), // 210 -+ LINX_(__NR_fsetxattr, sys_fsetxattr), // 211 - LINXY(__NR_getxattr, sys_getxattr), // 212 - LINXY(__NR_lgetxattr, sys_lgetxattr), // 213 - LINXY(__NR_fgetxattr, sys_fgetxattr), // 214 -diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c -index d3a5b0f..7310b2a 100644 ---- a/coregrind/m_syswrap/syswrap-ppc64-linux.c -+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c -@@ -927,10 +927,10 @@ static SyscallTableEntry syscall_table[] = { - // _____(__NR_mincore, sys_mincore), // 206 - LINX_(__NR_gettid, sys_gettid), // 207 - // _____(__NR_tkill, sys_tkill), // 208 --// _____(__NR_setxattr, sys_setxattr), // 209 -+ LINX_(__NR_setxattr, sys_setxattr), // 209 - --// _____(__NR_lsetxattr, sys_lsetxattr), // 210 --// _____(__NR_fsetxattr, sys_fsetxattr), // 211 -+ LINX_(__NR_lsetxattr, sys_lsetxattr), // 210 -+ LINX_(__NR_fsetxattr, sys_fsetxattr), // 211 - LINXY(__NR_getxattr, sys_getxattr), // 212 - LINXY(__NR_lgetxattr, sys_lgetxattr), // 213 - LINXY(__NR_fgetxattr, sys_fgetxattr), // 214 diff --git a/valgrind-3.8.1-proc-auxv.patch b/valgrind-3.8.1-proc-auxv.patch deleted file mode 100644 index 6951abe..0000000 --- a/valgrind-3.8.1-proc-auxv.patch +++ /dev/null @@ -1,321 +0,0 @@ -Index: valgrind/coregrind/m_clientstate.c -=================================================================== ---- valgrind/coregrind/m_clientstate.c (revision 13015) -+++ valgrind/coregrind/m_clientstate.c (working copy) -@@ -64,6 +64,9 @@ - /* A fd which refers to the fake /proc//cmdline in /tmp. */ - Int VG_(cl_cmdline_fd) = -1; - -+/* A fd which refers to the fake /proc//auxv in /tmp. */ -+Int VG_(cl_auxv_fd) = -1; -+ - // Command line pieces, after they have been extracted from argv in - // m_main.main(). The payload vectors are allocated in VG_AR_TOOL - // (the default arena). They are never freed. -Index: valgrind/coregrind/m_main.c -=================================================================== ---- valgrind/coregrind/m_main.c (revision 13015) -+++ valgrind/coregrind/m_main.c (working copy) -@@ -1871,14 +1871,17 @@ - setup_file_descriptors(); - - //-------------------------------------------------------------- -- // create the fake /proc//cmdline file and then unlink it, -- // but hold onto the fd, so we can hand it out to the client -- // when it tries to open /proc//cmdline for itself. -+ // create fake /proc//cmdline and /proc//auxv files -+ // and then unlink them, but hold onto the fds, so we can handr -+ // them out to the client when it tries to open -+ // /proc//cmdline or /proc//auxv for itself. - // p: setup file descriptors -+ // p: ii_create_image for VG_(client_auxv) setup. - //-------------------------------------------------------------- - #if !defined(VGO_linux) - // client shouldn't be using /proc! - VG_(cl_cmdline_fd) = -1; -+ VG_(cl_auxv_fd) = -1; - #else - if (!need_help) { - HChar buf[50], buf2[50+64]; -@@ -1915,6 +1918,34 @@ - VG_(err_config_error)("Can't delete client cmdline file in %s\n", buf2); - - VG_(cl_cmdline_fd) = fd; -+ -+ VG_(debugLog)(1, "main", "Create fake /proc//auxv\n"); -+ -+ VG_(sprintf)(buf, "proc_%d_auxv", VG_(getpid)()); -+ fd = VG_(mkstemp)( buf, buf2 ); -+ if (fd == -1) -+ VG_(err_config_error)("Can't create client auxv file in %s\n", buf2); -+ -+ UWord *client_auxv = VG_(client_auxv); -+ unsigned int client_auxv_len = 0; -+ while (*client_auxv != 0) { -+ client_auxv++; -+ client_auxv++; -+ client_auxv_len += 2 * sizeof(UWord); -+ } -+ client_auxv_len += 2 * sizeof(UWord); -+ -+ VG_(write)(fd, VG_(client_auxv), client_auxv_len); -+ -+ /* Don't bother to seek the file back to the start; instead do -+ it every time a copy of it is given out (by PRE(sys_open)). -+ That is probably more robust across fork() etc. */ -+ -+ /* Now delete it, but hang on to the fd. */ -+ r = VG_(unlink)( buf2 ); -+ if (r) -+ VG_(err_config_error)("Can't delete client cmdline file in %s\n", buf2); -+ VG_(cl_auxv_fd) = fd; - } - #endif - -Index: valgrind/coregrind/m_syswrap/syswrap-generic.c -=================================================================== ---- valgrind/coregrind/m_syswrap/syswrap-generic.c (revision 13015) -+++ valgrind/coregrind/m_syswrap/syswrap-generic.c (working copy) -@@ -3633,6 +3633,31 @@ - return; - } - } -+ -+ /* Handle the case where the open is of /proc/self/auxv or -+ /proc//auxv, and just give it a copy of the fd for the -+ fake file we cooked up at startup (in m_main). Also, seek the -+ cloned fd back to the start. */ -+ { -+ HChar name[30]; -+ Char* arg1s = (Char*) ARG1; -+ SysRes sres; -+ -+ VG_(sprintf)(name, "/proc/%d/auxv", VG_(getpid)()); -+ if (ML_(safe_to_deref)( arg1s, 1 ) && -+ (VG_STREQ(arg1s, name) || VG_STREQ(arg1s, "/proc/self/auxv")) -+ ) -+ { -+ sres = VG_(dup)( VG_(cl_auxv_fd) ); -+ SET_STATUS_from_SysRes( sres ); -+ if (!sr_isError(sres)) { -+ OffT off = VG_(lseek)( sr_Res(sres), 0, VKI_SEEK_SET ); -+ if (off < 0) -+ SET_STATUS_Failure( VKI_EMFILE ); -+ } -+ return; -+ } -+ } - #endif // defined(VGO_linux) - - /* Otherwise handle normally */ -Index: valgrind/coregrind/m_syswrap/syswrap-linux.c -=================================================================== ---- valgrind/coregrind/m_syswrap/syswrap-linux.c (revision 13015) -+++ valgrind/coregrind/m_syswrap/syswrap-linux.c (working copy) -@@ -3332,6 +3332,22 @@ - return; - } - -+ /* Do the same for /proc/self/auxv or /proc//auxv case. */ -+ -+ VG_(sprintf)(name, "/proc/%d/auxv", VG_(getpid)()); -+ if (ML_(safe_to_deref)( (void*)ARG2, 1 ) -+ && (VG_(strcmp)((Char *)ARG2, name) == 0 -+ || VG_(strcmp)((Char *)ARG2, "/proc/self/auxv") == 0)) { -+ sres = VG_(dup)( VG_(cl_auxv_fd) ); -+ SET_STATUS_from_SysRes( sres ); -+ if (!sr_isError(sres)) { -+ OffT off = VG_(lseek)( sr_Res(sres), 0, VKI_SEEK_SET ); -+ if (off < 0) -+ SET_STATUS_Failure( VKI_EMFILE ); -+ } -+ return; -+ } -+ - /* Otherwise handle normally */ - *flags |= SfMayBlock; - } -Index: valgrind/coregrind/pub_core_clientstate.h -=================================================================== ---- valgrind/coregrind/pub_core_clientstate.h (revision 13015) -+++ valgrind/coregrind/pub_core_clientstate.h (working copy) -@@ -67,6 +67,9 @@ - the file contents alive exactly until the process exits. */ - extern Int VG_(cl_cmdline_fd); - -+/* Same as above, but for /proc//auxv. */ -+extern Int VG_(cl_auxv_fd); -+ - // Client's original rlimit data and rlimit stack - extern struct vki_rlimit VG_(client_rlimit_data); - extern struct vki_rlimit VG_(client_rlimit_stack); -Index: valgrind/memcheck/tests/linux/Makefile.am -=================================================================== ---- valgrind/memcheck/tests/linux/Makefile.am (revision 13015) -+++ valgrind/memcheck/tests/linux/Makefile.am (working copy) -@@ -15,7 +15,8 @@ - syscalls-2007.vgtest syscalls-2007.stderr.exp \ - syslog-syscall.vgtest syslog-syscall.stderr.exp \ - timerfd-syscall.vgtest timerfd-syscall.stderr.exp \ -- with-space.stderr.exp with-space.stdout.exp with-space.vgtest -+ with-space.stderr.exp with-space.stdout.exp with-space.vgtest \ -+ proc-auxv.vgtest proc-auxv.stderr.exp - - check_PROGRAMS = \ - brk \ -@@ -27,7 +28,8 @@ - stack_switch \ - syscalls-2007 \ - syslog-syscall \ -- timerfd-syscall -+ timerfd-syscall \ -+ proc-auxv - - - AM_CFLAGS += $(AM_FLAG_M3264_PRI) -Index: memcheck/tests/linux/proc-auxv.c -=================================================================== ---- valgrind/memcheck/tests/linux/proc-auxv.c (revision 0) -+++ valgrind/memcheck/tests/linux/proc-auxv.c (working copy) -@@ -0,0 +1,62 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+int -+main (int argc, char **argv, char **envp) -+{ -+ ElfW(auxv_t) auxv; -+ ElfW(auxv_t) *auxv_p; -+ -+ void *entry0 = NULL; -+ void *entry1 = NULL; -+ -+ char *platform0 = NULL; -+ char *platform1 = NULL; -+ -+ // First try the "traditional" way. -+ while (*envp++ != NULL) -+ ; /* Skip, skip, skip... and after finding a NULL we have the auxv. */ -+ -+ for (auxv_p = (ElfW(auxv_t) *) envp; -+ auxv_p->a_type != AT_NULL; -+ auxv_p++) -+ { -+ if (auxv_p->a_type == AT_ENTRY) -+ entry0 = (void *) auxv_p->a_un.a_val; -+ if (auxv_p->a_type == AT_PLATFORM) -+ platform0 = strdup((char *) auxv_p->a_un.a_val); -+ } -+ -+ // Now the /proc way as often used in libraries. -+ int fd = open("/proc/self/auxv", O_RDONLY); -+ if (fd == -1) -+ return -1; -+ -+ while (read(fd, &auxv, sizeof(auxv)) == sizeof(auxv)) -+ { -+ if (auxv.a_type == AT_ENTRY) -+ entry1 = (void *) auxv.a_un.a_val; -+ if (auxv.a_type == AT_PLATFORM) -+ platform1 = strdup((char *) auxv.a_un.a_val); -+ } -+ close(fd); -+ -+ if (entry0 == entry1 && entry0 != NULL) -+ fprintf(stderr, "entries OK\n"); -+ -+ if (strcmp (platform0, platform1) == 0) -+ fprintf(stderr, "platform OK\n"); -+ -+ free (platform0); -+ free (platform1); -+ -+ return 0; -+} -Index: valgrind/memcheck/tests/linux/proc-auxv.stderr.exp -=================================================================== ---- valgrind/memcheck/tests/linux/proc-auxv.stderr.exp (revision 0) -+++ valgrind/memcheck/tests/linux/proc-auxv.stderr.exp (working copy) -@@ -0,0 +1,2 @@ -+entries OK -+platform OK -Index: valgrind/memcheck/tests/linux/proc-auxv.vgtest -=================================================================== ---- valgrind/memcheck/tests/linux/proc-auxv.vgtest (revision 0) -+++ valgrind/memcheck/tests/linux/proc-auxv.vgtest (working copy) -@@ -0,0 +1,2 @@ -+prog: proc-auxv -+vgopts: -q ---- valgrind-3.8.1.orig/memcheck/tests/linux/Makefile.in 2012-09-18 21:19:20.000000000 +0200 -+++ valgrind-3.8.1/memcheck/tests/linux/Makefile.in 2012-10-03 19:18:09.543945571 +0200 -@@ -57,7 +57,8 @@ - check_PROGRAMS = brk$(EXEEXT) capget$(EXEEXT) lsframe1$(EXEEXT) \ - lsframe2$(EXEEXT) sigqueue$(EXEEXT) stack_changes$(EXEEXT) \ - stack_switch$(EXEEXT) syscalls-2007$(EXEEXT) \ -- syslog-syscall$(EXEEXT) timerfd-syscall$(EXEEXT) -+ syslog-syscall$(EXEEXT) timerfd-syscall$(EXEEXT) \ -+ proc-auxv$(EXEEXT) - subdir = memcheck/tests/linux - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in -@@ -79,6 +80,9 @@ - lsframe2_SOURCES = lsframe2.c - lsframe2_OBJECTS = lsframe2.$(OBJEXT) - lsframe2_LDADD = $(LDADD) -+proc_auxv_SOURCES = proc-auxv.c -+proc_auxv_OBJECTS = proc-auxv.$(OBJEXT) -+proc_auxv_LDADD = $(LDADD) - sigqueue_SOURCES = sigqueue.c - sigqueue_OBJECTS = sigqueue.$(OBJEXT) - sigqueue_LDADD = $(LDADD) -@@ -106,11 +110,11 @@ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ --SOURCES = brk.c capget.c lsframe1.c lsframe2.c sigqueue.c \ -+SOURCES = brk.c capget.c lsframe1.c lsframe2.c proc-auxv.c sigqueue.c \ - stack_changes.c stack_switch.c syscalls-2007.c \ - syslog-syscall.c timerfd-syscall.c --DIST_SOURCES = brk.c capget.c lsframe1.c lsframe2.c sigqueue.c \ -- stack_changes.c stack_switch.c syscalls-2007.c \ -+DIST_SOURCES = brk.c capget.c lsframe1.c lsframe2.c proc-auxv.c \ -+ sigqueue.c stack_changes.c stack_switch.c syscalls-2007.c \ - syslog-syscall.c timerfd-syscall.c - ETAGS = etags - CTAGS = ctags -@@ -404,7 +408,8 @@ - syscalls-2007.vgtest syscalls-2007.stderr.exp \ - syslog-syscall.vgtest syslog-syscall.stderr.exp \ - timerfd-syscall.vgtest timerfd-syscall.stderr.exp \ -- with-space.stderr.exp with-space.stdout.exp with-space.vgtest -+ with-space.stderr.exp with-space.stdout.exp with-space.vgtest \ -+ proc-auxv.vgtest proc-auxv.stderr.exp - - stack_switch_LDADD = -lpthread - timerfd_syscall_LDADD = -lrt -@@ -457,6 +462,9 @@ - lsframe2$(EXEEXT): $(lsframe2_OBJECTS) $(lsframe2_DEPENDENCIES) - @rm -f lsframe2$(EXEEXT) - $(LINK) $(lsframe2_OBJECTS) $(lsframe2_LDADD) $(LIBS) -+proc-auxv$(EXEEXT): $(proc_auxv_OBJECTS) $(proc_auxv_DEPENDENCIES) -+ @rm -f proc-auxv$(EXEEXT) -+ $(LINK) $(proc_auxv_OBJECTS) $(proc_auxv_LDADD) $(LIBS) - sigqueue$(EXEEXT): $(sigqueue_OBJECTS) $(sigqueue_DEPENDENCIES) - @rm -f sigqueue$(EXEEXT) - $(LINK) $(sigqueue_OBJECTS) $(sigqueue_LDADD) $(LIBS) -@@ -486,6 +494,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capget.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsframe1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsframe2.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proc-auxv.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigqueue.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack_changes.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack_switch.Po@am__quote@ diff --git a/valgrind-3.8.1-ptrace-include-configure.patch b/valgrind-3.8.1-ptrace-include-configure.patch deleted file mode 100644 index 08564ca..0000000 --- a/valgrind-3.8.1-ptrace-include-configure.patch +++ /dev/null @@ -1,187 +0,0 @@ -commit e40952a7bbfa5ddbd5c4dc00392363a7069d3c15 -Author: philippe -Date: Thu Jul 25 20:40:17 2013 +0000 - - do not include linux/ptrace.h in vgdb.c - - Include of linux/ptrace.h was added in revision r11740, - to avoid compilation error on s390x (fedora and suse). - - The compilation error was retrieved thanks to archeological research - done by Christian Borntraeger: without this include, the following was given: - error: 'PT_ENDREGS' undeclared - There was also some errors on ppc64 around the same time: - error: 'PTRACE_GETREGS' undeclared - - Currently, the inclusion of linux/ptrace.h gives a problem on amd64/fedora20: - /usr/include/linux/ptrace.h:58:8: error: redefinition of ‘struct ptrace_peeksiginfo_args’ - /usr/include/sys/ptrace.h:191:8: note: originally defined here - - According to man ptrace, it is good enough to include sys/ptrace.h - (which should avoid the problem on amd64/f20). - - The linux/ptrace.h is deemed not necessary anymore as: - 1. Christian has tested on sles11sp2 on s390x. - 2. since linux/ptrace.h was added in vgdb.c, #ifdef PT_ENDREGS and - #ifdef PTRACE_GETREGS were added - - => remove the linux/ptrace.h - (tested on x86/f12, ppc64/f18, amd64/deb6, sles11sp2/s390x) - - Thanks to Christian for the investigations - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13471 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -commit f03cccfa732b9890860ba7fb743c5f0938515ab9 -Author: philippe -Date: Sat Aug 3 20:34:58 2013 +0000 - - Update configure machinery to detect PTRACE_GETREGS - Using #ifdef PTRACE_GETREGS gives difficulties as in some - platforms (e.g. mips) PTRACE_GETREGS is not defined as a - preprocessor symbols unless linux/ptrace.h is included. - However, including linux/ptrace.h causes compilation error on some - other platforms - - => better detect that PTRACE_GETREGS can be used using the - configure machinery. - - This should make vgdb PTRACE_GETREGS working again on - various platforms (x86/amd64/mips/...) as PTRACE_GETREGS - was disabled on all of these following r13471 - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13482 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff -ur valgrind-3.8.1.orig/config.h.in valgrind-3.8.1/config.h.in ---- valgrind-3.8.1.orig/config.h.in 2013-08-08 13:32:08.086267278 +0200 -+++ valgrind-3.8.1/config.h.in 2013-08-08 13:49:16.000000000 +0200 -@@ -207,6 +207,9 @@ - /* Define to 1 if you have the `pthread_yield' function. */ - #undef HAVE_PTHREAD_YIELD - -+/* Define to 1 if you have the `PTRACE_GETREGS' ptrace request. */ -+#undef HAVE_PTRACE_GETREGS -+ - /* Define to 1 if you have the `readlinkat' function. */ - #undef HAVE_READLINKAT - -diff -ur valgrind-3.8.1.orig/configure valgrind-3.8.1/configure ---- valgrind-3.8.1.orig/configure 2013-08-08 13:32:08.122267596 +0200 -+++ valgrind-3.8.1/configure 2013-08-08 13:49:21.697522489 +0200 -@@ -6731,6 +6731,45 @@ - # Checking for various library functions and other definitions - #---------------------------------------------------------------------------- - -+# Check for PTRACE_GETREGS -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 -+$as_echo_n "checking for PTRACE_GETREGS... " >&6; } -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+#include -+#include -+#include -+ -+int -+main () -+{ -+ -+ void *p; -+ long res = ptrace (PTRACE_GETREGS, 0, p, p); -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+$as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h -+ -+ -+else -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+ - # Check for CLOCK_MONOTONIC - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLOCK_MONOTONIC" >&5 -diff -ur valgrind-3.8.1.orig/configure.in valgrind-3.8.1/configure.in ---- valgrind-3.8.1.orig/configure.in 2013-08-08 13:32:08.086267278 +0200 -+++ valgrind-3.8.1/configure.in 2013-08-08 13:32:29.283455153 +0200 -@@ -1004,6 +1004,25 @@ - # Checking for various library functions and other definitions - #---------------------------------------------------------------------------- - -+# Check for PTRACE_GETREGS -+ -+AC_MSG_CHECKING([for PTRACE_GETREGS]) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#include -+#include -+#include -+]], [[ -+ void *p; -+ long res = ptrace (PTRACE_GETREGS, 0, p, p); -+]])], [ -+AC_MSG_RESULT([yes]) -+AC_DEFINE([HAVE_PTRACE_GETREGS], 1, -+ [Define to 1 if you have the `PTRACE_GETREGS' ptrace request.]) -+], [ -+AC_MSG_RESULT([no]) -+]) -+ -+ - # Check for CLOCK_MONOTONIC - - AC_MSG_CHECKING([for CLOCK_MONOTONIC]) -diff -ur valgrind-3.8.1.orig/coregrind/vgdb.c valgrind-3.8.1/coregrind/vgdb.c ---- valgrind-3.8.1.orig/coregrind/vgdb.c 2013-08-08 13:32:08.080267224 +0200 -+++ valgrind-3.8.1/coregrind/vgdb.c 2013-08-08 13:34:39.247611009 +0200 -@@ -102,7 +102,6 @@ - #include - #if defined(VGO_linux) - # include --# include - #endif - #endif - -@@ -696,7 +695,7 @@ - // runtime check not yet done. - // 0 : PTRACE_GETREGS runtime check has failed. - // 1 : PTRACE_GETREGS defined and runtime check ok. --#ifdef PTRACE_GETREGS -+#ifdef HAVE_PTRACE_GETREGS - static int has_working_ptrace_getregs = -1; - #endif - -@@ -707,7 +706,7 @@ - Bool getregs (int pid, void *regs, long regs_bsz) - { - DEBUG(1, "getregs regs_bsz %ld\n", regs_bsz); --# ifdef PTRACE_GETREGS -+# ifdef HAVE_PTRACE_GETREGS - if (has_working_ptrace_getregs) { - // Platforms having GETREGS - long res; -@@ -778,7 +777,7 @@ - DEBUG(1, "setregs regs_bsz %ld\n", regs_bsz); - // Note : the below is checking for GETREGS, not SETREGS - // as if one is defined and working, the other one should also work. --# ifdef PTRACE_GETREGS -+# ifdef HAVE_PTRACE_GETREGS - if (has_working_ptrace_getregs) { - // Platforms having SETREGS - long res; diff --git a/valgrind-3.8.1-ptrace-setgetregset.patch b/valgrind-3.8.1-ptrace-setgetregset.patch deleted file mode 100644 index 29d5fb2..0000000 --- a/valgrind-3.8.1-ptrace-setgetregset.patch +++ /dev/null @@ -1,481 +0,0 @@ -commit 7be84ee45ccc827a63353868558bed6c824b4a68 -Author: cborntra -Date: Thu Nov 8 19:42:00 2012 +0000 - - Add ptrace getreset testcase from Andreas Arnez - arnez AT linux DOT vnet DOT ibm DOT com - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13110 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/linux/getregset.c b/memcheck/tests/linux/getregset.c -new file mode 100644 -index 0000000..70b5ce2 ---- /dev/null -+++ b/memcheck/tests/linux/getregset.c -@@ -0,0 +1,76 @@ -+/* -*- mode: C; c-basic-offset: 3; -*- */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static int -+err_out(const char *msg) -+{ -+ perror(msg); -+ return 1; -+} -+ -+static int -+non_empty(const char *buf, size_t len) -+{ -+ size_t i; -+ int c; -+ volatile const char *p = buf; -+ -+ for (i = 0; i != len; i++) -+ c |= p[i]; -+ return c; -+} -+ -+static int -+do_child(void) -+{ -+ if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1) -+ return err_out("ptrace traceme"); -+ raise(SIGUSR1); -+ return 0; -+} -+ -+int -+main(void) -+{ -+ char buf[1024]; -+ struct iovec iov; -+ pid_t cpid, pid; -+ int status; -+ -+ cpid = fork(); -+ if (cpid == -1) -+ return err_out("fork"); -+ if (cpid == 0) -+ return do_child(); -+ -+ pid = wait(&status); -+ if (pid == -1) -+ return err_out("wait"); -+ -+ /* Intentionally provide an uninitialized buffer to ptrace. */ -+ iov.iov_len = sizeof(buf); -+ iov.iov_base = buf; -+ if (ptrace(0x4204, cpid, NT_PRSTATUS, &iov) == -1) -+ return err_out("ptrace getregset"); -+ -+ assert(iov.iov_base == buf); -+ assert(iov.iov_len > 0 && iov.iov_len < sizeof(buf)); -+ -+ /* We're assuming here that NT_PRSTATUS never contains -+ all-zeros. */ -+ assert(non_empty(buf, iov.iov_len)); -+ puts("OK"); -+ return 0; -+} -diff --git a/memcheck/tests/linux/getregset.stderr.exp b/memcheck/tests/linux/getregset.stderr.exp -new file mode 100644 -index 0000000..e69de29 -diff --git a/memcheck/tests/linux/getregset.stdout.exp b/memcheck/tests/linux/getregset.stdout.exp -new file mode 100644 -index 0000000..d86bac9 ---- /dev/null -+++ b/memcheck/tests/linux/getregset.stdout.exp -@@ -0,0 +1 @@ -+OK -diff --git a/memcheck/tests/linux/getregset.vgtest b/memcheck/tests/linux/getregset.vgtest -new file mode 100644 -index 0000000..73f52f7 ---- /dev/null -+++ b/memcheck/tests/linux/getregset.vgtest -@@ -0,0 +1,2 @@ -+prog: getregset -+vgopts: -q -\ No newline at end of file - -commit e48a444c9dfdf8083da562e87521c54876f8edc3 -Author: cborntra -Date: Thu Nov 8 20:10:10 2012 +0000 - - add s390 specific fix for getregset - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13112 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h -index 6638f14..ea043d7 100644 ---- a/coregrind/m_syswrap/priv_syswrap-linux.h -+++ b/coregrind/m_syswrap/priv_syswrap-linux.h -@@ -290,6 +290,11 @@ extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW ); - extern void ML_(linux_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW ); - extern void ML_(linux_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW ); - -+// Linux-specific (but non-arch-specific) ptrace wrapper helpers -+extern void ML_(linux_PRE_getregset) ( ThreadId, long, long ); -+extern void ML_(linux_PRE_setregset) ( ThreadId, long, long ); -+extern void ML_(linux_POST_getregset)( ThreadId, long, long ); -+ - #undef TId - #undef UW - #undef SR -diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c -index cec1c20..18bb548 100644 ---- a/coregrind/m_syswrap/syswrap-linux.c -+++ b/coregrind/m_syswrap/syswrap-linux.c -@@ -7230,6 +7230,46 @@ ML_(linux_POST_sys_getsockopt) ( ThreadId tid, - } - } - -+/* --------------------------------------------------------------------- -+ ptrace wrapper helpers -+ ------------------------------------------------------------------ */ -+ -+void -+ML_(linux_PRE_getregset) ( ThreadId tid, long arg3, long arg4 ) -+{ -+ struct vki_iovec *iov = (struct vki_iovec *) arg4; -+ -+ PRE_MEM_READ("ptrace(getregset iovec->iov_base)", -+ (unsigned long) &iov->iov_base, sizeof(iov->iov_base)); -+ PRE_MEM_READ("ptrace(getregset iovec->iov_len)", -+ (unsigned long) &iov->iov_len, sizeof(iov->iov_len)); -+ PRE_MEM_WRITE("ptrace(getregset *(iovec->iov_base))", -+ (unsigned long) iov->iov_base, iov->iov_len); -+} -+ -+void -+ML_(linux_PRE_setregset) ( ThreadId tid, long arg3, long arg4 ) -+{ -+ struct vki_iovec *iov = (struct vki_iovec *) arg4; -+ -+ PRE_MEM_READ("ptrace(setregset iovec->iov_base)", -+ (unsigned long) &iov->iov_base, sizeof(iov->iov_base)); -+ PRE_MEM_READ("ptrace(setregset iovec->iov_len)", -+ (unsigned long) &iov->iov_len, sizeof(iov->iov_len)); -+ PRE_MEM_READ("ptrace(setregset *(iovec->iov_base))", -+ (unsigned long) iov->iov_base, iov->iov_len); -+} -+ -+void -+ML_(linux_POST_getregset) ( ThreadId tid, long arg3, long arg4 ) -+{ -+ struct vki_iovec *iov = (struct vki_iovec *) arg4; -+ -+ /* XXX: The actual amount of data written by the kernel might be -+ less than iov_len, depending on the regset (arg3). */ -+ POST_MEM_WRITE((unsigned long) iov->iov_base, iov->iov_len); -+} -+ - #undef PRE - #undef POST - -diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c -index 10d83e7..84c2f29 100644 ---- a/coregrind/m_syswrap/syswrap-s390x-linux.c -+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c -@@ -345,10 +345,13 @@ DECL_TEMPLATE(s390x_linux, sys_sigreturn); - DECL_TEMPLATE(s390x_linux, sys_rt_sigreturn); - DECL_TEMPLATE(s390x_linux, sys_fadvise64); - --// PEEK TEXT,DATA and USER are common to all architectures --// PEEKUSR_AREA and POKEUSR_AREA are special, having a memory area --// containing the real addr, data, and len field pointed to by ARG3 --// instead of ARG4 -+/* PEEK TEXT,DATA and USER are common to all architectures. -+ PEEKUSR_AREA and POKEUSR_AREA are special, having a memory area -+ containing the real addr, data, and len field pointed to by ARG3 -+ instead of ARG4. -+ GETREGSET and SETREGSET use a struct iovec (pointed to by ARG4) for -+ the address and size of the user buffer. */ -+ - PRE(sys_ptrace) - { - PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", ARG1,ARG2,ARG3,ARG4); -@@ -404,6 +407,12 @@ PRE(sys_ptrace) - pa->vki_process_addr, pa->vki_len); - break; - } -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_PRE_getregset)(tid, ARG3, ARG4); -+ break; -+ case VKI_PTRACE_SETREGSET: -+ ML_(linux_PRE_setregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } -@@ -432,7 +441,11 @@ POST(sys_ptrace) - - pa = (vki_ptrace_area *) ARG3; - POST_MEM_WRITE(pa->vki_process_addr, pa->vki_len); -+ break; - } -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_POST_getregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } -diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h -index 64ba6a4..cee687d 100644 ---- a/include/vki/vki-linux.h -+++ b/include/vki/vki-linux.h -@@ -2251,6 +2251,8 @@ typedef __vki_kernel_uid32_t vki_qid_t; /* Type in which we store ids in memory - #define VKI_PTRACE_GETEVENTMSG 0x4201 - #define VKI_PTRACE_GETSIGINFO 0x4202 - #define VKI_PTRACE_SETSIGINFO 0x4203 -+#define VKI_PTRACE_GETREGSET 0x4204 -+#define VKI_PTRACE_SETREGSET 0x4205 - - //---------------------------------------------------------------------- - // From linux-2.6.14/include/sound/asound.h -diff --git a/memcheck/tests/linux/getregset.c b/memcheck/tests/linux/getregset.c -index 70b5ce2..3a67663 100644 ---- a/memcheck/tests/linux/getregset.c -+++ b/memcheck/tests/linux/getregset.c -@@ -24,7 +24,7 @@ static int - non_empty(const char *buf, size_t len) - { - size_t i; -- int c; -+ int c = 0; - volatile const char *p = buf; - - for (i = 0; i != len; i++) - -commit b2cd1bc0abb95119df1b9b8e6dcc71e48b828a94 -Author: cborntra -Date: Thu Nov 8 20:27:05 2012 +0000 - - also wire up arm, x86 and amd64 regarding ptrace regsets - original patch from - Andreas Arnez - - Seems that ppc and mips dont have ptrace support.... - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13113 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c -index 035f7b8..2f2b0a4 100644 ---- a/coregrind/m_syswrap/syswrap-amd64-linux.c -+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c -@@ -617,6 +617,12 @@ PRE(sys_ptrace) - case VKI_PTRACE_SETSIGINFO: - PRE_MEM_READ( "ptrace(setsiginfo)", ARG4, sizeof(vki_siginfo_t)); - break; -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_PRE_getregset)(tid, ARG3, ARG4); -+ break; -+ case VKI_PTRACE_SETREGSET: -+ ML_(linux_PRE_setregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } -@@ -645,6 +651,9 @@ POST(sys_ptrace) - */ - POST_MEM_WRITE( ARG4, sizeof(vki_siginfo_t)); - break; -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_POST_getregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } -diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c -index 27ecc8c..f60d771 100644 ---- a/coregrind/m_syswrap/syswrap-arm-linux.c -+++ b/coregrind/m_syswrap/syswrap-arm-linux.c -@@ -1110,6 +1110,12 @@ PRE(sys_ptrace) - case VKI_PTRACE_SETSIGINFO: - PRE_MEM_READ( "ptrace(setsiginfo)", ARG4, sizeof(vki_siginfo_t)); - break; -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_PRE_getregset)(tid, ARG3, ARG4); -+ break; -+ case VKI_PTRACE_SETREGSET: -+ ML_(linux_PRE_setregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } -@@ -1149,6 +1155,9 @@ POST(sys_ptrace) - */ - POST_MEM_WRITE( ARG4, sizeof(vki_siginfo_t)); - break; -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_POST_getregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } -diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c -index 8f47efd..b9f94b6 100644 ---- a/coregrind/m_syswrap/syswrap-x86-linux.c -+++ b/coregrind/m_syswrap/syswrap-x86-linux.c -@@ -1139,6 +1139,12 @@ PRE(sys_ptrace) - case VKI_PTRACE_SETSIGINFO: - PRE_MEM_READ( "ptrace(setsiginfo)", ARG4, sizeof(vki_siginfo_t)); - break; -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_PRE_getregset)(tid, ARG3, ARG4); -+ break; -+ case VKI_PTRACE_SETREGSET: -+ ML_(linux_PRE_setregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } -@@ -1170,6 +1176,9 @@ POST(sys_ptrace) - */ - POST_MEM_WRITE( ARG4, sizeof(vki_siginfo_t)); - break; -+ case VKI_PTRACE_GETREGSET: -+ ML_(linux_POST_getregset)(tid, ARG3, ARG4); -+ break; - default: - break; - } - -commit 49cc754d63a30accef06cd9a18315051b206373c -Author: cborntra -Date: Fri Nov 9 08:06:14 2012 +0000 - - GETREGSET was introduced with 2.6.33. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13115 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/linux/getregset.vgtest b/memcheck/tests/linux/getregset.vgtest -index 73f52f7..14be523 100644 ---- a/memcheck/tests/linux/getregset.vgtest -+++ b/memcheck/tests/linux/getregset.vgtest -@@ -1,2 +1,4 @@ - prog: getregset --vgopts: -q -\ No newline at end of file -+vgopts: -q -+prereq: ../../../tests/os_test linux 2.6.33 -+ -commit a9a475d568840ecdfcc312cc4b02c29e20b81fab -Author: cborntra -Date: Thu Nov 8 19:46:29 2012 +0000 - - wire up testcase - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13111 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am -index b59afae..5885ab0 100644 ---- a/memcheck/tests/linux/Makefile.am -+++ b/memcheck/tests/linux/Makefile.am -@@ -16,11 +16,13 @@ EXTRA_DIST = \ - syslog-syscall.vgtest syslog-syscall.stderr.exp \ - timerfd-syscall.vgtest timerfd-syscall.stderr.exp \ - with-space.stderr.exp with-space.stdout.exp with-space.vgtest \ -- proc-auxv.vgtest proc-auxv.stderr.exp -+ proc-auxv.vgtest proc-auxv.stderr.exp getregset.vgtest \ -+ getregset.stderr.exp getregset.stdout.exp - - check_PROGRAMS = \ - brk \ - capget \ -+ getregset \ - lsframe1 \ - lsframe2 \ - sigqueue \ ---- valgrind-3.8.1/memcheck/tests/linux/Makefile.in.orig 2013-02-19 15:22:18.550589954 +0100 -+++ valgrind-3.8.1/memcheck/tests/linux/Makefile.in 2013-02-19 15:22:30.941543855 +0100 -@@ -54,11 +54,11 @@ - @VGCONF_HAVE_PLATFORM_SEC_TRUE@am__append_2 = -DVGA_SEC_@VGCONF_ARCH_SEC@=1 \ - @VGCONF_HAVE_PLATFORM_SEC_TRUE@ -DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 - --check_PROGRAMS = brk$(EXEEXT) capget$(EXEEXT) lsframe1$(EXEEXT) \ -- lsframe2$(EXEEXT) sigqueue$(EXEEXT) stack_changes$(EXEEXT) \ -- stack_switch$(EXEEXT) syscalls-2007$(EXEEXT) \ -- syslog-syscall$(EXEEXT) timerfd-syscall$(EXEEXT) \ -- proc-auxv$(EXEEXT) -+check_PROGRAMS = brk$(EXEEXT) capget$(EXEEXT) getregset$(EXEEXT) \ -+ lsframe1$(EXEEXT) lsframe2$(EXEEXT) sigqueue$(EXEEXT) \ -+ stack_changes$(EXEEXT) stack_switch$(EXEEXT) \ -+ syscalls-2007$(EXEEXT) syslog-syscall$(EXEEXT) \ -+ timerfd-syscall$(EXEEXT) proc-auxv$(EXEEXT) - subdir = memcheck/tests/linux - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in -@@ -74,6 +74,9 @@ - capget_SOURCES = capget.c - capget_OBJECTS = capget.$(OBJEXT) - capget_LDADD = $(LDADD) -+getregset_SOURCES = getregset.c -+getregset_OBJECTS = getregset.$(OBJEXT) -+getregset_LDADD = $(LDADD) - lsframe1_SOURCES = lsframe1.c - lsframe1_OBJECTS = lsframe1.$(OBJEXT) - lsframe1_LDADD = $(LDADD) -@@ -110,12 +113,12 @@ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ --SOURCES = brk.c capget.c lsframe1.c lsframe2.c proc-auxv.c sigqueue.c \ -- stack_changes.c stack_switch.c syscalls-2007.c \ -- syslog-syscall.c timerfd-syscall.c --DIST_SOURCES = brk.c capget.c lsframe1.c lsframe2.c proc-auxv.c \ -+SOURCES = brk.c capget.c getregset.c lsframe1.c lsframe2.c proc-auxv.c \ - sigqueue.c stack_changes.c stack_switch.c syscalls-2007.c \ - syslog-syscall.c timerfd-syscall.c -+DIST_SOURCES = brk.c capget.c getregset.c lsframe1.c lsframe2.c \ -+ proc-auxv.c sigqueue.c stack_changes.c stack_switch.c \ -+ syscalls-2007.c syslog-syscall.c timerfd-syscall.c - ETAGS = etags - CTAGS = ctags - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -@@ -409,7 +412,8 @@ - syslog-syscall.vgtest syslog-syscall.stderr.exp \ - timerfd-syscall.vgtest timerfd-syscall.stderr.exp \ - with-space.stderr.exp with-space.stdout.exp with-space.vgtest \ -- proc-auxv.vgtest proc-auxv.stderr.exp -+ proc-auxv.vgtest proc-auxv.stderr.exp getregset.vgtest \ -+ getregset.stderr.exp getregset.stdout.exp - - stack_switch_LDADD = -lpthread - timerfd_syscall_LDADD = -lrt -@@ -456,6 +460,9 @@ - capget$(EXEEXT): $(capget_OBJECTS) $(capget_DEPENDENCIES) - @rm -f capget$(EXEEXT) - $(LINK) $(capget_OBJECTS) $(capget_LDADD) $(LIBS) -+getregset$(EXEEXT): $(getregset_OBJECTS) $(getregset_DEPENDENCIES) -+ @rm -f getregset$(EXEEXT) -+ $(LINK) $(getregset_OBJECTS) $(getregset_LDADD) $(LIBS) - lsframe1$(EXEEXT): $(lsframe1_OBJECTS) $(lsframe1_DEPENDENCIES) - @rm -f lsframe1$(EXEEXT) - $(LINK) $(lsframe1_OBJECTS) $(lsframe1_LDADD) $(LIBS) -@@ -492,6 +499,7 @@ - - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brk.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capget.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getregset.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsframe1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsframe2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proc-auxv.Po@am__quote@ diff --git a/valgrind-3.8.1-ptrace-thread-area.patch b/valgrind-3.8.1-ptrace-thread-area.patch deleted file mode 100644 index c8cba1b..0000000 --- a/valgrind-3.8.1-ptrace-thread-area.patch +++ /dev/null @@ -1,58 +0,0 @@ -commit f666d20249ff381dfc9bf5a621c544560527af40 -Author: mjw -Date: Wed May 22 10:21:08 2013 +0000 - - Support PTRACE_GET/SET_THREAD_AREA on x86. - BZ#320063. (Josh Stone, jistone@redhat.com) - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13403 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c -index 7e75899..ed60a15 100644 ---- a/coregrind/m_syswrap/syswrap-x86-linux.c -+++ b/coregrind/m_syswrap/syswrap-x86-linux.c -@@ -1118,6 +1118,10 @@ PRE(sys_ptrace) - PRE_MEM_WRITE( "ptrace(getfpxregs)", ARG4, - sizeof(struct vki_user_fxsr_struct) ); - break; -+ case VKI_PTRACE_GET_THREAD_AREA: -+ PRE_MEM_WRITE( "ptrace(get_thread_area)", ARG4, -+ sizeof(struct vki_user_desc) ); -+ break; - case VKI_PTRACE_SETREGS: - PRE_MEM_READ( "ptrace(setregs)", ARG4, - sizeof (struct vki_user_regs_struct)); -@@ -1130,6 +1134,10 @@ PRE(sys_ptrace) - PRE_MEM_READ( "ptrace(setfpxregs)", ARG4, - sizeof(struct vki_user_fxsr_struct) ); - break; -+ case VKI_PTRACE_SET_THREAD_AREA: -+ PRE_MEM_READ( "ptrace(set_thread_area)", ARG4, -+ sizeof(struct vki_user_desc) ); -+ break; - case VKI_PTRACE_GETEVENTMSG: - PRE_MEM_WRITE( "ptrace(geteventmsg)", ARG4, sizeof(unsigned long)); - break; -@@ -1167,6 +1175,9 @@ POST(sys_ptrace) - case VKI_PTRACE_GETFPXREGS: - POST_MEM_WRITE( ARG4, sizeof(struct vki_user_fxsr_struct) ); - break; -+ case VKI_PTRACE_GET_THREAD_AREA: -+ POST_MEM_WRITE( ARG4, sizeof(struct vki_user_desc) ); -+ break; - case VKI_PTRACE_GETEVENTMSG: - POST_MEM_WRITE( ARG4, sizeof(unsigned long)); - break; -diff --git a/include/vki/vki-x86-linux.h b/include/vki/vki-x86-linux.h -index 7c072d6..adfcb08 100644 ---- a/include/vki/vki-x86-linux.h -+++ b/include/vki/vki-x86-linux.h -@@ -812,6 +812,8 @@ struct vki_shminfo64 { - #define VKI_PTRACE_SETFPREGS 15 - #define VKI_PTRACE_GETFPXREGS 18 - #define VKI_PTRACE_SETFPXREGS 19 -+#define VKI_PTRACE_GET_THREAD_AREA 25 -+#define VKI_PTRACE_SET_THREAD_AREA 26 - - //---------------------------------------------------------------------- - // From linux-2.6.15.4/include/asm-i386/vm86.h diff --git a/valgrind-3.8.1-regtest-fixlets.patch b/valgrind-3.8.1-regtest-fixlets.patch deleted file mode 100644 index e8ee194..0000000 --- a/valgrind-3.8.1-regtest-fixlets.patch +++ /dev/null @@ -1,55 +0,0 @@ -commit 6f0b0c294b995df6c32edc75f90dfac3ad04114a -Author: mjw -Date: Thu Mar 28 22:52:13 2013 +0000 - - memcheck/tests/strchr test should not depend on line numbers. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13348 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/strchr.stderr.exp3 b/memcheck/tests/strchr.stderr.exp3 -index 9f90e69..e1832fa 100644 ---- a/memcheck/tests/strchr.stderr.exp3 -+++ b/memcheck/tests/strchr.stderr.exp3 -@@ -1,9 +1,9 @@ - Conditional jump or move depends on uninitialised value(s) -- at 0x........: __GI_strchr (mc_replace_strmem.c:211) -+ at 0x........: __GI_strchr (mc_replace_strmem.c:...) - by 0x........: main (strchr.c:15) - - Conditional jump or move depends on uninitialised value(s) -- at 0x........: __GI_strchr (mc_replace_strmem.c:211) -+ at 0x........: __GI_strchr (mc_replace_strmem.c:...) - by 0x........: main (strchr.c:15) - - Conditional jump or move depends on uninitialised value(s) -diff --git a/memcheck/tests/strchr.vgtest b/memcheck/tests/strchr.vgtest -index e914726..152c97e 100644 ---- a/memcheck/tests/strchr.vgtest -+++ b/memcheck/tests/strchr.vgtest -@@ -1,2 +1,3 @@ - prog: strchr - vgopts: -q -+stderr_filter_args: strchr.c - -commit 48b0ae338abe2dcd726e1733532a971837049ceb -Author: mjw -Date: Thu Mar 28 22:52:14 2013 +0000 - - For memcheck overlap filter_memcpy str[n]cpy and __GI_str[n]cpy are equal. - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13349 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/filter_memcpy b/memcheck/tests/filter_memcpy -index 47741ba..737304c 100755 ---- a/memcheck/tests/filter_memcpy -+++ b/memcheck/tests/filter_memcpy -@@ -1,5 +1,8 @@ - #! /bin/sh - - # mc_replace_strmem.c intercepts various memcpy glibc versions. -+# mc_replace_strmem.c str[n]cpy and __GI_str[n]cpy are the same. - ./filter_stderr "$@" | --perl -p -e "s/: memcpy\@\@?GLIBC_[.1-9]+ \(mc_replace_strmem.c:...\)/: memcpy \(mc_replace_strmem.c:...\)/" -+perl -p -e "s/: memcpy\@\@?GLIBC_[.1-9]+ \(mc_replace_strmem.c:...\)/: memcpy \(mc_replace_strmem.c:...\)/" | -+sed -e "s/: __GI_strcpy (mc_replace_strmem.c:/: strcpy (mc_replace_strmem.c:/" | -+sed -e "s/: __GI_strncpy (mc_replace_strmem.c:/: strncpy (mc_replace_strmem.c:/" diff --git a/valgrind-3.8.1-s390-STFLE.patch b/valgrind-3.8.1-s390-STFLE.patch deleted file mode 100644 index f6408ba..0000000 --- a/valgrind-3.8.1-s390-STFLE.patch +++ /dev/null @@ -1,141 +0,0 @@ -commit d2c954603a211e11c35db7d8b3fdd60675483738 -Author: florian -Date: Tue Dec 4 04:45:32 2012 +0000 - - In the past, the implementation of STFLE returned the facilities of the host - machine. This was not consistent in the following sense: Suppose the host - has a facility F installed and this facility implies the availability of an - insn X. Suppose further, that insn X is not supported in valgrind. - An application progrm that tests the availability of insn X by checking - for its associated facility F will fail under valgrind when using X because - valgrind will SIGILL. Not so good. - - This patch changes the STFLE behaviour to adjust the facilities of the - virtual machine according to what the set of insns that is actually - supported. It's an approximation, because for some facilities we only - support a subset of the insns enabled by that facility. - - Fixes BZ 310931. - - - git-svn-id: svn://svn.valgrind.org/vex/trunk@2579 8f6e269a-dfd6-0310-a8e1-e2731360e62c - -diff --git a/VEX/priv/guest_s390_helpers.c b/priv/guest_s390_helpers.c -index 8169916..b0c0225 100644 ---- a/VEX/priv/guest_s390_helpers.c -+++ b/VEX/priv/guest_s390_helpers.c -@@ -292,6 +292,22 @@ ULong s390x_dirtyhelper_STCKE(ULong *addr) {return 3;} - /*--- Dirty helper for Store Facility instruction ---*/ - /*------------------------------------------------------------*/ - #if defined(VGA_s390x) -+static void -+s390_set_facility_bit(ULong *addr, UInt bitno, UInt value) -+{ -+ addr += bitno / 64; -+ bitno = bitno % 64; -+ -+ ULong mask = 1; -+ mask <<= (63 - bitno); -+ -+ if (value == 1) { -+ *addr |= mask; // set -+ } else { -+ *addr &= ~mask; // clear -+ } -+} -+ - ULong - s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, ULong *addr) - { -@@ -313,9 +329,56 @@ s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, ULong *addr) - /* Update guest register 0 with what STFLE set r0 to */ - guest_state->guest_r0 = reg0; - -+ /* Set default: VM facilities = host facilities */ - for (i = 0; i < num_dw; ++i) - addr[i] = hoststfle[i]; - -+ /* Enumerators for interesting facilities. The value of the enumerator -+ is the number of the facility bit as per POP. */ -+ enum { -+ S390_FAC_MSA = 17, // message-security-assist -+ S390_FAC_LDISP = 18, // long displacement -+ S390_FAC_HFPMAS = 20, // HFP multiply-and-add-subtract -+ S390_FAC_EIMM = 21, // extended immediate -+ S390_FAC_HFPUNX = 23, // HFP unnormalized extension -+ S390_FAC_ETF2 = 24, // ETF2-enhancement -+ S390_FAC_PENH = 26, // parsing-enhancement -+ S390_FAC_ETF3 = 30, // ETF3-enhancement -+ S390_FAC_XCPUT = 31, // extract-CPU-time -+ S390_FAC_GIE = 34, // general insn extension -+ S390_FAC_EXEXT = 35, // execute extension -+ S390_FAC_DFP = 42, // decimal floating point -+ S390_FAC_PFPO = 44, // perform floating point operation insn -+ S390_FAC_HIGHW = 45, // high-word extension -+ S390_FAC_DFPZC = 48, // DFP zoned-conversion -+ S390_FAC_MISC = 49, // miscellaneous insn -+ S390_FAC_CTREXE = 50, // constrained transactional execution -+ S390_FAC_TREXE = 73, // transactional execution -+ S390_FAC_MSA4 = 77 // message-security-assist 4 -+ }; -+ -+ /* Now adjust the VM facilities according to what the VM supports */ -+ s390_set_facility_bit(addr, S390_FAC_LDISP, 1); -+ s390_set_facility_bit(addr, S390_FAC_EIMM, 1); -+ s390_set_facility_bit(addr, S390_FAC_ETF2, 1); -+ s390_set_facility_bit(addr, S390_FAC_ETF3, 1); -+ s390_set_facility_bit(addr, S390_FAC_GIE, 1); -+ s390_set_facility_bit(addr, S390_FAC_EXEXT, 1); -+ s390_set_facility_bit(addr, S390_FAC_HIGHW, 1); -+ -+ s390_set_facility_bit(addr, S390_FAC_HFPMAS, 0); -+ s390_set_facility_bit(addr, S390_FAC_HFPUNX, 0); -+ s390_set_facility_bit(addr, S390_FAC_XCPUT, 0); -+ s390_set_facility_bit(addr, S390_FAC_MSA, 0); -+ s390_set_facility_bit(addr, S390_FAC_PENH, 0); -+ s390_set_facility_bit(addr, S390_FAC_DFP, 0); -+ s390_set_facility_bit(addr, S390_FAC_PFPO, 0); -+ s390_set_facility_bit(addr, S390_FAC_DFPZC, 0); -+ s390_set_facility_bit(addr, S390_FAC_MISC, 0); -+ s390_set_facility_bit(addr, S390_FAC_CTREXE, 0); -+ s390_set_facility_bit(addr, S390_FAC_TREXE, 0); -+ s390_set_facility_bit(addr, S390_FAC_MSA4, 0); -+ - return cc; - } - -commit a53843d425a9cc64159bd46833e93febb0a8d797 -Author: florian -Date: Tue Dec 4 04:46:52 2012 +0000 - - Beef up testcase. Announce fix. - Part of fixing BZ 310931. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13150 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/none/tests/s390x/stfle.c b/none/tests/s390x/stfle.c -index 7bfe2d6..6c8007b 100644 ---- a/none/tests/s390x/stfle.c -+++ b/none/tests/s390x/stfle.c -@@ -52,5 +52,11 @@ int main() - else - printf("The z/Architecture architectural mode is not installed\n"); - -+ /* Test #4: Message security assist */ -+ if (stfle(dw, 17)) { -+ printf("MSA facility is present\n"); -+ } else { -+ printf("No MSA facility available\n"); -+ } - return 0; - } -diff --git a/none/tests/s390x/stfle.stdout.exp b/none/tests/s390x/stfle.stdout.exp -index c4653a9..00c2c75 100644 ---- a/none/tests/s390x/stfle.stdout.exp -+++ b/none/tests/s390x/stfle.stdout.exp -@@ -6,3 +6,4 @@ STFLE facility is installed - the value of cc is 3 and #double words is 2 - the value of cc is 3 and #double words is 2 - The z/Architecture architectural mode is installed and active -+No MSA facility available diff --git a/valgrind-3.8.1-s390_tsearch_supp.patch b/valgrind-3.8.1-s390_tsearch_supp.patch deleted file mode 100644 index 04c78ca..0000000 --- a/valgrind-3.8.1-s390_tsearch_supp.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- valgrind-3.8.1/glibc-2.X.supp.in.orig 2012-10-15 14:10:24.646984028 +0200 -+++ valgrind-3.8.1/glibc-2.X.supp.in 2012-10-15 14:13:58.505147375 +0200 -@@ -213,6 +213,16 @@ - obj:/*libc-@GLIBC_VERSION@*.so - } - -+## ---------------------------------------------------------------------## -+# Workaround for Bug 308427 - s390 memcheck reports tsearch conditional -+# jump or move depends on uninitialized value. -+{ -+ s390x-tsearch-node_t-red -+ Memcheck:Cond -+ fun:tsearch -+ obj:/*libc-@GLIBC_VERSION@*.so -+} -+ - ##----------------------------------------------------------------------## - # MontaVista Linux 4.0.1 on ppc32 - { diff --git a/valgrind-3.8.1-sendmsg-flags.patch b/valgrind-3.8.1-sendmsg-flags.patch deleted file mode 100644 index 779e8ea..0000000 --- a/valgrind-3.8.1-sendmsg-flags.patch +++ /dev/null @@ -1,289 +0,0 @@ -commit fc75e5ea3e57d58bbbbd3fd8fff3a71de9a1b172 -Author: tom -Date: Thu Feb 28 12:50:55 2013 +0000 - - Don't check the flags word in msghdr for sendmsg as the - kernel will neither read nor write it. - - Patch from Mark Wielaard to fix BZ#315441. - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13294 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/memcheck/tests/filter_stderr b/memcheck/tests/filter_stderr -index abd6792..3d62d94 100755 ---- a/memcheck/tests/filter_stderr -+++ b/memcheck/tests/filter_stderr -@@ -22,6 +22,9 @@ sed "s/checked [0-9,]* bytes./checked ... bytes./" | - # records. So we filter out the loss record numbers. - perl -p -e "s/in loss record \d+ of \d+/in loss record ... of .../" | - -+# Filter out glibc debuginfo if installed. -+perl -p -e "s/\(syscall-template.S:[0-9]*\)/(in \/...libc...)/" | -+ - $dir/../../memcheck/tests/filter_memcheck "$@" - - exit 0 -diff --git a/memcheck/tests/sendmsg.c b/memcheck/tests/sendmsg.c -new file mode 100644 -index 0000000..2039f07 ---- /dev/null -+++ b/memcheck/tests/sendmsg.c -@@ -0,0 +1,74 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define PORT 12345 -+ -+int -+main (int argc, char **argv) -+{ -+ int fd; -+ struct sockaddr_in sa; -+ struct msghdr msg; -+ struct iovec iov[2]; -+ -+ fd = socket (AF_INET, SOCK_DGRAM, 0); -+ if (fd == -1) -+ { -+ perror ("socket()"); -+ exit (EXIT_FAILURE); -+ } -+ -+ sa.sin_family = AF_INET; -+ sa.sin_addr.s_addr = htonl (INADDR_LOOPBACK); -+ sa.sin_port = htons (PORT); -+ if (connect (fd, (struct sockaddr *) &sa, sizeof (sa)) == -1) -+ { -+ perror ("connect ()"); -+ exit (EXIT_FAILURE); -+ } -+ -+ // Create msg_hdr. Oops, we forget to set msg_name... -+ msg.msg_namelen = 0; -+ iov[0].iov_base = "one"; -+ iov[0].iov_len = 3; -+ iov[1].iov_base = "two"; -+ iov[1].iov_len = 3; -+ msg.msg_iov = &iov; -+ msg.msg_iovlen = 2; -+ msg.msg_control = NULL; -+ msg.msg_controllen = 0; -+ -+ size_t s = sendmsg (fd, &msg, 0); -+ -+ // Note how we now do set msg_name, but don't set msg_flags. -+ // The msg_flags field is ignored by sendmsg. -+ msg.msg_name = NULL; -+ -+ fd = socket (AF_INET, SOCK_DGRAM, 0); -+ if (fd == -1) -+ { -+ perror ("socket()"); -+ exit (EXIT_FAILURE); -+ } -+ -+ if (connect (fd, (struct sockaddr *) &sa, sizeof (sa)) == -1) -+ { -+ perror ("connect ()"); -+ exit (EXIT_FAILURE); -+ } -+ -+ s = sendmsg (fd, &msg, 0); -+ if (s == -1) -+ { -+ perror ("sendmsg ()"); -+ exit (EXIT_FAILURE); -+ } -+ else -+ fprintf (stderr, "sendmsg: %d\n", (int) s); -+ -+ exit(0); -+} -diff --git a/memcheck/tests/sendmsg.stderr.exp b/memcheck/tests/sendmsg.stderr.exp -new file mode 100644 -index 0000000..38e20c5 ---- /dev/null -+++ b/memcheck/tests/sendmsg.stderr.exp -@@ -0,0 +1,6 @@ -+Syscall param sendmsg(msg) points to uninitialised byte(s) -+ at 0x........: sendmsg (in /...libc...) -+ by 0x........: main (sendmsg.c:45) -+ Address 0x........ is on thread 1's stack -+ -+sendmsg: 6 -diff --git a/memcheck/tests/sendmsg.vgtest b/memcheck/tests/sendmsg.vgtest -new file mode 100644 -index 0000000..f252b62 ---- /dev/null -+++ b/memcheck/tests/sendmsg.vgtest -@@ -0,0 +1,2 @@ -+prog: sendmsg -+vgopts: -q ---- valgrind-3.8.1/memcheck/tests/Makefile.in.orig 2013-02-19 14:46:14.305186272 +0100 -+++ valgrind-3.8.1/memcheck/tests/Makefile.in 2013-02-19 14:59:41.284835217 +0100 -@@ -105,20 +105,20 @@ - partial_load$(EXEEXT) pdb-realloc$(EXEEXT) \ - pdb-realloc2$(EXEEXT) pipe$(EXEEXT) pointer-trace$(EXEEXT) \ - post-syscall$(EXEEXT) realloc1$(EXEEXT) realloc2$(EXEEXT) \ -- realloc3$(EXEEXT) sbfragment$(EXEEXT) sh-mem$(EXEEXT) \ -- sh-mem-random$(EXEEXT) sigaltstack$(EXEEXT) signal2$(EXEEXT) \ -- sigprocmask$(EXEEXT) static_malloc$(EXEEXT) sigkill$(EXEEXT) \ -- stpncpy$(EXEEXT) strchr$(EXEEXT) str_tester$(EXEEXT) \ -- supp_unknown$(EXEEXT) supp1$(EXEEXT) supp2$(EXEEXT) \ -- suppfree$(EXEEXT) test-plo$(EXEEXT) trivialleak$(EXEEXT) \ -- unit_libcbase$(EXEEXT) unit_oset$(EXEEXT) varinfo1$(EXEEXT) \ -- varinfo2$(EXEEXT) varinfo3$(EXEEXT) varinfo4$(EXEEXT) \ -- varinfo5$(EXEEXT) varinfo5so.so$(EXEEXT) varinfo6$(EXEEXT) \ -- vcpu_fbench$(EXEEXT) vcpu_fnfns$(EXEEXT) wcs$(EXEEXT) \ -- xml1$(EXEEXT) wrap1$(EXEEXT) wrap2$(EXEEXT) wrap3$(EXEEXT) \ -- wrap4$(EXEEXT) wrap5$(EXEEXT) wrap6$(EXEEXT) wrap7$(EXEEXT) \ -- wrap7so.so$(EXEEXT) wrap8$(EXEEXT) writev1$(EXEEXT) \ -- $(am__EXEEXT_1) -+ realloc3$(EXEEXT) sbfragment$(EXEEXT) sendmsg$(EXEEXT) \ -+ sh-mem$(EXEEXT) sh-mem-random$(EXEEXT) sigaltstack$(EXEEXT) \ -+ signal2$(EXEEXT) sigprocmask$(EXEEXT) static_malloc$(EXEEXT) \ -+ sigkill$(EXEEXT) stpncpy$(EXEEXT) strchr$(EXEEXT) \ -+ str_tester$(EXEEXT) supp_unknown$(EXEEXT) supp1$(EXEEXT) \ -+ supp2$(EXEEXT) suppfree$(EXEEXT) test-plo$(EXEEXT) \ -+ trivialleak$(EXEEXT) unit_libcbase$(EXEEXT) unit_oset$(EXEEXT) \ -+ varinfo1$(EXEEXT) varinfo2$(EXEEXT) varinfo3$(EXEEXT) \ -+ varinfo4$(EXEEXT) varinfo5$(EXEEXT) varinfo5so.so$(EXEEXT) \ -+ varinfo6$(EXEEXT) vcpu_fbench$(EXEEXT) vcpu_fnfns$(EXEEXT) \ -+ wcs$(EXEEXT) xml1$(EXEEXT) wrap1$(EXEEXT) wrap2$(EXEEXT) \ -+ wrap3$(EXEEXT) wrap4$(EXEEXT) wrap5$(EXEEXT) wrap6$(EXEEXT) \ -+ wrap7$(EXEEXT) wrap7so.so$(EXEEXT) wrap8$(EXEEXT) \ -+ writev1$(EXEEXT) $(am__EXEEXT_1) - @DWARF4_TRUE@am__append_12 = dw4 - subdir = memcheck/tests - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -434,6 +434,9 @@ - sbfragment_SOURCES = sbfragment.c - sbfragment_OBJECTS = sbfragment.$(OBJEXT) - sbfragment_LDADD = $(LDADD) -+sendmsg_SOURCES = sendmsg.c -+sendmsg_OBJECTS = sendmsg.$(OBJEXT) -+sendmsg_LDADD = $(LDADD) - sh_mem_SOURCES = sh-mem.c - sh_mem_OBJECTS = sh-mem.$(OBJEXT) - sh_mem_LDADD = $(LDADD) -@@ -610,8 +613,8 @@ - origin3-no.c origin4-many.c origin5-bz2.c origin6-fp.c \ - overlap.c partial_load.c partiallydefinedeq.c pdb-realloc.c \ - pdb-realloc2.c pipe.c pointer-trace.c post-syscall.c \ -- realloc1.c realloc2.c realloc3.c sbfragment.c sh-mem.c \ -- sh-mem-random.c sigaltstack.c sigkill.c signal2.c \ -+ realloc1.c realloc2.c realloc3.c sbfragment.c sendmsg.c \ -+ sh-mem.c sh-mem-random.c sigaltstack.c sigkill.c signal2.c \ - sigprocmask.c static_malloc.c stpncpy.c str_tester.c strchr.c \ - $(supp1_SOURCES) $(supp2_SOURCES) $(supp_unknown_SOURCES) \ - suppfree.c test-plo.c trivialleak.c unit_libcbase.c \ -@@ -641,8 +644,8 @@ - origin3-no.c origin4-many.c origin5-bz2.c origin6-fp.c \ - overlap.c partial_load.c partiallydefinedeq.c pdb-realloc.c \ - pdb-realloc2.c pipe.c pointer-trace.c post-syscall.c \ -- realloc1.c realloc2.c realloc3.c sbfragment.c sh-mem.c \ -- sh-mem-random.c sigaltstack.c sigkill.c signal2.c \ -+ realloc1.c realloc2.c realloc3.c sbfragment.c sendmsg.c \ -+ sh-mem.c sh-mem-random.c sigaltstack.c sigkill.c signal2.c \ - sigprocmask.c static_malloc.c stpncpy.c str_tester.c strchr.c \ - $(supp1_SOURCES) $(supp2_SOURCES) $(supp_unknown_SOURCES) \ - suppfree.c test-plo.c trivialleak.c unit_libcbase.c \ -@@ -1112,6 +1115,7 @@ - realloc2.stderr.exp realloc2.vgtest \ - realloc3.stderr.exp realloc3.vgtest \ - sbfragment.stdout.exp sbfragment.stderr.exp sbfragment.vgtest \ -+ sendmsg.stderr.exp sendmsg.vgtest \ - sh-mem.stderr.exp sh-mem.vgtest \ - sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ - sh-mem-random.stdout.exp sh-mem-random.vgtest \ -@@ -1560,6 +1564,9 @@ - sbfragment$(EXEEXT): $(sbfragment_OBJECTS) $(sbfragment_DEPENDENCIES) - @rm -f sbfragment$(EXEEXT) - $(LINK) $(sbfragment_OBJECTS) $(sbfragment_LDADD) $(LIBS) -+sendmsg$(EXEEXT): $(sendmsg_OBJECTS) $(sendmsg_DEPENDENCIES) -+ @rm -f sendmsg$(EXEEXT) -+ $(LINK) $(sendmsg_OBJECTS) $(sendmsg_LDADD) $(LIBS) - sh-mem$(EXEEXT): $(sh_mem_OBJECTS) $(sh_mem_DEPENDENCIES) - @rm -f sh-mem$(EXEEXT) - $(LINK) $(sh_mem_OBJECTS) $(sh_mem_LDADD) $(LIBS) -@@ -1775,6 +1782,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc3.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sbfragment.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendmsg.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh-mem-random.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh-mem.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaltstack.Po@am__quote@ ---- a/coregrind/m_syswrap/syswrap-generic.c.orig 2013-02-28 15:14:08.035441439 +0100 -+++ b/coregrind/m_syswrap/syswrap-generic.c 2013-02-28 15:18:13.035249059 +0100 -@@ -848,7 +848,8 @@ - Char *name, - struct vki_msghdr *msg, - UInt length, -- void (*foreach_func)( ThreadId, Bool, Char *, Addr, SizeT ) -+ void (*foreach_func)( ThreadId, Bool, Char *, Addr, SizeT ), -+ Bool recv - ) - { - Char *fieldName; -@@ -866,7 +867,11 @@ - foreach_func ( tid, True, fieldName, (Addr)&msg->msg_iovlen, sizeof( msg->msg_iovlen ) ); - foreach_func ( tid, True, fieldName, (Addr)&msg->msg_control, sizeof( msg->msg_control ) ); - foreach_func ( tid, True, fieldName, (Addr)&msg->msg_controllen, sizeof( msg->msg_controllen ) ); -- foreach_func ( tid, False, fieldName, (Addr)&msg->msg_flags, sizeof( msg->msg_flags ) ); -+ -+ /* msg_flags is completely ignored for send_mesg, recv_mesg doesn't read -+ the field, but does write to it. */ -+ if ( recv ) -+ foreach_func ( tid, False, fieldName, (Addr)&msg->msg_flags, sizeof( msg->msg_flags ) ); - - if ( msg->msg_name ) { - VG_(sprintf) ( fieldName, "(%s.msg_name)", name ); -@@ -1509,7 +1514,7 @@ - void - ML_(generic_PRE_sys_sendmsg) ( ThreadId tid, Char *name, struct vki_msghdr *msg ) - { -- msghdr_foreachfield ( tid, name, msg, ~0, pre_mem_read_sendmsg ); -+ msghdr_foreachfield ( tid, name, msg, ~0, pre_mem_read_sendmsg, False ); - } - - /* ------ */ -@@ -1517,13 +1522,13 @@ - void - ML_(generic_PRE_sys_recvmsg) ( ThreadId tid, Char *name, struct vki_msghdr *msg ) - { -- msghdr_foreachfield ( tid, name, msg, ~0, pre_mem_write_recvmsg ); -+ msghdr_foreachfield ( tid, name, msg, ~0, pre_mem_write_recvmsg, True ); - } - - void - ML_(generic_POST_sys_recvmsg) ( ThreadId tid, Char *name, struct vki_msghdr *msg, UInt length ) - { -- msghdr_foreachfield( tid, name, msg, length, post_mem_write_recvmsg ); -+ msghdr_foreachfield( tid, name, msg, length, post_mem_write_recvmsg, True ); - check_cmsg_for_fds( tid, msg ); - } - ---- a/memcheck/tests/Makefile.am.orig 2013-02-28 15:14:08.220442048 +0100 -+++ b/memcheck/tests/Makefile.am 2013-02-28 15:20:17.575659460 +0100 -@@ -179,6 +179,7 @@ - realloc2.stderr.exp realloc2.vgtest \ - realloc3.stderr.exp realloc3.vgtest \ - sbfragment.stdout.exp sbfragment.stderr.exp sbfragment.vgtest \ -+ sendmsg.stderr.exp sendmsg.vgtest \ - sh-mem.stderr.exp sh-mem.vgtest \ - sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ - sh-mem-random.stdout.exp sh-mem-random.vgtest \ -@@ -282,6 +283,7 @@ - post-syscall \ - realloc1 realloc2 realloc3 \ - sbfragment \ -+ sendmsg \ - sh-mem sh-mem-random \ - sigaltstack signal2 sigprocmask static_malloc sigkill \ - stpncpy \ diff --git a/valgrind-3.8.1-sigill_diag.patch b/valgrind-3.8.1-sigill_diag.patch deleted file mode 100644 index 3f1006a..0000000 --- a/valgrind-3.8.1-sigill_diag.patch +++ /dev/null @@ -1,743 +0,0 @@ -diff -ur valgrind-3.8.1.orig/coregrind/m_main.c valgrind-3.8.1/coregrind/m_main.c ---- valgrind-3.8.1.orig/coregrind/m_main.c 2012-11-04 21:57:03.722415879 +0100 -+++ valgrind-3.8.1/coregrind/m_main.c 2012-11-04 21:57:37.250896792 +0100 -@@ -198,6 +198,7 @@ - " To use a non-libc malloc library that is\n" - " in the main exe: --soname-synonyms=somalloc=NONE\n" - " in libxyzzy.so: --soname-synonyms=somalloc=libxyzzy.so\n" -+" --sigill-diagnostics=yes|no warn about illegal instructions? [yes]\n" - "\n"; - - Char* usage2 = -@@ -422,6 +423,10 @@ - Char* log_fsname_unexpanded = NULL; - Char* xml_fsname_unexpanded = NULL; - -+ /* Whether the user has explicitly provided --sigill-diagnostics. -+ If not explicitly given depends on general verbosity setting. */ -+ Bool sigill_diag_set = False; -+ - /* Log to stderr by default, but usage message goes to stdout. XML - output is initially disabled. */ - tmp_log_fd = 2; -@@ -516,6 +521,9 @@ - VG_STREQ(arg, "--quiet")) - VG_(clo_verbosity)--; - -+ else if VG_BOOL_CLO(arg, "--sigill-diagnostics", VG_(clo_sigill_diag)) -+ sigill_diag_set = True; -+ - else if VG_BOOL_CLO(arg, "--stats", VG_(clo_stats)) {} - else if VG_BOOL_CLO(arg, "--xml", VG_(clo_xml)) - VG_(debugLog_setXml)(VG_(clo_xml)); -@@ -777,6 +785,9 @@ - if (VG_(clo_verbosity) < 0) - VG_(clo_verbosity) = 0; - -+ if (!sigill_diag_set) -+ VG_(clo_sigill_diag) = (VG_(clo_verbosity) > 0); -+ - if (VG_(clo_trace_notbelow) == -1) { - if (VG_(clo_trace_notabove) == -1) { - /* [] */ -diff -ur valgrind-3.8.1.orig/coregrind/m_options.c valgrind-3.8.1/coregrind/m_options.c ---- valgrind-3.8.1.orig/coregrind/m_options.c 2012-11-04 21:57:03.709415680 +0100 -+++ valgrind-3.8.1/coregrind/m_options.c 2012-11-04 21:57:37.251896807 +0100 -@@ -118,7 +118,7 @@ - VgSmc VG_(clo_smc_check) = Vg_SmcStack; - HChar* VG_(clo_kernel_variant) = NULL; - Bool VG_(clo_dsymutil) = False; -- -+Bool VG_(clo_sigill_diag) = True; - - /*====================================================================*/ - /*=== File expansion ===*/ -diff -ur valgrind-3.8.1.orig/coregrind/m_scheduler/scheduler.c valgrind-3.8.1/coregrind/m_scheduler/scheduler.c ---- valgrind-3.8.1.orig/coregrind/m_scheduler/scheduler.c 2012-11-04 21:57:03.720415849 +0100 -+++ valgrind-3.8.1/coregrind/m_scheduler/scheduler.c 2012-11-04 21:57:37.252896823 +0100 -@@ -1427,9 +1427,10 @@ - case VEX_TRC_JMP_NODECODE: { - Addr addr = VG_(get_IP)(tid); - -- VG_(umsg)( -- "valgrind: Unrecognised instruction at address %#lx.\n", addr); -- VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size)); -+ if (VG_(clo_sigill_diag)) { -+ VG_(umsg)( -+ "valgrind: Unrecognised instruction at address %#lx.\n", addr); -+ VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size)); - #define M(a) VG_(umsg)(a "\n"); - M("Your program just tried to execute an instruction that Valgrind" ); - M("did not recognise. There are two possible reasons for this." ); -@@ -1442,6 +1443,7 @@ - M("Either way, Valgrind will now raise a SIGILL signal which will" ); - M("probably kill your program." ); - #undef M -+ } - - #if defined(VGA_s390x) - /* Now that the complaint is out we need to adjust the guest_IA. The -diff -ur valgrind-3.8.1.orig/coregrind/m_translate.c valgrind-3.8.1/coregrind/m_translate.c ---- valgrind-3.8.1.orig/coregrind/m_translate.c 2012-11-04 21:57:03.721415864 +0100 -+++ valgrind-3.8.1/coregrind/m_translate.c 2012-11-04 21:57:37.261896960 +0100 -@@ -1524,6 +1524,7 @@ - vta.needs_self_check = needs_self_check; - vta.preamble_function = preamble_fn; - vta.traceflags = verbosity; -+ vta.sigill_diag = VG_(clo_sigill_diag); - vta.addProfInc = VG_(clo_profile_flags) > 0 - && kind != T_NoRedir; - -diff -ur valgrind-3.8.1.orig/coregrind/pub_core_options.h valgrind-3.8.1/coregrind/pub_core_options.h ---- valgrind-3.8.1.orig/coregrind/pub_core_options.h 2012-11-04 21:57:03.704415605 +0100 -+++ valgrind-3.8.1/coregrind/pub_core_options.h 2012-11-04 21:57:37.300897526 +0100 -@@ -275,6 +275,11 @@ - extern Bool VG_(should_we_trace_this_child) ( HChar* child_exe_name, - HChar** child_argv ); - -+/* Whether illegal instructions should be reported/diagnosed. -+ Can be explicitly set through --sigill-diagnostics otherwise -+ depends on verbosity (False if -q). */ -+extern Bool VG_(clo_sigill_diag); -+ - #endif // __PUB_CORE_OPTIONS_H - - /*--------------------------------------------------------------------*/ -diff -ur valgrind-3.8.1.orig/docs/xml/manual-core.xml valgrind-3.8.1/docs/xml/manual-core.xml ---- valgrind-3.8.1.orig/docs/xml/manual-core.xml 2012-11-04 21:57:03.689415507 +0100 -+++ valgrind-3.8.1/docs/xml/manual-core.xml 2012-11-04 21:57:37.302897560 +0100 -@@ -1036,6 +1036,26 @@ - - - -+ -+ -+ -+ -+ -+ Enable/disable printing of illegal instruction diagnostics. -+ Enabled by default, but defaults to disabled when -+ is given. The default can always be explicitly -+ overridden by giving this option. -+ -+ When enabled a warning message will be printed with some -+ diagnostics whenever some instruction is encountered that valgrind -+ cannot decode or translate before the program is given a SIGILL signal. -+ Often an illegal instruction indicates a bug in the program or missing -+ support for the particular instruction in Valgrind. But some programs -+ do deliberately try to execute an instruction that might be missing -+ and trap the SIGILL signal to detect processor features. -+ -+ -+ - - - -diff -ur valgrind-3.8.1.orig/none/tests/cmdline1.stdout.exp valgrind-3.8.1/none/tests/cmdline1.stdout.exp ---- valgrind-3.8.1.orig/none/tests/cmdline1.stdout.exp 2012-11-04 21:57:03.844417741 +0100 -+++ valgrind-3.8.1/none/tests/cmdline1.stdout.exp 2012-11-04 21:57:37.385898730 +0100 -@@ -87,6 +87,7 @@ - To use a non-libc malloc library that is - in the main exe: --soname-synonyms=somalloc=NONE - in libxyzzy.so: --soname-synonyms=somalloc=libxyzzy.so -+ --sigill-diagnostics=yes|no warn about illegal instructions? [yes] - - user options for Nulgrind: - (none) -diff -ur valgrind-3.8.1.orig/none/tests/cmdline2.stdout.exp valgrind-3.8.1/none/tests/cmdline2.stdout.exp ---- valgrind-3.8.1.orig/none/tests/cmdline2.stdout.exp 2012-11-04 21:57:03.811417238 +0100 -+++ valgrind-3.8.1/none/tests/cmdline2.stdout.exp 2012-11-04 21:57:37.386898745 +0100 -@@ -87,6 +87,7 @@ - To use a non-libc malloc library that is - in the main exe: --soname-synonyms=somalloc=NONE - in libxyzzy.so: --soname-synonyms=somalloc=libxyzzy.so -+ --sigill-diagnostics=yes|no warn about illegal instructions? [yes] - - user options for Nulgrind: - (none) -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_amd64_defs.h valgrind-3.8.1/VEX/priv/guest_amd64_defs.h ---- valgrind-3.8.1.orig/VEX/priv/guest_amd64_defs.h 2012-11-04 21:57:03.782416795 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_amd64_defs.h 2012-11-04 21:57:36.328883370 +0100 -@@ -56,7 +56,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian ); -+ Bool host_bigendian, -+ Bool sigill_diag ); - - /* Used by the optimiser to specialise calls to helpers. */ - extern -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_amd64_toIR.c valgrind-3.8.1/VEX/priv/guest_amd64_toIR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_amd64_toIR.c 2012-11-04 21:57:03.784416825 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_amd64_toIR.c 2012-11-04 21:57:36.465885366 +0100 -@@ -30426,7 +30426,8 @@ - void* callback_opaque, - Long delta64, - VexArchInfo* archinfo, -- VexAbiInfo* vbi -+ VexAbiInfo* vbi, -+ Bool sigill_diag - ) - { - IRTemp t1, t2, t3, t4, t5, t6; -@@ -30956,29 +30957,31 @@ - //default: - decode_failure: - /* All decode failures end up here. */ -- vex_printf("vex amd64->IR: unhandled instruction bytes: " -- "0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", -- (Int)getUChar(delta_start+0), -- (Int)getUChar(delta_start+1), -- (Int)getUChar(delta_start+2), -- (Int)getUChar(delta_start+3), -- (Int)getUChar(delta_start+4), -- (Int)getUChar(delta_start+5), -- (Int)getUChar(delta_start+6), -- (Int)getUChar(delta_start+7) ); -- vex_printf("vex amd64->IR: REX=%d REX.W=%d REX.R=%d REX.X=%d REX.B=%d\n", -- haveREX(pfx) ? 1 : 0, getRexW(pfx), getRexR(pfx), -- getRexX(pfx), getRexB(pfx)); -- vex_printf("vex amd64->IR: VEX=%d VEX.L=%d VEX.nVVVV=0x%x ESC=%s\n", -- haveVEX(pfx) ? 1 : 0, getVexL(pfx), -- getVexNvvvv(pfx), -- esc==ESC_NONE ? "NONE" : -- esc==ESC_0F ? "0F" : -- esc==ESC_0F38 ? "0F38" : -- esc==ESC_0F3A ? "0F3A" : "???"); -- vex_printf("vex amd64->IR: PFX.66=%d PFX.F2=%d PFX.F3=%d\n", -- have66(pfx) ? 1 : 0, haveF2(pfx) ? 1 : 0, -- haveF3(pfx) ? 1 : 0); -+ if (sigill_diag) { -+ vex_printf("vex amd64->IR: unhandled instruction bytes: " -+ "0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", -+ (Int)getUChar(delta_start+0), -+ (Int)getUChar(delta_start+1), -+ (Int)getUChar(delta_start+2), -+ (Int)getUChar(delta_start+3), -+ (Int)getUChar(delta_start+4), -+ (Int)getUChar(delta_start+5), -+ (Int)getUChar(delta_start+6), -+ (Int)getUChar(delta_start+7) ); -+ vex_printf("vex amd64->IR: REX=%d REX.W=%d REX.R=%d REX.X=%d REX.B=%d\n", -+ haveREX(pfx) ? 1 : 0, getRexW(pfx), getRexR(pfx), -+ getRexX(pfx), getRexB(pfx)); -+ vex_printf("vex amd64->IR: VEX=%d VEX.L=%d VEX.nVVVV=0x%x ESC=%s\n", -+ haveVEX(pfx) ? 1 : 0, getVexL(pfx), -+ getVexNvvvv(pfx), -+ esc==ESC_NONE ? "NONE" : -+ esc==ESC_0F ? "0F" : -+ esc==ESC_0F38 ? "0F38" : -+ esc==ESC_0F3A ? "0F3A" : "???"); -+ vex_printf("vex amd64->IR: PFX.66=%d PFX.F2=%d PFX.F3=%d\n", -+ have66(pfx) ? 1 : 0, haveF2(pfx) ? 1 : 0, -+ haveF3(pfx) ? 1 : 0); -+ } - - /* Tell the dispatcher that this insn cannot be decoded, and so has - not been executed, and (is currently) the next to be executed. -@@ -31041,7 +31044,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian_IN ) -+ Bool host_bigendian_IN, -+ Bool sigill_diag_IN ) - { - Int i, x1, x2; - Bool expect_CAS, has_CAS; -@@ -31064,7 +31068,7 @@ - dres = disInstr_AMD64_WRK ( &expect_CAS, resteerOkFn, - resteerCisOk, - callback_opaque, -- delta, archinfo, abiinfo ); -+ delta, archinfo, abiinfo, sigill_diag_IN ); - x2 = irsb_IN->stmts_used; - vassert(x2 >= x1); - -@@ -31097,7 +31101,7 @@ - dres = disInstr_AMD64_WRK ( &expect_CAS, resteerOkFn, - resteerCisOk, - callback_opaque, -- delta, archinfo, abiinfo ); -+ delta, archinfo, abiinfo, sigill_diag_IN ); - for (i = x1; i < x2; i++) { - vex_printf("\t\t"); - ppIRStmt(irsb_IN->stmts[i]); -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_arm_defs.h valgrind-3.8.1/VEX/priv/guest_arm_defs.h ---- valgrind-3.8.1.orig/VEX/priv/guest_arm_defs.h 2012-11-04 21:57:03.790416917 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_arm_defs.h 2012-11-04 21:57:36.588887153 +0100 -@@ -50,7 +50,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian ); -+ Bool host_bigendian, -+ Bool sigill_diag ); - - /* Used by the optimiser to specialise calls to helpers. */ - extern -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_arm_toIR.c valgrind-3.8.1/VEX/priv/guest_arm_toIR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_arm_toIR.c 2012-11-04 21:57:03.787416871 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_arm_toIR.c 2012-11-04 21:57:36.812890419 +0100 -@@ -12564,7 +12564,8 @@ - void* callback_opaque, - UChar* guest_instr, - VexArchInfo* archinfo, -- VexAbiInfo* abiinfo -+ VexAbiInfo* abiinfo, -+ Bool sigill_diag - ) - { - // A macro to fish bits out of 'insn'. -@@ -14643,15 +14644,17 @@ - - decode_failure: - /* All decode failures end up here. */ -- vex_printf("disInstr(arm): unhandled instruction: " -- "0x%x\n", insn); -- vex_printf(" cond=%d(0x%x) 27:20=%u(0x%02x) " -- "4:4=%d " -- "3:0=%u(0x%x)\n", -- (Int)INSN_COND, (UInt)INSN_COND, -- (Int)INSN(27,20), (UInt)INSN(27,20), -- (Int)INSN(4,4), -- (Int)INSN(3,0), (UInt)INSN(3,0) ); -+ if (sigill_diag) { -+ vex_printf("disInstr(arm): unhandled instruction: " -+ "0x%x\n", insn); -+ vex_printf(" cond=%d(0x%x) 27:20=%u(0x%02x) " -+ "4:4=%d " -+ "3:0=%u(0x%x)\n", -+ (Int)INSN_COND, (UInt)INSN_COND, -+ (Int)INSN(27,20), (UInt)INSN(27,20), -+ (Int)INSN(4,4), -+ (Int)INSN(3,0), (UInt)INSN(3,0) ); -+ } - - /* Tell the dispatcher that this insn cannot be decoded, and so has - not been executed, and (is currently) the next to be executed. -@@ -14760,7 +14763,8 @@ - void* callback_opaque, - UChar* guest_instr, - VexArchInfo* archinfo, -- VexAbiInfo* abiinfo -+ VexAbiInfo* abiinfo, -+ Bool sigill_diag - ) - { - /* A macro to fish bits out of insn0. There's also INSN1, to fish -@@ -18746,8 +18750,9 @@ - - decode_failure: - /* All decode failures end up here. */ -- vex_printf("disInstr(thumb): unhandled instruction: " -- "0x%04x 0x%04x\n", (UInt)insn0, (UInt)insn1); -+ if (sigill_diag) -+ vex_printf("disInstr(thumb): unhandled instruction: " -+ "0x%04x 0x%04x\n", (UInt)insn0, (UInt)insn1); - - /* Back up ITSTATE to the initial value for this instruction. - If we don't do that, any subsequent restart of the instruction -@@ -18892,7 +18897,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian_IN ) -+ Bool host_bigendian_IN, -+ Bool sigill_diag_IN ) - { - DisResult dres; - Bool isThumb = (Bool)(guest_IP_ENCODED & 1); -@@ -18914,12 +18920,12 @@ - dres = disInstr_THUMB_WRK ( resteerOkFn, - resteerCisOk, callback_opaque, - &guest_code_IN[delta_ENCODED - 1], -- archinfo, abiinfo ); -+ archinfo, abiinfo, sigill_diag_IN ); - } else { - dres = disInstr_ARM_WRK ( resteerOkFn, - resteerCisOk, callback_opaque, - &guest_code_IN[delta_ENCODED], -- archinfo, abiinfo ); -+ archinfo, abiinfo, sigill_diag_IN ); - } - - return dres; -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_generic_bb_to_IR.c valgrind-3.8.1/VEX/priv/guest_generic_bb_to_IR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_generic_bb_to_IR.c 2012-11-04 21:57:03.790416917 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_generic_bb_to_IR.c 2012-11-04 21:57:36.918891974 +0100 -@@ -187,6 +187,7 @@ - /*IN*/ Addr64 guest_IP_bbstart, - /*IN*/ Bool (*chase_into_ok)(void*,Addr64), - /*IN*/ Bool host_bigendian, -+ /*IN*/ Bool sigill_diag, - /*IN*/ VexArch arch_guest, - /*IN*/ VexArchInfo* archinfo_guest, - /*IN*/ VexAbiInfo* abiinfo_both, -@@ -361,7 +362,8 @@ - arch_guest, - archinfo_guest, - abiinfo_both, -- host_bigendian ); -+ host_bigendian, -+ sigill_diag ); - - /* stay sane ... */ - vassert(dres.whatNext == Dis_StopHere -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_generic_bb_to_IR.h valgrind-3.8.1/VEX/priv/guest_generic_bb_to_IR.h ---- valgrind-3.8.1.orig/VEX/priv/guest_generic_bb_to_IR.h 2012-11-04 21:57:03.790416917 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_generic_bb_to_IR.h 2012-11-04 21:57:36.970892726 +0100 -@@ -150,7 +150,10 @@ - /*IN*/ VexAbiInfo* abiinfo, - - /* Is the host bigendian? */ -- /*IN*/ Bool host_bigendian -+ /*IN*/ Bool host_bigendian, -+ -+ /* Should diagnostics be printed for illegal instructions? */ -+ /*IN*/ Bool sigill_diag - - ); - -@@ -171,6 +174,7 @@ - /*IN*/ Addr64 guest_IP_bbstart, - /*IN*/ Bool (*chase_into_ok)(void*,Addr64), - /*IN*/ Bool host_bigendian, -+ /*IN*/ Bool sigill_diag, - /*IN*/ VexArch arch_guest, - /*IN*/ VexArchInfo* archinfo_guest, - /*IN*/ VexAbiInfo* abiinfo_both, -Only in valgrind-3.8.1/VEX/priv: guest_generic_bb_to_IR.h.orig -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_mips_defs.h valgrind-3.8.1/VEX/priv/guest_mips_defs.h ---- valgrind-3.8.1.orig/VEX/priv/guest_mips_defs.h 2012-11-04 21:57:03.790416917 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_mips_defs.h 2012-11-04 21:57:36.984892934 +0100 -@@ -49,7 +49,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian ); -+ Bool host_bigendian, -+ Bool sigill_diag ); - - /* Used by the optimiser to specialise calls to helpers. */ - extern IRExpr *guest_mips32_spechelper(HChar * function_name, IRExpr ** args, -Only in valgrind-3.8.1/VEX/priv: guest_mips_defs.h.orig -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_mips_toIR.c valgrind-3.8.1/VEX/priv/guest_mips_toIR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_mips_toIR.c 2012-11-04 21:57:03.785416840 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_mips_toIR.c 2012-11-04 21:57:36.986892956 +0100 -@@ -1195,7 +1195,8 @@ - void* callback_opaque, - Long delta64, - VexArchInfo* archinfo, -- VexAbiInfo* abiinfo ) -+ VexAbiInfo* abiinfo, -+ Bool sigill_diag ) - { - IRTemp t0, t1, t2, t3, t4, t5, t6, t7, t8; - UInt opcode, cins, rs, rt, rd, sa, ft, fs, fd, fmt, tf, nd, function, -@@ -3399,12 +3400,13 @@ - - decode_failure: - /* All decode failures end up here. */ -- DIP("vex mips->IR: unhandled instruction bytes: " -- "0x%x 0x%x 0x%x 0x%x\n", -- (Int) getIByte(delta_start + 0), -- (Int) getIByte(delta_start + 1), -- (Int) getIByte(delta_start + 2), -- (Int) getIByte(delta_start + 3)); -+ if (sigill_diag) -+ vex_printf("vex mips->IR: unhandled instruction bytes: " -+ "0x%x 0x%x 0x%x 0x%x\n", -+ (Int) getIByte(delta_start + 0), -+ (Int) getIByte(delta_start + 1), -+ (Int) getIByte(delta_start + 2), -+ (Int) getIByte(delta_start + 3)); - - /* Tell the dispatcher that this insn cannot be decoded, and so has - not been executed, and (is currently) the next to be executed. -@@ -3494,7 +3496,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian_IN) -+ Bool host_bigendian_IN, -+ Bool sigill_diag_IN) - { - DisResult dres; - -@@ -3510,7 +3513,7 @@ - guest_PC_bbstart = (Addr32) toUInt(guest_IP - delta); - - dres = disInstr_MIPS_WRK(resteerOkFn, resteerCisOk, callback_opaque, -- delta, archinfo, abiinfo); -+ delta, archinfo, abiinfo, sigill_diag_IN); - - return dres; - } -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_ppc_defs.h valgrind-3.8.1/VEX/priv/guest_ppc_defs.h ---- valgrind-3.8.1.orig/VEX/priv/guest_ppc_defs.h 2012-11-04 21:57:03.782416795 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_ppc_defs.h 2012-11-04 21:57:37.030893654 +0100 -@@ -57,7 +57,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian ); -+ Bool host_bigendian, -+ Bool sigill_diag ); - - /* Used by the optimiser to specialise calls to helpers. */ - extern -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_ppc_toIR.c valgrind-3.8.1/VEX/priv/guest_ppc_toIR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_ppc_toIR.c 2012-11-04 21:57:03.784416825 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_ppc_toIR.c 2012-11-04 21:57:37.034893677 +0100 -@@ -16475,7 +16475,8 @@ - void* callback_opaque, - Long delta64, - VexArchInfo* archinfo, -- VexAbiInfo* abiinfo -+ VexAbiInfo* abiinfo, -+ Bool sigill_diag - ) - { - UChar opc1; -@@ -17688,10 +17689,12 @@ - decode_failure: - /* All decode failures end up here. */ - opc2 = (theInstr) & 0x7FF; -- vex_printf("disInstr(ppc): unhandled instruction: " -- "0x%x\n", theInstr); -- vex_printf(" primary %d(0x%x), secondary %u(0x%x)\n", -- opc1, opc1, opc2, opc2); -+ if (sigill_diag) { -+ vex_printf("disInstr(ppc): unhandled instruction: " -+ "0x%x\n", theInstr); -+ vex_printf(" primary %d(0x%x), secondary %u(0x%x)\n", -+ opc1, opc1, opc2, opc2); -+ } - - /* Tell the dispatcher that this insn cannot be decoded, and so has - not been executed, and (is currently) the next to be executed. -@@ -17752,7 +17755,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian_IN ) -+ Bool host_bigendian_IN, -+ Bool sigill_diag_IN ) - { - IRType ty; - DisResult dres; -@@ -17788,7 +17792,7 @@ - guest_CIA_bbstart = mkSzAddr(ty, guest_IP - delta); - - dres = disInstr_PPC_WRK ( resteerOkFn, resteerCisOk, callback_opaque, -- delta, archinfo, abiinfo ); -+ delta, archinfo, abiinfo, sigill_diag_IN ); - - return dres; - } -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_s390_defs.h valgrind-3.8.1/VEX/priv/guest_s390_defs.h ---- valgrind-3.8.1.orig/VEX/priv/guest_s390_defs.h 2012-11-04 21:57:03.782416795 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_s390_defs.h 2012-11-04 21:57:37.098894575 +0100 -@@ -52,7 +52,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian ); -+ Bool host_bigendian, -+ Bool sigill_diag ); - - /* Used by the optimiser to specialise calls to helpers. */ - IRExpr* guest_s390x_spechelper ( HChar *function_name, -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_s390_toIR.c valgrind-3.8.1/VEX/priv/guest_s390_toIR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_s390_toIR.c 2012-11-04 21:57:03.789416902 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_s390_toIR.c 2012-11-04 21:57:37.102894640 +0100 -@@ -73,6 +73,9 @@ - static Bool (*resteer_fn)(void *, Addr64); - static void *resteer_data; - -+/* Whether to print diagnostics for illegal instructions. */ -+static Bool sigill_diag; -+ - /* The last seen execute target instruction */ - ULong last_execute_target; - -@@ -14143,34 +14146,36 @@ - if (status == S390_DECODE_OK) return insn_length; /* OK */ - - /* Decoding failed somehow */ -- vex_printf("vex s390->IR: "); -- switch (status) { -- case S390_DECODE_UNKNOWN_INSN: -- vex_printf("unknown insn: "); -- break; -+ if (sigill_diag) { -+ vex_printf("vex s390->IR: "); -+ switch (status) { -+ case S390_DECODE_UNKNOWN_INSN: -+ vex_printf("unknown insn: "); -+ break; - -- case S390_DECODE_UNIMPLEMENTED_INSN: -- vex_printf("unimplemented insn: "); -- break; -+ case S390_DECODE_UNIMPLEMENTED_INSN: -+ vex_printf("unimplemented insn: "); -+ break; - -- case S390_DECODE_UNKNOWN_SPECIAL_INSN: -- vex_printf("unimplemented special insn: "); -- break; -+ case S390_DECODE_UNKNOWN_SPECIAL_INSN: -+ vex_printf("unimplemented special insn: "); -+ break; - -- default: -- case S390_DECODE_ERROR: -- vex_printf("decoding error: "); -- break; -- } -+ default: -+ case S390_DECODE_ERROR: -+ vex_printf("decoding error: "); -+ break; -+ } - -- vex_printf("%02x%02x", bytes[0], bytes[1]); -- if (insn_length > 2) { -- vex_printf(" %02x%02x", bytes[2], bytes[3]); -- } -- if (insn_length > 4) { -- vex_printf(" %02x%02x", bytes[4], bytes[5]); -+ vex_printf("%02x%02x", bytes[0], bytes[1]); -+ if (insn_length > 2) { -+ vex_printf(" %02x%02x", bytes[2], bytes[3]); -+ } -+ if (insn_length > 4) { -+ vex_printf(" %02x%02x", bytes[4], bytes[5]); -+ } -+ vex_printf("\n"); - } -- vex_printf("\n"); - - return 0; /* Failed */ - } -@@ -14261,7 +14266,8 @@ - VexArch guest_arch, - VexArchInfo *archinfo, - VexAbiInfo *abiinfo, -- Bool host_bigendian) -+ Bool host_bigendian, -+ Bool sigill_diag_IN) - { - vassert(guest_arch == VexArchS390X); - -@@ -14273,6 +14279,7 @@ - irsb = irsb_IN; - resteer_fn = resteerOkFn; - resteer_data = callback_opaque; -+ sigill_diag = sigill_diag_IN; - - return disInstr_S390_WRK(guest_code + delta); - } -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_x86_defs.h valgrind-3.8.1/VEX/priv/guest_x86_defs.h ---- valgrind-3.8.1.orig/VEX/priv/guest_x86_defs.h 2012-11-04 21:57:03.782416795 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_x86_defs.h 2012-11-04 21:57:37.169895603 +0100 -@@ -56,7 +56,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian ); -+ Bool host_bigendian, -+ Bool sigill_diag ); - - /* Used by the optimiser to specialise calls to helpers. */ - extern -diff -ur valgrind-3.8.1.orig/VEX/priv/guest_x86_toIR.c valgrind-3.8.1/VEX/priv/guest_x86_toIR.c ---- valgrind-3.8.1.orig/VEX/priv/guest_x86_toIR.c 2012-11-04 21:57:03.790416917 +0100 -+++ valgrind-3.8.1/VEX/priv/guest_x86_toIR.c 2012-11-04 21:57:37.176895720 +0100 -@@ -7927,7 +7927,8 @@ - void* callback_opaque, - Long delta64, - VexArchInfo* archinfo, -- VexAbiInfo* vbi -+ VexAbiInfo* vbi, -+ Bool sigill_diag - ) - { - IRType ty; -@@ -15157,12 +15158,14 @@ - default: - decode_failure: - /* All decode failures end up here. */ -- vex_printf("vex x86->IR: unhandled instruction bytes: " -- "0x%x 0x%x 0x%x 0x%x\n", -- (Int)getIByte(delta_start+0), -- (Int)getIByte(delta_start+1), -- (Int)getIByte(delta_start+2), -- (Int)getIByte(delta_start+3) ); -+ if (sigill_diag) { -+ vex_printf("vex x86->IR: unhandled instruction bytes: " -+ "0x%x 0x%x 0x%x 0x%x\n", -+ (Int)getIByte(delta_start+0), -+ (Int)getIByte(delta_start+1), -+ (Int)getIByte(delta_start+2), -+ (Int)getIByte(delta_start+3) ); -+ } - - /* Tell the dispatcher that this insn cannot be decoded, and so has - not been executed, and (is currently) the next to be executed. -@@ -15225,7 +15228,8 @@ - VexArch guest_arch, - VexArchInfo* archinfo, - VexAbiInfo* abiinfo, -- Bool host_bigendian_IN ) -+ Bool host_bigendian_IN, -+ Bool sigill_diag_IN ) - { - Int i, x1, x2; - Bool expect_CAS, has_CAS; -@@ -15244,7 +15248,7 @@ - dres = disInstr_X86_WRK ( &expect_CAS, resteerOkFn, - resteerCisOk, - callback_opaque, -- delta, archinfo, abiinfo ); -+ delta, archinfo, abiinfo, sigill_diag_IN ); - x2 = irsb_IN->stmts_used; - vassert(x2 >= x1); - -@@ -15264,7 +15268,7 @@ - dres = disInstr_X86_WRK ( &expect_CAS, resteerOkFn, - resteerCisOk, - callback_opaque, -- delta, archinfo, abiinfo ); -+ delta, archinfo, abiinfo, sigill_diag_IN ); - for (i = x1; i < x2; i++) { - vex_printf("\t\t"); - ppIRStmt(irsb_IN->stmts[i]); -Only in valgrind-3.8.1/VEX/priv: guest_x86_toIR.c.orig -diff -ur valgrind-3.8.1.orig/VEX/priv/main_main.c valgrind-3.8.1/VEX/priv/main_main.c ---- valgrind-3.8.1.orig/VEX/priv/main_main.c 2012-11-04 21:57:03.784416825 +0100 -+++ valgrind-3.8.1/VEX/priv/main_main.c 2012-11-04 21:57:37.247896750 +0100 -@@ -605,6 +605,7 @@ - vta->guest_bytes_addr, - vta->chase_into_ok, - host_is_bigendian, -+ vta->sigill_diag, - vta->arch_guest, - &vta->archinfo_guest, - &vta->abiinfo_both, -diff -ur valgrind-3.8.1.orig/VEX/pub/libvex.h valgrind-3.8.1/VEX/pub/libvex.h ---- valgrind-3.8.1.orig/VEX/pub/libvex.h 2012-11-04 21:57:03.781416780 +0100 -+++ valgrind-3.8.1/VEX/pub/libvex.h 2012-11-04 21:57:37.248896764 +0100 -@@ -622,6 +622,9 @@ - /* IN: debug: trace vex activity at various points */ - Int traceflags; - -+ /* IN: debug: print diagnostics when an illegal instr is detected */ -+ Bool sigill_diag; -+ - /* IN: profiling: add a 64 bit profiler counter increment to the - translation? */ - Bool addProfInc; diff --git a/valgrind-3.8.1-stat_h.patch b/valgrind-3.8.1-stat_h.patch deleted file mode 100644 index 628dd79..0000000 --- a/valgrind-3.8.1-stat_h.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- valgrind/include/vki/vki-amd64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-amd64-linux.h 2010-01-20 04:41:52.662552000 -0500 -@@ -328,6 +328,9 @@ struct vki_stat { - long st_blksize; - long st_blocks; /* Number 512-byte blocks allocated. */ - -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; ---- valgrind/include/vki/vki-x86-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-x86-linux.h 2010-01-20 04:42:19.649995000 -0500 -@@ -366,6 +366,9 @@ struct vki_stat { - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; ---- valgrind/include/vki/vki-ppc32-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-ppc32-linux.h 2010-01-20 04:42:44.861651000 -0500 -@@ -410,6 +410,9 @@ struct vki_stat { - long st_size; - unsigned long st_blksize; - unsigned long st_blocks; -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; ---- valgrind/include/vki/vki-ppc64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-ppc64-linux.h 2010-01-20 04:43:05.579922000 -0500 -@@ -446,6 +446,9 @@ struct vki_stat { - long st_size; - unsigned long st_blksize; - unsigned long st_blocks; -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; diff --git a/valgrind-3.8.1-static-variables.patch b/valgrind-3.8.1-static-variables.patch deleted file mode 100644 index 30d02c1..0000000 --- a/valgrind-3.8.1-static-variables.patch +++ /dev/null @@ -1,743 +0,0 @@ -commit 81d24c396c66dde7db2d9b567451f99081a2eab7 -Author: philippe -Date: Wed Dec 5 21:08:24 2012 +0000 - - fix 310424 --read-var-info does not properly describe static variables - - This patch changes the way static variables are - recorded by readdwarf3.c (when giving --read-var-info=yes), - improving the way such variables are described. - - Currently: - A static variable does not have the DW_AT_external tag. - So, readdwarf3.c does not consider it a global variable. - It is rather considered a "local" variable. - When it is recorded, it is associated to a range of program counters - (the functions in the file where it is visible). - However, even if the static variable is only visible - in the source file where it is declared, it can in reality - be used by any range of program counters, typically - by having the address of the local variable passed - to other functions. - - Such local variable can then only be described - when the program counter is in the range of program - counters for which it has been recorded. - However, this (local) description is obtained - by a kludge in debuginfo.c (around line 3285). - - This kludge then produces a strange description, - telling that the variable has been declared in - frame 0 of a thread (see second example below). - - The kludge is not always able to describe - the address (if the IP of the tid is in another file than - where the variable has been declared). - - I suspect the kludge can sometimes describe the var as being - declared in an unrelated thread - (e.g. if an error is triggered by tid 5, but tid1 is by - luck in an IP corresponding to the recorded range). - - - The patch changes the way a static variable is recorded: - if DW_AT_external tag is found, a variable is marked as global. - If a variable is not external, but is seen when level is 1, - then we record the variable as a global variable (i.e. - with a full IP range). - This improves the way such static variable are described: - * they are described even if being accessed by other files. - * their description is not in an artificial "thread frame". - - - - - First example: - ************** - a variable cannot be described because it is - accessed by a function in another file: - - with the trunk: - ==20410== ---------------------------------------------------------------- - ==20410== - ==20410== Possible data race during read of size 4 at 0x600F54 by thread #1 - ==20410== Locks held: none - ==20410== at 0x4007E4: a (abc.c:42) - ==20410== by 0x4006BC: main (mabc.c:24) - ==20410== - ==20410== This conflicts with a previous write of size 4 by thread #2 - ==20410== Locks held: none - ==20410== at 0x4007ED: a (abc.c:42) - ==20410== by 0x400651: brussels_fn (mabc.c:9) - ==20410== by 0x4C2B54E: mythread_wrapper (hg_intercepts.c:219) - ==20410== by 0x4E348C9: start_thread (pthread_create.c:300) - ==20410== - ==20410== ---------------------------------------------------------------- - - - with the patch: - ==4515== ---------------------------------------------------------------- - ==4515== - ==4515== Possible data race during read of size 4 at 0x600F54 by thread #1 - ==4515== Locks held: none - ==4515== at 0x4007E4: a (abc.c:42) - ==4515== by 0x4006BC: main (mabc.c:24) - ==4515== - ==4515== This conflicts with a previous write of size 4 by thread #2 - ==4515== Locks held: none - ==4515== at 0x4007ED: a (abc.c:42) - ==4515== by 0x400651: brussels_fn (mabc.c:9) - ==4515== by 0x4C2B54E: mythread_wrapper (hg_intercepts.c:219) - ==4515== by 0x4E348C9: start_thread (pthread_create.c:300) - ==4515== - ==4515== Location 0x600f54 is 0 bytes inside global var "static_global" - ==4515== declared at mabc.c:4 - ==4515== - ==4515== ---------------------------------------------------------------- - - - Second example: - *************** - When the kludge can describe the variable, it is strangely described - as being declared in a frame of a thread, while for sure the declaration - has nothing to do with a thread - With the trunk: - ==20410== Location 0x600f68 is 0 bytes inside local var "static_global_a" - ==20410== declared at abc.c:3, in frame #0 of thread 1 - - With the patch: - ==4515== Location 0x600f68 is 0 bytes inside global var "static_global_a" - ==4515== declared at abc.c:3 - - #include - - static int static_global_a = 0; //// <<<< this is abc.c:3 - - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13153 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c -index 59f920d..d3b8ef4 100644 ---- a/coregrind/m_debuginfo/debuginfo.c -+++ b/coregrind/m_debuginfo/debuginfo.c -@@ -3282,28 +3282,6 @@ Bool VG_(get_data_description)( - in the stacks of all the threads. First try to figure out which - thread's stack data_addr is in. */ - -- /* --- KLUDGE --- Try examining the top frame of all thread stacks. -- This finds variables which are not stack allocated but are not -- globally visible either; specifically it appears to pick up -- variables which are visible only within a compilation unit. -- These will have the address range of the compilation unit and -- tend to live at Scope level 1. */ -- VG_(thread_stack_reset_iter)(&tid); -- while ( VG_(thread_stack_next)(&tid, &stack_min, &stack_max) ) { -- if (stack_min >= stack_max) -- continue; /* ignore obviously stupid cases */ -- if (consider_vars_in_frame( dname1, dname2, -- data_addr, -- VG_(get_IP)(tid), -- VG_(get_SP)(tid), -- VG_(get_FP)(tid), tid, 0 )) { -- zterm_XA( dname1 ); -- zterm_XA( dname2 ); -- return True; -- } -- } -- /* --- end KLUDGE --- */ -- - /* Perhaps it's on a thread's stack? */ - found = False; - VG_(thread_stack_reset_iter)(&tid); -@@ -3328,9 +3306,6 @@ Bool VG_(get_data_description)( - n_frames = VG_(get_StackTrace)( tid, ips, N_FRAMES, - sps, fps, 0/*first_ip_delta*/ ); - -- /* As a result of KLUDGE above, starting the loop at j = 0 -- duplicates examination of the top frame and so isn't necessary. -- Oh well. */ - vg_assert(n_frames >= 0 && n_frames <= N_FRAMES); - for (j = 0; j < n_frames; j++) { - if (consider_vars_in_frame( dname1, dname2, -diff --git a/drd/tests/annotate_ignore_rw.stderr.exp b/drd/tests/annotate_ignore_rw.stderr.exp -index 24684da..416be80 100644 ---- a/drd/tests/annotate_ignore_rw.stderr.exp -+++ b/drd/tests/annotate_ignore_rw.stderr.exp -@@ -1,8 +1,8 @@ - - Conflicting load by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_rw.c:?) --Location 0x........ is 0 bytes inside local var "s_c" --declared at annotate_ignore_rw.c:12, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_c" -+declared at annotate_ignore_rw.c:12 - - Finished. - -diff --git a/drd/tests/annotate_ignore_rw2.stderr.exp b/drd/tests/annotate_ignore_rw2.stderr.exp -index ffdb76f..4e96bf3 100644 ---- a/drd/tests/annotate_ignore_rw2.stderr.exp -+++ b/drd/tests/annotate_ignore_rw2.stderr.exp -@@ -1,18 +1,18 @@ - - Conflicting load by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_rw.c:?) --Location 0x........ is 0 bytes inside local var "s_b" --declared at annotate_ignore_rw.c:11, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_b" -+declared at annotate_ignore_rw.c:11 - - Conflicting store by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_rw.c:?) --Location 0x........ is 0 bytes inside local var "s_a" --declared at annotate_ignore_rw.c:10, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_a" -+declared at annotate_ignore_rw.c:10 - - Conflicting load by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_rw.c:?) --Location 0x........ is 0 bytes inside local var "s_c" --declared at annotate_ignore_rw.c:12, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_c" -+declared at annotate_ignore_rw.c:12 - - Finished. - -diff --git a/drd/tests/annotate_ignore_write.stderr.exp b/drd/tests/annotate_ignore_write.stderr.exp -index f26242e..2204d5b 100644 ---- a/drd/tests/annotate_ignore_write.stderr.exp -+++ b/drd/tests/annotate_ignore_write.stderr.exp -@@ -1,18 +1,18 @@ - - Conflicting load by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_write.c:?) --Location 0x........ is 0 bytes inside local var "s_b" --declared at annotate_ignore_write.c:11, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_b" -+declared at annotate_ignore_write.c:11 - - Conflicting load by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_write.c:?) --Location 0x........ is 0 bytes inside local var "s_c" --declared at annotate_ignore_write.c:12, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_c" -+declared at annotate_ignore_write.c:12 - - Conflicting store by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_write.c:?) --Location 0x........ is 0 bytes inside local var "s_a" --declared at annotate_ignore_write.c:10, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_a" -+declared at annotate_ignore_write.c:10 - - Finished. - -diff --git a/drd/tests/annotate_ignore_write2.stderr.exp b/drd/tests/annotate_ignore_write2.stderr.exp -index 03c7766..9b58325 100644 ---- a/drd/tests/annotate_ignore_write2.stderr.exp -+++ b/drd/tests/annotate_ignore_write2.stderr.exp -@@ -1,23 +1,23 @@ - - Conflicting load by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_write.c:?) --Location 0x........ is 0 bytes inside local var "s_b" --declared at annotate_ignore_write.c:11, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_b" -+declared at annotate_ignore_write.c:11 - - Conflicting store by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_write.c:?) --Location 0x........ is 0 bytes inside local var "s_a" --declared at annotate_ignore_write.c:10, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_a" -+declared at annotate_ignore_write.c:10 - - Conflicting load by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_write.c:?) --Location 0x........ is 0 bytes inside local var "s_c" --declared at annotate_ignore_write.c:12, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_c" -+declared at annotate_ignore_write.c:12 - - Conflicting store by thread 1 at 0x........ size 1 - at 0x........: main (annotate_ignore_write.c:?) --Location 0x........ is 0 bytes inside local var "s_a" --declared at annotate_ignore_write.c:10, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_a" -+declared at annotate_ignore_write.c:10 - - Finished. - -diff --git a/drd/tests/atomic_var.stderr.exp b/drd/tests/atomic_var.stderr.exp -index 7fa1e0e..ad05687 100644 ---- a/drd/tests/atomic_var.stderr.exp -+++ b/drd/tests/atomic_var.stderr.exp -@@ -3,8 +3,8 @@ Start of test. - Conflicting load by thread x at 0x........ size 4 - at 0x........: thread_func_2 (atomic_var.c:?) - by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) --Location 0x........ is 0 bytes inside local var "s_y" --declared at atomic_var.c:35, in frame #? of thread x -+Location 0x........ is 0 bytes inside global var "s_y" -+declared at atomic_var.c:35 - - y = 1 - Test finished. -diff --git a/drd/tests/fp_race.stderr.exp b/drd/tests/fp_race.stderr.exp -index 23873d2..68bd254 100644 ---- a/drd/tests/fp_race.stderr.exp -+++ b/drd/tests/fp_race.stderr.exp -@@ -1,8 +1,8 @@ - - Conflicting load by thread 1 at 0x........ size 8 - at 0x........: main (fp_race.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at fp_race.c:24, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at fp_race.c:24 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -@@ -10,8 +10,8 @@ Other segment end (thread 2) - - Conflicting store by thread 1 at 0x........ size 8 - at 0x........: main (fp_race.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at fp_race.c:24, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at fp_race.c:24 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -diff --git a/drd/tests/fp_race_xml.stderr.exp b/drd/tests/fp_race_xml.stderr.exp -index 73a530e..05ffe71 100644 ---- a/drd/tests/fp_race_xml.stderr.exp -+++ b/drd/tests/fp_race_xml.stderr.exp -@@ -48,8 +48,8 @@ - ... - - -- Location 0x........ is 0 bytes inside local var "s_d3" -- declared at fp_race.c:24, in frame #? of thread x fp_race.c ... -+ Location 0x........ is 0 bytes inside global var "s_d3" -+ declared at fp_race.c:24 fp_race.c ... - - - -@@ -71,8 +71,8 @@ - ... - - -- Location 0x........ is 0 bytes inside local var "s_d3" -- declared at fp_race.c:24, in frame #? of thread x fp_race.c ... -+ Location 0x........ is 0 bytes inside global var "s_d3" -+ declared at fp_race.c:24 fp_race.c ... - - - -diff --git a/drd/tests/hg03_inherit.stderr.exp b/drd/tests/hg03_inherit.stderr.exp -index 62a8d5d..72eb236 100644 ---- a/drd/tests/hg03_inherit.stderr.exp -+++ b/drd/tests/hg03_inherit.stderr.exp -@@ -4,13 +4,13 @@ Conflicting store by thread 3 at 0x........ size 4 - at 0x........: t2 (hg03_inherit.c:28) - by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) - Location 0x........ is 0 bytes inside shared[1], --declared at hg03_inherit.c:11, in frame #? of thread 3 -+a global variable declared at hg03_inherit.c:11 - - Conflicting store by thread 3 at 0x........ size 4 - at 0x........: t2 (hg03_inherit.c:29) - by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) - Location 0x........ is 0 bytes inside shared[1], --declared at hg03_inherit.c:11, in frame #? of thread 3 -+a global variable declared at hg03_inherit.c:11 - - - ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) -diff --git a/drd/tests/hg04_race.stderr.exp b/drd/tests/hg04_race.stderr.exp -index 9ea3ccd..5b5969c 100644 ---- a/drd/tests/hg04_race.stderr.exp -+++ b/drd/tests/hg04_race.stderr.exp -@@ -3,8 +3,8 @@ Thread 3: - Conflicting load by thread 3 at 0x........ size 4 - at 0x........: th (hg04_race.c:10) - by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) --Location 0x........ is 0 bytes inside local var "shared" --declared at hg04_race.c:6, in frame #? of thread 2 -+Location 0x........ is 0 bytes inside global var "shared" -+declared at hg04_race.c:6 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -@@ -13,8 +13,8 @@ Other segment end (thread 2) - Conflicting store by thread 3 at 0x........ size 4 - at 0x........: th (hg04_race.c:10) - by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) --Location 0x........ is 0 bytes inside local var "shared" --declared at hg04_race.c:6, in frame #? of thread 2 -+Location 0x........ is 0 bytes inside global var "shared" -+declared at hg04_race.c:6 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -diff --git a/drd/tests/rwlock_race.stderr.exp b/drd/tests/rwlock_race.stderr.exp -index 8350b50..d3e0b37 100644 ---- a/drd/tests/rwlock_race.stderr.exp -+++ b/drd/tests/rwlock_race.stderr.exp -@@ -2,14 +2,14 @@ - Conflicting load by thread x at 0x........ size 4 - at 0x........: thread_func (rwlock_race.c:?) - by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) --Location 0x........ is 0 bytes inside local var "s_racy" --declared at rwlock_race.c:18, in frame #? of thread x -+Location 0x........ is 0 bytes inside global var "s_racy" -+declared at rwlock_race.c:18 - - Conflicting store by thread x at 0x........ size 4 - at 0x........: thread_func (rwlock_race.c:?) - by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) --Location 0x........ is 0 bytes inside local var "s_racy" --declared at rwlock_race.c:18, in frame #? of thread x -+Location 0x........ is 0 bytes inside global var "s_racy" -+declared at rwlock_race.c:18 - - Result: 2 - -diff --git a/drd/tests/sem_as_mutex.stderr.exp b/drd/tests/sem_as_mutex.stderr.exp -index 1646a6c..1fbd91a 100644 ---- a/drd/tests/sem_as_mutex.stderr.exp -+++ b/drd/tests/sem_as_mutex.stderr.exp -@@ -1,8 +1,8 @@ - - Conflicting load by thread 1 at 0x........ size 8 - at 0x........: main (sem_as_mutex.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at sem_as_mutex.c:25, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at sem_as_mutex.c:25 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -@@ -10,8 +10,8 @@ Other segment end (thread 2) - - Conflicting store by thread 1 at 0x........ size 8 - at 0x........: main (sem_as_mutex.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at sem_as_mutex.c:25, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at sem_as_mutex.c:25 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -diff --git a/drd/tests/sem_as_mutex3.stderr.exp b/drd/tests/sem_as_mutex3.stderr.exp -index 97b09a1..efd47ff 100644 ---- a/drd/tests/sem_as_mutex3.stderr.exp -+++ b/drd/tests/sem_as_mutex3.stderr.exp -@@ -1,8 +1,8 @@ - - Conflicting load by thread 1 at 0x........ size 8 - at 0x........: main (sem_as_mutex.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at sem_as_mutex.c:25, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at sem_as_mutex.c:25 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -diff --git a/drd/tests/sem_open.stderr.exp b/drd/tests/sem_open.stderr.exp -index 4e769e5..e926d05 100644 ---- a/drd/tests/sem_open.stderr.exp -+++ b/drd/tests/sem_open.stderr.exp -@@ -1,8 +1,8 @@ - - Conflicting load by thread 1 at 0x........ size 8 - at 0x........: main (sem_open.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at sem_open.c:25, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at sem_open.c:25 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -@@ -10,8 +10,8 @@ Other segment end (thread 2) - - Conflicting store by thread 1 at 0x........ size 8 - at 0x........: main (sem_open.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at sem_open.c:25, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at sem_open.c:25 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -diff --git a/drd/tests/sem_open3.stderr.exp b/drd/tests/sem_open3.stderr.exp -index 3c2d392..fb994f5 100644 ---- a/drd/tests/sem_open3.stderr.exp -+++ b/drd/tests/sem_open3.stderr.exp -@@ -1,8 +1,8 @@ - - Conflicting load by thread 1 at 0x........ size 8 - at 0x........: main (sem_open.c:?) --Location 0x........ is 0 bytes inside local var "s_d3" --declared at sem_open.c:25, in frame #? of thread 1 -+Location 0x........ is 0 bytes inside global var "s_d3" -+declared at sem_open.c:25 - Other segment start (thread 2) - (thread finished, call stack no longer available) - Other segment end (thread 2) -diff --git a/helgrind/tests/hg03_inherit.stderr.exp b/helgrind/tests/hg03_inherit.stderr.exp -index 1c4a91e..ee21cf0 100644 ---- a/helgrind/tests/hg03_inherit.stderr.exp -+++ b/helgrind/tests/hg03_inherit.stderr.exp -@@ -24,7 +24,7 @@ Locks held: none - at 0x........: main (hg03_inherit.c:60) - - Location 0x........ is 0 bytes inside shared[1], --declared at hg03_inherit.c:11, in frame #x of thread x -+a global variable declared at hg03_inherit.c:11 - - - ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) -diff --git a/helgrind/tests/hg04_race.stderr.exp b/helgrind/tests/hg04_race.stderr.exp -index 982f940..bf2a185 100644 ---- a/helgrind/tests/hg04_race.stderr.exp -+++ b/helgrind/tests/hg04_race.stderr.exp -@@ -29,8 +29,8 @@ Locks held: none - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - --Location 0x........ is 0 bytes inside local var "shared" --declared at hg04_race.c:6, in frame #x of thread x -+Location 0x........ is 0 bytes inside global var "shared" -+declared at hg04_race.c:6 - - ---------------------------------------------------------------- - -@@ -46,8 +46,8 @@ Locks held: none - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - --Location 0x........ is 0 bytes inside local var "shared" --declared at hg04_race.c:6, in frame #x of thread x -+Location 0x........ is 0 bytes inside global var "shared" -+declared at hg04_race.c:6 - - - ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) -diff --git a/helgrind/tests/rwlock_race.stderr.exp b/helgrind/tests/rwlock_race.stderr.exp -index 4a44713..47c3bd5 100644 ---- a/helgrind/tests/rwlock_race.stderr.exp -+++ b/helgrind/tests/rwlock_race.stderr.exp -@@ -29,8 +29,8 @@ Locks held: none - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - --Location 0x........ is 0 bytes inside local var "s_racy" --declared at rwlock_race.c:18, in frame #x of thread x -+Location 0x........ is 0 bytes inside global var "s_racy" -+declared at rwlock_race.c:18 - - Result: 2 - -diff --git a/helgrind/tests/tc21_pthonce.stderr.exp b/helgrind/tests/tc21_pthonce.stderr.exp -index 3e7d241..700b492 100644 ---- a/helgrind/tests/tc21_pthonce.stderr.exp -+++ b/helgrind/tests/tc21_pthonce.stderr.exp -@@ -29,8 +29,8 @@ Locks held: none - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - --Location 0x........ is 0 bytes inside local var "unprotected2" --declared at tc21_pthonce.c:51, in frame #x of thread x -+Location 0x........ is 0 bytes inside global var "unprotected2" -+declared at tc21_pthonce.c:51 - - ---------------------------------------------------------------- - -@@ -46,8 +46,8 @@ Locks held: none - by 0x........: mythread_wrapper (hg_intercepts.c:...) - ... - --Location 0x........ is 0 bytes inside local var "unprotected2" --declared at tc21_pthonce.c:51, in frame #x of thread x -+Location 0x........ is 0 bytes inside global var "unprotected2" -+declared at tc21_pthonce.c:51 - - - ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) -diff --git a/memcheck/tests/varinfo3.stderr.exp b/memcheck/tests/varinfo3.stderr.exp -index d24ddb8..73130b7 100644 ---- a/memcheck/tests/varinfo3.stderr.exp -+++ b/memcheck/tests/varinfo3.stderr.exp -@@ -3,7 +3,7 @@ Uninitialised byte(s) found during client check request - by 0x........: foo (varinfo3.c:54) - by 0x........: main (varinfo3.c:66) - Location 0x........ is 0 bytes inside static_global_def[1], -- declared at varinfo3.c:35, in frame #0 of thread 1 -+ a global variable declared at varinfo3.c:35 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo3.c:28) -@@ -17,7 +17,7 @@ Uninitialised byte(s) found during client check request - by 0x........: foo (varinfo3.c:56) - by 0x........: main (varinfo3.c:66) - Location 0x........ is 0 bytes inside static_global_undef[3], -- declared at varinfo3.c:37, in frame #0 of thread 1 -+ a global variable declared at varinfo3.c:37 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo3.c:28) -diff --git a/memcheck/tests/varinfo3.stderr.exp-ppc64 b/memcheck/tests/varinfo3.stderr.exp-ppc64 -index e02a3c8..8dff370 100644 ---- a/memcheck/tests/varinfo3.stderr.exp-ppc64 -+++ b/memcheck/tests/varinfo3.stderr.exp-ppc64 -@@ -3,7 +3,7 @@ Uninitialised byte(s) found during client check request - by 0x........: foo (varinfo3.c:54) - by 0x........: main (varinfo3.c:66) - Location 0x........ is 0 bytes inside static_global_def[1], -- declared at varinfo3.c:35, in frame #0 of thread 1 -+ a global variable declared at varinfo3.c:35 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo3.c:29) -@@ -17,7 +17,7 @@ Uninitialised byte(s) found during client check request - by 0x........: foo (varinfo3.c:56) - by 0x........: main (varinfo3.c:66) - Location 0x........ is 0 bytes inside static_global_undef[3], -- declared at varinfo3.c:37, in frame #0 of thread 1 -+ a global variable declared at varinfo3.c:37 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo3.c:29) -diff --git a/memcheck/tests/varinfo5.stderr.exp b/memcheck/tests/varinfo5.stderr.exp -index 3be0984..5fa9d97 100644 ---- a/memcheck/tests/varinfo5.stderr.exp -+++ b/memcheck/tests/varinfo5.stderr.exp -@@ -83,7 +83,7 @@ Uninitialised byte(s) found during client check request - by 0x........: varinfo5_main (varinfo5so.c:156) - by 0x........: main (varinfo5.c:5) - Location 0x........ is 0 bytes inside static_global_def[1], -- declared at varinfo5so.c:87, in frame #0 of thread 1 -+ a global variable declared at varinfo5so.c:87 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo5so.c:29) -@@ -101,7 +101,7 @@ Uninitialised byte(s) found during client check request - by 0x........: varinfo5_main (varinfo5so.c:156) - by 0x........: main (varinfo5.c:5) - Location 0x........ is 0 bytes inside static_global_undef[3], -- declared at varinfo5so.c:89, in frame #0 of thread 1 -+ a global variable declared at varinfo5so.c:89 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo5so.c:29) -diff --git a/memcheck/tests/varinfo5.stderr.exp-ppc64 b/memcheck/tests/varinfo5.stderr.exp-ppc64 -index db0c4fd..f5ebf0b 100644 ---- a/memcheck/tests/varinfo5.stderr.exp-ppc64 -+++ b/memcheck/tests/varinfo5.stderr.exp-ppc64 -@@ -83,7 +83,7 @@ Uninitialised byte(s) found during client check request - by 0x........: varinfo5_main (varinfo5so.c:156) - by 0x........: main (varinfo5.c:5) - Location 0x........ is 0 bytes inside static_global_def[1], -- declared at varinfo5so.c:87, in frame #0 of thread 1 -+ a global variable declared at varinfo5so.c:87 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo5so.c:30) -@@ -101,7 +101,7 @@ Uninitialised byte(s) found during client check request - by 0x........: varinfo5_main (varinfo5so.c:156) - by 0x........: main (varinfo5.c:5) - Location 0x........ is 0 bytes inside static_global_undef[3], -- declared at varinfo5so.c:89, in frame #0 of thread 1 -+ a global variable declared at varinfo5so.c:89 - - Uninitialised byte(s) found during client check request - at 0x........: croak (varinfo5so.c:30) ---- valgrind-3.8.1/coregrind/m_debuginfo/readdwarf3.c.orig 2012-08-17 08:59:56.000000000 +0200 -+++ valgrind-3.8.1/coregrind/m_debuginfo/readdwarf3.c 2013-02-19 15:39:55.965382081 +0100 -@@ -1853,7 +1853,7 @@ - if (dtag == DW_TAG_variable || dtag == DW_TAG_formal_parameter) { - UChar* name = NULL; - UWord typeR = D3_INVALID_CUOFF; -- Bool external = False; -+ Bool global = False; - GExpr* gexpr = NULL; - Int n_attrs = 0; - UWord abs_ori = (UWord)D3_INVALID_CUOFF; -@@ -1880,7 +1880,7 @@ - typeR = cook_die_using_form( cc, (UWord)cts, form ); - } - if (attr == DW_AT_external && ctsSzB > 0 && cts > 0) { -- external = True; -+ global = True; - } - if (attr == DW_AT_abstract_origin && ctsSzB > 0) { - abs_ori = (UWord)cts; -@@ -1902,6 +1902,14 @@ - if (0) VG_(printf)("XXX filename = %s\n", fileName); - } - } -+ if (!global && dtag == DW_TAG_variable && level == 1) { -+ /* Case of a static variable. It is better to declare -+ it global as the variable is not really related to -+ a PC range, as its address can be used by program -+ counters outside of the ranges where it is visible . */ -+ global = True; -+ } -+ - /* We'll collect it under if one of the following three - conditions holds: - (1) has location and type -> completed -@@ -1927,7 +1935,7 @@ - this CU. */ - vg_assert(parser->sp >= 0); - -- /* If this is a local variable (non-external), try to find -+ /* If this is a local variable (non-global), try to find - the GExpr for the DW_AT_frame_base of the containing - function. It should have been pushed on the stack at the - time we encountered its DW_TAG_subprogram DIE, so the way -@@ -1939,7 +1947,7 @@ - if the containing DT_TAG_subprogram didn't supply a - DW_AT_frame_base -- that's OK, but there must actually be - a containing DW_TAG_subprogram. */ -- if (!external) { -+ if (!global) { - Bool found = False; - for (i = parser->sp; i >= 0; i--) { - if (parser->isFunc[i]) { -@@ -1951,7 +1959,7 @@ - if (!found) { - if (0 && VG_(clo_verbosity) >= 0) { - VG_(message)(Vg_DebugMsg, -- "warning: parse_var_DIE: non-external variable " -+ "warning: parse_var_DIE: non-global variable " - "outside DW_TAG_subprogram\n"); - } - /* goto bad_DIE; */ -@@ -1964,18 +1972,18 @@ - } - } - -- /* re "external ? 0 : parser->sp" (twice), if the var is -- marked 'external' then we must put it at the global scope, -+ /* re "global ? 0 : parser->sp" (twice), if the var is -+ marked 'global' then we must put it at the global scope, - as only the global scope (level 0) covers the entire PC - address space. It is asserted elsewhere that level 0 - always covers the entire address space. */ -- xa = parser->ranges[external ? 0 : parser->sp]; -+ xa = parser->ranges[global ? 0 : parser->sp]; - nRanges = VG_(sizeXA)(xa); - vg_assert(nRanges >= 0); - - tv = ML_(dinfo_zalloc)( "di.readdwarf3.pvD.1", sizeof(TempVar) ); - tv->name = name; -- tv->level = external ? 0 : parser->sp; -+ tv->level = global ? 0 : parser->sp; - tv->typeR = typeR; - tv->gexpr = gexpr; - tv->fbGX = fbGX; diff --git a/valgrind-3.8.1-stpncpy.patch b/valgrind-3.8.1-stpncpy.patch deleted file mode 100644 index bcf8a61..0000000 --- a/valgrind-3.8.1-stpncpy.patch +++ /dev/null @@ -1,205 +0,0 @@ ---- valgrind/memcheck/mc_replace_strmem.c -+++ valgrind/memcheck/mc_replace_strmem.c -@@ -101,6 +101,7 @@ - 20390 WCSCPY - 20400 WCSCHR - 20410 WCSRCHR -+ 20420 STPNCPY - */ - - -@@ -983,6 +984,34 @@ static inline void my_exit ( int x ) - #endif - - -+/*---------------------- stpncpy ----------------------*/ -+ -+#define STPNCPY(soname, fnname) \ -+ char* VG_REPLACE_FUNCTION_EZU(20420,soname,fnname) \ -+ ( char* dst, const char* src, SizeT n ); \ -+ char* VG_REPLACE_FUNCTION_EZU(20420,soname,fnname) \ -+ ( char* dst, const char* src, SizeT n ) \ -+ { \ -+ const Char* src_orig = src; \ -+ Char* dst_str = dst; \ -+ SizeT m = 0; \ -+ \ -+ while (m < n && *src) { m++; *dst++ = *src++; } \ -+ /* Check for overlap after copying; all n bytes of dst are relevant, */ \ -+ /* but only m+1 bytes of src if terminator was found */ \ -+ if (is_overlap(dst_str, src_orig, n, (m < n) ? m+1 : n)) \ -+ RECORD_OVERLAP_ERROR("stpncpy", dst, src, n); \ -+ dst_str = dst; \ -+ while (m++ < n) *dst++ = 0; /* must pad remainder with nulls */ \ -+ \ -+ return dst_str; \ -+ } -+ -+#if defined(VGO_linux) -+ STPNCPY(VG_Z_LIBC_SONAME, stpncpy) -+#endif -+ -+ - /*---------------------- memset ----------------------*/ - - /* Why are we bothering to intercept this? It seems entirely ---- valgrind/memcheck/tests/Makefile.am -+++ valgrind/memcheck/tests/Makefile.am -@@ -190,6 +190,7 @@ EXTRA_DIST = \ - signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ - sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ - static_malloc.stderr.exp static_malloc.vgtest \ -+ stpncpy.vgtest stpncpy.stderr.exp \ - strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \ - strchr.stderr.exp3 strchr.vgtest \ - str_tester.stderr.exp str_tester.vgtest \ -@@ -286,6 +287,7 @@ check_PROGRAMS = \ - sbfragment \ - sh-mem sh-mem-random \ - sigaltstack signal2 sigprocmask static_malloc sigkill \ -+ stpncpy \ - strchr \ - str_tester \ - supp_unknown supp1 supp2 suppfree \ ---- /dev/null -+++ valgrind/memcheck/tests/stpncpy.c -@@ -0,0 +1,37 @@ -+#include -+#include -+#include -+ -+int main(int argc, char **argv) -+{ -+ char a[] = "The spazzy orange tiger jumped over the tawny jaguar."; -+ char *b, *c; -+ char *d, *e; -+ -+ size_t l = strlen (a); -+ fprintf (stderr, "strlen: %zd\n", l); // strlen: 53 -+ -+ b = (char *) malloc((l + 3)); // Extra space for some zeros. -+ b[l] = 'X'; -+ b[l + 1] = 'X'; -+ b[l + 2] = 'X'; -+ c = stpncpy (b, a, l + 3); -+ -+ fprintf (stderr, "equal: %d\n", strcmp (a, b)); // equal: 0 -+ fprintf (stderr, "retlen: %zd\n", c - b); // retlen: 53 -+ fprintf (stderr, "last: '%c'\n", *(c - 1)); // last: '.' -+ fprintf (stderr, "zero0: %d\n", *c); // zero0: 0 -+ fprintf (stderr, "zero1: %d\n", *(c + 1)); // zero1: 0 -+ fprintf (stderr, "zero2: %d\n", *(c + 2)); // zero2: 0 -+ -+ d = (char *) malloc (l - 1); // No room for zero termination or dot. -+ e = stpncpy (d, b, l - 1); -+ -+ fprintf (stderr, "equal: %d\n", strncmp (b, d, l - 1)); // equal: 0 -+ fprintf (stderr, "retlen: %zd\n", e - d); // retlen: 52 -+ fprintf (stderr, "last: '%c'\n", *(e - 1)); // last: 'r' -+ -+ free (b); -+ free (d); -+ return 0; -+} ---- /dev/null -+++ valgrind/memcheck/tests/stpncpy.stderr.exp -@@ -0,0 +1,10 @@ -+strlen: 53 -+equal: 0 -+retlen: 53 -+last: '.' -+zero0: 0 -+zero1: 0 -+zero2: 0 -+equal: 0 -+retlen: 52 -+last: 'r' ---- /dev/null -+++ valgrind/memcheck/tests/stpncpy.vgtest -@@ -0,0 +1,2 @@ -+prog: stpncpy -+vgopts: -q ---- valgrind/memcheck/tests/Makefile.in.orig 2012-11-04 21:02:22.477642451 +0100 -+++ valgrind/memcheck/tests/Makefile.in 2012-11-04 21:04:10.077182544 +0100 -@@ -108,16 +108,17 @@ - realloc3$(EXEEXT) sbfragment$(EXEEXT) sh-mem$(EXEEXT) \ - sh-mem-random$(EXEEXT) sigaltstack$(EXEEXT) signal2$(EXEEXT) \ - sigprocmask$(EXEEXT) static_malloc$(EXEEXT) sigkill$(EXEEXT) \ -- strchr$(EXEEXT) str_tester$(EXEEXT) supp_unknown$(EXEEXT) \ -- supp1$(EXEEXT) supp2$(EXEEXT) suppfree$(EXEEXT) \ -- test-plo$(EXEEXT) trivialleak$(EXEEXT) unit_libcbase$(EXEEXT) \ -- unit_oset$(EXEEXT) varinfo1$(EXEEXT) varinfo2$(EXEEXT) \ -- varinfo3$(EXEEXT) varinfo4$(EXEEXT) varinfo5$(EXEEXT) \ -- varinfo5so.so$(EXEEXT) varinfo6$(EXEEXT) vcpu_fbench$(EXEEXT) \ -- vcpu_fnfns$(EXEEXT) wcs$(EXEEXT) xml1$(EXEEXT) wrap1$(EXEEXT) \ -- wrap2$(EXEEXT) wrap3$(EXEEXT) wrap4$(EXEEXT) wrap5$(EXEEXT) \ -- wrap6$(EXEEXT) wrap7$(EXEEXT) wrap7so.so$(EXEEXT) \ -- wrap8$(EXEEXT) writev1$(EXEEXT) $(am__EXEEXT_1) -+ stpncpy$(EXEEXT) strchr$(EXEEXT) str_tester$(EXEEXT) \ -+ supp_unknown$(EXEEXT) supp1$(EXEEXT) supp2$(EXEEXT) \ -+ suppfree$(EXEEXT) test-plo$(EXEEXT) trivialleak$(EXEEXT) \ -+ unit_libcbase$(EXEEXT) unit_oset$(EXEEXT) varinfo1$(EXEEXT) \ -+ varinfo2$(EXEEXT) varinfo3$(EXEEXT) varinfo4$(EXEEXT) \ -+ varinfo5$(EXEEXT) varinfo5so.so$(EXEEXT) varinfo6$(EXEEXT) \ -+ vcpu_fbench$(EXEEXT) vcpu_fnfns$(EXEEXT) wcs$(EXEEXT) \ -+ xml1$(EXEEXT) wrap1$(EXEEXT) wrap2$(EXEEXT) wrap3$(EXEEXT) \ -+ wrap4$(EXEEXT) wrap5$(EXEEXT) wrap6$(EXEEXT) wrap7$(EXEEXT) \ -+ wrap7so.so$(EXEEXT) wrap8$(EXEEXT) writev1$(EXEEXT) \ -+ $(am__EXEEXT_1) - @DWARF4_TRUE@am__append_12 = dw4 - subdir = memcheck/tests - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -454,6 +455,9 @@ - static_malloc_SOURCES = static_malloc.c - static_malloc_OBJECTS = static_malloc.$(OBJEXT) - static_malloc_LDADD = $(LDADD) -+stpncpy_SOURCES = stpncpy.c -+stpncpy_OBJECTS = stpncpy.$(OBJEXT) -+stpncpy_LDADD = $(LDADD) - str_tester_SOURCES = str_tester.c - str_tester_OBJECTS = str_tester-str_tester.$(OBJEXT) - str_tester_LDADD = $(LDADD) -@@ -608,7 +612,7 @@ - pdb-realloc2.c pipe.c pointer-trace.c post-syscall.c \ - realloc1.c realloc2.c realloc3.c sbfragment.c sh-mem.c \ - sh-mem-random.c sigaltstack.c sigkill.c signal2.c \ -- sigprocmask.c static_malloc.c str_tester.c strchr.c \ -+ sigprocmask.c static_malloc.c stpncpy.c str_tester.c strchr.c \ - $(supp1_SOURCES) $(supp2_SOURCES) $(supp_unknown_SOURCES) \ - suppfree.c test-plo.c trivialleak.c unit_libcbase.c \ - unit_oset.c varinfo1.c varinfo2.c varinfo3.c varinfo4.c \ -@@ -639,7 +643,7 @@ - pdb-realloc2.c pipe.c pointer-trace.c post-syscall.c \ - realloc1.c realloc2.c realloc3.c sbfragment.c sh-mem.c \ - sh-mem-random.c sigaltstack.c sigkill.c signal2.c \ -- sigprocmask.c static_malloc.c str_tester.c strchr.c \ -+ sigprocmask.c static_malloc.c stpncpy.c str_tester.c strchr.c \ - $(supp1_SOURCES) $(supp2_SOURCES) $(supp_unknown_SOURCES) \ - suppfree.c test-plo.c trivialleak.c unit_libcbase.c \ - unit_oset.c varinfo1.c varinfo2.c varinfo3.c varinfo4.c \ -@@ -1117,6 +1121,7 @@ - signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ - sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ - static_malloc.stderr.exp static_malloc.vgtest \ -+ stpncpy.vgtest stpncpy.stderr.exp \ - strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \ - strchr.stderr.exp3 strchr.vgtest \ - str_tester.stderr.exp str_tester.vgtest \ -@@ -1576,6 +1581,9 @@ - static_malloc$(EXEEXT): $(static_malloc_OBJECTS) $(static_malloc_DEPENDENCIES) - @rm -f static_malloc$(EXEEXT) - $(LINK) $(static_malloc_OBJECTS) $(static_malloc_LDADD) $(LIBS) -+stpncpy$(EXEEXT): $(stpncpy_OBJECTS) $(stpncpy_DEPENDENCIES) -+ @rm -f stpncpy$(EXEEXT) -+ $(LINK) $(stpncpy_OBJECTS) $(stpncpy_LDADD) $(LIBS) - str_tester$(EXEEXT): $(str_tester_OBJECTS) $(str_tester_DEPENDENCIES) - @rm -f str_tester$(EXEEXT) - $(str_tester_LINK) $(str_tester_OBJECTS) $(str_tester_LDADD) $(LIBS) -@@ -1774,6 +1782,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/static_malloc.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpncpy.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_tester-str_tester.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchr.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/supp.Po@am__quote@ diff --git a/valgrind-3.8.1-text-segment.patch b/valgrind-3.8.1-text-segment.patch deleted file mode 100644 index 40a83ef..0000000 --- a/valgrind-3.8.1-text-segment.patch +++ /dev/null @@ -1,929 +0,0 @@ -diff --git a/configure.in b/configure.in -index 391b763..9aadfa2 100644 ---- a/configure.in -+++ b/configure.in -@@ -1701,23 +1701,32 @@ AM_CONDITIONAL(DWARF4, test x$ac_have_dwarf4 = xyes) - CFLAGS=$safe_CFLAGS - - --# does the linker support -Wl,--build-id=none ? Note, it's --# important that we test indirectly via whichever C compiler --# is selected, rather than testing /usr/bin/ld or whatever --# directly. -+# We want to use use the -Ttext-segment option to the linker. -+# GNU (bfd) ld supports this directly. Newer GNU gold linkers -+# support it as an alias of -Ttext. Sadly GNU (bfd) ld's -Ttext -+# semantics are NOT what we want (GNU gold -Ttext is fine). -+# -+# For GNU (bfd) ld -Ttext-segment chooses the base at which ELF headers -+# will reside. -Ttext aligns just the .text section start (but not any -+# other section). -+# -+# So test for -Ttext-segment which is supported by all bfd ld versions -+# and use that if it exists. If it doesn't exist it must be an older -+# version of gold and we can fall back to using -Ttext which has the -+# right semantics. - --AC_MSG_CHECKING([if the linker accepts -Wl,--build-id=none]) -+AC_MSG_CHECKING([if the linker accepts -Wl,-Ttext-segment]) - - safe_CFLAGS=$CFLAGS --CFLAGS="-Wl,--build-id=none" -+CFLAGS="-Wl,-Ttext-segment=$valt_load_address_pri_norml" - - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([ ], [return 0;])], - [ -- AC_SUBST([FLAG_NO_BUILD_ID], ["-Wl,--build-id=none"]) -+ AC_SUBST([FLAG_T_TEXT], ["-Ttext-segment"]) - AC_MSG_RESULT([yes]) - ], [ -- AC_SUBST([FLAG_NO_BUILD_ID], [""]) -+ AC_SUBST([FLAG_T_TEXT], ["-Ttext"]) - AC_MSG_RESULT([no]) - ]) - CFLAGS=$safe_CFLAGS -diff --git a/configure.in b/configure.in -index 6e2a675..424f8e6 100644 ---- a/configure.in -+++ b/configure.in -@@ -1723,14 +1723,46 @@ CFLAGS="-Wl,-Ttext-segment=$valt_load_address_pri_norml" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([ ], [return 0;])], - [ -+ linker_using_t_text="no" - AC_SUBST([FLAG_T_TEXT], ["-Ttext-segment"]) - AC_MSG_RESULT([yes]) - ], [ -+ linker_using_t_text="yes" - AC_SUBST([FLAG_T_TEXT], ["-Ttext"]) - AC_MSG_RESULT([no]) - ]) - CFLAGS=$safe_CFLAGS - -+# If the linker only supports -Ttext (not -Ttext-segment) then we will -+# have to strip any build-id ELF NOTEs from the staticly linked tools. -+# Otherwise the build-id NOTE might end up at the default load address. -+# (Pedantically if the linker is gold then -Ttext is fine, but newer -+# gold versions also support -Ttext-segment. So just assume that unless -+# we can use -Ttext-segment we need to strip the build-id NOTEs. -+if test "x${linker_using_t_text}" == "xyes"; then -+AC_MSG_NOTICE([ld -Ttext used, need to strip build-id NOTEs.]) -+# does the linker support -Wl,--build-id=none ? Note, it's -+# important that we test indirectly via whichever C compiler -+# is selected, rather than testing /usr/bin/ld or whatever -+# directly. -+AC_MSG_CHECKING([if the linker accepts -Wl,--build-id=none]) -+safe_CFLAGS=$CFLAGS -+CFLAGS="-Wl,--build-id=none" -+ -+AC_LINK_IFELSE( -+[AC_LANG_PROGRAM([ ], [return 0;])], -+[ -+ AC_SUBST([FLAG_NO_BUILD_ID], ["-Wl,--build-id=none"]) -+ AC_MSG_RESULT([yes]) -+], [ -+ AC_SUBST([FLAG_NO_BUILD_ID], [""]) -+ AC_MSG_RESULT([no]) -+]) -+else -+AC_MSG_NOTICE([ld -Ttext-segment used, no need to strip build-id NOTEs.]) -+AC_SUBST([FLAG_NO_BUILD_ID], [""]) -+fi -+CFLAGS=$safe_CFLAGS - - # does the ppc assembler support "mtocrf" et al? - AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf]) ---- valgrind-3.8.1.orig/coregrind/link_tool_exe_linux.in 2013-03-20 16:59:08.834198437 +0100 -+++ valgrind-3.8.1/coregrind/link_tool_exe_linux.in 2013-03-20 17:02:20.184864053 +0100 -@@ -27,24 +27,20 @@ - # directly. It is only run as part of the build process, with - # carefully constrained inputs. - # --# Linux specific complications: -+# Linux specific complication: - # - # - need to support both old GNU ld and gold: use -Ttext= to --# set the text segment address. --# --# - need to pass --build-id=none (that is, -Wl,--build-id=none to --# gcc) if it accepts it, to ensure the linker doesn't add a --# notes section which ends up at the default load address and --# so defeats our attempts to keep that address clear for the --# client. However, older linkers don't support this flag, so it --# is tested for by configure.in and is shipped to us as part of --# argv[2 ..]. -+# set the text segment address if that is all we have. We really -+# need -Ttext-segment. Otherwise with GNU ld sections or notes -+# (like the build-id) don't get at the desired address. Luckily -+# -Ttext does the right thing for gold. So configure checks for -+# us and sets FLAG_T_TEXT. - # - # - # So: what we actually do: - # - # pass the specified command to the linker as-is, except, add --# "-static" and "-Ttext=" to it. -+# "-static" and "-Ttext[-segment]=" to it. - # - - use warnings; -@@ -66,7 +62,7 @@ - # and the 'restargs' are argv[2 ..] - - # so, build up the complete command here: --# 'cc' -static -Ttext='ala' 'restargs' -+# 'cc' -static -Ttext[-segment]='ala' 'restargs' - - # For mips we need to use "--section-start=.reginfo=$ala" because - # "--section-start=.reginfo=$ala" will put all the sections to the -@@ -78,7 +74,7 @@ - if (($arch eq 'mips') || ($arch eq 'mipsel')) { - $cmd = "$cc -static -Wl,--section-start=.reginfo=$ala"; - } else { -- $cmd = "$cc -static -Wl,-Ttext=$ala"; -+ $cmd = "$cc -static -Wl,@FLAG_T_TEXT@=$ala"; - } - - # Add the rest of the parameters -Only in valgrind-3.8.1: autom4te.cache -diff -ur valgrind-3.8.1.orig/auxprogs/Makefile.in valgrind-3.8.1/auxprogs/Makefile.in ---- valgrind-3.8.1.orig/auxprogs/Makefile.in 2013-04-02 17:57:17.050898570 +0200 -+++ valgrind-3.8.1/auxprogs/Makefile.in 2013-04-02 17:57:28.199938856 +0200 -@@ -120,6 +120,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/cachegrind/Makefile.in valgrind-3.8.1/cachegrind/Makefile.in ---- valgrind-3.8.1.orig/cachegrind/Makefile.in 2013-04-02 17:57:17.030898498 +0200 -+++ valgrind-3.8.1/cachegrind/Makefile.in 2013-04-02 17:57:28.301939225 +0200 -@@ -222,6 +222,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/cachegrind/tests/Makefile.in valgrind-3.8.1/cachegrind/tests/Makefile.in ---- valgrind-3.8.1.orig/cachegrind/tests/Makefile.in 2013-04-02 17:57:17.030898498 +0200 -+++ valgrind-3.8.1/cachegrind/tests/Makefile.in 2013-04-02 17:57:28.356939423 +0200 -@@ -168,6 +168,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/cachegrind/tests/x86/Makefile.in valgrind-3.8.1/cachegrind/tests/x86/Makefile.in ---- valgrind-3.8.1.orig/cachegrind/tests/x86/Makefile.in 2013-04-02 17:57:17.030898498 +0200 -+++ valgrind-3.8.1/cachegrind/tests/x86/Makefile.in 2013-04-02 17:57:28.402939589 +0200 -@@ -120,6 +120,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/callgrind/Makefile.in valgrind-3.8.1/callgrind/Makefile.in ---- valgrind-3.8.1.orig/callgrind/Makefile.in 2013-04-02 17:57:17.146898918 +0200 -+++ valgrind-3.8.1/callgrind/Makefile.in 2013-04-02 17:57:28.556940145 +0200 -@@ -239,6 +239,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/callgrind/tests/Makefile.in valgrind-3.8.1/callgrind/tests/Makefile.in ---- valgrind-3.8.1.orig/callgrind/tests/Makefile.in 2013-04-02 17:57:17.146898918 +0200 -+++ valgrind-3.8.1/callgrind/tests/Makefile.in 2013-04-02 17:57:28.608940333 +0200 -@@ -161,6 +161,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/configure valgrind-3.8.1/configure ---- valgrind-3.8.1.orig/configure 2013-04-02 17:57:17.158898961 +0200 -+++ valgrind-3.8.1/configure 2013-04-02 17:57:32.984956139 +0200 -@@ -657,6 +657,7 @@ - BUILD_SSE3_TESTS_FALSE - BUILD_SSE3_TESTS_TRUE - FLAG_NO_BUILD_ID -+FLAG_T_TEXT - DWARF4_FALSE - DWARF4_TRUE - FLAG_UNLIMITED_INLINE_UNIT_GROWTH -@@ -7913,14 +7914,73 @@ - CFLAGS=$safe_CFLAGS - - -+# We want to use use the -Ttext-segment option to the linker. -+# GNU (bfd) ld supports this directly. Newer GNU gold linkers -+# support it as an alias of -Ttext. Sadly GNU (bfd) ld's -Ttext -+# semantics are NOT what we want (GNU gold -Ttext is fine). -+# -+# For GNU (bfd) ld -Ttext-segment chooses the base at which ELF headers -+# will reside. -Ttext aligns just the .text section start (but not any -+# other section). -+# -+# So test for -Ttext-segment which is supported by all bfd ld versions -+# and use that if it exists. If it doesn't exist it must be an older -+# version of gold and we can fall back to using -Ttext which has the -+# right semantics. -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker accepts -Wl,-Ttext-segment" >&5 -+$as_echo_n "checking if the linker accepts -Wl,-Ttext-segment... " >&6; } -+ -+safe_CFLAGS=$CFLAGS -+CFLAGS="-Wl,-Ttext-segment=$valt_load_address_pri_norml" -+ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ -+ linker_using_t_text="no" -+ FLAG_T_TEXT="-Ttext-segment" -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+else -+ -+ linker_using_t_text="yes" -+ FLAG_T_TEXT="-Ttext" -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+CFLAGS=$safe_CFLAGS -+ -+# If the linker only supports -Ttext (not -Ttext-segment) then we will -+# have to strip any build-id ELF NOTEs from the staticly linked tools. -+# Otherwise the build-id NOTE might end up at the default load address. -+# (Pedantically if the linker is gold then -Ttext is fine, but newer -+# gold versions also support -Ttext-segment. So just assume that unless -+# we can use -Ttext-segment we need to strip the build-id NOTEs. -+if test "x${linker_using_t_text}" == "xyes"; then -+{ $as_echo "$as_me:${as_lineno-$LINENO}: ld -Ttext used, need to strip build-id NOTEs." >&5 -+$as_echo "$as_me: ld -Ttext used, need to strip build-id NOTEs." >&6;} - # does the linker support -Wl,--build-id=none ? Note, it's - # important that we test indirectly via whichever C compiler - # is selected, rather than testing /usr/bin/ld or whatever - # directly. -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker accepts -Wl,--build-id=none" >&5 - $as_echo_n "checking if the linker accepts -Wl,--build-id=none... " >&6; } -- - safe_CFLAGS=$CFLAGS - CFLAGS="-Wl,--build-id=none" - -@@ -7952,8 +8012,13 @@ - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --CFLAGS=$safe_CFLAGS -+else -+{ $as_echo "$as_me:${as_lineno-$LINENO}: ld -Ttext-segment used, no need to strip build-id NOTEs." >&5 -+$as_echo "$as_me: ld -Ttext-segment used, no need to strip build-id NOTEs." >&6;} -+FLAG_NO_BUILD_ID="" - -+fi -+CFLAGS=$safe_CFLAGS - - # does the ppc assembler support "mtocrf" et al? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ppc32/64 as supports mtocrf/mfocrf" >&5 -diff -ur valgrind-3.8.1.orig/coregrind/Makefile.in valgrind-3.8.1/coregrind/Makefile.in ---- valgrind-3.8.1.orig/coregrind/Makefile.in 2013-04-02 17:57:17.116898809 +0200 -+++ valgrind-3.8.1/coregrind/Makefile.in 2013-04-02 17:57:29.304942848 +0200 -@@ -703,6 +703,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/docs/Makefile.in valgrind-3.8.1/docs/Makefile.in ---- valgrind-3.8.1.orig/docs/Makefile.in 2013-04-02 17:57:17.157898957 +0200 -+++ valgrind-3.8.1/docs/Makefile.in 2013-04-02 17:57:29.344942992 +0200 -@@ -83,6 +83,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/drd/Makefile.in valgrind-3.8.1/drd/Makefile.in ---- valgrind-3.8.1.orig/drd/Makefile.in 2013-04-02 17:57:17.049898567 +0200 -+++ valgrind-3.8.1/drd/Makefile.in 2013-04-02 17:57:29.491943523 +0200 -@@ -268,6 +268,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/drd/tests/Makefile.in valgrind-3.8.1/drd/tests/Makefile.in ---- valgrind-3.8.1.orig/drd/tests/Makefile.in 2013-04-02 17:57:17.043898545 +0200 -+++ valgrind-3.8.1/drd/tests/Makefile.in 2013-04-02 17:57:29.625944007 +0200 -@@ -477,6 +477,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-bbv/Makefile.in valgrind-3.8.1/exp-bbv/Makefile.in ---- valgrind-3.8.1.orig/exp-bbv/Makefile.in 2013-04-02 17:57:17.162898976 +0200 -+++ valgrind-3.8.1/exp-bbv/Makefile.in 2013-04-02 17:57:29.688944235 +0200 -@@ -168,6 +168,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-bbv/tests/amd64-linux/Makefile.in valgrind-3.8.1/exp-bbv/tests/amd64-linux/Makefile.in ---- valgrind-3.8.1.orig/exp-bbv/tests/amd64-linux/Makefile.in 2013-04-02 17:57:17.161898973 +0200 -+++ valgrind-3.8.1/exp-bbv/tests/amd64-linux/Makefile.in 2013-04-02 17:57:29.788944595 +0200 -@@ -140,6 +140,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-bbv/tests/arm-linux/Makefile.in valgrind-3.8.1/exp-bbv/tests/arm-linux/Makefile.in ---- valgrind-3.8.1.orig/exp-bbv/tests/arm-linux/Makefile.in 2013-04-02 17:57:17.160898969 +0200 -+++ valgrind-3.8.1/exp-bbv/tests/arm-linux/Makefile.in 2013-04-02 17:57:29.836944769 +0200 -@@ -123,6 +123,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-bbv/tests/Makefile.in valgrind-3.8.1/exp-bbv/tests/Makefile.in ---- valgrind-3.8.1.orig/exp-bbv/tests/Makefile.in 2013-04-02 17:57:17.162898976 +0200 -+++ valgrind-3.8.1/exp-bbv/tests/Makefile.in 2013-04-02 17:57:29.735944405 +0200 -@@ -151,6 +151,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-bbv/tests/ppc32-linux/Makefile.in valgrind-3.8.1/exp-bbv/tests/ppc32-linux/Makefile.in ---- valgrind-3.8.1.orig/exp-bbv/tests/ppc32-linux/Makefile.in 2013-04-02 17:57:17.159898965 +0200 -+++ valgrind-3.8.1/exp-bbv/tests/ppc32-linux/Makefile.in 2013-04-02 17:57:29.885944945 +0200 -@@ -123,6 +123,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-bbv/tests/x86/Makefile.in valgrind-3.8.1/exp-bbv/tests/x86/Makefile.in ---- valgrind-3.8.1.orig/exp-bbv/tests/x86/Makefile.in 2013-04-02 17:57:17.162898976 +0200 -+++ valgrind-3.8.1/exp-bbv/tests/x86/Makefile.in 2013-04-02 17:57:29.987945315 +0200 -@@ -132,6 +132,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-bbv/tests/x86-linux/Makefile.in valgrind-3.8.1/exp-bbv/tests/x86-linux/Makefile.in ---- valgrind-3.8.1.orig/exp-bbv/tests/x86-linux/Makefile.in 2013-04-02 17:57:17.160898969 +0200 -+++ valgrind-3.8.1/exp-bbv/tests/x86-linux/Makefile.in 2013-04-02 17:57:29.935945126 +0200 -@@ -123,6 +123,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-dhat/Makefile.in valgrind-3.8.1/exp-dhat/Makefile.in ---- valgrind-3.8.1.orig/exp-dhat/Makefile.in 2013-04-02 17:57:17.143898906 +0200 -+++ valgrind-3.8.1/exp-dhat/Makefile.in 2013-04-02 17:57:30.052945550 +0200 -@@ -192,6 +192,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-dhat/tests/Makefile.in valgrind-3.8.1/exp-dhat/tests/Makefile.in ---- valgrind-3.8.1.orig/exp-dhat/tests/Makefile.in 2013-04-02 17:57:17.143898906 +0200 -+++ valgrind-3.8.1/exp-dhat/tests/Makefile.in 2013-04-02 17:57:30.083945661 +0200 -@@ -83,6 +83,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-sgcheck/Makefile.in valgrind-3.8.1/exp-sgcheck/Makefile.in ---- valgrind-3.8.1.orig/exp-sgcheck/Makefile.in 2013-04-02 17:57:17.127898849 +0200 -+++ valgrind-3.8.1/exp-sgcheck/Makefile.in 2013-04-02 17:57:30.168945969 +0200 -@@ -211,6 +211,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/exp-sgcheck/tests/Makefile.in valgrind-3.8.1/exp-sgcheck/tests/Makefile.in ---- valgrind-3.8.1.orig/exp-sgcheck/tests/Makefile.in 2013-04-02 17:57:17.126898845 +0200 -+++ valgrind-3.8.1/exp-sgcheck/tests/Makefile.in 2013-04-02 17:57:30.227946183 +0200 -@@ -146,6 +146,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/gdbserver_tests/Makefile.in valgrind-3.8.1/gdbserver_tests/Makefile.in ---- valgrind-3.8.1.orig/gdbserver_tests/Makefile.in 2013-04-02 17:57:17.121898828 +0200 -+++ valgrind-3.8.1/gdbserver_tests/Makefile.in 2013-04-02 17:57:30.284946388 +0200 -@@ -153,6 +153,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/helgrind/Makefile.in valgrind-3.8.1/helgrind/Makefile.in ---- valgrind-3.8.1.orig/helgrind/Makefile.in 2013-04-02 17:57:17.138898889 +0200 -+++ valgrind-3.8.1/helgrind/Makefile.in 2013-04-02 17:57:30.380946734 +0200 -@@ -235,6 +235,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/helgrind/tests/Makefile.in valgrind-3.8.1/helgrind/tests/Makefile.in ---- valgrind-3.8.1.orig/helgrind/tests/Makefile.in 2013-04-02 17:57:17.134898874 +0200 -+++ valgrind-3.8.1/helgrind/tests/Makefile.in 2013-04-02 17:57:30.473947070 +0200 -@@ -359,6 +359,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/include/Makefile.in valgrind-3.8.1/include/Makefile.in ---- valgrind-3.8.1.orig/include/Makefile.in 2013-04-02 17:57:17.141898898 +0200 -+++ valgrind-3.8.1/include/Makefile.in 2013-04-02 17:57:30.509947200 +0200 -@@ -110,6 +110,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/lackey/Makefile.in valgrind-3.8.1/lackey/Makefile.in ---- valgrind-3.8.1.orig/lackey/Makefile.in 2013-04-02 17:57:16.946898195 +0200 -+++ valgrind-3.8.1/lackey/Makefile.in 2013-04-02 17:57:30.569947417 +0200 -@@ -168,6 +168,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/lackey/tests/Makefile.in valgrind-3.8.1/lackey/tests/Makefile.in ---- valgrind-3.8.1.orig/lackey/tests/Makefile.in 2013-04-02 17:57:16.945898192 +0200 -+++ valgrind-3.8.1/lackey/tests/Makefile.in 2013-04-02 17:57:30.601947533 +0200 -@@ -86,6 +86,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/Makefile.in valgrind-3.8.1/Makefile.in ---- valgrind-3.8.1.orig/Makefile.in 2013-04-02 17:57:17.144898910 +0200 -+++ valgrind-3.8.1/Makefile.in 2013-04-02 17:57:32.681955045 +0200 -@@ -184,6 +184,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/Makefile.vex.in valgrind-3.8.1/Makefile.vex.in ---- valgrind-3.8.1.orig/Makefile.vex.in 2013-04-02 17:57:17.127898849 +0200 -+++ valgrind-3.8.1/Makefile.vex.in 2013-04-02 17:57:28.148938672 +0200 -@@ -250,6 +250,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/massif/Makefile.in valgrind-3.8.1/massif/Makefile.in ---- valgrind-3.8.1.orig/massif/Makefile.in 2013-04-02 17:57:16.956898231 +0200 -+++ valgrind-3.8.1/massif/Makefile.in 2013-04-02 17:57:30.667947771 +0200 -@@ -217,6 +217,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/massif/tests/Makefile.in valgrind-3.8.1/massif/tests/Makefile.in ---- valgrind-3.8.1.orig/massif/tests/Makefile.in 2013-04-02 17:57:16.954898223 +0200 -+++ valgrind-3.8.1/massif/tests/Makefile.in 2013-04-02 17:57:30.731948003 +0200 -@@ -201,6 +201,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/Makefile.in valgrind-3.8.1/memcheck/Makefile.in ---- valgrind-3.8.1.orig/memcheck/Makefile.in 2013-04-02 17:57:17.098898743 +0200 -+++ valgrind-3.8.1/memcheck/Makefile.in 2013-04-02 17:57:30.827948350 +0200 -@@ -235,6 +235,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/amd64/Makefile.in valgrind-3.8.1/memcheck/tests/amd64/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/amd64/Makefile.in 2013-04-02 17:57:17.097898740 +0200 -+++ valgrind-3.8.1/memcheck/tests/amd64/Makefile.in 2013-04-02 17:57:31.141949484 +0200 -@@ -142,6 +142,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/amd64-linux/Makefile.in valgrind-3.8.1/memcheck/tests/amd64-linux/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/amd64-linux/Makefile.in 2013-04-02 17:57:17.082898686 +0200 -+++ valgrind-3.8.1/memcheck/tests/amd64-linux/Makefile.in 2013-04-02 17:57:31.087949289 +0200 -@@ -123,6 +123,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/darwin/Makefile.in valgrind-3.8.1/memcheck/tests/darwin/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/darwin/Makefile.in 2013-04-02 17:57:17.086898701 +0200 -+++ valgrind-3.8.1/memcheck/tests/darwin/Makefile.in 2013-04-02 17:57:31.194949675 +0200 -@@ -143,6 +143,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/linux/Makefile.in valgrind-3.8.1/memcheck/tests/linux/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/linux/Makefile.in 2013-04-02 17:57:17.069898639 +0200 -+++ valgrind-3.8.1/memcheck/tests/linux/Makefile.in 2013-04-02 17:57:31.249949874 +0200 -@@ -159,6 +159,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/Makefile.in valgrind-3.8.1/memcheck/tests/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/Makefile.in 2013-04-02 17:57:17.084898693 +0200 -+++ valgrind-3.8.1/memcheck/tests/Makefile.in 2013-04-02 17:57:31.033949093 +0200 -@@ -732,6 +732,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/ppc32/Makefile.in valgrind-3.8.1/memcheck/tests/ppc32/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/ppc32/Makefile.in 2013-04-02 17:57:17.064898621 +0200 -+++ valgrind-3.8.1/memcheck/tests/ppc32/Makefile.in 2013-04-02 17:57:31.299950054 +0200 -@@ -120,6 +120,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/ppc64/Makefile.in valgrind-3.8.1/memcheck/tests/ppc64/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/ppc64/Makefile.in 2013-04-02 17:57:17.087898705 +0200 -+++ valgrind-3.8.1/memcheck/tests/ppc64/Makefile.in 2013-04-02 17:57:31.349950235 +0200 -@@ -120,6 +120,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/s390x/Makefile.in valgrind-3.8.1/memcheck/tests/s390x/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/s390x/Makefile.in 2013-04-02 17:57:17.083898689 +0200 -+++ valgrind-3.8.1/memcheck/tests/s390x/Makefile.in 2013-04-02 17:57:31.400950418 +0200 -@@ -135,6 +135,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/x86/Makefile.in valgrind-3.8.1/memcheck/tests/x86/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/x86/Makefile.in 2013-04-02 17:57:17.093898726 +0200 -+++ valgrind-3.8.1/memcheck/tests/x86/Makefile.in 2013-04-02 17:57:31.517950841 +0200 -@@ -165,6 +165,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/memcheck/tests/x86-linux/Makefile.in valgrind-3.8.1/memcheck/tests/x86-linux/Makefile.in ---- valgrind-3.8.1.orig/memcheck/tests/x86-linux/Makefile.in 2013-04-02 17:57:17.073898654 +0200 -+++ valgrind-3.8.1/memcheck/tests/x86-linux/Makefile.in 2013-04-02 17:57:31.453950611 +0200 -@@ -143,6 +143,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/mpi/Makefile.in valgrind-3.8.1/mpi/Makefile.in ---- valgrind-3.8.1.orig/mpi/Makefile.in 2013-04-02 17:57:16.948898201 +0200 -+++ valgrind-3.8.1/mpi/Makefile.in 2013-04-02 17:57:31.572951039 +0200 -@@ -141,6 +141,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/Makefile.in valgrind-3.8.1/none/Makefile.in ---- valgrind-3.8.1.orig/none/Makefile.in 2013-04-02 17:57:17.028898490 +0200 -+++ valgrind-3.8.1/none/Makefile.in 2013-04-02 17:57:31.632951257 +0200 -@@ -166,6 +166,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/amd64/Makefile.in valgrind-3.8.1/none/tests/amd64/Makefile.in ---- valgrind-3.8.1.orig/none/tests/amd64/Makefile.in 2013-04-02 17:57:17.023898473 +0200 -+++ valgrind-3.8.1/none/tests/amd64/Makefile.in 2013-04-02 17:57:31.863952092 +0200 -@@ -345,6 +345,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/arm/Makefile.in valgrind-3.8.1/none/tests/arm/Makefile.in ---- valgrind-3.8.1.orig/none/tests/arm/Makefile.in 2013-04-02 17:57:16.976898304 +0200 -+++ valgrind-3.8.1/none/tests/arm/Makefile.in 2013-04-02 17:57:31.933952345 +0200 -@@ -157,6 +157,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/darwin/Makefile.in valgrind-3.8.1/none/tests/darwin/Makefile.in ---- valgrind-3.8.1.orig/none/tests/darwin/Makefile.in 2013-04-02 17:57:16.998898383 +0200 -+++ valgrind-3.8.1/none/tests/darwin/Makefile.in 2013-04-02 17:57:31.982952522 +0200 -@@ -125,6 +125,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/linux/Makefile.in valgrind-3.8.1/none/tests/linux/Makefile.in ---- valgrind-3.8.1.orig/none/tests/linux/Makefile.in 2013-04-02 17:57:16.967898270 +0200 -+++ valgrind-3.8.1/none/tests/linux/Makefile.in 2013-04-02 17:57:32.032952702 +0200 -@@ -128,6 +128,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/Makefile.in valgrind-3.8.1/none/tests/Makefile.in ---- valgrind-3.8.1.orig/none/tests/Makefile.in 2013-04-02 17:57:16.998898383 +0200 -+++ valgrind-3.8.1/none/tests/Makefile.in 2013-04-02 17:57:31.762951727 +0200 -@@ -504,6 +504,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/mips32/Makefile.in valgrind-3.8.1/none/tests/mips32/Makefile.in ---- valgrind-3.8.1.orig/none/tests/mips32/Makefile.in 2013-04-02 17:57:16.979898314 +0200 -+++ valgrind-3.8.1/none/tests/mips32/Makefile.in 2013-04-02 17:57:32.088952903 +0200 -@@ -152,6 +152,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/ppc32/Makefile.in valgrind-3.8.1/none/tests/ppc32/Makefile.in ---- valgrind-3.8.1.orig/none/tests/ppc32/Makefile.in 2013-04-02 17:57:16.962898252 +0200 -+++ valgrind-3.8.1/none/tests/ppc32/Makefile.in 2013-04-02 17:57:32.178953228 +0200 -@@ -234,6 +234,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/ppc64/Makefile.in valgrind-3.8.1/none/tests/ppc64/Makefile.in ---- valgrind-3.8.1.orig/none/tests/ppc64/Makefile.in 2013-04-02 17:57:17.003898401 +0200 -+++ valgrind-3.8.1/none/tests/ppc64/Makefile.in 2013-04-02 17:57:32.260953525 +0200 -@@ -201,6 +201,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/s390x/Makefile.in valgrind-3.8.1/none/tests/s390x/Makefile.in ---- valgrind-3.8.1.orig/none/tests/s390x/Makefile.in 2013-04-02 17:57:16.993898365 +0200 -+++ valgrind-3.8.1/none/tests/s390x/Makefile.in 2013-04-02 17:57:32.366953907 +0200 -@@ -382,6 +382,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/x86/Makefile.in valgrind-3.8.1/none/tests/x86/Makefile.in ---- valgrind-3.8.1.orig/none/tests/x86/Makefile.in 2013-04-02 17:57:17.013898436 +0200 -+++ valgrind-3.8.1/none/tests/x86/Makefile.in 2013-04-02 17:57:32.511954432 +0200 -@@ -307,6 +307,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/none/tests/x86-linux/Makefile.in valgrind-3.8.1/none/tests/x86-linux/Makefile.in ---- valgrind-3.8.1.orig/none/tests/x86-linux/Makefile.in 2013-04-02 17:57:16.969898276 +0200 -+++ valgrind-3.8.1/none/tests/x86-linux/Makefile.in 2013-04-02 17:57:32.415954086 +0200 -@@ -121,6 +121,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/perf/Makefile.in valgrind-3.8.1/perf/Makefile.in ---- valgrind-3.8.1.orig/perf/Makefile.in 2013-04-02 17:57:17.124898837 +0200 -+++ valgrind-3.8.1/perf/Makefile.in 2013-04-02 17:57:32.572954652 +0200 -@@ -153,6 +153,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ -diff -ur valgrind-3.8.1.orig/tests/Makefile.in valgrind-3.8.1/tests/Makefile.in ---- valgrind-3.8.1.orig/tests/Makefile.in 2013-04-02 17:57:17.143898906 +0200 -+++ valgrind-3.8.1/tests/Makefile.in 2013-04-02 17:57:32.627954850 +0200 -@@ -139,6 +139,7 @@ - FLAG_MMMX = @FLAG_MMMX@ - FLAG_MSSE = @FLAG_MSSE@ - FLAG_NO_BUILD_ID = @FLAG_NO_BUILD_ID@ -+FLAG_T_TEXT = @FLAG_T_TEXT@ - FLAG_UNLIMITED_INLINE_UNIT_GROWTH = @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@ - FLAG_W_EXTRA = @FLAG_W_EXTRA@ - FLAG_W_NO_EMPTY_BODY = @FLAG_W_NO_EMPTY_BODY@ - -commit 0e6f91f20c180a37e32a7688b93c94f73aede0b6 -Author: Mark Wielaard -Date: Wed Apr 17 20:30:10 2013 +0200 - - Fix -Ttext-segment configure check. - - Explicitly test together with -static -nodefaultlibs -nostartfiles to mimic - what the tools linking script does. At least on s390 the test might fail for - a non-static AC_LINK, while it does work when using those other flags too. - -diff --git a/configure.in b/configure.in -index 424f8e6..9a1db0c 100644 ---- a/configure.in -+++ b/configure.in -@@ -1718,10 +1718,10 @@ CFLAGS=$safe_CFLAGS - AC_MSG_CHECKING([if the linker accepts -Wl,-Ttext-segment]) - - safe_CFLAGS=$CFLAGS --CFLAGS="-Wl,-Ttext-segment=$valt_load_address_pri_norml" -+CFLAGS="-static -nodefaultlibs -nostartfiles -Wl,-Ttext-segment=$valt_load_address_pri_norml" - - AC_LINK_IFELSE( --[AC_LANG_PROGRAM([ ], [return 0;])], -+[AC_LANG_SOURCE([int _start () { return 0; }])], - [ - linker_using_t_text="no" - AC_SUBST([FLAG_T_TEXT], ["-Ttext-segment"]) ---- valgrind-3.8.1/configure.orig2 2013-04-17 20:37:38.431443701 +0200 -+++ valgrind-3.8.1/configure 2013-04-17 20:38:19.103686995 +0200 -@@ -7932,18 +7932,11 @@ - $as_echo_n "checking if the linker accepts -Wl,-Ttext-segment... " >&6; } - - safe_CFLAGS=$CFLAGS --CFLAGS="-Wl,-Ttext-segment=$valt_load_address_pri_norml" -+CFLAGS="-static -nodefaultlibs -nostartfiles -Wl,-Ttext-segment=$valt_load_address_pri_norml" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ -- --int --main () --{ --return 0; -- ; -- return 0; --} -+int _start () { return 0; } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : - diff --git a/valgrind-3.8.1-wcs.patch b/valgrind-3.8.1-wcs.patch deleted file mode 100644 index 1aa918c..0000000 --- a/valgrind-3.8.1-wcs.patch +++ /dev/null @@ -1,273 +0,0 @@ -Index: valgrind/memcheck/mc_replace_strmem.c -=================================================================== ---- valgrind/memcheck/mc_replace_strmem.c (revision 13016) -+++ valgrind/memcheck/mc_replace_strmem.c (working copy) -@@ -97,6 +97,10 @@ - 20350 STRCASESTR - 20360 MEMRCHR - 20370 WCSLEN -+ 20380 WCSCMP -+ 20390 WCSCPY -+ 20400 WCSCHR -+ 20410 WCSRCHR - */ - - -@@ -1570,7 +1574,115 @@ - - #endif - -+/*---------------------- wcscmp ----------------------*/ - -+// This is a wchar_t equivalent to strcmp. We don't -+// have wchar_t available here, but in the GNU C Library -+// wchar_t is always 32 bits wide and wcscmp uses signed -+// comparison, not unsigned as in strcmp function. -+ -+#define WCSCMP(soname, fnname) \ -+ int VG_REPLACE_FUNCTION_EZU(20380,soname,fnname) \ -+ ( const Int* s1, const Int* s2 ); \ -+ int VG_REPLACE_FUNCTION_EZU(20380,soname,fnname) \ -+ ( const Int* s1, const Int* s2 ) \ -+ { \ -+ register Int c1; \ -+ register Int c2; \ -+ while (True) { \ -+ c1 = *s1; \ -+ c2 = *s2; \ -+ if (c1 != c2) break; \ -+ if (c1 == 0) break; \ -+ s1++; s2++; \ -+ } \ -+ if (c1 < c2) return -1; \ -+ if (c1 > c2) return 1; \ -+ return 0; \ -+ } -+ -+#if defined(VGO_linux) -+ WCSCMP(VG_Z_LIBC_SONAME, wcscmp) -+#endif -+ -+/*---------------------- wcscpy ----------------------*/ -+ -+// This is a wchar_t equivalent to strcpy. We don't -+// have wchar_t available here, but in the GNU C Library -+// wchar_t is always 32 bits wide. -+ -+#define WCSCPY(soname, fnname) \ -+ Int* VG_REPLACE_FUNCTION_EZU(20390,soname,fnname) \ -+ ( Int* dst, const Int* src ); \ -+ Int* VG_REPLACE_FUNCTION_EZU(20390,soname,fnname) \ -+ ( Int* dst, const Int* src ) \ -+ { \ -+ const Int* src_orig = src; \ -+ Int* dst_orig = dst; \ -+ \ -+ while (*src) *dst++ = *src++; \ -+ *dst = 0; \ -+ \ -+ /* This checks for overlap after copying, unavoidable without */ \ -+ /* pre-counting length... should be ok */ \ -+ if (is_overlap(dst_orig, \ -+ src_orig, \ -+ (Addr)dst-(Addr)dst_orig+1, \ -+ (Addr)src-(Addr)src_orig+1)) \ -+ RECORD_OVERLAP_ERROR("wcscpy", dst_orig, src_orig, 0); \ -+ \ -+ return dst_orig; \ -+ } -+ -+#if defined(VGO_linux) -+ WCSCPY(VG_Z_LIBC_SONAME, wcscpy) -+#endif -+ -+ -+/*---------------------- wcschr ----------------------*/ -+ -+// This is a wchar_t equivalent to strchr. We don't -+// have wchar_t available here, but in the GNU C Library -+// wchar_t is always 32 bits wide. -+ -+#define WCSCHR(soname, fnname) \ -+ Int* VG_REPLACE_FUNCTION_EZU(20400,soname,fnname) ( const Int* s, Int c ); \ -+ Int* VG_REPLACE_FUNCTION_EZU(20400,soname,fnname) ( const Int* s, Int c ) \ -+ { \ -+ Int* p = (Int*)s; \ -+ while (True) { \ -+ if (*p == c) return p; \ -+ if (*p == 0) return NULL; \ -+ p++; \ -+ } \ -+ } -+ -+#if defined(VGO_linux) -+ WCSCHR(VG_Z_LIBC_SONAME, wcschr) -+#endif -+/*---------------------- wcsrchr ----------------------*/ -+ -+// This is a wchar_t equivalent to strrchr. We don't -+// have wchar_t available here, but in the GNU C Library -+// wchar_t is always 32 bits wide. -+ -+#define WCSRCHR(soname, fnname) \ -+ Int* VG_REPLACE_FUNCTION_EZU(20410,soname,fnname)( const Int* s, Int c ); \ -+ Int* VG_REPLACE_FUNCTION_EZU(20410,soname,fnname)( const Int* s, Int c ) \ -+ { \ -+ Int* p = (Int*) s; \ -+ Int* last = NULL; \ -+ while (True) { \ -+ if (*p == c) last = p; \ -+ if (*p == 0) return last; \ -+ p++; \ -+ } \ -+ } -+ -+#if defined(VGO_linux) -+ WCSRCHR(VG_Z_LIBC_SONAME, wcsrchr) -+#endif -+ - /*------------------------------------------------------------*/ - /*--- Improve definedness checking of process environment ---*/ - /*------------------------------------------------------------*/ -Index: valgrind/memcheck/tests/Makefile.am -=================================================================== ---- valgrind/memcheck/tests/Makefile.am (revision 13016) -+++ valgrind/memcheck/tests/Makefile.am (working copy) -@@ -216,6 +217,7 @@ - vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \ - vcpu_fnfns.stdout.exp vcpu_fnfns.stdout.exp-glibc28-amd64 \ - vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \ -+ wcs.vgtest wcs.stderr.exp \ - wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \ - wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \ - wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \ -@@ -292,6 +294,7 @@ - varinfo1 varinfo2 varinfo3 varinfo4 \ - varinfo5 varinfo5so.so varinfo6 \ - vcpu_fbench vcpu_fnfns \ -+ wcs \ - xml1 \ - wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \ - writev1 -Index: valgrind/memcheck/tests/wcs.c -=================================================================== ---- valgrind/memcheck/tests/wcs.c (revision 0) -+++ valgrind/memcheck/tests/wcs.c (working copy) -@@ -0,0 +1,29 @@ -+// Uses various wchar_t * functions that have hand written SSE assembly -+// implementations in glibc. wcslen, wcscpy, wcscmp, wcsrchr, wcschr. -+ -+#include -+#include -+#include -+ -+int main(int argc, char **argv) -+{ -+ wchar_t a[] = L"The spazzy orange tiger jumped over the tawny jaguar."; -+ wchar_t *b, *c; -+ wchar_t *d, *e; -+ -+ size_t l = wcslen (a); -+ fprintf (stderr, "wcslen: %zd\n", l); // wcslen: 53 -+ -+ b = (wchar_t *) malloc((l + 1) * sizeof (wchar_t)); -+ c = wcscpy (b, a); -+ -+ fprintf (stderr, "wcscmp equal: %d\n", wcscmp (a, b)); // wcscmp equal: 0 -+ -+ d = wcsrchr (a, L'd'); -+ e = wcschr (a, L'd'); -+ -+ fprintf (stderr, "wcsrchr == wcschr: %d\n", d == e); // wcsrchr == wcschr: 1 -+ -+ free (c); // b == c -+ return 0; -+} -Index: valgrind/memcheck/tests/wcs.stderr.exp -=================================================================== ---- valgrind/memcheck/tests/wcs.stderr.exp (revision 0) -+++ valgrind/memcheck/tests/wcs.stderr.exp (working copy) -@@ -0,0 +1,3 @@ -+wcslen: 53 -+wcscmp equal: 0 -+wcsrchr == wcschr: 1 -Index: valgrind/memcheck/tests/wcs.vgtest -=================================================================== ---- valgrind/memcheck/tests/wcs.vgtest (revision 0) -+++ valgrind/memcheck/tests/wcs.vgtest (working copy) -@@ -0,0 +1,2 @@ -+prog: wcs -+vgopts: -q ---- valgrind-3.8.1/memcheck/tests/Makefile.in.orig 2012-10-04 22:27:31.879093431 +0200 -+++ valgrind-3.8.1/memcheck/tests/Makefile.in 2012-10-04 22:28:55.381301338 +0200 -@@ -114,7 +114,7 @@ - unit_oset$(EXEEXT) varinfo1$(EXEEXT) varinfo2$(EXEEXT) \ - varinfo3$(EXEEXT) varinfo4$(EXEEXT) varinfo5$(EXEEXT) \ - varinfo5so.so$(EXEEXT) varinfo6$(EXEEXT) vcpu_fbench$(EXEEXT) \ -- vcpu_fnfns$(EXEEXT) xml1$(EXEEXT) wrap1$(EXEEXT) \ -+ vcpu_fnfns$(EXEEXT) wcs$(EXEEXT) xml1$(EXEEXT) wrap1$(EXEEXT) \ - wrap2$(EXEEXT) wrap3$(EXEEXT) wrap4$(EXEEXT) wrap5$(EXEEXT) \ - wrap6$(EXEEXT) wrap7$(EXEEXT) wrap7so.so$(EXEEXT) \ - wrap8$(EXEEXT) writev1$(EXEEXT) $(am__EXEEXT_1) -@@ -530,6 +530,9 @@ - vcpu_fnfns_DEPENDENCIES = - vcpu_fnfns_LINK = $(CCLD) $(vcpu_fnfns_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -+wcs_SOURCES = wcs.c -+wcs_OBJECTS = wcs.$(OBJEXT) -+wcs_LDADD = $(LDADD) - wrap1_SOURCES = wrap1.c - wrap1_OBJECTS = wrap1.$(OBJEXT) - wrap1_LDADD = $(LDADD) -@@ -610,9 +613,9 @@ - suppfree.c test-plo.c trivialleak.c unit_libcbase.c \ - unit_oset.c varinfo1.c varinfo2.c varinfo3.c varinfo4.c \ - $(varinfo5_SOURCES) $(varinfo5so_so_SOURCES) varinfo6.c \ -- vcpu_fbench.c vcpu_fnfns.c wrap1.c wrap2.c wrap3.c wrap4.c \ -- wrap5.c wrap6.c $(wrap7_SOURCES) $(wrap7so_so_SOURCES) wrap8.c \ -- writev1.c xml1.c -+ vcpu_fbench.c vcpu_fnfns.c wcs.c wrap1.c wrap2.c wrap3.c \ -+ wrap4.c wrap5.c wrap6.c $(wrap7_SOURCES) $(wrap7so_so_SOURCES) \ -+ wrap8.c writev1.c xml1.c - DIST_SOURCES = accounting.c addressable.c atomic_incs.c badaddrvalue.c \ - badfree.c badjump.c badjump2.c badloop.c badpoll.c badrw.c \ - big_blocks_freed_list.c brk2.c buflen_check.c bug287260.c \ -@@ -641,9 +644,9 @@ - suppfree.c test-plo.c trivialleak.c unit_libcbase.c \ - unit_oset.c varinfo1.c varinfo2.c varinfo3.c varinfo4.c \ - $(varinfo5_SOURCES) $(varinfo5so_so_SOURCES) varinfo6.c \ -- vcpu_fbench.c vcpu_fnfns.c wrap1.c wrap2.c wrap3.c wrap4.c \ -- wrap5.c wrap6.c $(wrap7_SOURCES) $(wrap7so_so_SOURCES) wrap8.c \ -- writev1.c xml1.c -+ vcpu_fbench.c vcpu_fnfns.c wcs.c wrap1.c wrap2.c wrap3.c \ -+ wrap4.c wrap5.c wrap6.c $(wrap7_SOURCES) $(wrap7so_so_SOURCES) \ -+ wrap8.c writev1.c xml1.c - RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ -@@ -1142,6 +1145,7 @@ - vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \ - vcpu_fnfns.stdout.exp vcpu_fnfns.stdout.exp-glibc28-amd64 \ - vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \ -+ wcs.vgtest wcs.stderr.exp \ - wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \ - wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \ - wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \ -@@ -1629,6 +1633,9 @@ - vcpu_fnfns$(EXEEXT): $(vcpu_fnfns_OBJECTS) $(vcpu_fnfns_DEPENDENCIES) - @rm -f vcpu_fnfns$(EXEEXT) - $(vcpu_fnfns_LINK) $(vcpu_fnfns_OBJECTS) $(vcpu_fnfns_LDADD) $(LIBS) -+wcs$(EXEEXT): $(wcs_OBJECTS) $(wcs_DEPENDENCIES) -+ @rm -f wcs$(EXEEXT) -+ $(LINK) $(wcs_OBJECTS) $(wcs_LDADD) $(LIBS) - wrap1$(EXEEXT): $(wrap1_OBJECTS) $(wrap1_DEPENDENCIES) - @rm -f wrap1$(EXEEXT) - $(LINK) $(wrap1_OBJECTS) $(wrap1_LDADD) $(LIBS) -@@ -1784,6 +1791,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varinfo6-varinfo6.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcpu_fbench-vcpu_fbench.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcpu_fnfns-vcpu_fnfns.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrap1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrap2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrap3.Po@am__quote@ diff --git a/valgrind-3.8.1-x86-backtrace.patch b/valgrind-3.8.1-x86-backtrace.patch deleted file mode 100644 index 17ff658..0000000 --- a/valgrind-3.8.1-x86-backtrace.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- valgrind/coregrind/m_stacktrace.c.jj 2012-08-05 18:04:16.000000000 +0200 -+++ valgrind/coregrind/m_stacktrace.c 2012-08-10 12:13:46.069797051 +0200 -@@ -149,11 +149,23 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId - /* Try to derive a new (ip,sp,fp) triple from the current - set. */ - -- /* On x86, first try the old-fashioned method of following the -- %ebp-chain. Code which doesn't use this (that is, compiled -- with -fomit-frame-pointer) is not ABI compliant and so -- relatively rare. Besides, trying the CFI first almost always -- fails, and is expensive. */ -+ /* On x86 GCC 4.6 and later now defaults to -fomit-frame-pointer -+ together with emitting unwind info (-fasynchronous-unwind-tables). -+ So, try CF info first. */ -+ if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) { -+ if (0 == uregs.xip || 1 == uregs.xip) break; -+ if (sps) sps[i] = uregs.xsp; -+ if (fps) fps[i] = uregs.xbp; -+ ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */ -+ if (debug) -+ VG_(printf)(" ipsC[%d]=0x%08lx\n", i-1, ips[i-1]); -+ uregs.xip = uregs.xip - 1; -+ /* as per comment at the head of this loop */ -+ continue; -+ } -+ -+ /* And only then the old-fashioned method of following the -+ %ebp-chain. */ - /* Deal with frames resulting from functions which begin "pushl% - ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */ - if (fp_min <= uregs.xbp && -@@ -179,20 +191,6 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId - uregs.xip = uregs.xip - 1; - /* as per comment at the head of this loop */ - continue; -- } -- -- /* That didn't work out, so see if there is any CF info to hand -- which can be used. */ -- if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) { -- if (0 == uregs.xip || 1 == uregs.xip) break; -- if (sps) sps[i] = uregs.xsp; -- if (fps) fps[i] = uregs.xbp; -- ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */ -- if (debug) -- VG_(printf)(" ipsC[%d]=0x%08lx\n", i-1, ips[i-1]); -- uregs.xip = uregs.xip - 1; -- /* as per comment at the head of this loop */ -- continue; - } - - /* And, similarly, try for MSVC FPO unwind info. */ diff --git a/valgrind-3.8.1-x86_amd64_features-avx.patch b/valgrind-3.8.1-x86_amd64_features-avx.patch deleted file mode 100644 index 49ba8bd..0000000 --- a/valgrind-3.8.1-x86_amd64_features-avx.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- valgrind/tests/x86_amd64_features.c 2012-07-11 15:30:47.564508460 +0200 -+++ valgrind/tests/x86_amd64_features.c 2012-09-23 21:21:40.826638636 +0200 -@@ -123,7 +123,7 @@ - cmask = 1 << 20; - } else if ( strcmp( cpu, "amd64-avx" ) == 0 ) { - level = 1; -- cmask = (1 << 20) | (1 << 28); -+ cmask = (1 << 27) | (1 << 28); /* osxsave and avx */ - require_xgetbv = True; - #endif - } else { diff --git a/valgrind-3.8.1-xaddb.patch b/valgrind-3.8.1-xaddb.patch deleted file mode 100644 index f15213d..0000000 --- a/valgrind-3.8.1-xaddb.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- valgrind/VEX/priv/guest_amd64_toIR.c.jj 2012-10-16 09:53:54.000000000 +0200 -+++ valgrind/VEX/priv/guest_amd64_toIR.c 2012-10-16 11:06:26.007515653 +0200 -@@ -20117,6 +20117,14 @@ Long dis_ESC_0F ( - delta = dis_movx_E_G ( vbi, pfx, delta, 2, sz, True ); - return delta; - -+ case 0xC0: { /* XADD Gb,Eb */ -+ Bool decode_OK = False; -+ delta = dis_xadd_G_E ( &decode_OK, vbi, pfx, 1, delta ); -+ if (!decode_OK) -+ goto decode_failure; -+ return delta; -+ } -+ - case 0xC1: { /* XADD Gv,Ev */ - Bool decode_OK = False; - delta = dis_xadd_G_E ( &decode_OK, vbi, pfx, sz, delta ); -@@ -26992,14 +27000,6 @@ DisResult disInstr_AMD64_WRK ( - - /* =-=-=-=-=-=-=-=-=- XADD -=-=-=-=-=-=-=-=-=-= */ - -- case 0xC0: { /* XADD Gb,Eb */ -- Bool decode_OK = False; -- delta = dis_xadd_G_E ( &decode_OK, vbi, pfx, 1, delta ); -- if (!decode_OK) -- goto decode_failure; -- break; -- } -- - /* =-=-=-=-=-=-=-=-=- SGDT and SIDT =-=-=-=-=-=-=-=-=-=-= */ - - /* =-=-=-=-=-=-=-=-=- unimp2 =-=-=-=-=-=-=-=-=-=-= */ diff --git a/valgrind-3.8.1-zero-size-sections.patch b/valgrind-3.8.1-zero-size-sections.patch deleted file mode 100644 index f0a7928..0000000 --- a/valgrind-3.8.1-zero-size-sections.patch +++ /dev/null @@ -1,216 +0,0 @@ -commit abe8793d216293af960a0334401795bf74945705 -Author: sewardj -Date: Thu Nov 8 15:45:16 2012 +0000 - - Ignore ELF sections that have zero size. Fixes #309600. - (Dragos Tatulea, dragos.tatulea@gmail.com) - - - - git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13109 a5019735-40e9-0310-863c-91ae7b9d1cf9 - -diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c -index d78dc7a..2d08b67 100644 ---- a/coregrind/m_debuginfo/readelf.c -+++ b/coregrind/m_debuginfo/readelf.c -@@ -1713,7 +1713,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - UChar* name = shdr_strtab_img + shdr->sh_name; - Addr svma = shdr->sh_addr; - OffT foff = shdr->sh_offset; -- UWord size = shdr->sh_size; -+ UWord size = shdr->sh_size; /* Do not change this to be signed. */ - UInt alyn = shdr->sh_addralign; - Bool bits = !(shdr->sh_type == SHT_NOBITS); - /* Look through our collection of info obtained from the PT_LOAD -@@ -1754,6 +1754,12 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - goto out; - } - -+ /* Ignore zero sized sections. */ -+ if (size == 0) { -+ TRACE_SYMTAB("zero sized section \"%s\", ignoring\n", name); -+ continue; -+ } -+ - # define BAD(_secname) \ - do { ML_(symerr)(di, True, \ - "Can't make sense of " _secname \ -@@ -1770,7 +1776,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .text where mapped as rx (code), even if zero-sized */ - if (0 == VG_(strcmp)(name, ".text")) { -- if (inrx && size >= 0 && !di->text_present) { -+ if (inrx && !di->text_present) { - di->text_present = True; - di->text_svma = svma; - di->text_avma = svma + inrx->bias; -@@ -1792,7 +1798,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .data where mapped as rw (data), even if zero-sized */ - if (0 == VG_(strcmp)(name, ".data")) { -- if (inrw && size >= 0 && !di->data_present) { -+ if (inrw && !di->data_present) { - di->data_present = True; - di->data_svma = svma; - di->data_avma = svma + inrw->bias; -@@ -1814,7 +1820,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .sdata where mapped as rw (data) */ - if (0 == VG_(strcmp)(name, ".sdata")) { -- if (inrw && size > 0 && !di->sdata_present) { -+ if (inrw && !di->sdata_present) { - di->sdata_present = True; - di->sdata_svma = svma; - di->sdata_avma = svma + inrw->bias; -@@ -1836,7 +1842,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .rodata where mapped as rx (data), even if zero-sized */ - if (0 == VG_(strcmp)(name, ".rodata")) { -- if (inrx && size >= 0 && !di->rodata_present) { -+ if (inrx && !di->rodata_present) { - di->rodata_present = True; - di->rodata_svma = svma; - di->rodata_avma = svma + inrx->bias; -@@ -1858,7 +1864,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - } - - if (0 == VG_(strcmp)(name, ".dynbss")) { -- if (inrw && size > 0 && !di->bss_present) { -+ if (inrw && !di->bss_present) { - dynbss_present = True; - di->bss_present = True; - di->bss_svma = svma; -@@ -1879,7 +1885,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .bss where mapped as rw (data), even if zero-sized */ - if (0 == VG_(strcmp)(name, ".bss")) { -- if (inrw && size > 0 && dynbss_present) { -+ if (inrw && dynbss_present) { - vg_assert(di->bss_present); - dynbss_present = False; - vg_assert(di->bss_svma + di->bss_size == svma); -@@ -1891,7 +1897,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - TRACE_SYMTAB("acquiring .bss bias = %#lx\n", di->bss_bias); - } else - -- if (inrw && size >= 0 && !di->bss_present) { -+ if (inrw && !di->bss_present) { - di->bss_present = True; - di->bss_svma = svma; - di->bss_avma = svma + inrw->bias; -@@ -1909,7 +1915,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - } else - - /* Now one from the wtf?! department ... */ -- if (inrx && (!inrw) && size >= 0 && !di->bss_present) { -+ if (inrx && (!inrw) && !di->bss_present) { - /* File contains a .bss, but it got mapped as rx only. - This is very strange. For now, just pretend we didn't - see it :-) */ -@@ -1930,7 +1936,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - } - } else - -- if ((!inrw) && (!inrx) && size >= 0 && !di->bss_present) { -+ if ((!inrw) && (!inrx) && !di->bss_present) { - /* File contains a .bss, but it didn't get mapped. Ignore. */ - di->bss_present = False; - di->bss_svma = 0; -@@ -1943,7 +1949,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - } - - if (0 == VG_(strcmp)(name, ".sdynbss")) { -- if (inrw && size >= 0 && !di->sbss_present) { -+ if (inrw && !di->sbss_present) { - sdynbss_present = True; - di->sbss_present = True; - di->sbss_svma = svma; -@@ -1964,7 +1970,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .sbss where mapped as rw (data) */ - if (0 == VG_(strcmp)(name, ".sbss")) { -- if (inrw && size > 0 && sdynbss_present) { -+ if (inrw && sdynbss_present) { - vg_assert(di->sbss_present); - sdynbss_present = False; - vg_assert(di->sbss_svma + di->sbss_size == svma); -@@ -1976,7 +1982,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", di->sbss_bias); - } else - -- if (inrw && size > 0 && !di->sbss_present) { -+ if (inrw && !di->sbss_present) { - di->sbss_present = True; - di->sbss_svma = svma; - di->sbss_avma = svma + inrw->bias; -@@ -1998,7 +2004,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .got where mapped as rw (data) */ - if (0 == VG_(strcmp)(name, ".got")) { -- if (inrw && size > 0 && !di->got_present) { -+ if (inrw && !di->got_present) { - di->got_present = True; - di->got_avma = svma + inrw->bias; - di->got_size = size; -@@ -2010,7 +2016,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .got.plt where mapped as rw (data) */ - if (0 == VG_(strcmp)(name, ".got.plt")) { -- if (inrw && size > 0 && !di->gotplt_present) { -+ if (inrw && !di->gotplt_present) { - di->gotplt_present = True; - di->gotplt_avma = svma + inrw->bias; - di->gotplt_size = size; -@@ -2026,7 +2032,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - || defined(VGP_mips32_linux) - /* Accept .plt where mapped as rx (code) */ - if (0 == VG_(strcmp)(name, ".plt")) { -- if (inrx && size > 0 && !di->plt_present) { -+ if (inrx && !di->plt_present) { - di->plt_present = True; - di->plt_avma = svma + inrx->bias; - di->plt_size = size; -@@ -2038,7 +2044,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - # elif defined(VGP_ppc32_linux) - /* Accept .plt where mapped as rw (data) */ - if (0 == VG_(strcmp)(name, ".plt")) { -- if (inrw && size > 0 && !di->plt_present) { -+ if (inrw && !di->plt_present) { - di->plt_present = True; - di->plt_avma = svma + inrw->bias; - di->plt_size = size; -@@ -2050,7 +2056,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - # elif defined(VGP_ppc64_linux) - /* Accept .plt where mapped as rw (data), or unmapped */ - if (0 == VG_(strcmp)(name, ".plt")) { -- if (inrw && size > 0 && !di->plt_present) { -+ if (inrw && !di->plt_present) { - di->plt_present = True; - di->plt_avma = svma + inrw->bias; - di->plt_size = size; -@@ -2073,7 +2079,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - - /* Accept .opd where mapped as rw (data) */ - if (0 == VG_(strcmp)(name, ".opd")) { -- if (inrw && size > 0 && !di->opd_present) { -+ if (inrw && !di->opd_present) { - di->opd_present = True; - di->opd_avma = svma + inrw->bias; - di->opd_size = size; -@@ -2088,14 +2094,14 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) - rw (data) instead. We can handle up to N_EHFRAME_SECTS per - ELF object. */ - if (0 == VG_(strcmp)(name, ".eh_frame")) { -- if (inrx && size > 0 && di->n_ehframe < N_EHFRAME_SECTS) { -+ if (inrx && di->n_ehframe < N_EHFRAME_SECTS) { - di->ehframe_avma[di->n_ehframe] = svma + inrx->bias; - di->ehframe_size[di->n_ehframe] = size; - TRACE_SYMTAB("acquiring .eh_frame avma = %#lx\n", - di->ehframe_avma[di->n_ehframe]); - di->n_ehframe++; - } else -- if (inrw && size > 0 && di->n_ehframe < N_EHFRAME_SECTS) { -+ if (inrw && di->n_ehframe < N_EHFRAME_SECTS) { - di->ehframe_avma[di->n_ehframe] = svma + inrw->bias; - di->ehframe_size[di->n_ehframe] = size; - TRACE_SYMTAB("acquiring .eh_frame avma = %#lx\n", diff --git a/valgrind-3.9.0-cachegrind-improvements.patch b/valgrind-3.9.0-cachegrind-improvements.patch new file mode 100644 index 0000000..3432c55 --- /dev/null +++ b/valgrind-3.9.0-cachegrind-improvements.patch @@ -0,0 +1,54 @@ +--- valgrind-3.8.1/cachegrind/cg_sim.c.jj 2011-10-26 23:24:32.000000000 +0200 ++++ valgrind-3.8.1/cachegrind/cg_sim.c 2011-12-09 17:31:19.256023683 +0100 +@@ -42,27 +42,30 @@ typedef struct { + Int size; /* bytes */ + Int assoc; + Int line_size; /* bytes */ +- Int sets; + Int sets_min_1; + Int line_size_bits; + Int tag_shift; +- HChar desc_line[128]; + UWord* tags; +-} cache_t2; ++ HChar 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->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", +@@ -72,11 +75,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), sets * c->assoc); + } + + /* This attribute forces GCC to inline the function, getting rid of a diff --git a/valgrind-3.9.0-config_h.patch b/valgrind-3.9.0-config_h.patch new file mode 100644 index 0000000..47a498f --- /dev/null +++ b/valgrind-3.9.0-config_h.patch @@ -0,0 +1,11 @@ +--- valgrind/include/pub_tool_basics.h.jj 2011-10-26 23:24:32.000000000 +0200 ++++ valgrind/include/pub_tool_basics.h 2011-12-09 17:42:50.828630546 +0100 +@@ -297,7 +297,7 @@ static inline Bool sr_EQ ( SysRes sr1, S + #define VG_BUGS_TO "www.valgrind.org" + + /* Branch prediction hints. */ +-#if defined(__GNUC__) ++#if defined(__GNUC__) && (__GNUC__ >= 3) + # define LIKELY(x) __builtin_expect(!!(x), 1) + # define UNLIKELY(x) __builtin_expect(!!(x), 0) + #else diff --git a/valgrind-3.9.0-helgrind-race-supp.patch b/valgrind-3.9.0-helgrind-race-supp.patch new file mode 100644 index 0000000..759d151 --- /dev/null +++ b/valgrind-3.9.0-helgrind-race-supp.patch @@ -0,0 +1,15 @@ +--- valgrind/glibc-2.34567-NPTL-helgrind.supp.jj 2009-08-19 15:37:48.000000000 +0200 ++++ valgrind/glibc-2.34567-NPTL-helgrind.supp 2009-10-21 16:46:31.000000000 +0200 +@@ -88,6 +88,12 @@ + obj:*/lib*/libpthread-2.*so* + } + { ++ helgrind-glibc2X-102a ++ Helgrind:Race ++ fun:mythread_wrapper ++ obj:*vgpreload_helgrind*.so ++} ++{ + helgrind-glibc2X-103 + Helgrind:Race + fun:pthread_cond_*@@GLIBC_2.* diff --git a/valgrind-3.9.0-stat_h.patch b/valgrind-3.9.0-stat_h.patch new file mode 100644 index 0000000..628dd79 --- /dev/null +++ b/valgrind-3.9.0-stat_h.patch @@ -0,0 +1,48 @@ +--- valgrind/include/vki/vki-amd64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-amd64-linux.h 2010-01-20 04:41:52.662552000 -0500 +@@ -328,6 +328,9 @@ struct vki_stat { + long st_blksize; + long st_blocks; /* Number 512-byte blocks allocated. */ + ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- valgrind/include/vki/vki-x86-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-x86-linux.h 2010-01-20 04:42:19.649995000 -0500 +@@ -366,6 +366,9 @@ struct vki_stat { + unsigned long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- valgrind/include/vki/vki-ppc32-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-ppc32-linux.h 2010-01-20 04:42:44.861651000 -0500 +@@ -410,6 +410,9 @@ struct vki_stat { + long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- valgrind/include/vki/vki-ppc64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-ppc64-linux.h 2010-01-20 04:43:05.579922000 -0500 +@@ -446,6 +446,9 @@ struct vki_stat { + long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; diff --git a/valgrind.spec b/valgrind.spec index eb1a5b1..11b9b1d 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -2,200 +2,35 @@ Summary: Tool for finding memory management bugs in programs Name: %{?scl_prefix}valgrind -Version: 3.8.1 -Release: 31%{?dist} +Version: 3.9.0 +Release: 0.1.TEST1%{?dist} Epoch: 1 -License: GPLv2 +License: GPLv2+ URL: http://www.valgrind.org/ Group: Development/Debuggers # Only necessary for RHEL, will be ignored on Fedora BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2 +Source0: http://www.valgrind.org/downloads/valgrind-%{version}.TEST1.tar.bz2 -Patch1: valgrind-3.8.1-cachegrind-improvements.patch - -# KDE#307103 - sys_openat If pathname is absolute, then dirfd is ignored. -Patch2: valgrind-3.8.1-openat.patch +# Needs investigation and pushing upstrea +Patch1: valgrind-3.9.0-cachegrind-improvements.patch # KDE#211352 - helgrind races in helgrind's own mythread_wrapper -Patch3: valgrind-3.8.1-helgrind-race-supp.patch +Patch2: valgrind-3.9.0-helgrind-race-supp.patch -Patch4: valgrind-3.8.1-stat_h.patch +# undef st_atime, st_mtime and st_ctime. Unknown why this is (still?) needed. +Patch3: valgrind-3.9.0-stat_h.patch # Support really ancient gcc. Check __GNUC__ >= 3 for __builtin_expect. -Patch5: valgrind-3.8.1-config_h.patch - -# KDE#307101 - sys_capget second argument can be NULL -Patch6: valgrind-3.8.1-capget.patch - -# KDE#263034 - Crash when loading some PPC64 binaries -Patch7: valgrind-3.8.1-pie.patch - -# configure detection change from armv7* to armv[57]*. -Patch8: valgrind-3.8.1-enable-armv5.patch - -Patch9: valgrind-3.8.1-ldso-supp.patch - -# On x86 GCC 4.6 and later now defaults to -fomit-frame-pointer -# together with emitting unwind info (-fasynchronous-unwind-tables). -# So, try CF info first. -Patch10: valgrind-3.8.1-x86-backtrace.patch +Patch4: valgrind-3.9.0-config_h.patch -# KDE#305431 - Use find_buildid shdr fallback for separate .debug files -Patch11: valgrind-3.8.1-find-buildid.patch - -# KDE#305513 - Fix readdwarf.c read_unitinfo_dwarf2 abbrev reading -Patch12: valgrind-3.8.1-abbrev-parsing.patch - -# KDE#307038 - DWARF2 CFI reader: unhandled DW_OP_ opcode 0x8 (DW_OP_const1u) -Patch13: valgrind-3.8.1-cfi_dw_ops.patch +# Make ld.so supressions slightly less specific. +Patch5: valgrind-3.8.1-ldso-supp.patch # On some ppc64 installs these test just hangs -Patch14: valgrind-3.8.1-gdbserver_tests-mcinvoke-ppc64.patch - -# KDE#307285 - x86_amd64 feature test for avx in test suite is wrong -# Should test OSXSAVE first before executing XGETBV. -Patch15: valgrind-3.8.1-x86_amd64_features-avx.patch - -# KDE#307155 - gdbserver_tests/filter_gdb should filter out syscall-template.S -# This is only a real issue when glibc-debuginfo is installed. -Patch16: valgrind-3.8.1-gdbserver_tests-syscall-template-source.patch - -# KDE#307290 - memcheck overlap testcase needs memcpy version filter -Patch17: valgrind-3.8.1-overlap_memcpy_filter.patch -# Note: Need to make memcheck/tests/filter_memcpy executable - -# KDE#307729 - pkgconfig support broken valgrind.pc -# valt_load_address=@VALT_LOAD_ADDRESS@ -Patch18: valgrind-3.8.1-pkg-config.patch - -# KDE#253519 - Memcheck reports auxv pointer accesses as invalid reads. -Patch19: valgrind-3.8.1-proc-auxv.patch - -# KDE#307828 - SSE optimized wcscpy, wcscmp, wcsrchr and wcschr trigger -# uninitialised value and/or invalid read warnings -Patch20: valgrind-3.8.1-wcs.patch - -# KDE#305728 - Add support for AVX2, BMI1, BMI2 and FMA instructions -# Combined patch for: -# - valgrind-avx2-1.patch -# - valgrind-avx2-2.patch -# - valgrind-avx2-3.patch -# - valgrind-avx2-4.patch -# - valgrind-bmi-1.patch -# - valgrind-bmi-2.patch -# - valgrind-bmi-3.patch -# - valgrind-fma-1.patch -# - valgrind-memcheck-avx2-bmi-fma.patch -# - valgrind-vmaskmov-load.patch -# - valgrind-avx2-5.patch -# - valgrind-bmi-4.patch -# - valgrind-avx2-bmi-fma-tests.tar.bz2 -# -# NOTE: Need to touch empty files from tar file: -# ./none/tests/amd64/avx2-1.stderr.exp -# ./none/tests/amd64/fma.stderr.exp -# ./none/tests/amd64/bmi.stderr.exp -Patch21: valgrind-3.8.1-avx2-bmi-fma.patch.gz -# Small fixup for above patch, just a configure check. -# This is equivalent to valgrind-bmi-5.patch from KDE#305728 -Patch22: valgrind-3.8.1-bmi-conf-check.patch -# Partial backport of upstream revision 12884 without it AVX2 VPBROADCASTB -# insn is broken under memcheck. -Patch23: valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch -# vgtest files should prereq that the binary is there (for old binutils). -Patch24: valgrind-3.8.1-avx2-prereq.patch - -# KDE#308321 - testsuite memcheck filter interferes with gdb_filter -Patch25: valgrind-3.8.1-filter_gdb.patch - -# KDE#308341 - vgdb should report process exit (or fatal signal) -Patch26: valgrind-3.8.1-gdbserver_exit.patch - -# KDE#164485 - VG_N_SEGNAMES and VG_N_SEGMENTS are (still) too small -Patch27: valgrind-3.8.1-aspacemgr_VG_N_SEGs.patch - -# KDE#308427 - s390 memcheck reports tsearch conditional jump or move -# depends on uninitialized value [workaround, suppression] -Patch28: valgrind-3.8.1-s390_tsearch_supp.patch - -# KDE#307106 - unhandled instruction bytes: f0 0f c0 02 (lock xadd) -Patch29: valgrind-3.8.1-xaddb.patch - -# KDE#309427 - SSE optimized stpncpy trigger uninitialised value -Patch30: valgrind-3.8.1-stpncpy.patch - -# KDE#308573 - Internal Valgrind error on 64-bit instruction executed -# in 32-bit mode -Patch31: valgrind-3.8.1-ppc-32-mode-64-bit-instr.patch - -# KDE#309425 - Provide a --sigill-diagnostics flag to suppress -# illegal instruction reporting -Patch32: valgrind-3.8.1-sigill_diag.patch - -# Allow building against glibc-2.17. Upstream commit svn 13228. -# Allow building against glibc-2.18. Upstream commit svn 13504. -Patch33: valgrind-3.8.1-glibc-2.17-18.patch - -# KDE#315441 - sendmsg syscall should ignore unset msghdr msg_flags -Patch34: valgrind-3.8.1-sendmsg-flags.patch - -# KDE#308886 - Missing support for PTRACE_SET/GETREGSET -Patch35: valgrind-3.8.1-ptrace-setgetregset.patch - -# KDE#310424 - --read-var-info does not properly describe static variables -Patch36: valgrind-3.8.1-static-variables.patch - -# KDE#316144, KDE#315959, KDE#316145 - various manpage fixes -Patch37: valgrind-3.8.1-manpages.patch - -# KDE#317091 Use -Wl,-Ttext-segment when static linking to keep build-ids -Patch38: valgrind-3.8.1-text-segment.patch - -# svn revisions 13348 and 13349 -Patch39: valgrind-3.8.1-regtest-fixlets.patch - -# KDE#309600 - valgrind is a bit confused about 0-sized sections -Patch40: valgrind-3.8.1-zero-size-sections.patch - -# KDE#289360 - parse_type_DIE confused by DW_TAG_enumeration_type -Patch41: valgrind-3.8.1-dwarf-anon-enum.patch - -# KDE#321969 - Support [lf]setxattr on ppc32 and ppc64 linux kernel -Patch42: valgrind-3.8.1-ppc-setxattr.patch - -# KDE#321730 Add cg_merge and cg_diff man pages -# KDE#321738 Add manpages for vgdb and valgrind-listener -Patch43: valgrind-3.8.1-new-manpages.patch - -# KDE#320063 Support PTRACE_GET/SET_THREAD_AREA on x86. -Patch44: valgrind-3.8.1-ptrace-thread-area.patch - -# KDE#320116 Support Linux kernel AF_BLUETOOTH for bind() -Patch45: valgrind-3.8.1-af-bluetooth.patch - -# Don't include linux/ptrace.h. Upstream commits r13471 and r13482. -Patch46: valgrind-3.8.1-ptrace-include-configure.patch - -# KDE#322294 Initial ISA 2.07 support for POWER8-tuned libc. -Patch47: valgrind-3.8.1-initial-power-isa-207.patch - -# KDE#323116 Deprecation of some ISA 2.05 POWER6 instructions. -Patch48: valgrind-3.8.1-power-isa-205-deprecation.patch - -# KDE#310931 message-security assist instruction extension not implemented -Patch49: valgrind-3.8.1-s390-STFLE.patch - -# KDE#323713 Support mmxext (integer sse) subset on i386 (athlon) -Patch50: valgrind-3.8.1-mmxext.patch - -# KDE#316503 Implement SSE4 MOVNTDQA insn. -Patch51: valgrind-3.8.1-movntdqa.patch - -# rhbz#1011713 valgrind finds errors in index (workaround till 3.9.0) -Patch52: valgrind-3.8.1-index-supp.patch +Patch6: valgrind-3.8.1-gdbserver_tests-mcinvoke-ppc64.patch %ifarch x86_64 ppc64 @@ -284,7 +119,7 @@ See the section on Debugging MPI Parallel Programs with Valgrind in the Valgrind User Manual for details. %prep -%setup -q %{?scl:-n %{pkg_name}-%{version}} +%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}.TEST1 %patch1 -p1 %patch2 -p1 @@ -292,77 +127,6 @@ Valgrind User Manual for details. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -chmod 755 memcheck/tests/filter_memcpy -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 - -# Add support for AVX2, BMI1, BMI2 and FMA instructions -%patch21 -p1 -touch ./none/tests/amd64/avx2-1.stderr.exp -touch ./none/tests/amd64/fma.stderr.exp -touch ./none/tests/amd64/bmi.stderr.exp -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 - -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%ifarch s390x -%patch28 -p1 -%endif - -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 -touch ./memcheck/tests/linux/getregset.stderr.exp -%patch36 -p1 -%patch37 -p1 -%patch38 -p1 -%patch39 -p1 -%patch40 -p1 -%patch41 -p1 -%patch42 -p1 -%patch43 -p1 -%patch44 -p1 -%patch45 -p1 -%patch46 -p1 -%patch47 -p1 -chmod 755 tests/check_isa-2_07_cap -%patch48 -p1 -%patch49 -p1 -%patch50 -p1 -%patch51 -p1 -%patch52 -p1 - -# These tests go into an endless loop on ARM -# There is a __sync_add_and_fetch in the testcase. -# DRD is doing this trace printing inside the loop -# which causes the reservation (LDREX) to fail so -# it can never make progress. -%ifarch %{arm} -rm -f drd/tests/annotate_trace_memory_xml.vgtest -rm -f drd/tests/annotate_trace_memory.vgtest -%endif - -# To suppress eventual automake warnings/errors -rm -f gdbserver_tests/filter_gdb.orig %build # We need to use the software collection compiler and binutils if available. @@ -419,15 +183,12 @@ int main (int argc, char *const argv[]) EOF gcc $RPM_OPT_FLAGS -o close_fds close_fds.c -# XXX pth_cancel2 hangs on x86_64 -echo 'int main (void) { return 0; }' > none/tests/pth_cancel2.c - %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -mkdir docs.installed -mv $RPM_BUILD_ROOT%{_datadir}/doc/valgrind/* docs.installed/ -rm -f docs.installed/*.ps +mkdir docs/installed +mv $RPM_BUILD_ROOT%{_datadir}/doc/valgrind/* docs/installed/ +rm -f docs/installed/*.ps %if "%{valsecarch}" != "" pushd $RPM_BUILD_ROOT%{_libdir}/valgrind/ @@ -491,7 +252,7 @@ echo ===============END TESTING=============== %files %defattr(-,root,root) %doc COPYING NEWS README_* -%doc docs.installed/html docs.installed/*.pdf +%doc docs/installed/html docs/installed/*.pdf %{_bindir}/* %dir %{_libdir}/valgrind %{_libdir}/valgrind/*[^ao] @@ -513,6 +274,57 @@ echo ===============END TESTING=============== %endif %changelog +* Mon Oct 28 2013 Mark Wielaard - 3.9.0-0.1.TEST1 +- Upgrade to valgrind 3.9.0.TEST1 +- Remove patches that are now upstream: + - valgrind-3.8.1-abbrev-parsing.patch + - valgrind-3.8.1-af-bluetooth.patch + - valgrind-3.8.1-aspacemgr_VG_N_SEGs.patch + - valgrind-3.8.1-avx2-bmi-fma.patch.gz + - valgrind-3.8.1-avx2-prereq.patch + - valgrind-3.8.1-bmi-conf-check.patch + - valgrind-3.8.1-capget.patch + - valgrind-3.8.1-cfi_dw_ops.patch + - valgrind-3.8.1-dwarf-anon-enum.patch + - valgrind-3.8.1-filter_gdb.patch + - valgrind-3.8.1-find-buildid.patch + - valgrind-3.8.1-gdbserver_exit.patch + - valgrind-3.8.1-gdbserver_tests-syscall-template-source.patch + - valgrind-3.8.1-glibc-2.17-18.patch + - valgrind-3.8.1-index-supp.patch + - valgrind-3.8.1-initial-power-isa-207.patch + - valgrind-3.8.1-manpages.patch + - valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch + - valgrind-3.8.1-mmxext.patch + - valgrind-3.8.1-movntdqa.patch + - valgrind-3.8.1-new-manpages.patch + - valgrind-3.8.1-openat.patch + - valgrind-3.8.1-overlap_memcpy_filter.patch + - valgrind-3.8.1-pie.patch + - valgrind-3.8.1-pkg-config.patch + - valgrind-3.8.1-power-isa-205-deprecation.patch + - valgrind-3.8.1-ppc-32-mode-64-bit-instr.patch + - valgrind-3.8.1-ppc-setxattr.patch + - valgrind-3.8.1-proc-auxv.patch + - valgrind-3.8.1-ptrace-include-configure.patch + - valgrind-3.8.1-ptrace-setgetregset.patch + - valgrind-3.8.1-ptrace-thread-area.patch + - valgrind-3.8.1-regtest-fixlets.patch + - valgrind-3.8.1-s390-STFLE.patch + - valgrind-3.8.1-s390_tsearch_supp.patch + - valgrind-3.8.1-sendmsg-flags.patch + - valgrind-3.8.1-sigill_diag.patch + - valgrind-3.8.1-static-variables.patch + - valgrind-3.8.1-stpncpy.patch + - valgrind-3.8.1-text-segment.patch + - valgrind-3.8.1-wcs.patch + - valgrind-3.8.1-x86_amd64_features-avx.patch + - valgrind-3.8.1-xaddb.patch + - valgrind-3.8.1-zero-size-sections.patch +- Remove special case valgrind-3.8.1-enable-armv5.patch. +- Remove valgrind-3.8.1-x86-backtrace.patch, rely on new upstream fp/cfi + try-cache mechanism. + * Mon Oct 14 2013 Mark Wielaard - 3.8.1-31 - Fix multilib issue with HAVE_PTRACE_GETREGS in config.h.