]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove from the active tree; this is of historical interest only now.
authorJulian Seward <jseward@acm.org>
Sun, 25 Nov 2007 14:11:38 +0000 (14:11 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 25 Nov 2007 14:11:38 +0000 (14:11 +0000)
Of course this remains in the repo forever.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7216

50 files changed:
old-helgrind/Makefile.am [deleted file]
old-helgrind/docs/Makefile.am [deleted file]
old-helgrind/docs/hg-manual.xml [deleted file]
old-helgrind/helgrind.h [deleted file]
old-helgrind/hg_main.c [deleted file]
old-helgrind/tests/Makefile.am [deleted file]
old-helgrind/tests/allok.c [deleted file]
old-helgrind/tests/allok.stderr.exp [deleted file]
old-helgrind/tests/allok.vgtest [deleted file]
old-helgrind/tests/deadlock.c [deleted file]
old-helgrind/tests/deadlock.stderr.exp [deleted file]
old-helgrind/tests/deadlock.vgtest [deleted file]
old-helgrind/tests/filter_stderr [deleted file]
old-helgrind/tests/inherit.c [deleted file]
old-helgrind/tests/inherit.stderr.exp [deleted file]
old-helgrind/tests/inherit.vgtest [deleted file]
old-helgrind/tests/race.c [deleted file]
old-helgrind/tests/race.stderr.exp [deleted file]
old-helgrind/tests/race.vgtest [deleted file]
old-helgrind/tests/race2.c [deleted file]
old-helgrind/tests/race2.stderr.exp [deleted file]
old-helgrind/tests/race2.vgtest [deleted file]
old-helgrind/tests/readshared.c [deleted file]
old-helgrind/tests/readshared.stderr.exp [deleted file]
old-helgrind/tests/readshared.vgtest [deleted file]
old-helgrind/tests/toobig-allocs.stderr.exp [deleted file]
old-helgrind/tests/toobig-allocs.vgtest [deleted file]
old-helgrind/tests/x86/Makefile.am [deleted file]
old-helgrind/tests/x86/filter_stderr [deleted file]
old-helgrind/tests/x86/insn_basic.stderr.exp [deleted file]
old-helgrind/tests/x86/insn_basic.stdout.exp [deleted file]
old-helgrind/tests/x86/insn_basic.vgtest [deleted file]
old-helgrind/tests/x86/insn_cmov.stderr.exp [deleted file]
old-helgrind/tests/x86/insn_cmov.stdout.exp [deleted file]
old-helgrind/tests/x86/insn_cmov.vgtest [deleted file]
old-helgrind/tests/x86/insn_fpu.stderr.exp [deleted file]
old-helgrind/tests/x86/insn_fpu.stdout.exp [deleted file]
old-helgrind/tests/x86/insn_fpu.vgtest [deleted file]
old-helgrind/tests/x86/insn_mmx.stderr.exp [deleted file]
old-helgrind/tests/x86/insn_mmx.stdout.exp [deleted file]
old-helgrind/tests/x86/insn_mmx.vgtest [deleted file]
old-helgrind/tests/x86/insn_mmxext.stderr.exp [deleted file]
old-helgrind/tests/x86/insn_mmxext.stdout.exp [deleted file]
old-helgrind/tests/x86/insn_mmxext.vgtest [deleted file]
old-helgrind/tests/x86/insn_sse.stderr.exp [deleted file]
old-helgrind/tests/x86/insn_sse.stdout.exp [deleted file]
old-helgrind/tests/x86/insn_sse.vgtest [deleted file]
old-helgrind/tests/x86/insn_sse2.stderr.exp [deleted file]
old-helgrind/tests/x86/insn_sse2.stdout.exp [deleted file]
old-helgrind/tests/x86/insn_sse2.vgtest [deleted file]

diff --git a/old-helgrind/Makefile.am b/old-helgrind/Makefile.am
deleted file mode 100644 (file)
index 5941600..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-include $(top_srcdir)/Makefile.tool.am
-
-noinst_PROGRAMS = 
-if VGP_X86_LINUX
-noinst_PROGRAMS += helgrind-x86-linux vgpreload_helgrind-x86-linux.so
-endif
-if VGP_AMD64_LINUX
-noinst_PROGRAMS += helgrind-amd64-linux vgpreload_helgrind-amd64-linux.so
-endif
-if VGP_PPC32_LINUX
-noinst_PROGRAMS += helgrind-ppc32-linux vgpreload_helgrind-ppc32-linux.so
-endif
-if VGP_PPC64_LINUX
-noinst_PROGRAMS += helgrind-ppc64-linux vgpreload_helgrind-ppc64-linux.so
-endif
-if VGP_PPC32_AIX5
-noinst_PROGRAMS += helgrind-ppc32-aix5 vgpreload_helgrind-ppc32-aix5.so
-endif
-if VGP_PPC64_AIX5
-noinst_PROGRAMS += helgrind-ppc64-aix5 vgpreload_helgrind-ppc64-aix5.so
-endif
-
-vgpreload_helgrind_x86_linux_so_SOURCES      = 
-vgpreload_helgrind_x86_linux_so_CPPFLAGS     = $(AM_CPPFLAGS_X86_LINUX)
-vgpreload_helgrind_x86_linux_so_CFLAGS       = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC)
-vgpreload_helgrind_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX)
-vgpreload_helgrind_x86_linux_so_LDFLAGS      = \
-       $(PRELOAD_LDFLAGS_X86_LINUX) \
-       $(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX)
-
-vgpreload_helgrind_amd64_linux_so_SOURCES      = 
-vgpreload_helgrind_amd64_linux_so_CPPFLAGS     = $(AM_CPPFLAGS_AMD64_LINUX)
-vgpreload_helgrind_amd64_linux_so_CFLAGS       = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC)
-vgpreload_helgrind_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX)
-vgpreload_helgrind_amd64_linux_so_LDFLAGS      = \
-       $(PRELOAD_LDFLAGS_AMD64_LINUX) \
-       $(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX)
-
-vgpreload_helgrind_ppc32_linux_so_SOURCES      = 
-vgpreload_helgrind_ppc32_linux_so_CPPFLAGS     = $(AM_CPPFLAGS_PPC32_LINUX)
-vgpreload_helgrind_ppc32_linux_so_CFLAGS       = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC)
-vgpreload_helgrind_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX)
-vgpreload_helgrind_ppc32_linux_so_LDFLAGS      = \
-       $(PRELOAD_LDFLAGS_PPC32_LINUX) \
-       $(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX)
-
-vgpreload_helgrind_ppc64_linux_so_SOURCES      = 
-vgpreload_helgrind_ppc64_linux_so_CPPFLAGS     = $(AM_CPPFLAGS_PPC64_LINUX)
-vgpreload_helgrind_ppc64_linux_so_CFLAGS       = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC)
-vgpreload_helgrind_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX)
-vgpreload_helgrind_ppc64_linux_so_LDFLAGS      = \
-       $(PRELOAD_LDFLAGS_PPC64_LINUX) \
-       $(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX)
-
-vgpreload_helgrind_ppc32_aix5_so_SOURCES      = 
-vgpreload_helgrind_ppc32_aix5_so_CPPFLAGS     = $(AM_CPPFLAGS_PPC32_AIX5)
-vgpreload_helgrind_ppc32_aix5_so_CFLAGS       = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC)
-vgpreload_helgrind_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5)
-vgpreload_helgrind_ppc32_aix5_so_LDFLAGS      = \
-       $(PRELOAD_LDFLAGS_PPC32_AIX5) \
-       $(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5)
-
-vgpreload_helgrind_ppc64_aix5_so_SOURCES      = 
-vgpreload_helgrind_ppc64_aix5_so_CPPFLAGS     = $(AM_CPPFLAGS_PPC64_AIX5)
-vgpreload_helgrind_ppc64_aix5_so_CFLAGS       = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC)
-vgpreload_helgrind_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5)
-vgpreload_helgrind_ppc64_aix5_so_LDFLAGS      = \
-       $(PRELOAD_LDFLAGS_PPC64_AIX5) \
-       $(LIBREPLACEMALLOC_LDFLAGS_PPC64_AIX5)
-
-HELGRIND_SOURCES_COMMON = hg_main.c
-
-helgrind_x86_linux_SOURCES      = $(HELGRIND_SOURCES_COMMON)
-helgrind_x86_linux_CPPFLAGS     = $(AM_CPPFLAGS_X86_LINUX)
-helgrind_x86_linux_CFLAGS       = $(AM_CFLAGS_X86_LINUX)
-helgrind_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX)
-helgrind_x86_linux_LDADD        = $(TOOL_LDADD_X86_LINUX)
-helgrind_x86_linux_LDFLAGS      = $(TOOL_LDFLAGS_X86_LINUX)
-
-helgrind_amd64_linux_SOURCES      = $(HELGRIND_SOURCES_COMMON)
-helgrind_amd64_linux_CPPFLAGS     = $(AM_CPPFLAGS_AMD64_LINUX)
-helgrind_amd64_linux_CFLAGS       = $(AM_CFLAGS_AMD64_LINUX)
-helgrind_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX)
-helgrind_amd64_linux_LDADD        = $(TOOL_LDADD_AMD64_LINUX)
-helgrind_amd64_linux_LDFLAGS      = $(TOOL_LDFLAGS_AMD64_LINUX)
-
-helgrind_ppc32_linux_SOURCES      = $(HELGRIND_SOURCES_COMMON)
-helgrind_ppc32_linux_CPPFLAGS     = $(AM_CPPFLAGS_PPC32_LINUX)
-helgrind_ppc32_linux_CFLAGS       = $(AM_CFLAGS_PPC32_LINUX)
-helgrind_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX)
-helgrind_ppc32_linux_LDADD        = $(TOOL_LDADD_PPC32_LINUX)
-helgrind_ppc32_linux_LDFLAGS      = $(TOOL_LDFLAGS_PPC32_LINUX)
-
-helgrind_ppc64_linux_SOURCES      = $(HELGRIND_SOURCES_COMMON)
-helgrind_ppc64_linux_CPPFLAGS     = $(AM_CPPFLAGS_PPC64_LINUX)
-helgrind_ppc64_linux_CFLAGS       = $(AM_CFLAGS_PPC64_LINUX)
-helgrind_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX)
-helgrind_ppc64_linux_LDADD        = $(TOOL_LDADD_PPC64_LINUX)
-helgrind_ppc64_linux_LDFLAGS      = $(TOOL_LDFLAGS_PPC64_LINUX)
-
-helgrind_ppc32_aix5_SOURCES      = $(HELGRIND_SOURCES_COMMON)
-helgrind_ppc32_aix5_CPPFLAGS     = $(AM_CPPFLAGS_PPC32_AIX5)
-helgrind_ppc32_aix5_CFLAGS       = $(AM_CFLAGS_PPC32_AIX5)
-helgrind_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5)
-helgrind_ppc32_aix5_LDADD        = $(TOOL_LDADD_PPC32_AIX5)
-helgrind_ppc32_aix5_LDFLAGS      = $(TOOL_LDFLAGS_PPC32_AIX5)
-
-helgrind_ppc64_aix5_SOURCES      = $(HELGRIND_SOURCES_COMMON)
-helgrind_ppc64_aix5_CPPFLAGS     = $(AM_CPPFLAGS_PPC64_AIX5)
-helgrind_ppc64_aix5_CFLAGS       = $(AM_CFLAGS_PPC64_AIX5)
-helgrind_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5)
-helgrind_ppc64_aix5_LDADD        = $(TOOL_LDADD_PPC64_AIX5)
-helgrind_ppc64_aix5_LDFLAGS      = $(TOOL_LDFLAGS_PPC64_AIX5)
-
-hgincludedir = $(includedir)/valgrind
-
-hginclude_HEADERS = helgrind.h
diff --git a/old-helgrind/docs/Makefile.am b/old-helgrind/docs/Makefile.am
deleted file mode 100644 (file)
index 84f630f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = hg-manual.xml
diff --git a/old-helgrind/docs/hg-manual.xml b/old-helgrind/docs/hg-manual.xml
deleted file mode 100644 (file)
index 3f4cabb..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0"?> <!-- -*- sgml -*- -->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-
-<chapter id="hg-manual" xreflabel="Helgrind: a data-race detector">
-  <title>Helgrind: a data-race detector</title>
-
-<para>To use this tool, you must specify
-<computeroutput>--tool=helgrind</computeroutput> on the Valgrind
-command line.</para>
-
-<para>Note: Helgrind does not work in Valgrind 3.1.0.  We hope
-to reinstate in version 3.2.0.</para>
-
-
-<sect1 id="hg-manual.data-races" xreflabel="Data Races">
-<title>Data Races</title>
-
-<para>Helgrind is a valgrind tool for detecting data races in C and C++
-programs that use the Pthreads library.</para>
-
-<para>It uses the Eraser algorithm described in:
-
- <address>Eraser: A Dynamic Data Race Detector for Multithreaded Programs
-  Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro and Thomas Anderson
-  ACM Transactions on Computer Systems, 15(4):391-411
-  November 1997.
- </address>
-</para>
-
-<para>We also incorporate significant improvements from this paper:
-
- <address>Runtime Checking of Multithreaded Applications with Visual Threads
-  Jerry J. Harrow, Jr.
-  Proceedings of the 7th International SPIN Workshop on Model Checking of Software
-  Stanford, California, USA
-  August 2000
-  LNCS 1885, pp331--342
-  K. Havelund, J. Penix, and W. Visser, editors.
- </address>
-</para>
-
-</sect1>
-
-
-<sect1 id="hg-manual.what-does" xreflabel="What Helgrind Does">
-<title>What Helgrind Does</title>
-
-<para>Basically what Helgrind does is to look for memory
-locations which are accessed by more than one thread.  For each
-such location, Helgrind records which of the program's
-(pthread_mutex_)locks were held by the accessing thread at the
-time of the access.  The hope is to discover that there is indeed
-at least one lock which is used by all threads to protect that
-location.  If no such lock can be found, then there is
-(apparently) no consistent locking strategy being applied for
-that location, and so a possible data race might result.</para>
-
-<para>Helgrind also allows for "thread segment lifetimes".  If
-the execution of two threads cannot overlap -- for example, if
-your main thread waits on another thread with a
-<computeroutput>pthread_join()</computeroutput> operation -- they
-can both access the same variable without holding a lock.</para>
-
-<para>There's a lot of other sophistication in Helgrind, aimed at
-reducing the number of false reports, and at producing useful
-error reports.  We hope to have more documentation one
-day ... </para>
-
-</sect1>
-
-
-
-<sect1 id="hg-manual.options" xreflabel="Helgrind Options">
-<title>Helgrind Options</title>
-
-<para>Helgrind-specific options are:</para>
-
-<!-- start of xi:include in the manpage -->
-<variablelist id="hg.opts.list">
-
-  <varlistentry id="opt.private-stacks" xreflabel="--private-stacks">
-    <term>
-      <option><![CDATA[--private-stacks=<yes|no> [default: no] ]]></option>
-    </term>
-    <listitem>
-      <para>Assume thread stacks are used privately.</para>
-    </listitem>
-  </varlistentry>
-
-  <varlistentry id="opt.show-last-access" xreflabel="--show-last-access">
-    <term>
-      <option><![CDATA[--show-last-access=<yes|some|no> [default: no] ]]></option>
-    </term>
-    <listitem>
-      <para>Show location of last word access on error.</para>
-    </listitem>
-  </varlistentry>
-
-</variablelist>
-<!-- end of xi:include in the manpage -->
-
-</sect1>
-
-</chapter>
diff --git a/old-helgrind/helgrind.h b/old-helgrind/helgrind.h
deleted file mode 100644 (file)
index 24394fb..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-   ----------------------------------------------------------------
-
-   Notice that the following BSD-style license applies to this one
-   file (helgrind.h) only.  The rest of Valgrind is licensed under the
-   terms of the GNU General Public License, version 2, unless
-   otherwise indicated.  See the COPYING file in the source
-   distribution for details.
-
-   ----------------------------------------------------------------
-
-   This file is part of helgrind, a Valgrind tool for detecting
-   data races in threaded programs.
-
-   Copyright (C) 2002-2007 Nicholas Nethercote.  All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-   2. The origin of this software must not be misrepresented; you must 
-      not claim that you wrote the original software.  If you use this 
-      software in a product, an acknowledgment in the product 
-      documentation would be appreciated but is not required.
-
-   3. Altered source versions must be plainly marked as such, and must
-      not be misrepresented as being the original software.
-
-   4. The name of the author may not be used to endorse or promote 
-      products derived from this software without specific prior written 
-      permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   ----------------------------------------------------------------
-
-   Notice that the above BSD-style license applies to this one file
-   (helgrind.h) only.  The entire rest of Valgrind is licensed under
-   the terms of the GNU General Public License, version 2.  See the
-   COPYING file in the source distribution for details.
-
-   ---------------------------------------------------------------- 
-*/
-
-#ifndef __HELGRIND_H
-#define __HELGRIND_H
-
-#include "valgrind.h"
-
-typedef
-   enum {
-      VG_USERREQ__HG_CLEAN_MEMORY = VG_USERREQ_TOOL_BASE('H','G'),
-      VG_USERREQ__HG_KNOWN_RACE
-   } Vg_HelgrindClientRequest;
-
-/* Clean memory state.  This makes Helgrind forget everything it knew
-   about the specified memory range, and resets it to virgin.  This is
-   particularly useful for memory allocators who wish to recycle
-   memory. */
-#define VALGRIND_HG_CLEAN_MEMORY(_qzz_start, _qzz_len)                 \
-   do {                                                                        \
-     unsigned int _qzz_res;                                            \
-     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__HG_CLEAN_MEMORY, \
-                            _qzz_start, _qzz_len, 0, 0);               \
-     (void)0;                                                          \
-   } while(0)
-
-/* Mark memory as known racy.  This puts the memory range specified
-   into the error state, so that data race errors are not reported
-   against it. */
-#define VALGRIND_HG_KNOWN_RACE(_qzz_start, _qzz_len)                   \
-   do {                                                                        \
-     unsigned int _qzz_res;                                            \
-     VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__HG_KNOWN_RACE,   \
-                            _qzz_start, _qzz_len, 0, 0);               \
-     (void)0;                                                          \
-   } while(0)
-
-#endif /* __HELGRIND_H */
diff --git a/old-helgrind/hg_main.c b/old-helgrind/hg_main.c
deleted file mode 100644 (file)
index 1b5a2ab..0000000
+++ /dev/null
@@ -1,3494 +0,0 @@
-
-/*--------------------------------------------------------------------*/
-/*--- Helgrind: checking for data races in threaded programs.      ---*/
-/*---                                                    hg_main.c ---*/
-/*--------------------------------------------------------------------*/
-
-/*
-   This file is part of Helgrind, a Valgrind tool for detecting
-   data races in threaded programs.
-
-   Copyright (C) 2002-2007 Nicholas Nethercote
-      njn@valgrind.org
-
-   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.
-*/
-
-// *** WARNING *** 
-// Helgrind is not 64-bit clean.
-
-// For anyone wanting to understand race conditions better, this paper might
-// be instructive:
-//
-//   S. Carr, J. Mayo and C.-K. Shene. Race Conditions: A Case Study, The
-//   Journal of Computing in Small Colleges 17(1), September 2001.
-//   http://www.cs.mtu.edu/~carr/papers/jcsc02.pdf
-//
-// It nicely describes several example race conditions, emphasising the
-// fundamentals in each case.
-
-#include "pub_tool_basics.h"
-#include "pub_tool_vki.h"
-#include "pub_tool_threadstate.h"
-#include "pub_tool_aspacemgr.h"
-#include "pub_tool_debuginfo.h"
-#include "pub_tool_hashtable.h"
-#include "pub_tool_libcbase.h"
-#include "pub_tool_libcassert.h"
-#include "pub_tool_libcprint.h"
-#include "pub_tool_libcproc.h"
-#include "pub_tool_machine.h"
-#include "pub_tool_mallocfree.h"
-#include "pub_tool_options.h"
-#include "pub_tool_replacemalloc.h"
-#include "pub_tool_tooliface.h"
-
-#include "helgrind.h"
-
-static UInt n_hg_warnings = 0;
-static UInt n_lockorder_warnings = 0;
-
-/*------------------------------------------------------------*/
-/*--- Debug guff                                           ---*/
-/*------------------------------------------------------------*/
-
-#define DEBUG_LOCK_TABLE    0   /* Print lock table at end */
-
-#define DEBUG_MAKE_ACCESSES 0   /* Print make_access() calls */
-#define DEBUG_LOCKS         0   /* Print lock()/unlock() calls and locksets */
-#define DEBUG_NEW_LOCKSETS  0   /* Print new locksets when created */
-#define DEBUG_ACCESSES      0   /* Print reads, writes */
-#define DEBUG_MEM_LOCKSET_CHANGES 0
-                                /* Print when an address's lockset
-                                   changes; only useful with
-                                   DEBUG_ACCESSES */
-#define SLOW_ASSERTS        0  /* do expensive asserts */
-#define DEBUG_VIRGIN_READS  0   /* Dump around address on VIRGIN reads */
-
-#if SLOW_ASSERTS
-#define TL_ASSERT(x)   tl_assert(x)
-#else
-#define TL_ASSERT(x)
-#endif
-
-/* heavyweight LockSet sanity checking:
-   0 == never
-   1 == after important ops
-   2 == As 1 and also after pthread_mutex_* ops (excessively slow)
- */
-#define LOCKSET_SANITY 0
-
-/* Rotate an unsigned quantity left */
-#define ROTL(x, n)     (((x) << (n)) | ((x) >> ((sizeof(x)*8)-(n))))
-
-/*------------------------------------------------------------*/
-/*--- Command line options                                 ---*/
-/*------------------------------------------------------------*/
-
-static enum {
-   EC_None,
-   EC_Some,
-   EC_All
-} clo_execontext = EC_None;
-
-static Bool clo_priv_stacks = False;
-
-/*------------------------------------------------------------*/
-/*--- Crude profiling machinery.                           ---*/
-/*------------------------------------------------------------*/
-
-// PPP: work out if I want this
-
-#define PROF_EVENT(x)
-#if 0
-#ifdef VG_PROFILE_MEMORY
-
-#define N_PROF_EVENTS 150
-
-static UInt event_ctr[N_PROF_EVENTS];
-
-void VGE_(done_prof_mem) ( void )
-{
-   Int i;
-   for (i = 0; i < N_PROF_EVENTS; i++) {
-      if ((i % 10) == 0)
-         VG_(printf)("\n");
-      if (event_ctr[i] > 0)
-         VG_(printf)( "prof mem event %2d: %d\n", i, event_ctr[i] );
-   }
-   VG_(printf)("\n");
-}
-
-#define PROF_EVENT(ev)                                  \
-   do { tl_assert((ev) >= 0 && (ev) < N_PROF_EVENTS);   \
-        event_ctr[ev]++;                                \
-   } while (False);
-
-#else
-
-//static void init_prof_mem ( void ) { }
-//       void VG_(done_prof_mem) ( void ) { }
-
-#define PROF_EVENT(ev) /* */
-
-#endif /* VG_PROFILE_MEMORY */
-
-/* Event index.  If just the name of the fn is given, this means the
-   number of calls to the fn.  Otherwise it is the specified event.
-
-   [PPP: snip event numbers...]
-*/
-#endif /* 0 */
-
-
-/*------------------------------------------------------------*/
-/*--- Data defns.                                          ---*/
-/*------------------------------------------------------------*/
-
-typedef
-   struct _HG_Chunk {
-      struct _HG_Chunk* next;
-      Addr          data;           /* ptr to actual block              */
-      SizeT         size;           /* size requested                   */
-      ExeContext*   where;          /* where it was allocated           */
-      ThreadId      tid;            /* allocating thread                */
-   }
-   HG_Chunk;
-
-typedef enum 
-   { Vge_VirginInit, Vge_NonVirginInit, Vge_SegmentInit, Vge_Error } 
-   VgeInitStatus;
-
-
-// XXX: not 64-bit clean!
-/* Should add up to 32 to fit in one word */
-#define OTHER_BITS      30
-#define STATE_BITS      2
-
-#define ESEC_MAP_WORDS  16384   /* Words per secondary map */
-
-/* This is for indicating that a memory block has been initialised but not
- * really directly by a particular thread... (eg. text/data initialised
- * automatically at startup).
- * Must be different to virgin_word.other */
-#define TID_INDICATING_NONVIRGIN    1
-
-/* Magic packed TLS used for error suppression; if word state is Excl
-   and tid is this, then it means all access are OK without changing
-   state and without raising any more errors  */
-#define TLSP_INDICATING_ALL          ((1 << OTHER_BITS) - 1)
-
-/* Number of entries must fit in STATE_BITS bits */
-typedef enum { Vge_Virgin, Vge_Excl, Vge_Shar, Vge_SharMod } pth_state;
-
-static inline const Char *pp_state(pth_state st)
-{
-   const Char *ret;
-
-   switch(st) {
-   case Vge_Virgin:    ret = "virgin"; break;
-   case Vge_Excl:      ret = "exclusive"; break;
-   case Vge_Shar:      ret = "shared RO"; break;
-   case Vge_SharMod:   ret = "shared RW"; break;
-   default:            ret = "???";
-   }
-   return ret;
-}
-
-typedef
-   struct {
-      /* gcc arranges this bitfield with state in the 2LSB and other
-        in the 30MSB, which is what we want */
-      UInt state:STATE_BITS;
-      UInt other:OTHER_BITS;
-   } shadow_word;
-
-#define SW(st, other)  ((shadow_word) { st, other })
-
-typedef
-   struct {
-      shadow_word swords[ESEC_MAP_WORDS];
-   }
-   ESecMap;
-
-static ESecMap* primary_map[ 65536 ];
-static ESecMap  distinguished_secondary_map;
-
-static const shadow_word virgin_sword = SW(Vge_Virgin, 0);
-static const shadow_word error_sword = SW(Vge_Excl, TLSP_INDICATING_ALL);
-
-#define VGE_IS_DISTINGUISHED_SM(smap) \
-   ((smap) == &distinguished_secondary_map)
-
-#define ENSURE_MAPPABLE(addr,caller)                                  \
-   do {                                                               \
-      if (VGE_IS_DISTINGUISHED_SM(primary_map[(addr) >> 16])) {       \
-         primary_map[(addr) >> 16] = alloc_secondary_map(caller);     \
-         /*VG_(printf)("new 2map because of %p\n", addr);*/           \
-      } \
-   } while(0)
-
-
-/* Parallel map which contains execution contexts when words last
-  changed state (if required) */
-
-typedef struct EC_IP {
-   union u_ec_ip {
-      Addr             ip;
-      ExeContext       *ec;
-   } uu_ec_ip;
-   UInt                        state:STATE_BITS;
-   UInt                        tls:OTHER_BITS;         /* packed TLS */
-} EC_IP;
-
-#define NULL_EC_IP     ((EC_IP){ { 0 }, 0, 0})
-
-#define IP(ip, prev, tls) ((EC_IP) { (union u_ec_ip)(ip), (prev).state, packTLS(tls) })
-#define EC(ec, prev, tls)   ((EC_IP) { (union u_ec_ip)(ec), (prev).state, packTLS(tls) })
-
-static inline UInt packEC(ExeContext *ec)
-{
-   TL_ASSERT(((UWord)ec & ((1 << STATE_BITS)-1)) == 0);
-   return ((UWord)ec) >> STATE_BITS;
-}
-
-/* Lose 2 LSB of IP */
-static inline UInt packIP(Addr ip)
-{
-   return ip >> STATE_BITS;
-}
-
-static inline Addr unpackIP(UInt i)
-{
-   return (Addr)(i << STATE_BITS);
-}
-
-typedef struct {
-   EC_IP execontext[ESEC_MAP_WORDS];
-} ExeContextMap;
-
-static ExeContextMap** execontext_map;
-
-static inline void setExeContext(Addr a, EC_IP ec)
-{
-   UInt idx = (a >> 16) & 0xffff;
-   UInt off = (a >>  2) & 0x3fff;
-
-   if (execontext_map[idx] == NULL) {
-      execontext_map[idx] = VG_(malloc)(sizeof(ExeContextMap));
-      VG_(memset)(execontext_map[idx], 0, sizeof(ExeContextMap));
-   }
-
-   execontext_map[idx]->execontext[off] = ec;
-}
-
-static inline EC_IP getExeContext(Addr a)
-{
-   UInt idx = (a >> 16) & 0xffff;
-   UInt off = (a >>  2) & 0x3fff;
-   EC_IP ec = NULL_EC_IP;
-
-   if (execontext_map[idx] != NULL)
-      ec = execontext_map[idx]->execontext[off];
-
-   return ec;
-}
-
-/*------------------------------------------------------------*/
-/*--- Thread lifetime segments                             ---*/
-/*------------------------------------------------------------*/
-
-/*
- * This mechanism deals with the common case of a parent thread
- * creating a structure for a child thread, and then passing ownership
- * of the structure to that thread.  It similarly copes with a child
- * thread passing information back to another thread waiting to join
- * on it.
- *
- * Each thread's lifetime can be partitioned into segments.  Those
- * segments are arranged to form an interference graph which indicates
- * whether two thread lifetime segments can possibly be concurrent.
- * If not, then memory with is exclusively accessed by one TLS can be
- * passed on to another TLS without an error occurring, and without
- * moving it from Excl state.
- *
- * At present this only considers thread creation and join as
- * synchronisation events for creating new lifetime segments, but
- * others may be possible (like mutex operations).
- */
-
-typedef struct _ThreadLifeSeg ThreadLifeSeg;
-
-struct _ThreadLifeSeg {
-   ThreadId             tid;
-   ThreadLifeSeg       *prior[2];      /* Previous lifetime segments */
-   UInt                         refcount;      /* Number of memory locations pointing here */
-   UInt                         mark;          /* mark used for graph traversal */
-   ThreadLifeSeg       *next;          /* list of all TLS */
-};
-
-static ThreadLifeSeg *all_tls;
-static UInt tls_since_gc;
-#define TLS_SINCE_GC   10000
-
-/* current mark used for TLS graph traversal */
-static UInt tlsmark;
-
-static ThreadLifeSeg *thread_seg[VG_N_THREADS];
-
-
-static void tls_gc(void)
-{
-   /* XXX later.  Walk through all TLSs and look for ones with 0
-      refcount and remove them from the structure and free them.
-      Could probably get rid of ThreadLifeSeg.refcount and simply use
-      mark-sweep from the shadow table. */
-   VG_(printf)("WRITEME: TLS GC\n");
-}
-
-static void newTLS(ThreadId tid)
-{
-   static const Bool debug = False;
-   ThreadLifeSeg *tls;
-
-   /* Initial NULL */
-   if (thread_seg[tid] == NULL) {
-      tls = VG_(malloc)(sizeof(*tls));
-      tls->tid = tid;
-      tls->prior[0] = tls->prior[1] = NULL;
-      tls->refcount = 0;
-      tls->mark = tlsmark-1;
-
-      tls->next = all_tls;
-      all_tls = tls;
-      tls_since_gc++;
-
-      thread_seg[tid] = tls;
-      return;
-   }
-   
-   /* Previous TLS was unused, so just recycle */
-   if (thread_seg[tid]->refcount == 0) {
-      if (debug)
-        VG_(printf)("newTLS; recycling TLS %p for tid %u\n", 
-                    thread_seg[tid], tid);
-      return;
-   }
-
-   /* Use existing TLS for this tid as a prior for new TLS */
-   tls = VG_(malloc)(sizeof(*tls));
-   tls->tid = tid;
-   tls->prior[0] = thread_seg[tid];
-   tls->prior[1] = NULL;
-   tls->refcount = 0;
-   tls->mark = tlsmark-1;
-
-   tls->next = all_tls;
-   all_tls = tls;
-   if (++tls_since_gc > TLS_SINCE_GC) {
-      tls_gc();
-      tls_since_gc = 0;
-   }
-   
-   if (debug)
-      VG_(printf)("newTLS: made new TLS %p for tid %u (prior %p(%u))\n",
-                 tls, tid, tls->prior[0], tls->prior[0]->tid);
-
-   thread_seg[tid] = tls;
-}
-
-/* clear out a TLS for a thread that's died */
-static void clearTLS(ThreadId tid)
-{
-   newTLS(tid);
-
-   thread_seg[tid]->prior[0] = NULL;
-   thread_seg[tid]->prior[1] = NULL;
-}
-
-static void addPriorTLS(ThreadId tid, ThreadId prior)
-{
-   static const Bool debug = False;
-   ThreadLifeSeg *tls = thread_seg[tid];
-
-   if (debug)
-      VG_(printf)("making TLS %p(%u) prior to TLS %p(%u)\n",
-                 thread_seg[prior], prior, tls, tid);
-
-   tl_assert(thread_seg[tid] != NULL);
-   tl_assert(thread_seg[prior] != NULL);
-
-   if (tls->prior[0] == NULL)
-      tls->prior[0] = thread_seg[prior];
-   else {
-      tl_assert(tls->prior[1] == NULL);
-      tls->prior[1] = thread_seg[prior];
-   }
-}
-
-static Bool isPrior(const ThreadLifeSeg *t, const ThreadLifeSeg *prior)
-{
-   if (t == NULL || t->mark == tlsmark)
-      return False;
-
-   if (t == prior)
-      return True;
-
-   ((ThreadLifeSeg *)t)->mark = tlsmark;
-
-   return isPrior(t->prior[0], prior) || isPrior(t->prior[1], prior);
-}
-
-/* Return True if prior is definitely not concurrent with tls */
-static Bool tlsIsDisjoint(const ThreadLifeSeg *tls, 
-                         const ThreadLifeSeg *prior)
-{
-   tlsmark++;                  /* new traversal mark */
-
-   return isPrior(tls, prior);
-}
-
-static inline UInt packTLS(ThreadLifeSeg *tls)
-{
-   TL_ASSERT(((UWord)tls & ((1 << STATE_BITS)-1)) == 0);
-   return ((UWord)tls) >> STATE_BITS;
-}
-
-static inline ThreadLifeSeg *unpackTLS(UInt i)
-{
-   /* HACK ALERT -- DUBIOUS CAST */
-   return (ThreadLifeSeg *)ULong_to_Ptr(i << STATE_BITS);
-}
-
-/*------------------------------------------------------------*/
-/*--- Low-level support for memory tracking.               ---*/
-/*------------------------------------------------------------*/
-
-/*
-   All reads and writes are recorded in the memory map, which
-   records the state of all memory in the process.  The memory map is
-   organised like that for normal Valgrind, except each that everything
-   is done at word-level instead of byte-level, and each word has only
-   one word of shadow (instead of 36 bits).  
-
-   As for normal Valgrind there is a distinguished secondary map.  But we're
-   working at word-granularity, so it has 16k word entries instead of 64k byte
-   entries.  Lookup is done as follows:
-
-     bits 31..16:   primary map lookup
-     bits 15.. 2:   secondary map lookup
-     bits  1.. 0:   ignored
-*/
-
-
-/*------------------------------------------------------------*/
-/*--- Basic bitmap management, reading and writing.        ---*/
-/*------------------------------------------------------------*/
-
-/* Allocate and initialise a secondary map, marking all words as virgin. */
-
-/* Just a value that isn't a real pointer */
-#define SEC_MAP_ACCESS  (shadow_word*)0x99    
-
-
-static 
-ESecMap* alloc_secondary_map ( __attribute__ ((unused)) Char* caller )
-{
-   ESecMap* map;
-   UInt  i;
-   //PROF_EVENT(10); PPP
-
-   // Mark all words as virgin.
-   map = (ESecMap *)VG_(am_shadow_alloc)(sizeof(ESecMap));
-   if (map == NULL)
-      VG_(out_of_memory_NORETURN)( "helgrind:allocate new ESecMap", 
-                                   sizeof(ESecMap) );
-   for (i = 0; i < ESEC_MAP_WORDS; i++)
-      map->swords[i] = virgin_sword;
-
-   return map;
-}
-
-
-/* Set a word.  The byte give by 'a' could be anywhere in the word -- the whole
- * word gets set. */
-static /* __inline__ */
-void set_sword ( Addr a, shadow_word sword )
-{
-   ESecMap* sm;
-   shadow_word *oldsw;
-
-   //PROF_EVENT(23); PPP
-   ENSURE_MAPPABLE(a, "VGE_(set_sword)");
-
-   /* Use bits 31..16 for primary, 15..2 for secondary lookup */
-   sm     = primary_map[a >> 16];
-   tl_assert(sm != &distinguished_secondary_map);
-   oldsw = &sm->swords[(a & 0xFFFC) >> 2];
-   if (oldsw->state == Vge_Excl && oldsw->other != TLSP_INDICATING_ALL) {
-      ThreadLifeSeg *tls = unpackTLS(oldsw->other);
-      tls->refcount--;
-   }
-
-   if (sword.state == Vge_Excl && sword.other != TLSP_INDICATING_ALL) {
-      ThreadLifeSeg *tls = unpackTLS(sword.other);
-      tls->refcount++;
-   }
-   
-   sm->swords[(a & 0xFFFC) >> 2] = sword;
-
-   if (VGE_IS_DISTINGUISHED_SM(sm)) {
-      VG_(printf)("wrote to distinguished 2ndary map! 0x%lx\n", a);
-      // XXX: may be legit, but I want to know when it happens --njn
-      VG_(tool_panic)("wrote to distinguished 2ndary map!");
-   }
-}
-
-
-static __inline__ 
-shadow_word* get_sword_addr ( Addr a )
-{
-   /* Use bits 31..16 for primary, 15..2 for secondary lookup */
-   ESecMap* sm     = primary_map[a >> 16];
-   UInt    sm_off = (a & 0xFFFC) >> 2;
-
-   if (VGE_IS_DISTINGUISHED_SM(sm)) {
-      VG_(printf)("accessed distinguished 2ndary map! 0x%lx\n", a);
-      // XXX: may be legit, but I want to know when it happens --njn
-      //VG_(tool_panic)("accessed distinguished 2ndary map!");
-      return SEC_MAP_ACCESS;
-   }
-
-   //PROF_EVENT(21); PPP
-   return & (sm->swords[sm_off]);
-}
-
-
-// SSS: rename these so they're not so similar to memcheck, unless it's
-// appropriate of course
-
-static __inline__ 
-void init_virgin_sword(Addr a)
-{
-   if (clo_execontext != EC_None)
-      setExeContext(a, NULL_EC_IP);
-   set_sword(a, virgin_sword);
-}
-
-static __inline__
-void init_error_sword(Addr a)
-{
-   set_sword(a, error_sword);
-}
-
-static __inline__ 
-void init_nonvirgin_sword(Addr a)
-{
-   shadow_word sword;
-   ThreadId tid;
-   ThreadLifeSeg *tls;
-
-   // The tid must be passed in here now;  this requires more events to be
-   // given the tid in the first place.
-   //
-   //tid = VG_(get_current_or_recent_tid)();
-   VG_(message)(Vg_DebugMsg, "tid needs to be passed in here");
-   VG_(exit)(1);
-
-   tl_assert(tid != VG_INVALID_THREADID);
-   tls = thread_seg[tid];
-
-   sword = SW(Vge_Excl, packTLS(tls));
-   set_sword(a, sword);
-}
-
-
-/* In this case, we treat it for Helgrind's sake like virgin (it hasn't
- * been inited by a particular thread, it's just done automatically upon
- * startup), but we mark its .state specially so it doesn't look like an 
- * uninited read. */
-static __inline__ 
-void init_magically_inited_sword(Addr a)
-{
-   shadow_word sword;
-
-   sword = SW(Vge_Virgin, TID_INDICATING_NONVIRGIN);
-
-   set_sword(a, virgin_sword);
-}
-
-
-/*------------------------------------------------------------*/
-/*--- Implementation of lock sets.                         ---*/
-/*------------------------------------------------------------*/
-
-typedef struct _Mutex Mutex; /* forward decl */
-typedef struct _LockSet LockSet;
-
-typedef enum MutexState {
-   MxUnknown,                  /* don't know */
-   MxUnlocked,                 /* unlocked */
-   MxLocked,                   /* locked */
-   MxDead                      /* destroyed */
-} MutexState;
-
-struct _Mutex {
-   Addr               mutexp;
-   Mutex             *next;
-
-   MutexState         state;   /* mutex state */
-   ThreadId           tid;     /* owner */
-   ExeContext       *location; /* where the last change happened */
-
-   const LockSet     *lockdep; /* set of locks we depend on */
-   UInt               mark;    /* mark for graph traversal */
-};
-
-static inline Int mutex_cmp(const Mutex *a, const Mutex *b)
-{
-   return a->mutexp - b->mutexp;
-}
-
-struct _LockSet {
-   Int               setsize;  /* number of members */
-   UInt                      hash;     /* hash code */
-   LockSet           *next;    /* next in hash chain */
-   const Mutex       *mutex[0];        /* locks */
-};
-
-static const LockSet *emptyset;
-
-/* Each one is an index into the lockset table. */
-static const LockSet *thread_locks[VG_N_THREADS];
-
-#define LOCKSET_HASH_SZ        1021
-
-static LockSet *lockset_hash[LOCKSET_HASH_SZ];
-
-/* Pack and unpack a LockSet pointer into shadow_word.other */
-static inline UInt packLockSet(const LockSet *p)
-{
-   UInt id;
-
-   TL_ASSERT(((UWord)p & ((1 << STATE_BITS)-1)) == 0);
-   id = ((UWord)p) >> STATE_BITS;
-
-   return id;
-}
-
-static inline const LockSet *unpackLockSet(UInt id)
-{
-   /* HACK ALERT -- DUBIOUS CAST */
-   return (LockSet *)ULong_to_Ptr(id << STATE_BITS);
-}
-
-static 
-void pp_LockSet(const LockSet* p)
-{
-   Int i;
-   VG_(printf)("{ ");
-   for(i = 0; i < p->setsize; i++) {
-      const Mutex *mx = p->mutex[i];
-
-      VG_(printf)("%p%(y ", mx->mutexp, mx->mutexp);
-   }
-   VG_(printf)("}\n");
-}
-
-
-static void print_LockSet(const Char *s, const LockSet *ls)
-{
-   VG_(printf)("%s: ", s);
-   pp_LockSet(ls);
-}
-
-/* Compute the hash of a LockSet */
-static UInt hash_LockSet_w_wo(const LockSet *ls, 
-                             const Mutex *with,
-                             const Mutex *without)
-{
-   Int  i;
-   UInt hash = ls->setsize + (with != NULL) - (without != NULL);
-   
-   tl_assert(with == NULL || with != without);
-
-   for(i = 0; with != NULL || i < ls->setsize; i++) {
-      const Mutex *mx = i >= ls->setsize ? NULL : ls->mutex[i];
-
-      if (without && mutex_cmp(without, mx) == 0)
-        continue;
-
-      if (with && (mx == NULL || mutex_cmp(with, mx) < 0)) {
-        mx = with;
-        with = NULL;
-        i--;
-      }
-
-      hash = ROTL(hash, 17);
-      hash ^= mx->mutexp;
-   }
-
-   return hash % LOCKSET_HASH_SZ;
-}
-
-static inline UInt hash_LockSet_with(const LockSet *ls, const Mutex *with)
-{
-   UInt hash = hash_LockSet_w_wo(ls, with, NULL);
-
-   if (0)
-      VG_(printf)("hash_with %p+%p -> %d\n", ls, with->mutexp, hash);
-
-   return hash;
-}
-
-static inline UInt hash_LockSet_without(const LockSet *ls, const Mutex *without)
-{
-   UInt hash = hash_LockSet_w_wo(ls, NULL, without);
-
-   if (0)
-      VG_(printf)("hash_with %p-%p -> %d\n", ls, without->mutexp, hash);
-
-   return hash;
-}
-
-static inline UInt hash_LockSet(const LockSet *ls)
-{
-   UInt hash = hash_LockSet_w_wo(ls, NULL, NULL);
-
-   if (0)
-      VG_(printf)("hash %p -> %d\n", ls, hash);
-
-   return hash;
-}
-
-static 
-Bool structural_eq_LockSet(const LockSet* a, const LockSet* b)
-{
-   Int i;
-
-   if (a == b)
-      return True;
-   if (a->setsize != b->setsize)
-      return False;
-
-   for(i = 0; i < a->setsize; i++) {
-      if (mutex_cmp(a->mutex[i], b->mutex[i]) != 0)
-         return False;
-   }
-
-   return True;
-}
-
-
-/* Tricky: equivalent to (compare(insert(missing_elem, a), b)), but
- * doesn't do the insertion.  Returns True if they match.
- */
-static Bool 
-weird_LockSet_equals(const LockSet* a, const LockSet* b, 
-                     const Mutex *missing_mutex)
-{
-   static const Bool debug = False;
-   Int ia, ib;
-
-   /* Idea is to try and match each element of b against either an
-      element of a, or missing_mutex. */
-
-   if (debug) {
-      print_LockSet("weird_LockSet_equals a", a);
-      print_LockSet("                     b", b);
-      VG_(printf)(  "               missing: %p%(y\n", 
-                   missing_mutex->mutexp, missing_mutex->mutexp);
-   }
-
-   if ((a->setsize + 1) != b->setsize) {
-      if (debug)
-        VG_(printf)("   fastpath length mismatch -> 0\n");
-      return False;
-   }
-
-   /* There are three phases to this compare:
-      1 the section from the start of a up to missing_mutex
-      2 missing mutex itself
-      3 the section after missing_mutex to the end of a
-    */
-
-   ia = 0;
-   ib = 0;
-
-   /* 1: up to missing_mutex */
-   for(; ia < a->setsize && mutex_cmp(a->mutex[ia], missing_mutex) < 0; ia++, ib++) {
-      if (debug) {
-        print_LockSet("     1:a", a);
-        print_LockSet("     1:b", b);
-      }
-      if (ib == b->setsize || mutex_cmp(a->mutex[ia], b->mutex[ib]) != 0)
-        return False;
-   }
-
-   /* 2: missing_mutex itself */
-   if (debug) {
-      VG_(printf)(  "     2:missing: %p%(y\n", 
-                   missing_mutex->mutexp, missing_mutex->mutexp);
-      print_LockSet("     2:      b", b);
-   }
-
-   tl_assert(ia == a->setsize || mutex_cmp(a->mutex[ia], missing_mutex) >= 0);
-
-   if (ib == b->setsize || mutex_cmp(missing_mutex, b->mutex[ib]) != 0)
-      return False;
-
-   ib++;
-
-   /* 3: after missing_mutex to end */
-
-   for(; ia < a->setsize && ib < b->setsize; ia++, ib++) {
-      if (debug) {
-        print_LockSet("     3:a", a);
-        print_LockSet("     3:b", b);
-      }
-      if (mutex_cmp(a->mutex[ia], b->mutex[ib]) != 0)
-        return False;
-   }
-
-   if (debug)
-      VG_(printf)("  ia=%d ib=%d --> %d\n", ia, ib, ia == a->setsize && ib == b->setsize);
-
-   return ia == a->setsize && ib == b->setsize;
-}
-
-
-
-static const LockSet *lookup_LockSet(const LockSet *set)
-{
-   UInt bucket = set->hash;
-   LockSet *ret;
-
-   for(ret = lockset_hash[bucket]; ret != NULL; ret = ret->next)
-      if (set == ret || structural_eq_LockSet(set, ret))
-        return ret;
-
-   return NULL;
-}
-
-static const LockSet *lookup_LockSet_with(const LockSet *set, Mutex *mutex)
-{
-   UInt bucket = hash_LockSet_with(set, mutex);
-   const LockSet *ret;
-   
-   for(ret = lockset_hash[bucket]; ret != NULL; ret = ret->next)
-      if (weird_LockSet_equals(set, ret, mutex))
-        return ret;
-
-   return NULL;
-}
-
-static const LockSet *lookup_LockSet_without(const LockSet *set, Mutex *mutex)
-{
-   UInt bucket = hash_LockSet_without(set, mutex);
-   const LockSet *ret;
-   
-   for(ret = lockset_hash[bucket]; ret != NULL; ret = ret->next)
-      if (weird_LockSet_equals(ret, set, mutex))
-        return ret;
-
-   return NULL;
-}
-
-static void insert_LockSet(LockSet *set)
-{
-   UInt hash = hash_LockSet(set);
-   
-   set->hash = hash;
-
-   tl_assert(lookup_LockSet(set) == NULL);
-
-   set->next = lockset_hash[hash];
-   lockset_hash[hash] = set;
-}
-
-static inline
-LockSet *alloc_LockSet(UInt setsize)
-{
-   LockSet *ret = VG_(malloc)(sizeof(*ret) + sizeof(Mutex *) * setsize);
-   ret->setsize = setsize;
-   return ret;
-}
-
-static inline
-void free_LockSet(LockSet *p)
-{
-   /* assert: not present in hash */
-   VG_(free)(p);
-}
-
-static
-void pp_all_LockSets ( void )
-{
-   Int i;
-   Int sets, buckets;
-
-   sets = buckets = 0;
-   for (i = 0; i < LOCKSET_HASH_SZ; i++) {
-      const LockSet *ls = lockset_hash[i];
-      Bool first = True;
-      
-      for(; ls != NULL; ls = ls->next) {
-        if (first) {
-           buckets++;
-           VG_(printf)("[%4d] = ", i);
-        } else
-           VG_(printf)("         ");
-
-        sets++;
-        first = False;
-        pp_LockSet(ls);
-      }
-   }
-
-   VG_(printf)("%d distinct LockSets in %d buckets\n", sets, buckets);
-}
-
-static inline Bool isempty(const LockSet *ls)
-{
-   return ls == NULL || ls->setsize == 0;
-}
-
-static Bool ismember(const LockSet *ls, const Mutex *mx)
-{
-   Int i;
-
-   /* XXX use binary search */
-   for(i = 0; i < ls->setsize; i++)
-      if (mutex_cmp(mx, ls->mutex[i]) == 0)
-        return True;
-
-   return False;
-}
-
-/* Check invariants:
-   - all locksets are unique
-   - each set is an array in strictly increasing order of mutex addr 
-*/
-static
-void sanity_check_locksets ( const Char* caller )
-{
-   Int              i;
-   const Char *badness;
-   LockSet *ls;
-
-   for(i = 0; i < LOCKSET_HASH_SZ; i++) {
-
-      for(ls = lockset_hash[i]; ls != NULL; ls = ls->next) {
-        const Mutex *prev;
-        Int j;
-
-        if (hash_LockSet(ls) != ls->hash) {
-           badness = "mismatched hash";
-           goto bad;
-        }
-        if (ls->hash != (UInt)i) {
-           badness = "wrong bucket";
-           goto bad;
-        }
-        if (lookup_LockSet(ls) != ls) {
-           badness = "non-unique set";
-           goto bad;
-        }
-
-        prev = ls->mutex[0];
-        for(j = 1; j < ls->setsize; j++) {
-           if (mutex_cmp(prev, ls->mutex[j]) >= 0) {
-              badness = "mutexes out of order";
-              goto bad;
-           }
-        }
-      }
-   }
-   return;
-
-  bad:
-   VG_(printf)("sanity_check_locksets: "
-               "i = %d, ls=%p badness = %s, caller = %s\n", 
-               i, ls, badness, caller);
-   pp_all_LockSets();
-   VG_(tool_panic)("sanity_check_locksets");
-}
-
-static
-LockSet *add_LockSet(const LockSet *ls, const Mutex *mx)
-{
-   static const Bool debug = False;
-   LockSet *ret = NULL;
-   Int i, j;
-
-   if (debug || DEBUG_MEM_LOCKSET_CHANGES) {
-      VG_(printf)("add-IN mutex %p%(y\n", mx->mutexp, mx->mutexp);
-      print_LockSet("add-IN", ls);
-   }
-
-   if (debug || LOCKSET_SANITY)
-      sanity_check_locksets("add-IN");
-
-   tl_assert(!ismember(ls, mx));
-
-   ret = alloc_LockSet(ls->setsize+1);
-
-   for(i = j = 0; i < ls->setsize; i++) {
-      if (debug)
-        VG_(printf)("i=%d j=%d ls->mutex[i]=%p mx=%p\n",
-                   i, j, ls->mutex[i]->mutexp, mx ? mx->mutexp : 0);
-      if (mx && mutex_cmp(mx, ls->mutex[i]) < 0) {
-        ret->mutex[j++] = mx;
-        mx = NULL;
-      }
-      ret->mutex[j++] = ls->mutex[i];
-   }
-
-   /* not added in loop - must be after */
-   if (mx)
-      ret->mutex[j++] = mx;
-
-   tl_assert(j == ret->setsize);
-
-   if (debug || LOCKSET_SANITY) {
-      print_LockSet("add-OUT", ret);
-      sanity_check_locksets("add-OUT");
-   }
-   return ret;
-}
-
-/* Builds ls with mx removed.  mx should actually be in ls! 
-   (a checked assertion).  Resulting set should not already
-   exist in the table (unchecked).
-*/
-static 
-LockSet *remove_LockSet ( const LockSet *ls, const Mutex *mx )
-{
-   static const Bool debug = False;
-   LockSet   *ret = NULL;
-   Int        i, j;
-
-   if (debug || DEBUG_MEM_LOCKSET_CHANGES) {
-      print_LockSet("remove-IN", ls);
-   }
-
-   if (debug || LOCKSET_SANITY)
-      sanity_check_locksets("remove-IN");
-
-   tl_assert(ismember(ls, mx));
-
-   ret = alloc_LockSet(ls->setsize-1);
-
-   for(i = j = 0; i < ls->setsize; i++) {
-      if (mutex_cmp(ls->mutex[i], mx) == 0)
-             continue;
-      ret->mutex[j++] = ls->mutex[i];
-   }
-
-   tl_assert(j == ret->setsize);
-
-   if (debug || LOCKSET_SANITY) {
-      print_LockSet("remove-OUT", ret);
-      sanity_check_locksets("remove-OUT");
-   }
-   return ret;
-}
-
-
-/* Builds the intersection, and then unbuilds it if it's already in the table.
- */
-static const LockSet *_intersect(const LockSet *a, const LockSet *b)
-{
-   static const Bool debug = False;
-   Int       iret;
-   Int      ia, ib;
-   Int      size;
-   LockSet   *ret;
-   const LockSet   *found;
-
-   if (debug || LOCKSET_SANITY)
-      sanity_check_locksets("intersect-IN");
-
-   if (debug || DEBUG_MEM_LOCKSET_CHANGES) {
-      print_LockSet("intersect a", a);
-      print_LockSet("intersect b", b);
-   }
-
-   /* count the size of the new set */
-   size = 0;
-   ia = ib = 0;
-   for(size = ia = ib = 0; ia < a->setsize && ib < b->setsize; ) {
-      if (mutex_cmp(a->mutex[ia], b->mutex[ib]) == 0) {
-        size++;
-        ia++;
-        ib++;
-      } else if (mutex_cmp(a->mutex[ia], b->mutex[ib]) < 0) {
-        ia++;
-      } else {
-        tl_assert(mutex_cmp(a->mutex[ia], b->mutex[ib]) > 0);
-        ib++;
-      } 
-   }
-
-   /* Build the intersection of the two sets */
-   ret = alloc_LockSet(size);
-   for (iret = ia = ib = 0; ia < a->setsize && ib < b->setsize; ) {
-      if (mutex_cmp(a->mutex[ia], b->mutex[ib]) == 0) {
-        tl_assert(iret < ret->setsize);
-        ret->mutex[iret++] = a->mutex[ia];
-        ia++;
-        ib++;
-      } else if (mutex_cmp(a->mutex[ia], b->mutex[ib]) < 0) {
-        ia++;
-      } else {
-        tl_assert(mutex_cmp(a->mutex[ia], b->mutex[ib]) > 0);
-        ib++;
-      } 
-   }
-
-   ret->hash = hash_LockSet(ret);
-
-   /* Now search for it in the table, adding it if not seen before */
-   found = lookup_LockSet(ret);
-
-   if (found != NULL) {
-      free_LockSet(ret);
-   } else {
-      insert_LockSet(ret);
-      found = ret;
-   }
-
-   if (debug || LOCKSET_SANITY) {
-      print_LockSet("intersect-OUT", found);
-      sanity_check_locksets("intersect-OUT");
-   }
-
-   return found;
-}
-
-/* inline the fastpath */
-static inline const LockSet *intersect(const LockSet *a, const LockSet *b)
-{
-   static const Bool debug = False;
-
-   /* Fast case -- when the two are the same */
-   if (a == b) {
-      if (debug || DEBUG_MEM_LOCKSET_CHANGES) {
-        print_LockSet("intersect-same fastpath", a);
-      }
-      return a;
-   }
-
-   if (isempty(a) || isempty(b)) {
-      if (debug)
-        VG_(printf)("intersect empty fastpath\n");
-      return emptyset;
-   }
-
-   return _intersect(a, b);
-}
-
-
-static const LockSet *ls_union(const LockSet *a, const LockSet *b)
-{
-   static const Bool debug = False;
-   Int       iret;
-   Int      ia, ib;
-   Int      size;
-   LockSet   *ret;
-   const LockSet   *found;
-
-   if (debug || LOCKSET_SANITY)
-      sanity_check_locksets("union-IN");
-
-   /* Fast case -- when the two are the same */
-   if (a == b) {
-      if (debug || DEBUG_MEM_LOCKSET_CHANGES) {
-        print_LockSet("union-same fastpath", a);
-      }
-      return a;
-   }
-
-   if (isempty(a)) {
-      if (debug)
-        print_LockSet("union a=empty b", b);
-      return b;
-   }
-   if (isempty(b)) {
-      if (debug)
-        print_LockSet("union b=empty a", a);
-      return a;
-   }
-
-   if (debug || DEBUG_MEM_LOCKSET_CHANGES) {
-      print_LockSet("union a", a);
-      print_LockSet("union b", b);
-   }
-
-   /* count the size of the new set */
-   for(size = ia = ib = 0; (ia < a->setsize) || (ib < b->setsize); ) {
-      Int cmp;
-
-      if ((ia < a->setsize) && (ib < b->setsize))
-        cmp = mutex_cmp(a->mutex[ia], b->mutex[ib]);
-      else if (ia == a->setsize)
-        cmp = 1;
-      else 
-        cmp = -1;
-
-      if (cmp == 0) {
-        size++;
-        ia++;
-        ib++;
-      } else if (cmp < 0) {
-        size++;
-        ia++;
-      } else {
-        tl_assert(cmp > 0);
-        size++;
-        ib++;
-      } 
-   }
-
-   /* Build the intersection of the two sets */
-   ret = alloc_LockSet(size);
-   for (iret = ia = ib = 0; (ia < a->setsize) || (ib < b->setsize); ) {
-      Int cmp;
-      tl_assert(iret < ret->setsize);
-
-      if ((ia < a->setsize) && (ib < b->setsize))
-        cmp = mutex_cmp(a->mutex[ia], b->mutex[ib]);
-      else if (ia == a->setsize)
-        cmp = 1;
-      else 
-        cmp = -1;
-
-      if (cmp == 0) {
-        ret->mutex[iret++] = a->mutex[ia];
-        ia++;
-        ib++;
-      } else if (cmp < 0) {
-        ret->mutex[iret++] = a->mutex[ia];
-        ia++;
-      } else {
-        tl_assert(cmp > 0);
-        ret->mutex[iret++] = b->mutex[ib];
-        ib++;
-      } 
-   }
-
-   tl_assert(iret == ret->setsize);
-
-   ret->hash = hash_LockSet(ret);
-
-   /* Now search for it in the table, adding it if not seen before */
-   found = lookup_LockSet(ret);
-
-   if (found != NULL) {
-      if (debug)
-        print_LockSet("union found existing set", found);
-      free_LockSet(ret);
-   } else {
-      if (debug)
-        print_LockSet("union inserting new set", ret);
-      insert_LockSet(ret);
-      found = ret;
-   }
-
-   if (debug || LOCKSET_SANITY) {
-      print_LockSet("union-OUT", found);
-      sanity_check_locksets("union-OUT");
-   }
-
-   return found;
-}
-
-/*------------------------------------------------------------*/
-/*--- Implementation of mutex structure.                   ---*/
-/*------------------------------------------------------------*/
-
-static UInt graph_mark;                /* current mark we're using for graph traversal */
-
-static void record_mutex_error(ThreadId tid, Mutex *mutex, 
-                              Char *str, ExeContext *ec);
-static void record_lockgraph_error(ThreadId tid, Mutex *mutex,
-                                  const LockSet *lockset_holding, 
-                                  const LockSet *lockset_prev);
-
-static void set_mutex_state(Mutex *mutex, MutexState state, ThreadId tid);
-
-#define M_MUTEX_HASHSZ 1021
-
-static Mutex *mutex_hash[M_MUTEX_HASHSZ];
-static UInt total_mutexes;
-
-static const Char *pp_MutexState(MutexState st)
-{
-   switch(st) {
-   case MxLocked:      return "Locked";
-   case MxUnlocked:    return "Unlocked";
-   case MxDead:                return "Dead";
-   case MxUnknown:     return "Unknown";
-   }
-   return "???";
-}
-
-static void pp_all_mutexes(void)
-{
-   Int i;
-   Int locks, buckets;
-
-   locks = buckets = 0;
-   for(i = 0; i < M_MUTEX_HASHSZ; i++) {
-      Mutex *mx;
-      Bool first = True;
-
-      for(mx = mutex_hash[i]; mx != NULL; mx = mx->next) {
-        if (first) {
-           buckets++;
-           VG_(printf)("[%4d] = ", i);
-        } else
-           VG_(printf)("         ");
-        locks++;
-        first = False;
-        VG_(printf)("%p [%8s] -> %p%(y\n",
-                    mx, pp_MutexState(mx->state), mx->mutexp, mx->mutexp);
-      }
-   }
-
-   VG_(printf)("%d locks in %d buckets (%d allocated)\n", 
-              locks, buckets, total_mutexes);
-}
-
-/* find or create a Mutex for a program's mutex use */
-static Mutex *get_mutex(Addr mutexp)
-{
-   UInt bucket = mutexp % M_MUTEX_HASHSZ;
-   Mutex *mp;
-   
-   for(mp = mutex_hash[bucket]; mp != NULL; mp = mp->next)
-      if (mp->mutexp == mutexp)
-        return mp;
-
-   total_mutexes++;
-
-   mp = VG_(malloc)(sizeof(*mp));
-   mp->mutexp = mutexp;
-   mp->next = mutex_hash[bucket];
-   mutex_hash[bucket] = mp;
-
-   mp->state = MxUnknown;
-   mp->tid = VG_INVALID_THREADID;
-   mp->location = NULL;
-
-   mp->lockdep = emptyset;
-   mp->mark = graph_mark - 1;
-
-   return mp;
-}
-
-/* Find all mutexes in a range of memory, and call the callback.
-   Remove the mutex from the hash if the callback returns True (mutex
-   structure itself is not freed, because it may be pointed to by a
-   LockSet. */
-static void find_mutex_range(Addr start, Addr end, Bool (*action)(Mutex *))
-{
-   UInt first = start % M_MUTEX_HASHSZ;
-   UInt last = (end+1) % M_MUTEX_HASHSZ;
-   UInt i;
-
-   /* Single pass over the hash table, looking for likely hashes */
-   for(i = first; i != last; ) {
-      Mutex *mx;
-      Mutex **prev = &mutex_hash[i];
-
-      for(mx = mutex_hash[i]; mx != NULL; prev = &mx->next, mx = mx->next) {
-        if (mx->mutexp >= start && mx->mutexp < end && (*action)(mx))
-            *prev = mx->next;
-      }
-      
-      if (++i == M_MUTEX_HASHSZ)
-        i = 0;
-   }
-}
-
-#define MARK_LOOP      (graph_mark+0)
-#define MARK_DONE      (graph_mark+1)
-
-static Bool check_cycle_inner(const Mutex *mutex, const LockSet *ls)
-{
-   static const Bool debug = False;
-   Int i;
-
-   if (mutex->mark == MARK_LOOP)
-      return True;             /* found cycle */
-   if (mutex->mark == MARK_DONE)
-      return False;            /* been here before, its OK */
-   
-   ((Mutex*)mutex)->mark = MARK_LOOP;
-   
-   if (debug)
-      VG_(printf)("mark=%d visiting %p%(y mutex->lockset=%d\n",
-                  graph_mark, mutex->mutexp, mutex->mutexp, mutex->lockdep);
-   for(i = 0; i < ls->setsize; i++) {
-      const Mutex *mx = ls->mutex[i];
-     
-      if (debug)
-         VG_(printf)("   %y ls=%p (ls->mutex=%p%(y)\n", 
-                     mutex->mutexp, ls,
-                     mx->mutexp, mx->mutexp);
-      if (check_cycle_inner(mx, mx->lockdep))
-         return True;
-   }
-   ((Mutex*)mutex)->mark = MARK_DONE;
-   
-   return False;
-}
-
-static Bool check_cycle(const Mutex *start, const LockSet* lockset)
-{
-
-   graph_mark += 2;            /* clear all marks */
-
-   return check_cycle_inner(start, lockset);
-}
-
-/* test to see if a mutex state change would be problematic; this
-   makes no changes to the mutex state.  This should be called before
-   the locking thread has actually blocked. */
-static void test_mutex_state(Mutex *mutex, MutexState state, ThreadId tid)
-{
-   static const Bool debug = False;
-
-   if (mutex->state == MxDead) {
-      Char *str;
-
-      switch(state) {
-      case MxLocked:   str = "lock dead mutex"; break;
-      case MxUnlocked: str = "unlock dead mutex"; break;
-      default:         str = "operate on dead mutex"; break;
-      }
-
-      /* can't do anything legal to a destroyed mutex */
-      record_mutex_error(tid, mutex, str, mutex->location);
-      return;
-   }
-
-   switch(state) {
-   case MxLocked:
-      tl_assert(!check_cycle(mutex, mutex->lockdep));
-
-      if (debug)
-        print_LockSet("thread holding", thread_locks[tid]);
-
-      if (check_cycle(mutex, thread_locks[tid]))
-        record_lockgraph_error(tid, mutex, thread_locks[tid], mutex->lockdep);
-      else {
-        mutex->lockdep = ls_union(mutex->lockdep, thread_locks[tid]);
-
-        if (debug) {
-           VG_(printf)("giving mutex %p%(y lockdep = %p ", 
-                       mutex->mutexp, mutex->mutexp, mutex->lockdep);
-           print_LockSet("lockdep", mutex->lockdep);
-        }
-      }
-      break;
-
-   case MxUnlocked:
-      if (debug)
-        print_LockSet("thread holding", thread_locks[tid]);
-
-      if (mutex->state != MxLocked) {
-        record_mutex_error(tid, mutex, 
-                           "unlock non-locked mutex", mutex->location);
-      }
-      if (mutex->tid != tid) {
-        record_mutex_error(tid, mutex, 
-                           "unlock someone else's mutex", mutex->location);
-      }
-      break;
-
-   case MxDead:
-      break;
-
-   default:
-      break;
-   }
-}
-
-/* Update a mutex state.  Expects most error testing and reporting to
-   have happened in test_mutex_state().  The assumption is that no
-   client code is run by thread tid between test and set, either
-   because it is blocked or test and set are called together
-   atomically.  
-
-   Setting state to MxDead is the exception, since that can happen as
-   a result of any thread freeing memory; in this case set_mutex_state
-   does all the error reporting as well.
-*/
-static void set_mutex_state(Mutex *mutex, MutexState state, ThreadId tid)
-{
-   static const Bool debug = False;
-
-   if (debug)
-      VG_(printf)("\ntid %d changing mutex (%p)->%p%(y state %s -> %s\n",
-                 tid, mutex, mutex->mutexp, mutex->mutexp,
-                 pp_MutexState(mutex->state), pp_MutexState(state));
-
-   if (mutex->state == MxDead) {
-      /* can't do anything legal to a destroyed mutex */
-      return;
-   }
-
-   switch(state) {
-   case MxLocked:
-      if (mutex->state == MxLocked) {
-        if (mutex->tid != tid)
-           record_mutex_error(tid, mutex, "take lock held by someone else", 
-                              mutex->location);
-        else
-           record_mutex_error(tid, mutex, "take lock we already hold", 
-                              mutex->location);
-
-        VG_(tool_panic)("core should have checked this\n");
-        break;
-      }
-
-      tl_assert(!check_cycle(mutex, mutex->lockdep));
-
-      mutex->tid = tid;
-      break;
-
-   case MxUnlocked:
-      if (debug)
-        print_LockSet("thread holding", thread_locks[tid]);
-
-      if (mutex->state != MxLocked || mutex->tid != tid)
-        break;
-
-      mutex->tid = VG_INVALID_THREADID;
-      break;
-
-   case MxDead:
-      if (mutex->state == MxLocked) {
-        /* forcably remove offending lock from thread's lockset  */
-        tl_assert(ismember(thread_locks[mutex->tid], mutex));
-        thread_locks[mutex->tid] = remove_LockSet(thread_locks[mutex->tid], mutex);
-        mutex->tid = VG_INVALID_THREADID;
-
-        record_mutex_error(tid, mutex,
-                           "free locked mutex", mutex->location);
-      }
-      break;
-
-   default:
-      break;
-   }
-
-   mutex->location = VG_(record_ExeContext)(tid);
-   mutex->state = state;
-}
-
-/*------------------------------------------------------------*/
-/*--- Setting and checking permissions.                    ---*/
-/*------------------------------------------------------------*/
-
-/* only clean up dead mutexes */
-static
-Bool cleanmx(Mutex *mx) {
-   return mx->state == MxDead;
-}
-
-static
-void set_address_range_state ( Addr a, SizeT len /* in bytes */, 
-                               VgeInitStatus status )
-{
-   Addr end;
-
-#  if DEBUG_MAKE_ACCESSES
-   VG_(printf)("make_access: 0x%x, %u, status=%u\n", a, len, status);
-#  endif
-   //PROF_EVENT(30); PPP
-
-   if (len == 0)
-      return;
-
-   if (len > 100 * 1000 * 1000)
-      VG_(message)(Vg_UserMsg,
-                   "Warning: set address range state: large range %d",
-                   len);
-
-   /* Remove mutexes in recycled memory range from hash */
-   find_mutex_range(a, a+len, cleanmx);
-
-   /* Memory block may not be aligned or a whole word multiple.  In neat cases,
-    * we have to init len/4 words (len is in bytes).  In nasty cases, it's
-    * len/4+1 words.  This works out which it is by aligning the block and
-    * seeing if the end byte is in the same word as it is for the unaligned
-    * block; if not, it's the awkward case. */
-   end = VG_ROUNDUP(a + len, 4);
-   a   = VG_ROUNDDN(a, 4);
-
-   /* Do it ... */
-   switch (status) {
-   case Vge_VirginInit:
-      for ( ; a < end; a += 4) {
-         //PROF_EVENT(31);  PPP
-         init_virgin_sword(a);
-      }
-      break;
-
-   case Vge_NonVirginInit:
-      for ( ; a < end; a += 4) {
-         //PROF_EVENT(31);  PPP
-         init_nonvirgin_sword(a);
-      }
-      break;
-
-   case Vge_SegmentInit:
-      for ( ; a < end; a += 4) {
-         //PROF_EVENT(31);  PPP
-         init_magically_inited_sword(a);
-      }
-      break;
-
-   case Vge_Error:
-      for ( ; a < end; a += 4) {
-         //PROF_EVENT(31);  PPP
-         init_error_sword(a);
-      }
-      break;
-   
-   default:
-      VG_(printf)("init_status = %u\n", status);
-      VG_(tool_panic)("Unexpected Vge_InitStatus");
-   }
-}
-
-
-static void make_segment_readable ( Addr a, SizeT len )
-{
-   //PROF_EVENT(??);    PPP
-   set_address_range_state ( a, len, Vge_SegmentInit );
-}
-
-static void make_writable ( Addr a, SizeT len )
-{
-   //PROF_EVENT(36);  PPP
-   set_address_range_state( a, len, Vge_VirginInit );
-}
-
-static void make_readable ( Addr a, SizeT len )
-{
-   //PROF_EVENT(37);  PPP
-   set_address_range_state( a, len, Vge_VirginInit );
-}
-
-
-/* Block-copy states (needed for implementing realloc()). */
-static void copy_address_range_state(Addr src, Addr dst, SizeT len)
-{
-   UInt i;
-
-   //PROF_EVENT(40); PPP
-   for (i = 0; i < len; i += 4) {
-      shadow_word sword = *(get_sword_addr ( src+i ));
-      //PROF_EVENT(41);  PPP
-      set_sword ( dst+i, sword );
-   }
-}
-
-// SSS: put these somewhere better
-static void hg_mem_read (Addr a, SizeT data_size, ThreadId tid);
-static void hg_mem_write(Addr a, SizeT data_size, ThreadId tid);
-
-__attribute__((unused))
-static void hg_mem_help_read_1(Addr a) VG_REGPARM(1);
-__attribute__((unused))
-static void hg_mem_help_read_2(Addr a) VG_REGPARM(1);
-__attribute__((unused))
-static void hg_mem_help_read_4(Addr a) VG_REGPARM(1);
-__attribute__((unused))
-static void hg_mem_help_read_N(Addr a, SizeT size) VG_REGPARM(2);
-
-__attribute__((unused))
-static void hg_mem_help_write_1(Addr a, UInt val) VG_REGPARM(2);
-__attribute__((unused))
-static void hg_mem_help_write_2(Addr a, UInt val) VG_REGPARM(2);
-__attribute__((unused))
-static void hg_mem_help_write_4(Addr a, UInt val) VG_REGPARM(2);
-__attribute__((unused))
-static void hg_mem_help_write_N(Addr a, SizeT size) VG_REGPARM(2);
-
-__attribute__((unused))
-static void bus_lock(void);
-__attribute__((unused))
-static void bus_unlock(void);
-
-static
-void hg_pre_mem_read(CorePart part, ThreadId tid,
-                     Char* s, Addr base, SizeT size )
-{
-   if (tid > 50) { VG_(printf)("pid = %d, s = '%s', part = %d\n", tid, s, part); VG_(tool_panic)("a");}
-   hg_mem_read(base, size, tid);
-}
-
-static
-void hg_pre_mem_read_asciiz(CorePart part, ThreadId tid,
-                            Char* s, Addr base )
-{
-   hg_mem_read(base, VG_(strlen)((Char*)base), tid);
-}
-
-static
-void hg_pre_mem_write(CorePart part, ThreadId tid,
-                      Char* s, Addr base, SizeT size )
-{
-   hg_mem_write(base, size, tid);
-}
-
-
-
-static
-void hg_new_mem_startup( Addr a, SizeT len, Bool rr, Bool ww, Bool xx )
-{
-   /* Ignore the permissions, just make it readable.  Seems to work... */
-   make_segment_readable(a, len);
-}
-
-
-static
-void hg_new_mem_heap ( Addr a, SizeT len, Bool is_inited )
-{
-   if (is_inited) {
-      make_readable(a, len);
-   } else {
-      make_writable(a, len);
-   }
-}
-
-static
-void hg_set_perms (Addr a, SizeT len,
-                   Bool rr, Bool ww, Bool xx)
-{
-   if      (rr) make_readable(a, len);
-   else if (ww) make_writable(a, len);
-   /* else do nothing */
-}
-
-static
-void hg_new_mem_stack_private(Addr a, SizeT len)
-{
-   set_address_range_state(a, len, Vge_NonVirginInit);
-}
-
-static
-void hg_new_mem_stack(Addr a, SizeT len)
-{
-   set_address_range_state(a, len, Vge_VirginInit);
-}
-
-/*--------------------------------------------------------------*/
-/*--- Initialise the memory audit system on program startup. ---*/
-/*--------------------------------------------------------------*/
-
-static 
-void init_shadow_memory(void)
-{
-   Int i;
-
-   for (i = 0; i < ESEC_MAP_WORDS; i++)
-      distinguished_secondary_map.swords[i] = virgin_sword;
-
-   /* These entries gradually get overwritten as the used address
-      space expands. */
-   for (i = 0; i < 65536; i++)
-      primary_map[i] = &distinguished_secondary_map;
-}
-
-
-/*------------------------------------------------------------*/
-/*--- malloc() et al replacements                          ---*/
-/*------------------------------------------------------------*/
-
-static VgHashTable hg_malloc_list = NULL;
-
-#define N_FREED_CHUNKS 2
-static Int freechunkptr = 0;
-static HG_Chunk *freechunks[N_FREED_CHUNKS];
-
-
-/* Allocate a user-chunk of size bytes.  Also allocate its shadow
-   block, make the shadow block point at the user block.  Put the
-   shadow chunk on the appropriate list, and set all memory
-   protections correctly. */
-
-static void add_HG_Chunk ( ThreadId tid, Addr p, SizeT size )
-{
-   HG_Chunk* hc;
-
-   hc            = VG_(malloc)(sizeof(HG_Chunk));
-   hc->data      = p;
-   hc->size      = size;
-   hc->where     = VG_(record_ExeContext)(tid);
-   hc->tid       = tid;
-
-   VG_(HT_add_node)( hg_malloc_list, (VgHashNode*)hc );
-}
-
-/* Allocate memory and note change in memory available */
-static __inline__
-void* alloc_and_new_mem ( ThreadId tid, SizeT size, SizeT alignment,
-                          Bool is_zeroed )
-{
-   Addr p;
-
-   if (size < 0) return NULL;
-
-   p = (Addr)VG_(cli_malloc)(alignment, size);
-   if (!p) {
-      return NULL;
-   }
-   if (is_zeroed) VG_(memset)((void*)p, 0, size);
-   add_HG_Chunk ( tid, p, size );
-   hg_new_mem_heap( p, size, is_zeroed );
-
-   return (void*)p;
-}
-
-static void* hg_malloc ( ThreadId tid, SizeT n )
-{
-   return alloc_and_new_mem ( tid, n, VG_(clo_alignment), /*is_zeroed*/False );
-}
-
-static void* hg___builtin_new ( ThreadId tid, SizeT n )
-{
-   return alloc_and_new_mem ( tid, n, VG_(clo_alignment), /*is_zeroed*/False );
-}
-
-static void* hg___builtin_vec_new ( ThreadId tid, SizeT n )
-{
-   return alloc_and_new_mem ( tid, n, VG_(clo_alignment), /*is_zeroed*/False );
-}
-
-static void* hg_memalign ( ThreadId tid, SizeT align, SizeT n )
-{
-   return alloc_and_new_mem ( tid, n, align,              /*is_zeroed*/False );
-}
-
-static void* hg_calloc ( ThreadId tid, SizeT nmemb, SizeT size )
-{
-   return alloc_and_new_mem ( tid, nmemb*size, VG_(clo_alignment),
-                              /*is_zeroed*/True );
-}
-
-static ThreadId deadmx_tid;
-
-static
-Bool deadmx(Mutex *mx) {
-   if (mx->state != MxDead)
-      set_mutex_state(mx, MxDead, deadmx_tid);
-   
-   return False;
-}
-
-static
-void die_and_free_mem ( ThreadId tid, HG_Chunk* hc,
-                        HG_Chunk** prev_chunks_next_ptr )
-{
-   Addr start = hc->data;
-   Addr end   = start + hc->size;
-
-   /* Remove hc from the malloclist using prev_chunks_next_ptr to
-      avoid repeating the hash table lookup.  Can't remove until at least
-      after free and free_mismatch errors are done because they use
-      describe_addr() which looks for it in malloclist. */
-   *prev_chunks_next_ptr = hc->next;
-
-   /* Record where freed */
-   hc->where = VG_(record_ExeContext) ( tid );
-
-   /* maintain a small window so that the error reporting machinery
-      knows about this memory */
-   if (freechunks[freechunkptr] != NULL) {
-      /* free HG_Chunk */
-      HG_Chunk* sc1 = freechunks[freechunkptr];
-      VG_(cli_free) ( (void*)(sc1->data) );
-      VG_(free) ( sc1 );
-   }
-
-   freechunks[freechunkptr] = hc;
-
-   if (++freechunkptr == N_FREED_CHUNKS)
-      freechunkptr = 0;
-
-   /* mark all mutexes in range dead */
-   deadmx_tid = tid;
-   find_mutex_range(start, end, deadmx);
-}
-
-
-static __inline__
-void handle_free ( ThreadId tid, void* p )
-{
-   HG_Chunk*  hc;
-   HG_Chunk** prev_chunks_next_ptr;
-   /* Commented out 25 Aug 07 as VG_(HT_get_node) no longer exists.
-   hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UWord)p,
-                                      (VgHashNode***)&prev_chunks_next_ptr );
-   */
-   if (hc == NULL) {
-      return;
-   }
-   die_and_free_mem ( tid, hc, prev_chunks_next_ptr );
-}
-
-static void hg_free ( ThreadId tid, void* p )
-{
-   handle_free(tid, p);
-}
-
-static void hg___builtin_delete ( ThreadId tid, void* p )
-{
-   handle_free(tid, p);
-}
-
-static void hg___builtin_vec_delete ( ThreadId tid, void* p )
-{
-   handle_free(tid, p);
-}
-
-static void* hg_realloc ( ThreadId tid, void* p, SizeT new_size )
-{
-   HG_Chunk  *hc;
-   HG_Chunk **prev_chunks_next_ptr;
-
-   /* First try and find the block. */
-   /* Commented out 25 Aug 07 as VG_(HT_get_node) no longer exists.
-   hc = (HG_Chunk*)VG_(HT_get_node) ( hg_malloc_list, (UWord)p,
-                                       (VgHashNode***)&prev_chunks_next_ptr );
-   */
-   if (hc == NULL) {
-      return NULL;
-   }
-  
-   if (hc->size == new_size) {
-      /* size unchanged */
-      hc->where = VG_(record_ExeContext)(tid);
-      return p;
-      
-   } else if (hc->size > new_size) {
-      /* new size is smaller */
-      hc->size = new_size;
-      hc->where = VG_(record_ExeContext)(tid);
-      return p;
-
-   } else {
-      /* new size is bigger */
-      Addr p_new;
-
-      /* Get new memory */
-      p_new = (Addr)VG_(cli_malloc)(VG_(clo_alignment), new_size);
-
-      if (p_new) {
-         /* First half kept and copied, second half new */
-         copy_address_range_state( (Addr)p, p_new, hc->size );
-         hg_new_mem_heap ( p_new+hc->size, new_size-hc->size,
-                           /*inited*/False );
-
-         /* Copy from old to new */
-         VG_(memcpy)((void *)p_new, p, hc->size);
-
-         /* Free old memory */
-         die_and_free_mem ( tid, hc, prev_chunks_next_ptr );
-
-         /* this has to be after die_and_free_mem, otherwise the
-            former succeeds in shorting out the new block, not the
-            old, in the case when both are on the same list.  */
-         add_HG_Chunk ( tid, p_new, new_size );
-      }
-
-      return (void*)p_new;
-   }  
-}
-
-/*--------------------------------------------------------------*/
-/*--- Machinery to support sanity checking                   ---*/
-/*--------------------------------------------------------------*/
-
-static Bool hg_cheap_sanity_check ( void )
-{
-   /* nothing useful we can rapidly check */
-   return True;
-}
-
-static Bool hg_expensive_sanity_check(void)
-{
-   Int i;
-
-   /* Make sure nobody changed the distinguished secondary. */
-   for (i = 0; i < ESEC_MAP_WORDS; i++)
-      if (distinguished_secondary_map.swords[i].other != virgin_sword.other ||
-          distinguished_secondary_map.swords[i].state != virgin_sword.state)
-         return False;
-
-   return True;
-}
-
-
-/*--------------------------------------------------------------*/
-/*--- Instrumentation                                        ---*/
-/*--------------------------------------------------------------*/
-
-static UInt stk_ld, nonstk_ld, stk_st, nonstk_st;
-
-#if 0
-/* Create and return an instrumented version of cb_in.  Free cb_in
-   before returning. */
-UCodeBlock* TL_(instrument) ( UCodeBlock* cb_in, Addr not_used )
-{
-   UCodeBlock* cb;
-   Int         i;
-   UInstr*     u_in;
-   Int         t_size = INVALID_TEMPREG;
-   Int        ntemps;
-   Bool               *stackref = NULL;
-   Bool        locked = False; /* lock prefix */
-
-   cb = VG_(setup_UCodeBlock)(cb_in);
-
-   /* stackref[] is used for super-simple value tracking to keep note
-      of which tempregs currently hold a value which is derived from
-      the stack pointer or frame pointer, and is therefore likely
-      stack-relative if used as the address for LOAD or STORE. */
-   ntemps = VG_(get_num_temps)(cb);
-   stackref = VG_(malloc)(sizeof(*stackref) * ntemps);
-   VG_(memset)(stackref, 0, sizeof(*stackref) * ntemps);
-
-   for (i = 0; i < VG_(get_num_instrs)(cb_in); i++) {
-      u_in = VG_(get_instr)(cb_in, i);
-
-      switch (u_in->opcode) {
-
-         case NOP: case CALLM_S: case CALLM_E:
-            break;
-    
-         case LOCK:
-           locked = True;
-           uInstr0(cb, CCALL, 0);
-           uCCall(cb, (Addr)bus_lock, 0, 0, False);
-           break;
-
-         case JMP: case INCEIP:
-           if (locked) {
-              uInstr0(cb, CCALL, 0);
-              uCCall(cb, (Addr)bus_unlock, 0, 0, False);
-           }
-           locked = False;
-           VG_(copy_UInstr)(cb, u_in);
-           break;
-
-         case GET:
-           tl_assert(u_in->tag1 == ArchReg);
-           tl_assert(u_in->tag2 == TempReg);
-           tl_assert(u_in->val2 < ntemps);
-
-           stackref[u_in->val2] = (u_in->size == 4 &&
-                                   (u_in->val1 == VG_R_STACK_PTR ||
-                                     u_in->val1 == VG_R_FRAME_PTR));
-           VG_(copy_UInstr)(cb, u_in);
-           break;
-
-         case MOV:
-           if (u_in->size == 4 && u_in->tag1 == TempReg) {
-              tl_assert(u_in->tag2 == TempReg);
-              stackref[u_in->val2] = stackref[u_in->val1];
-           }
-           VG_(copy_UInstr)(cb, u_in);
-           break;
-
-         case LEA1:
-         case ADD: case SUB:
-           if (u_in->size == 4 && u_in->tag1 == TempReg) {
-              tl_assert(u_in->tag2 == TempReg);
-              stackref[u_in->val2] |= stackref[u_in->val1];
-           }
-           VG_(copy_UInstr)(cb, u_in);
-           break;
-
-         case LOAD: {
-           void (*help)(Addr);
-           tl_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size);
-           tl_assert(u_in->tag1 == TempReg);
-
-           if (!clo_priv_stacks || !stackref[u_in->val1]) {
-              nonstk_ld++;
-
-              switch(u_in->size) {
-              case 1: help = hg_mem_help_read_1; break;
-              case 2: help = hg_mem_help_read_2; break;
-              case 4: help = hg_mem_help_read_4; break;
-              default:
-                 VG_(tool_panic)("bad size");
-              }
-
-              /* XXX all registers should be flushed to baseblock
-                 here */
-              uInstr1(cb, CCALL, 0, TempReg, u_in->val1);
-              uCCall(cb, (Addr)help, 1, 1, False);
-           } else
-              stk_ld++;
-
-           VG_(copy_UInstr)(cb, u_in);
-           t_size = INVALID_TEMPREG;
-           break;
-        }
-
-         case MMX2_MemRd:
-         case FPU_R: {
-            tl_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size || 
-                      8 == u_in->size || 10 == u_in->size || 108 == u_in->size);
-           
-           t_size = newTemp(cb);
-           uInstr2(cb, MOV,   4, Literal, 0, TempReg, t_size);
-           uLiteral(cb, (UInt)u_in->size);
-
-           /* XXX all registers should be flushed to baseblock
-              here */
-           uInstr2(cb, CCALL, 0, TempReg, u_in->val2, TempReg, t_size);
-           uCCall(cb, (Addr) & hg_mem_help_read_N, 2, 2, False);
-           
-           VG_(copy_UInstr)(cb, u_in);
-           t_size = INVALID_TEMPREG;
-           break;
-        } 
-
-         case MMX2a1_MemRd: {
-            tl_assert(8 == u_in->size);
-           
-           t_size = newTemp(cb);
-           uInstr2(cb, MOV,   4, Literal, 0, TempReg, t_size);
-           uLiteral(cb, (UInt)u_in->size);
-
-           /* XXX all registers should be flushed to baseblock
-              here */
-           uInstr2(cb, CCALL, 0, TempReg, u_in->val3, TempReg, t_size);
-           uCCall(cb, (Addr) & hg_mem_help_read_N, 2, 2, False);
-           
-           VG_(copy_UInstr)(cb, u_in);
-           t_size = INVALID_TEMPREG;
-           break;
-        } 
-
-         case SSE2a_MemRd:
-         case SSE2a1_MemRd:
-         case SSE3a_MemRd:
-         case SSE3a1_MemRd:
-         case SSE3ag_MemRd_RegWr: {
-           Int addr = (u_in->opcode == SSE3ag_MemRd_RegWr) ? u_in->val1 : u_in->val3;
-
-            tl_assert(u_in->size == 4 || u_in->size == 8 || u_in->size == 16 || u_in->size == 512);
-           
-           t_size = newTemp(cb);
-           uInstr2(cb, MOV,   4, Literal, 0, TempReg, t_size);
-           uLiteral(cb, (UInt)u_in->size);
-
-           uInstr2(cb, CCALL, 0, TempReg, addr, TempReg, t_size);
-           uCCall(cb, (Addr) & hg_mem_help_read_N, 2, 2, False);
-           
-           VG_(copy_UInstr)(cb, u_in);
-           t_size = INVALID_TEMPREG;
-           break;
-         }
-
-         case STORE: {
-           void (*help)(Addr, UInt);
-            tl_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size);
-           tl_assert(u_in->tag2 == TempReg);
-
-           if (!clo_priv_stacks || !stackref[u_in->val2]) {
-              nonstk_st++;
-
-              switch(u_in->size) {
-              case 1: help = hg_mem_help_write_1; break;
-              case 2: help = hg_mem_help_write_2; break;
-              case 4: help = hg_mem_help_write_4; break;
-              default:
-                 VG_(tool_panic)("bad size");
-              }
-
-              /* XXX all registers should be flushed to baseblock
-                 here */
-              uInstr2(cb, CCALL, 0, TempReg, u_in->val2, TempReg, u_in->val1);
-              uCCall(cb, (Addr)help, 2, 2, False);
-           } else
-              stk_st++;
-
-           VG_(copy_UInstr)(cb, u_in);
-           t_size = INVALID_TEMPREG;
-           break;
-        }
-
-         case MMX2_MemWr:
-         case FPU_W: {
-            tl_assert(1 == u_in->size || 2 == u_in->size || 4 == u_in->size || 
-                      8 == u_in->size || 10 == u_in->size || 108 == u_in->size);
-
-           t_size = newTemp(cb);
-           uInstr2(cb, MOV,   4, Literal, 0, TempReg, t_size);
-           uLiteral(cb, (UInt)u_in->size);
-              /* XXX all registers should be flushed to baseblock
-                 here */
-           uInstr2(cb, CCALL, 0, TempReg, u_in->val2, TempReg, t_size);
-           uCCall(cb, (Addr) & hg_mem_help_write_N, 2, 2, False);
-
-           VG_(copy_UInstr)(cb, u_in);
-           t_size = INVALID_TEMPREG;
-           break;
-        }
-
-         case SSE2a_MemWr:
-         case SSE3a_MemWr: {
-            tl_assert(4 == u_in->size || 8 == u_in->size || 16 == u_in->size ||
-                     512 == u_in->size);
-
-           t_size = newTemp(cb);
-           uInstr2(cb, MOV,   4, Literal, 0, TempReg, t_size);
-           uLiteral(cb, (UInt)u_in->size);
-              /* XXX all registers should be flushed to baseblock
-                 here */
-           uInstr2(cb, CCALL, 0, TempReg, u_in->val3, TempReg, t_size);
-           uCCall(cb, (Addr) & hg_mem_help_write_N, 2, 2, False);
-
-           VG_(copy_UInstr)(cb, u_in);
-           t_size = INVALID_TEMPREG;
-           break;
-        }
-
-         default:
-           /* conservative tromping */
-           if (0 && u_in->tag1 == TempReg) /* can val1 ever be dest? */
-              stackref[u_in->val1] = False;
-           if (u_in->tag2 == TempReg)
-              stackref[u_in->val2] = False;
-           if (u_in->tag3 == TempReg)
-              stackref[u_in->val3] = False;
-            VG_(copy_UInstr)(cb, u_in);
-            break;
-      }
-   }
-
-   VG_(free)(stackref);
-   VG_(free_UCodeBlock)(cb_in);
-   return cb;
-}
-#endif
-static
-IRSB* hg_instrument ( VgCallbackClosure* closure,
-                      IRSB* bb,
-                      VexGuestLayout* layout, 
-                      VexGuestExtents* vge,
-                      IRType gWordTy, IRType hWordTy )
-{
-   tl_assert(0);  // Need to convert to Vex
-}
-
-/*--------------------------------------------------------------------*/
-/*--- Error and suppression handling                               ---*/
-/*--------------------------------------------------------------------*/
-
-typedef
-   enum {
-      /* Possible data race */
-      RaceSupp
-   }
-   RaceSuppKind;
-
-/* What kind of error it is. */
-typedef
-   enum { 
-      RaceErr,                 /* data-race */
-      MutexErr,                        /* mutex operations */
-      LockGraphErr,            /* mutex order error */
-   }
-   RaceErrorKind;
-
-/* The classification of a faulting address. */
-typedef 
-   enum { Undescribed, /* as-yet unclassified */
-          Stack, 
-          Unknown, /* classification yielded nothing useful */
-          Mallocd,
-         Freed,
-         Segment
-   }
-   AddrKind;
-/* Records info about a faulting address. */
-typedef
-   struct {
-      /* ALL */
-      AddrKind akind;
-      /* Freed, Mallocd */
-      Int blksize;
-      /* Freed, Mallocd */
-      Int rwoffset;
-      /* Freed, Mallocd */
-      ExeContext* lastchange;
-      ThreadId lasttid;
-      /* Stack */
-      ThreadId stack_tid;
-      /* Segment */
-      const Char* filename;
-      const Char* section;
-      /* True if is just-below the stack pointer -- could be a gcc bug. */
-      Bool maybe_gcc;
-      /* symbolic address description */
-      Char *expr;
-   }
-   AddrInfo;
-
-/* What kind of memory access is involved in the error? */
-typedef
-   enum { ReadAxs, WriteAxs, ExecAxs }
-   AxsKind;
-
-/* Extra context for memory errors */
-typedef
-   struct {
-      AxsKind axskind;
-      Int size;
-      AddrInfo addrinfo;
-      Bool isWrite;
-      shadow_word prevstate;
-      /* MutexErr, LockGraphErr */
-      Mutex      *mutex;
-      EC_IP      lasttouched;
-      ThreadId    lasttid;
-      /* LockGraphErr */
-      const LockSet    *held_lockset;
-      const LockSet    *prev_lockset;
-   }
-   HelgrindError;
-
-static __inline__
-void clear_AddrInfo ( AddrInfo* ai )
-{
-   ai->akind      = Unknown;
-   ai->blksize    = 0;
-   ai->rwoffset   = 0;
-   ai->lastchange = NULL;
-   ai->lasttid    = VG_INVALID_THREADID;
-   ai->filename   = NULL;
-   ai->section    = "???";
-   ai->stack_tid  = VG_INVALID_THREADID;
-   ai->maybe_gcc  = False;
-   ai->expr       = NULL;
-}
-
-static __inline__
-void clear_HelgrindError ( HelgrindError* err_extra )
-{
-   err_extra->axskind    = ReadAxs;
-   err_extra->size       = 0;
-   err_extra->mutex      = NULL;
-   err_extra->lasttouched= NULL_EC_IP;
-   err_extra->lasttid    = VG_INVALID_THREADID;
-   err_extra->prev_lockset = 0;
-   err_extra->held_lockset = 0;
-   err_extra->prevstate  = SW(Vge_Virgin, 0);
-   clear_AddrInfo ( &err_extra->addrinfo );
-   err_extra->isWrite    = False;
-}
-
-
-
-/* Describe an address as best you can, for error messages,
-   putting the result in ai. */
-
-/* Callback for searching malloc'd and free'd lists */
-/*
-static Bool addr_is_in_block(VgHashNode *node, void *ap)
-{
-   HG_Chunk* hc2 = (HG_Chunk*)node;
-   Addr a = *(Addr *)ap;
-   
-   return (hc2->data <= a && a < hc2->data + hc2->size);
-}
-*/
-
-static void describe_addr ( Addr a, AddrInfo* ai )
-{
-   HG_Chunk* hc;
-   Int i;
-
-   /* Search for it in segments */
-   {
-      const SegInfo *si;
-
-      for (si = VG_(next_seginfo)(NULL); 
-          si != NULL; 
-          si = VG_(next_seginfo)(si)) 
-      {
-        Addr base = VG_(seginfo_start)(si);
-        SizeT size = VG_(seginfo_size)(si);
-        const UChar *filename = VG_(seginfo_filename)(si);
-
-        if (a >= base && a < base+size) {
-           ai->akind = Segment;
-           ai->blksize = size;
-           ai->rwoffset = a - base;
-           ai->filename = filename;
-
-           switch(VG_(seginfo_sect_kind)(a)) {
-           case Vg_SectText:   ai->section = "text"; break;
-           case Vg_SectData:   ai->section = "data"; break;
-           case Vg_SectBSS:    ai->section = "BSS"; break;
-           case Vg_SectGOT:    ai->section = "GOT"; break;
-           case Vg_SectPLT:    ai->section = "PLT"; break;
-           case Vg_SectUnknown:
-           default:
-              ai->section = "???"; break;
-           }
-
-           return;
-        }
-      }
-   }
-
-   /* Search for a currently malloc'd block which might bracket it. */
-   /* Commented out 25 Aug 07 as VG_(HT_first_match) no longer exists.
-   hc = (HG_Chunk*)VG_(HT_first_match)(hg_malloc_list, addr_is_in_block, &a);
-   */
-   if (NULL != hc) {
-      ai->akind      = Mallocd;
-      ai->blksize    = hc->size;
-      ai->rwoffset   = (Int)a - (Int)(hc->data);
-      ai->lastchange = hc->where;
-      ai->lasttid    = hc->tid;
-      return;
-   } 
-
-   /* Look in recently freed memory */
-   for(i = 0; i < N_FREED_CHUNKS; i++) {
-      hc = freechunks[i];
-      if (hc == NULL)
-        continue;
-
-      if (a >= hc->data && a < hc->data + hc->size) {
-        ai->akind      = Freed;
-        ai->blksize    = hc->size;
-        ai->rwoffset   = a - hc->data;
-        ai->lastchange = hc->where;
-        ai->lasttid    = hc->tid;
-        return;
-      } 
-   }
-   /* Clueless ... */
-   ai->akind = Unknown;
-   return;
-}
-
-
-/* Updates the copy with address info if necessary. */
-static UInt hg_update_extra(Error* err)
-{
-   HelgrindError* extra;
-
-   extra = (HelgrindError*)VG_(get_error_extra)(err);
-   if (extra != NULL && Undescribed == extra->addrinfo.akind) {
-      describe_addr ( VG_(get_error_address)(err), &(extra->addrinfo) );
-   }
-   return sizeof(HelgrindError);
-}
-
-static void record_race_error ( ThreadId tid, Addr a, Bool is_write,
-                                shadow_word prevstate )
-{
-   shadow_word *sw;
-   HelgrindError err_extra;
-
-   n_hg_warnings++;
-
-   clear_HelgrindError(&err_extra);
-   err_extra.isWrite = is_write;
-   err_extra.addrinfo.akind = Undescribed;
-   err_extra.prevstate = prevstate;
-   if (clo_execontext)
-      err_extra.lasttouched = getExeContext(a);
-   /* JRS 4 Apr 06: VG_(describe_addr) disappeared from m_debuginfo,
-      at least for the time being. */
-   err_extra.addrinfo.expr = "???"; /* VG_(describe_addr)(tid, a); */
-
-   VG_(maybe_record_error)( tid, RaceErr, a, 
-                            (is_write ? "writing" : "reading"),
-                            &err_extra);
-
-   sw = get_sword_addr(a);
-   if (sw->state == Vge_Excl && sw->other != TLSP_INDICATING_ALL) {
-      ThreadLifeSeg *tls = unpackTLS(sw->other);
-      tls->refcount--;
-   }
-
-   set_sword(a, error_sword);
-}
-
-static void record_mutex_error(ThreadId tid, Mutex *mutex, 
-                              Char *str, ExeContext *ec)
-{
-   HelgrindError err_extra;
-
-   clear_HelgrindError(&err_extra);
-   err_extra.addrinfo.akind = Undescribed;
-   err_extra.mutex = mutex;
-   err_extra.lasttouched = EC(ec, virgin_sword, thread_seg[tid]);
-   err_extra.lasttid = tid;
-
-   VG_(maybe_record_error)(tid, MutexErr, 
-                          (Addr)mutex->mutexp, str, &err_extra);
-}
-
-static void record_lockgraph_error(ThreadId tid, Mutex *mutex,
-                                  const LockSet *lockset_holding,
-                                  const LockSet *lockset_prev)
-{
-   HelgrindError err_extra;
-
-   n_lockorder_warnings++;
-
-   clear_HelgrindError(&err_extra);
-   err_extra.addrinfo.akind = Undescribed;
-   err_extra.mutex = mutex;
-   
-   err_extra.lasttouched = EC(mutex->location, virgin_sword, 0);
-   err_extra.held_lockset = lockset_holding;
-   err_extra.prev_lockset = lockset_prev;
-   
-   VG_(maybe_record_error)(tid, LockGraphErr, mutex->mutexp, "", &err_extra);
-}
-
-static Bool hg_eq_Error ( VgRes not_used, Error* e1, Error* e2 )
-{
-   Char *e1s, *e2s;
-
-   tl_assert(VG_(get_error_kind)(e1) == VG_(get_error_kind)(e2));
-
-   switch (VG_(get_error_kind)(e1)) {
-   case RaceErr:
-      return VG_(get_error_address)(e1) == VG_(get_error_address)(e2);
-
-   case MutexErr:
-      return VG_(get_error_address)(e1) == VG_(get_error_address)(e2);
-   }
-
-   e1s = VG_(get_error_string)(e1);
-   e2s = VG_(get_error_string)(e2);
-   if (e1s != e2s) return False;
-   if (0 != VG_(strcmp)(e1s, e2s)) return False;
-   return True;
-}
-
-static void pp_AddrInfo ( Addr a, AddrInfo* ai )
-{
-   if (ai->expr != NULL)
-      VG_(message)(Vg_UserMsg, 
-                  " Address %p == %s", a, ai->expr);
-   
-   switch (ai->akind) {
-      case Stack: 
-         VG_(message)(Vg_UserMsg, 
-                      " Address %p is on thread %d's stack", 
-                      a, ai->stack_tid);
-         break;
-      case Unknown:
-        if (ai->expr != NULL)
-           break;
-
-         /* maybe_gcc is never set to True!  This is a hangover from code
-            in Memcheck */
-         if (ai->maybe_gcc) {
-            VG_(message)(Vg_UserMsg, 
-               " Address %p is just below the stack pointer.  Possibly a bug in GCC/G++",
-               a);
-            VG_(message)(Vg_UserMsg, 
-               "   v 2.96 or 3.0.X.  To suppress, use: --workaround-gcc296-bugs=yes");
-        } else {
-            VG_(message)(Vg_UserMsg, 
-               " Address %p is not stack'd, malloc'd or (recently) free'd", a);
-         }
-         break;
-      case Segment:
-       VG_(message)(Vg_UserMsg,
-                    " Address %p is in %s section of %s", 
-                    a, ai->section, ai->filename);
-       break;
-      case Mallocd:
-      case Freed: {
-         SizeT delta;
-         UChar* relative;
-         if (ai->rwoffset < 0) {
-            delta    = (SizeT)(- ai->rwoffset);
-            relative = "before";
-         } else if (ai->rwoffset >= ai->blksize) {
-            delta    = ai->rwoffset - ai->blksize;
-            relative = "after";
-         } else {
-            delta    = ai->rwoffset;
-            relative = "inside";
-         }
-        VG_(message)(Vg_UserMsg, 
-                     " Address %p is %llu bytes %s a block of size %d %s by thread %d",
-                     a, (ULong)delta, relative, 
-                     ai->blksize,
-                     ai->akind == Mallocd ? "alloc'd" : "freed",
-                     ai->lasttid);
-
-         VG_(pp_ExeContext)(ai->lastchange);
-         break;
-      }   
-      default:
-         VG_(tool_panic)("pp_AddrInfo");
-   }
-}
-
-static Char *lockset_str(const Char *prefix, const LockSet *lockset)
-{
-   Char *buf, *cp;
-   Int i;
-
-   buf = VG_(malloc)((prefix == NULL ? 0 : VG_(strlen)(prefix)) +
-                    lockset->setsize * 120 +
-                    1);
-
-   cp = buf;
-   if (prefix)
-      cp += VG_(sprintf)(cp, "%s", prefix);
-
-   for(i = 0; i < lockset->setsize; i++)
-      cp += VG_(sprintf)(cp, "%p%(y, ", lockset->mutex[i]->mutexp, 
-                        lockset->mutex[i]->mutexp);
-
-   if (lockset->setsize)
-      cp[-2] = '\0';
-   else
-      *cp = '\0';
-
-   return buf;
-}
-
-static void hg_pp_Error ( Error* err )
-{
-   HelgrindError *extra = (HelgrindError *)VG_(get_error_extra)(err);
-   Char buf[100];
-   Char *msg = buf;
-   const LockSet *ls;
-
-   *msg = '\0';
-
-   switch(VG_(get_error_kind)(err)) {
-   case RaceErr: {
-      Addr err_addr = VG_(get_error_address)(err);
-                      
-      VG_(message)(Vg_UserMsg, "Possible data race %s variable at %p %(y",
-                  VG_(get_error_string)(err), err_addr, err_addr);
-      VG_(pp_ExeContext)( VG_(get_error_where)(err) );
-      pp_AddrInfo(err_addr, &extra->addrinfo);
-
-      switch(extra->prevstate.state) {
-      case Vge_Virgin:
-        /* shouldn't be possible to go directly from virgin -> error */
-        VG_(sprintf)(buf, "virgin!?");
-        break;
-
-      case Vge_Excl: {
-        ThreadLifeSeg *tls = unpackTLS(extra->prevstate.other);
-
-        tl_assert(tls != unpackTLS(TLSP_INDICATING_ALL));
-        VG_(sprintf)(buf, "exclusively owned by thread %u", tls->tid);
-        break;
-      }
-
-      case Vge_Shar:
-      case Vge_SharMod:
-        ls = unpackLockSet(extra->prevstate.other);
-
-        if (isempty(ls)) {
-           VG_(sprintf)(buf, "shared %s, no locks", 
-                        extra->prevstate.state == Vge_Shar ? "RO" : "RW");
-           break;
-        }
-
-        msg = lockset_str(extra->prevstate.state == Vge_Shar ?
-                          "shared RO, locked by:" :
-                          "shared RW, locked by:", ls);
-
-        break;
-      }
-
-      if (*msg)
-        VG_(message)(Vg_UserMsg, " Previous state: %s", msg);
-
-      if (clo_execontext == EC_Some 
-          && extra->lasttouched.uu_ec_ip.ip != 0) {
-        Char file[100];
-        UInt line;
-        Addr ip = extra->lasttouched.uu_ec_ip.ip;
-        
-        VG_(message)(Vg_UserMsg, " Word at %p last changed state from %s by thread %u",
-                     err_addr,
-                     pp_state(extra->lasttouched.state),
-                     unpackTLS(extra->lasttouched.tls)->tid);
-        
-        if (VG_(get_filename_linenum)(ip, file, sizeof(file), 
-                                           NULL, 0, NULL, &line)) {
-           VG_(message)(Vg_UserMsg, "   at %p: %y (%s:%u)",
-                        ip, ip, file, line);
-        } else if (VG_(get_objname)(ip, file, sizeof(file))) {
-           VG_(message)(Vg_UserMsg, "   at %p: %y (in %s)",
-                        ip, ip, file);
-        } else {
-           VG_(message)(Vg_UserMsg, "   at %p: %y", ip, ip);
-        }
-      } else if (clo_execontext == EC_All 
-                 && extra->lasttouched.uu_ec_ip.ec != NULL) {
-        VG_(message)(Vg_UserMsg, " Word at %p last changed state from %s in tid %u",
-                     err_addr,
-                     pp_state(extra->lasttouched.state),
-                     unpackTLS(extra->lasttouched.tls)->tid);
-        VG_(pp_ExeContext)(extra->lasttouched.uu_ec_ip.ec);
-      }
-      break;
-   }
-
-   case MutexErr:
-      VG_(message)(Vg_UserMsg, "Mutex problem at %p%(y trying to %s",
-                  VG_(get_error_address)(err),
-                  VG_(get_error_address)(err),
-                  VG_(get_error_string)(err));
-      VG_(pp_ExeContext)( VG_(get_error_where)(err) );
-      if (extra->lasttouched.uu_ec_ip.ec != NULL) {
-        VG_(message)(Vg_UserMsg, " last touched by thread %d", extra->lasttid);
-        VG_(pp_ExeContext)(extra->lasttouched.uu_ec_ip.ec);
-      }
-      pp_AddrInfo(VG_(get_error_address)(err), &extra->addrinfo);
-      break;
-
-   case LockGraphErr: {
-      const LockSet *heldset = extra->held_lockset;
-      Addr err_addr = VG_(get_error_address)(err);
-      Int i;
-
-      msg = lockset_str(NULL, heldset);
-
-      VG_(message)(Vg_UserMsg, "Mutex %p%(y locked in inconsistent order",
-                  err_addr, err_addr);
-      VG_(pp_ExeContext)( VG_(get_error_where)(err) );
-      VG_(message)(Vg_UserMsg, " while holding locks %s", msg);
-
-      for(i = 0; i < heldset->setsize; i++) {
-        const Mutex *lsmx = heldset->mutex[i];
-
-        /* needs to be a recursive search+display */
-        if (0 && !ismember(lsmx->lockdep, extra->mutex))
-           continue;
-      
-        VG_(message)(Vg_UserMsg, " %p%(y last locked at", 
-                     lsmx->mutexp, lsmx->mutexp);
-        VG_(pp_ExeContext)(lsmx->location);
-        VG_(free)(msg);
-        msg = lockset_str(NULL, lsmx->lockdep);
-        VG_(message)(Vg_UserMsg, " while depending on locks %s", msg);
-      }
-      
-      break;
-   }
-   }
-
-   if (msg != buf)
-      VG_(free)(msg);
-}
-
-
-static Bool hg_recognised_suppression ( Char* name, Supp *su )
-{
-   if (0 == VG_(strcmp)(name, "Eraser")) {
-      VG_(set_supp_kind)(su, RaceSupp);
-      return True;
-   } else {
-      return False;
-   }
-}
-
-
-static Bool hg_read_extra_suppression_info ( Int fd, Char* buf, Int nBuf, Supp* su )
-{
-   /* do nothing -- no extra suppression info present.  Return True to
-      indicate nothing bad happened. */
-   return True;
-}
-
-
-static Bool hg_error_matches_suppression(Error* err, Supp* su)
-{
-   tl_assert(VG_(get_supp_kind)(su) == RaceSupp);
-
-   return (VG_(get_error_kind)(err) == RaceErr);
-}
-
-static Char* hg_get_error_name ( Error* err )
-{
-   if (RaceErr == VG_(get_error_kind)(err)) {
-      return "Eraser";     // old name, required for backwards compatibility
-   } else {
-      return NULL;      /* Other errors types can't be suppressed */
-   }
-}
-
-static void hg_print_extra_suppression_info ( Error* err )
-{
-   /* Do nothing */
-}
-
-static void hg_pre_mutex_lock(ThreadId tid, Addr client_mutex)
-{
-   Mutex *mutex = get_mutex(client_mutex);
-
-   test_mutex_state(mutex, MxLocked, tid);
-}
-
-static void hg_post_mutex_lock(ThreadId tid, Addr client_mutex)
-{
-   static const Bool debug = False;
-   Mutex *mutex = get_mutex(client_mutex);
-   const LockSet*  ls;
-
-   set_mutex_state(mutex, MxLocked, tid);
-
-#  if DEBUG_LOCKS
-   VG_(printf)("lock  (%u, %p)\n", tid, mutex->mutexp);
-#  endif
-
-   /* VG_(printf)("LOCK: held %d, new %p\n", thread_locks[tid], mutex); */
-#  if LOCKSET_SANITY > 1
-   sanity_check_locksets("hg_post_mutex_lock-IN");
-#  endif
-
-   ls = lookup_LockSet_with(thread_locks[tid], mutex);
-
-   if (ls == NULL) {
-      LockSet *newset = add_LockSet(thread_locks[tid], mutex);
-      insert_LockSet(newset);
-      ls = newset;
-   }
-   thread_locks[tid] = ls;
-
-   if (debug || DEBUG_LOCKS)
-      VG_(printf)("tid %u now has lockset %p\n", tid, ls);
-
-   if (debug || LOCKSET_SANITY > 1)
-      sanity_check_locksets("hg_post_mutex_lock-OUT");
-}
-
-
-static void hg_post_mutex_unlock(ThreadId tid, Addr client_mutex)
-{
-   static const Bool debug = False;
-   Int i = 0;
-   Mutex *mutex = get_mutex(client_mutex);
-   const LockSet *ls;
-
-   test_mutex_state(mutex, MxUnlocked, tid);
-   set_mutex_state(mutex, MxUnlocked, tid);
-
-   if (!ismember(thread_locks[tid], mutex))
-       return;
-
-   if (debug || DEBUG_LOCKS)
-      VG_(printf)("unlock(%u, %p%(y)\n", tid, mutex->mutexp, mutex->mutexp);
-
-   if (debug || LOCKSET_SANITY > 1)
-      sanity_check_locksets("hg_post_mutex_unlock-IN");
-
-   ls = lookup_LockSet_without(thread_locks[tid], mutex);
-
-   if (ls == NULL) {
-      LockSet *newset = remove_LockSet(thread_locks[tid], mutex);
-      insert_LockSet(newset);
-      ls = newset;
-   }
-
-   /* Update the thread's lock vector */
-   if (debug || DEBUG_LOCKS)
-      VG_(printf)("tid %u reverts from %p to lockset %p\n", 
-                 tid, thread_locks[tid], i);
-
-   thread_locks[tid] = ls;
-
-   if (debug || LOCKSET_SANITY > 1)
-      sanity_check_locksets("hg_post_mutex_unlock-OUT");
-}
-
-
-/* ---------------------------------------------------------------------
-   Checking memory reads and writes
-   ------------------------------------------------------------------ */
-
-/* Behaviour on reads and writes:
- *
- *                      VIR          EXCL        SHAR        SH_MOD
- * ----------------------------------------------------------------
- * rd/wr, 1st thread |  -            EXCL        -           -
- * rd, new thread    |  -            SHAR        -           -
- * wr, new thread    |  -            SH_MOD      -           -
- * rd                |  error!       -           SHAR        SH_MOD
- * wr                |  EXCL         -           SH_MOD      SH_MOD
- * ----------------------------------------------------------------
- */
-
-static inline
-void dump_around_a(Addr a)
-{
-   UInt i;
-   shadow_word* sword;
-   VG_(printf)("NEARBY:\n");
-   for (i = a - 12; i <= a + 12; i += 4) {
-      sword = get_sword_addr(i); 
-      VG_(printf)("    %x -- tid: %u, state: %u\n", i, sword->other, sword->state);
-   }
-}
-
-#if DEBUG_ACCESSES
-   #define DEBUG_STATE(args...)   \
-      VG_(printf)("(%u) ", size), \
-      VG_(printf)(args)
-#else
-   #define DEBUG_STATE(args...)
-#endif
-
-static void hg_mem_read_word(Addr a, ThreadId tid)
-{
-   shadow_word* sword /* egcs-2.91.66 complains uninit */ = NULL; 
-   shadow_word  prevstate;
-   ThreadLifeSeg *tls;
-   const LockSet *ls;
-   Bool statechange = False;
-
-   static const void *const states[4] = {
-      [Vge_Virgin]  &&st_virgin,
-      [Vge_Excl]    &&st_excl,
-      [Vge_Shar]    &&st_shar,
-      [Vge_SharMod] &&st_sharmod,
-   };
-
-   tls = thread_seg[tid];
-   tl_assert(tls != NULL && tls->tid == tid);
-
-   sword = get_sword_addr(a);
-   if (sword == SEC_MAP_ACCESS) {
-      VG_(printf)("read distinguished 2ndary map! 0x%lx\n", a);
-      return;
-   }
-
-   prevstate = *sword;
-
-   goto *states[sword->state];
-
-   /* This looks like reading of unitialised memory, may be legit.  Eg. 
-    * calloc() zeroes its values, so untouched memory may actually be 
-    * initialised.   Leave that stuff to Valgrind.  */
-  st_virgin:
-   if (TID_INDICATING_NONVIRGIN == sword->other) {
-      DEBUG_STATE("Read  VIRGIN --> EXCL:   %8x, %u\n", a, tid);
-      if (DEBUG_VIRGIN_READS)
-        dump_around_a(a);
-   } else {
-      DEBUG_STATE("Read  SPECIAL --> EXCL:  %8x, %u\n", a, tid);
-   }
-   statechange = True;
-   *sword = SW(Vge_Excl, packTLS(tls));       /* remember exclusive owner */
-   tls->refcount++;
-   goto done;
-
-  st_excl: {
-      ThreadLifeSeg *sw_tls = unpackTLS(sword->other);
-
-      if (tls == sw_tls) {
-        DEBUG_STATE("Read  EXCL:              %8x, %u\n", a, tid);
-      } else if (unpackTLS(TLSP_INDICATING_ALL) == sw_tls) {
-        DEBUG_STATE("Read  EXCL/ERR:          %8x, %u\n", a, tid);
-      } else if (tlsIsDisjoint(tls, sw_tls)) {
-        DEBUG_STATE("Read  EXCL(%u) --> EXCL:  %8x, %u\n", sw_tls->tid, a, tid);
-        statechange = True;
-        sword->other = packTLS(tls);
-        sw_tls->refcount--;
-        tls->refcount++;
-      } else {
-        DEBUG_STATE("Read  EXCL(%u) --> SHAR:  %8x, %u\n", sw_tls->tid, a, tid);
-        sw_tls->refcount--;
-        statechange = True;
-        *sword = SW(Vge_Shar, packLockSet(thread_locks[tid]));
-           
-        if (DEBUG_MEM_LOCKSET_CHANGES)
-           print_LockSet("excl read locks", unpackLockSet(sword->other));
-      }
-      goto done;
-   }
-
-  st_shar:
-   DEBUG_STATE("Read  SHAR:              %8x, %u\n", a, tid);
-   sword->other = packLockSet(intersect(unpackLockSet(sword->other), 
-                                       thread_locks[tid]));
-   statechange = sword->other != prevstate.other;
-   goto done;
-
-  st_sharmod:
-   DEBUG_STATE("Read  SHAR_MOD:          %8x, %u\n", a, tid);
-   ls = intersect(unpackLockSet(sword->other), 
-                 thread_locks[tid]);
-   sword->other = packLockSet(ls);
-
-   statechange = sword->other != prevstate.other;
-
-   if (isempty(ls)) {
-      record_race_error(tid, a, False /* !is_write */, prevstate);
-   }
-   goto done;
-
-  done:
-   if (clo_execontext != EC_None && statechange) {
-      EC_IP ecip;
-
-      if (clo_execontext == EC_Some)
-        ecip = IP(VG_(get_IP)(tid), prevstate, tls);
-      else
-        ecip = EC(VG_(record_ExeContext)(tid), prevstate, tls);
-      setExeContext(a, ecip);
-   }
-}
-
-static void hg_mem_read(Addr a, SizeT size, ThreadId tid)
-{
-   Addr end;
-
-   end = VG_ROUNDUP(a+size, 4);
-   a   = VG_ROUNDDN(a, 4);
-
-   for ( ; a < end; a += 4)
-      hg_mem_read_word(a, tid);
-}
-
-static void hg_mem_write_word(Addr a, ThreadId tid)
-{
-   ThreadLifeSeg *tls;
-   shadow_word* sword /* egcs-2.91.66 complains uninit */ = NULL;
-   shadow_word  prevstate;
-   Bool statechange = False;
-   static const void *const states[4] = {
-      [Vge_Virgin]  &&st_virgin,
-      [Vge_Excl]    &&st_excl,
-      [Vge_Shar]    &&st_shar,
-      [Vge_SharMod] &&st_sharmod,
-   };
-
-   tls = thread_seg[tid];
-   tl_assert(tls != NULL && tls->tid == tid);
-
-   sword = get_sword_addr(a);
-   if (sword == SEC_MAP_ACCESS) {
-      VG_(printf)("read distinguished 2ndary map! 0x%lx\n", a);
-      return;
-   }
-
-   prevstate = *sword;
-
-   goto *states[sword->state];
-
-  st_virgin:
-   if (TID_INDICATING_NONVIRGIN == sword->other)
-      DEBUG_STATE("Write VIRGIN --> EXCL:   %8x, %u\n", a, tid);
-   else
-      DEBUG_STATE("Write SPECIAL --> EXCL:  %8x, %u\n", a, tid);
-   statechange = True;
-   *sword = SW(Vge_Excl, packTLS(tls));/* remember exclusive owner */
-   tls->refcount++;
-   goto done;
-
-  st_excl: {
-      ThreadLifeSeg *sw_tls = unpackTLS(sword->other);
-
-      if (tls == sw_tls) {
-        DEBUG_STATE("Write EXCL:              %8x, %u\n", a, tid);
-        goto done;
-      } else if (unpackTLS(TLSP_INDICATING_ALL) == sw_tls) {
-        DEBUG_STATE("Write EXCL/ERR:          %8x, %u\n", a, tid);
-        goto done;
-      } else if (tlsIsDisjoint(tls, sw_tls)) {
-        DEBUG_STATE("Write EXCL(%u) --> EXCL: %8x, %u\n", sw_tls->tid, a, tid);
-        sword->other = packTLS(tls);
-        sw_tls->refcount--;
-        tls->refcount++;
-        goto done;
-      } else {
-        DEBUG_STATE("Write EXCL(%u) --> SHAR_MOD: %8x, %u\n", sw_tls->tid, a, tid);
-        statechange = True;
-        sw_tls->refcount--;
-        *sword = SW(Vge_SharMod, packLockSet(thread_locks[tid]));
-        if(DEBUG_MEM_LOCKSET_CHANGES)
-           print_LockSet("excl write locks", unpackLockSet(sword->other));
-        goto SHARED_MODIFIED;
-      }
-   }
-
-  st_shar:
-   DEBUG_STATE("Write SHAR --> SHAR_MOD: %8x, %u\n", a, tid);
-   sword->state = Vge_SharMod;
-   sword->other = packLockSet(intersect(unpackLockSet(sword->other),
-                                       thread_locks[tid]));
-   statechange = True;
-   goto SHARED_MODIFIED;
-
-  st_sharmod:
-   DEBUG_STATE("Write SHAR_MOD:          %8x, %u\n", a, tid);
-   sword->other = packLockSet(intersect(unpackLockSet(sword->other), 
-                                       thread_locks[tid]));
-   statechange = sword->other != prevstate.other;
-
-  SHARED_MODIFIED:
-   if (isempty(unpackLockSet(sword->other))) {
-      record_race_error(tid, a, True /* is_write */, prevstate);
-   }
-   goto done;
-
-  done:
-   if (clo_execontext != EC_None && statechange) {
-      EC_IP ecip;
-
-      if (clo_execontext == EC_Some)
-        ecip = IP(VG_(get_IP)(tid), prevstate, tls);
-      else
-        ecip = EC(VG_(record_ExeContext)(tid), prevstate, tls);
-      setExeContext(a, ecip);
-   }
-}
-
-static void hg_mem_write(Addr a, SizeT size, ThreadId tid)
-{
-   Addr     end;
-
-   end = VG_ROUNDUP(a+size, 4);
-   a   = VG_ROUNDDN(a, 4);
-
-   for ( ; a < end; a += 4)
-      hg_mem_write_word(a, tid);
-}
-
-#undef DEBUG_STATE
-
-VG_REGPARM(1) static void hg_mem_help_read_1(Addr a)
-{
-   hg_mem_read(a, 1, VG_(get_running_tid)());
-}
-
-VG_REGPARM(1) static void hg_mem_help_read_2(Addr a)
-{
-   hg_mem_read(a, 2, VG_(get_running_tid)());
-}
-
-VG_REGPARM(1) static void hg_mem_help_read_4(Addr a)
-{
-   hg_mem_read(a, 4, VG_(get_running_tid)());
-}
-
-VG_REGPARM(2) static void hg_mem_help_read_N(Addr a, SizeT size)
-{
-   hg_mem_read(a, size, VG_(get_running_tid)());
-}
-
-VG_REGPARM(2) static void hg_mem_help_write_1(Addr a, UInt val)
-{
-   if (*(UChar *)a != val)
-      hg_mem_write(a, 1, VG_(get_running_tid)());
-}
-VG_REGPARM(2) static void hg_mem_help_write_2(Addr a, UInt val)
-{
-   if (*(UShort *)a != val)
-      hg_mem_write(a, 2, VG_(get_running_tid)());
-}
-VG_REGPARM(2) static void hg_mem_help_write_4(Addr a, UInt val)
-{
-   if (*(UInt *)a != val)
-      hg_mem_write(a, 4, VG_(get_running_tid)());
-}
-VG_REGPARM(2) static void hg_mem_help_write_N(Addr a, SizeT size)
-{
-   hg_mem_write(a, size, VG_(get_running_tid)());
-}
-
-static void hg_thread_create(ThreadId parent, ThreadId child)
-{
-   if (0)
-      VG_(printf)("CREATE: %u creating %u\n", parent, child);
-
-   newTLS(child);
-   addPriorTLS(child, parent);
-
-   newTLS(parent);
-}
-
-static void hg_thread_join(ThreadId joiner, ThreadId joinee)
-{
-   if (0)
-      VG_(printf)("JOIN: %u joining on %u\n", joiner, joinee);
-
-   newTLS(joiner);
-   addPriorTLS(joiner, joinee);
-
-   clearTLS(joinee);
-}
-
-static Int __BUS_HARDWARE_LOCK__;
-
-static void bus_lock(void)
-{
-   ThreadId tid = VG_(get_running_tid)();
-   hg_pre_mutex_lock(tid, (Addr)&__BUS_HARDWARE_LOCK__);
-   hg_post_mutex_lock(tid, (Addr)&__BUS_HARDWARE_LOCK__);
-}
-
-static void bus_unlock(void)
-{
-   ThreadId tid = VG_(get_running_tid)();
-   hg_post_mutex_unlock(tid, (Addr)&__BUS_HARDWARE_LOCK__);
-}
-
-/*--------------------------------------------------------------------*/
-/*--- Client requests                                              ---*/
-/*--------------------------------------------------------------------*/
-
-static Bool hg_handle_client_request(ThreadId tid, UWord *args, UWord *ret)
-{
-   if (!VG_IS_TOOL_USERREQ('H','G',args[0]))
-      return False;
-
-   switch(args[0]) {
-   case VG_USERREQ__HG_CLEAN_MEMORY:
-      set_address_range_state(args[1], args[2], Vge_VirginInit);
-      *ret = 0;                        /* meaningless */
-      break;
-
-   case VG_USERREQ__HG_KNOWN_RACE:
-      set_address_range_state(args[1], args[2], Vge_Error);
-      *ret = 0;                        /* meaningless */
-      break;
-
-   default:
-      return False;
-   }
-
-   return True;
-}
-
-
-/*--------------------------------------------------------------------*/
-/*--- Setup and finalisation                                       ---*/
-/*--------------------------------------------------------------------*/
-
-static Bool hg_process_cmd_line_option(Char* arg)
-{
-   if      (VG_CLO_STREQ(arg, "--show-last-access=no"))
-      clo_execontext = EC_None;
-   else if (VG_CLO_STREQ(arg, "--show-last-access=some"))
-      clo_execontext = EC_Some;
-   else if (VG_CLO_STREQ(arg, "--show-last-access=all"))
-      clo_execontext = EC_All;
-
-   else VG_BOOL_CLO(arg, "--private-stacks", clo_priv_stacks)
-
-   else 
-      return VG_(replacement_malloc_process_cmd_line_option)(arg);
-
-   return True;
-}
-
-static void hg_print_usage(void)
-{
-   VG_(printf)(
-"    --private-stacks=yes|no   assume thread stacks are used privately [no]\n"
-"    --show-last-access=no|some|all\n"
-"                           show location of last word access on error [no]\n"
-   );
-   VG_(replacement_malloc_print_usage)();
-}
-
-static void hg_print_debug_usage(void)
-{
-   VG_(replacement_malloc_print_debug_usage)();
-}
-
-static void hg_post_clo_init(void)
-{
-   void (*stack_tracker)(Addr a, SizeT len);
-   
-   if (clo_execontext) {
-      execontext_map = VG_(malloc)(sizeof(ExeContextMap *) * 65536);
-      VG_(memset)(execontext_map, 0, sizeof(ExeContextMap *) * 65536);
-   }
-
-   if (clo_priv_stacks)
-      stack_tracker = & hg_new_mem_stack_private;
-   else
-      stack_tracker = & hg_new_mem_stack;
-
-   VG_(track_new_mem_stack)        (stack_tracker);
-   VG_(track_new_mem_stack_signal) (stack_tracker);
-}
-
-
-static void hg_fini(Int exitcode)
-{
-   if (DEBUG_LOCK_TABLE) {
-      pp_all_LockSets();
-      pp_all_mutexes();
-   }
-
-   if (LOCKSET_SANITY)
-      sanity_check_locksets("hg_fini");
-
-   if (VG_(clo_verbosity) > 0)
-      VG_(message)(Vg_UserMsg, "%u possible data races found; %u lock order problems",
-                  n_hg_warnings, n_lockorder_warnings);
-
-   if (0)
-      VG_(printf)("stk_ld:%u+stk_st:%u = %u  nonstk_ld:%u+nonstk_st:%u = %u  %u%%\n",
-                 stk_ld, stk_st, stk_ld + stk_st,
-                 nonstk_ld, nonstk_st, nonstk_ld + nonstk_st,
-                 ((stk_ld+stk_st)*100) / (stk_ld + stk_st + nonstk_ld + nonstk_st));
-}
-
-static void hg_pre_clo_init(void)
-{
-   Int i;
-   LockSet *empty;
-
-   VG_(details_name)            ("Helgrind");
-   VG_(details_version)         (NULL);
-   VG_(details_description)     ("a data race detector");
-   VG_(details_copyright_author)(
-      "Copyright (C) 2002-2007, and GNU GPL'd, by Nicholas Nethercote et al.");
-   VG_(details_bug_reports_to)  (VG_BUGS_TO);
-   VG_(details_avg_translation_sizeB) ( 300 );
-
-   VG_(basic_tool_funcs)          (hg_post_clo_init,
-                                   hg_instrument,
-                                   hg_fini);
-
-   VG_(printf)(
-"\n"
-"Helgrind is currently not working, because:\n"
-" (a) it is not yet ready to handle the Vex IR and the use with 64-bit\n"
-"     platforms introduced in Valgrind 3.0.0\n"
-" (b) we need to get thread operation tracking working again after\n"
-"     the changes added in Valgrind 2.4.0\n"
-" If you want to use Helgrind, you'll have to use Valgrind 2.2.0, which is\n"
-" the most recent Valgrind release that contains a working Helgrind.\n"
-"\n"
-"Sorry for the inconvenience.  Let us know if this is a problem for you.\n");
-   VG_(exit)(1);
-
-   VG_(needs_core_errors)         ();
-   VG_(needs_tool_errors)         (hg_eq_Error,
-                                   hg_pp_Error,
-                                   hg_update_extra,
-                                   hg_recognised_suppression,
-                                   hg_read_extra_suppression_info,
-                                   hg_error_matches_suppression,
-                                   hg_get_error_name,
-                                   hg_print_extra_suppression_info);
-   VG_(needs_data_syms)           ();
-   VG_(needs_client_requests)     (hg_handle_client_request);
-   VG_(needs_sanity_checks)       (hg_cheap_sanity_check,
-                                   hg_expensive_sanity_check);
-   VG_(needs_command_line_options)(hg_process_cmd_line_option,
-                                   hg_print_usage,
-                                   hg_print_debug_usage);
-
-   VG_(needs_malloc_replacement)  (hg_malloc,
-                                   hg___builtin_new,
-                                   hg___builtin_vec_new,
-                                   hg_memalign,
-                                   hg_calloc,
-                                   hg_free,
-                                   hg___builtin_delete,
-                                   hg___builtin_vec_delete,
-                                   hg_realloc,
-                                   8 );
-
-   VG_(track_new_mem_startup)      (& hg_new_mem_startup);
-
-   /* stack ones not decided until hg_post_clo_init() */
-
-   VG_(track_new_mem_brk)         (& make_writable);
-   VG_(track_new_mem_mmap)        (& hg_new_mem_startup);
-
-   VG_(track_change_mem_mprotect) (& hg_set_perms);
-
-   VG_(track_ban_mem_stack)       (NULL);
-
-   VG_(track_die_mem_stack)       (NULL);
-   VG_(track_die_mem_stack_signal)(NULL);
-   VG_(track_die_mem_brk)         (NULL);
-   VG_(track_die_mem_munmap)      (NULL);
-
-   VG_(track_pre_mem_read)        (& hg_pre_mem_read);
-   VG_(track_pre_mem_read_asciiz) (& hg_pre_mem_read_asciiz);
-   VG_(track_pre_mem_write)       (& hg_pre_mem_write);
-   VG_(track_post_mem_write)      (NULL);
-
-   VG_(track_post_thread_create)  (& hg_thread_create);
-   VG_(track_post_thread_join)    (& hg_thread_join);
-
-   /* The core doesn't provide these events any more */
-   /*
-   VG_(track_pre_mutex_lock)      (& hg_pre_mutex_lock);
-   VG_(track_post_mutex_lock)     (& hg_post_mutex_lock);
-   VG_(track_post_mutex_unlock)   (& hg_post_mutex_unlock);
-   */
-
-   for (i = 0; i < LOCKSET_HASH_SZ; i++)
-      lockset_hash[i] = NULL;
-
-   empty = alloc_LockSet(0);
-   insert_LockSet(empty);
-   emptyset = empty;
-
-   /* Init lock table and thread segments */
-   for (i = 0; i < VG_N_THREADS; i++) {
-      thread_locks[i] = empty;
-
-      newTLS(i);
-   }
-
-   init_shadow_memory();
-   hg_malloc_list = VG_(HT_construct)( "Helgrind's malloc list" );
-}
-
-VG_DETERMINE_INTERFACE_VERSION(hg_pre_clo_init)
-
-/*--------------------------------------------------------------------*/
-/*--- end                                                hg_main.c ---*/
-/*--------------------------------------------------------------------*/
diff --git a/old-helgrind/tests/Makefile.am b/old-helgrind/tests/Makefile.am
deleted file mode 100644 (file)
index fbfc93d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-# For AM_FLAG_M3264_PRI
-include $(top_srcdir)/Makefile.flags.am
-
-noinst_SCRIPTS = filter_stderr
-
-EXTRA_DIST = $(noinst_SCRIPTS) \
-       allok.stderr.exp allok.vgtest           \
-       deadlock.stderr.exp deadlock.vgtest     \
-       inherit.stderr.exp inherit.vgtest       \
-       race.stderr.exp race.vgtest             \
-       race2.stderr.exp race2.vgtest           \
-       readshared.stderr.exp readshared.vgtest \
-       toobig-allocs.stderr.exp toobig-allocs.vgtest
-
-check_PROGRAMS = \
-       allok deadlock inherit race race2 readshared
-
-# force -gstabs, because we don't print symaddr for DWARF yet
-# Sigh, gcc-3.4.3 on ppc64 generates bogus .stabs.  So disable it
-# for now on ppc64-linux.
-if VGP_PPC64_LINUX
-AM_CFLAGS      = $(WERROR) -Winline -Wall -Wshadow -g      $(AM_FLAG_M3264_PRI)
-else
-
-# In fact -gstabs is broken on many systems now
-#AM_CFLAGS     = $(WERROR) -Winline -Wall -Wshadow -gstabs $(AM_FLAG_M3264_PRI)
-AM_CFLAGS      = $(WERROR) -Winline -Wall -Wshadow -g      $(AM_FLAG_M3264_PRI)
-
-endif
-
-LDADD          = -lpthread
diff --git a/old-helgrind/tests/allok.c b/old-helgrind/tests/allok.c
deleted file mode 100644 (file)
index 144ce60..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* All OK */
-
-#include <pthread.h>
-
-static pthread_mutex_t mx = PTHREAD_MUTEX_INITIALIZER;
-
-static int shared;
-
-static void *th(void *v)
-{
-       pthread_mutex_lock(&mx);
-       shared++;
-       pthread_mutex_unlock(&mx);
-
-       return 0;
-}
-
-int main()
-{
-       pthread_t a, b;
-
-       pthread_mutex_lock(&mx);
-       pthread_mutex_unlock(&mx);
-
-       pthread_create(&a, NULL, th, NULL);     
-       pthread_create(&b, NULL, th, NULL);
-
-       pthread_join(a, NULL);
-       pthread_join(b, NULL);
-
-       return 0;
-}
diff --git a/old-helgrind/tests/allok.stderr.exp b/old-helgrind/tests/allok.stderr.exp
deleted file mode 100644 (file)
index 139597f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/old-helgrind/tests/allok.vgtest b/old-helgrind/tests/allok.vgtest
deleted file mode 100644 (file)
index 6063069..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: allok
-vgopts: --optimise=no
diff --git a/old-helgrind/tests/deadlock.c b/old-helgrind/tests/deadlock.c
deleted file mode 100644 (file)
index 1142f5c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Simple possible deadlock */
-#include <pthread.h>
-
-static pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
-
-static void *t1(void *v)
-{
-       pthread_mutex_lock(&m1);
-       pthread_mutex_lock(&m2);
-       pthread_mutex_unlock(&m1);
-       pthread_mutex_unlock(&m2);
-
-       return 0;
-}
-
-static void *t2(void *v)
-{
-       pthread_mutex_lock(&m2);
-       pthread_mutex_lock(&m1);
-       pthread_mutex_unlock(&m1);
-       pthread_mutex_unlock(&m2);
-
-       return 0;
-}
-
-int main()
-{
-       pthread_t a, b;
-       
-       /* prevent spurious messages from the dynamic linker */
-       pthread_mutex_lock(&m1);
-       pthread_mutex_unlock(&m1);
-
-       pthread_create(&a, NULL, t1, NULL);     
-       pthread_create(&b, NULL, t2, NULL);
-
-       pthread_join(a, NULL);
-       pthread_join(b, NULL);
-
-       return 0;
-}
-
diff --git a/old-helgrind/tests/deadlock.stderr.exp b/old-helgrind/tests/deadlock.stderr.exp
deleted file mode 100644 (file)
index 050d008..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Thread 3:
-Mutex 0x........(m1) locked in inconsistent order
-   at 0x........: pthread_mutex_lock (vg_libpthread.c:...)
-   by 0x........: t2 (deadlock.c:20)
-   by 0x........: thread_wrapper (vg_libpthread.c:...)
-   by 0x........: do__quit (vg_scheduler.c:...)
- while holding locks 0x........(m2)
- 0x........(m2) last locked at
-   at 0x........: pthread_mutex_lock (vg_libpthread.c:...)
-   by 0x........: t2 (deadlock.c:19)
-   by 0x........: thread_wrapper (vg_libpthread.c:...)
-   by 0x........: do__quit (vg_scheduler.c:...)
- while depending on locks 0x........(m1)
-
diff --git a/old-helgrind/tests/deadlock.vgtest b/old-helgrind/tests/deadlock.vgtest
deleted file mode 100644 (file)
index 38418b4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: deadlock
-vgopts: --optimise=no
diff --git a/old-helgrind/tests/filter_stderr b/old-helgrind/tests/filter_stderr
deleted file mode 100755 (executable)
index b8a0cf7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /bin/sh
-
-# Same as for MemCheck
-
-dir=`dirname $0`
-
-$dir/../../tests/filter_stderr_basic |
-$dir/../../tests/filter_addresses |
-
-# Remove "Helgrind, ..." line and the following copyright line.
-sed "/^Helgrind, a data race detector./ , /./ d" |
-
-# Anonymise paths like "section of /foo/bar/helgrind/tests/baz)"
-sed "s/section of \/.*helgrind\/tests.*$/section of \/...helgrind\/tests.../" |
-
-# Anonymise line numbers in vg_scheduler.c
-sed "s/vg_scheduler.c:[0-9]\+/vg_scheduler.c:.../" |
-
-# Output looks like...
-#
-# ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-# [0] = { }
-# ==27116== 0 possible data races found
-sed "/ERROR SUMMARY:/ , /0 possible data races found/ d"
-
diff --git a/old-helgrind/tests/inherit.c b/old-helgrind/tests/inherit.c
deleted file mode 100644 (file)
index 700ec4f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* test child thread inheriting data */
-
-// ***
-//
-// Helgrind should detect an error on line 48 for this test, but it doesn't!
-//
-// ***
-
-#include <pthread.h>
-#include <unistd.h>
-
-static volatile int shared[2];
-
-static void *t1(void *v)
-{
-       volatile int *ip = (int *)v;
-       *ip += 44;
-       *ip *= 2;
-       sleep(1);
-       return 0;
-}
-
-static void *t2(void *v)
-{
-       volatile int *ip = (int *)v;
-       *ip += 88;
-       *ip *= 3;
-       sleep(2);
-       return 0;
-}
-
-int main()
-{
-       pthread_t a, b;
-       volatile int ret = 0;
-
-       sleep(0);
-
-       shared[0] = 22;
-       shared[1] = 77;
-
-       pthread_create(&a, NULL, t1, (void *)&shared[0]);       
-       pthread_create(&b, NULL, t2, (void *)&shared[1]);
-
-       pthread_join(a, NULL);
-
-       ret += shared[0];       /* no error - a is finished */
-       ret += shared[1];       /* expect error - b has not finished,
-                                  so we can't touch shared[1] yet */
-
-       pthread_join(b, NULL);
-
-
-       return ret;
-}
diff --git a/old-helgrind/tests/inherit.stderr.exp b/old-helgrind/tests/inherit.stderr.exp
deleted file mode 100644 (file)
index 139597f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/old-helgrind/tests/inherit.vgtest b/old-helgrind/tests/inherit.vgtest
deleted file mode 100644 (file)
index 5db4a74..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: inherit
-vgopts: --optimise=no
diff --git a/old-helgrind/tests/race.c b/old-helgrind/tests/race.c
deleted file mode 100644 (file)
index 111195b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* A simple race */
-
-#include <pthread.h>
-#include <unistd.h>
-
-static int shared;
-
-static void *th(void *v)
-{
-       shared++;
-
-       return 0;
-}
-
-int main()
-{
-       pthread_t a, b;
-
-       pthread_create(&a, NULL, th, NULL);     
-       sleep(1);               /* force ordering */
-       pthread_create(&b, NULL, th, NULL);
-
-       pthread_join(a, NULL);
-       pthread_join(b, NULL);
-
-       return 0;
-}
diff --git a/old-helgrind/tests/race.stderr.exp b/old-helgrind/tests/race.stderr.exp
deleted file mode 100644 (file)
index 96832e6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-Thread 3:
-Possible data race writing variable at 0x........ (shared)
-   at 0x........: th (race.c:10)
-   by 0x........: thread_wrapper (vg_libpthread.c:...)
-   by 0x........: do__quit (vg_scheduler.c:...)
- Address 0x........ is in BSS section of /...helgrind/tests...
- Previous state: shared RO, no locks
-
diff --git a/old-helgrind/tests/race.vgtest b/old-helgrind/tests/race.vgtest
deleted file mode 100644 (file)
index ca127cd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: race
-vgopts: --optimise=no
diff --git a/old-helgrind/tests/race2.c b/old-helgrind/tests/race2.c
deleted file mode 100644 (file)
index de01f2c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* A simple race - test symaddr */
-
-#include <pthread.h>
-#include <unistd.h>
-
-struct foo {
-       struct bar {
-               int plop[22];
-               char biff;
-       } poot[11];
-};
-
-static void *th(void *v)
-{
-       struct foo *f = (struct foo *)v;
-
-       f->poot[5].plop[11]++;
-
-       return 0;
-}
-
-int main()
-{
-       struct foo foo;
-       pthread_t a, b;
-
-       pthread_create(&a, NULL, th, &foo);     
-       sleep(1);               /* force ordering */
-       pthread_create(&b, NULL, th, &foo);
-
-       pthread_join(a, NULL);
-       pthread_join(b, NULL);
-
-       return 0;
-}
diff --git a/old-helgrind/tests/race2.stderr.exp b/old-helgrind/tests/race2.stderr.exp
deleted file mode 100644 (file)
index 9a7d7e6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-Thread 3:
-Possible data race writing variable at 0x........ 
-   at 0x........: th (race2.c:17)
-   by 0x........: thread_wrapper (vg_libpthread.c:...)
-   by 0x........: do__quit (vg_scheduler.c:...)
- Address 0x........ == &(f->poot[5].plop[11]) at race2.c:17
- Previous state: shared RO, no locks
-
diff --git a/old-helgrind/tests/race2.vgtest b/old-helgrind/tests/race2.vgtest
deleted file mode 100644 (file)
index a67c27a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: race2
-vgopts: --optimise=no
diff --git a/old-helgrind/tests/readshared.c b/old-helgrind/tests/readshared.c
deleted file mode 100644 (file)
index 3904b44..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* All OK - test allowed read sharing */
-
-#include <pthread.h>
-#include <assert.h>
-
-static int shared;
-
-static void *t1(void *v)
-{
-       return (void *)(long)(shared + 44);
-}
-
-static void *t2(void *v)
-{
-       return (void *)(long)(shared + 55);
-}
-
-int main()
-{
-       pthread_t a, b;
-
-       shared = 22;
-
-       pthread_create(&a, NULL, t1, NULL);     
-       pthread_create(&b, NULL, t2, NULL);
-
-       pthread_join(a, NULL);
-       pthread_join(b, NULL);
-
-       assert(shared == 22);
-
-       return 0;
-}
diff --git a/old-helgrind/tests/readshared.stderr.exp b/old-helgrind/tests/readshared.stderr.exp
deleted file mode 100644 (file)
index 139597f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/old-helgrind/tests/readshared.vgtest b/old-helgrind/tests/readshared.vgtest
deleted file mode 100644 (file)
index 2d91bee..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: readshared
-vgopts: --optimise=no
diff --git a/old-helgrind/tests/toobig-allocs.stderr.exp b/old-helgrind/tests/toobig-allocs.stderr.exp
deleted file mode 100644 (file)
index 28c2b9e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Attempting too-big malloc()...
-Attempting too-big mmap()...
-
diff --git a/old-helgrind/tests/toobig-allocs.vgtest b/old-helgrind/tests/toobig-allocs.vgtest
deleted file mode 100644 (file)
index 186cf5f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-prog: ../../tests/toobig-allocs
diff --git a/old-helgrind/tests/x86/Makefile.am b/old-helgrind/tests/x86/Makefile.am
deleted file mode 100644 (file)
index 7bd6d4c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_SCRIPTS = filter_stderr
-
-INSN_TESTS=insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
-
-EXTRA_DIST = $(noinst_SCRIPTS) \
-       $(addsuffix .stderr.exp,$(INSN_TESTS)) \
-       $(addsuffix .stdout.exp,$(INSN_TESTS)) \
-       $(addsuffix .vgtest,$(INSN_TESTS))
diff --git a/old-helgrind/tests/x86/filter_stderr b/old-helgrind/tests/x86/filter_stderr
deleted file mode 100755 (executable)
index 0ae9313..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-
-../filter_stderr
diff --git a/old-helgrind/tests/x86/insn_basic.stderr.exp b/old-helgrind/tests/x86/insn_basic.stderr.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/old-helgrind/tests/x86/insn_basic.stdout.exp b/old-helgrind/tests/x86/insn_basic.stdout.exp
deleted file mode 100644 (file)
index 40cabbc..0000000
+++ /dev/null
@@ -1,1083 +0,0 @@
-aaa_1 ... ok
-aaa_2 ... ok
-aaa_3 ... ok
-aaa_4 ... ok
-aaa_5 ... ok
-aaa_6 ... ok
-aaa_7 ... ok
-aaa_8 ... ok
-aad_1 ... ok
-aad_2 ... ok
-aam_1 ... ok
-aam_2 ... ok
-aas_1 ... ok
-aas_2 ... ok
-aas_3 ... ok
-aas_4 ... ok
-aas_5 ... ok
-aas_6 ... ok
-aas_7 ... ok
-aas_8 ... ok
-adcb_1 ... ok
-adcb_2 ... ok
-adcb_3 ... ok
-adcb_4 ... ok
-adcb_5 ... ok
-adcb_6 ... ok
-adcb_7 ... ok
-adcb_8 ... ok
-adcb_9 ... ok
-adcb_10 ... ok
-adcb_11 ... ok
-adcb_12 ... ok
-adcw_1 ... ok
-adcw_2 ... ok
-adcw_3 ... ok
-adcw_4 ... ok
-adcw_5 ... ok
-adcw_6 ... ok
-adcw_7 ... ok
-adcw_8 ... ok
-adcw_9 ... ok
-adcw_10 ... ok
-adcw_11 ... ok
-adcw_12 ... ok
-adcw_13 ... ok
-adcw_14 ... ok
-adcl_1 ... ok
-adcl_2 ... ok
-adcl_3 ... ok
-adcl_4 ... ok
-adcl_5 ... ok
-adcl_6 ... ok
-adcl_7 ... ok
-adcl_8 ... ok
-adcl_9 ... ok
-adcl_10 ... ok
-adcl_11 ... ok
-adcl_12 ... ok
-adcl_13 ... ok
-adcl_14 ... ok
-addb_1 ... ok
-addb_2 ... ok
-addb_3 ... ok
-addb_4 ... ok
-addb_5 ... ok
-addb_6 ... ok
-addw_1 ... ok
-addw_2 ... ok
-addw_3 ... ok
-addw_4 ... ok
-addw_5 ... ok
-addw_6 ... ok
-addw_7 ... ok
-addl_1 ... ok
-addl_2 ... ok
-addl_3 ... ok
-addl_4 ... ok
-addl_5 ... ok
-addl_6 ... ok
-addl_7 ... ok
-andb_1 ... ok
-andb_2 ... ok
-andb_3 ... ok
-andb_4 ... ok
-andb_5 ... ok
-andb_6 ... ok
-andw_1 ... ok
-andw_2 ... ok
-andw_3 ... ok
-andw_4 ... ok
-andw_5 ... ok
-andw_6 ... ok
-andw_7 ... ok
-andl_1 ... ok
-andl_2 ... ok
-andl_3 ... ok
-andl_4 ... ok
-andl_5 ... ok
-andl_6 ... ok
-andl_7 ... ok
-bsfw_1 ... ok
-bsfw_2 ... ok
-bsfl_1 ... ok
-bsfl_2 ... ok
-bsrw_1 ... ok
-bsrw_2 ... ok
-bsrl_1 ... ok
-bsrl_2 ... ok
-bswapl_1 ... ok
-btw_1 ... ok
-btw_2 ... ok
-btw_3 ... ok
-btw_4 ... ok
-btw_5 ... ok
-btw_6 ... ok
-btw_7 ... ok
-btw_8 ... ok
-btl_1 ... ok
-btl_2 ... ok
-btl_3 ... ok
-btl_4 ... ok
-btl_5 ... ok
-btl_6 ... ok
-btl_7 ... ok
-btl_8 ... ok
-btcw_1 ... ok
-btcw_2 ... ok
-btcw_3 ... ok
-btcw_4 ... ok
-btcw_5 ... ok
-btcw_6 ... ok
-btcw_7 ... ok
-btcw_8 ... ok
-btcl_1 ... ok
-btcl_2 ... ok
-btcl_3 ... ok
-btcl_4 ... ok
-btcl_5 ... ok
-btcl_6 ... ok
-btcl_7 ... ok
-btcl_8 ... ok
-btrw_1 ... ok
-btrw_2 ... ok
-btrw_3 ... ok
-btrw_4 ... ok
-btrw_5 ... ok
-btrw_6 ... ok
-btrw_7 ... ok
-btrw_8 ... ok
-btrl_1 ... ok
-btrl_2 ... ok
-btrl_3 ... ok
-btrl_4 ... ok
-btrl_5 ... ok
-btrl_6 ... ok
-btrl_7 ... ok
-btrl_8 ... ok
-btsw_1 ... ok
-btsw_2 ... ok
-btsw_3 ... ok
-btsw_4 ... ok
-btsw_5 ... ok
-btsw_6 ... ok
-btsw_7 ... ok
-btsw_8 ... ok
-btsl_1 ... ok
-btsl_2 ... ok
-btsl_3 ... ok
-btsl_4 ... ok
-btsl_5 ... ok
-btsl_6 ... ok
-btsl_7 ... ok
-btsl_8 ... ok
-cbw_1 ... ok
-cbw_2 ... ok
-cdq_1 ... ok
-cdq_2 ... ok
-clc_1 ... ok
-clc_2 ... ok
-cld_1 ... ok
-cld_2 ... ok
-cmc_1 ... ok
-cmc_2 ... ok
-cmpb_1 ... ok
-cmpb_2 ... ok
-cmpb_3 ... ok
-cmpb_4 ... ok
-cmpb_5 ... ok
-cmpb_6 ... ok
-cmpb_7 ... ok
-cmpb_8 ... ok
-cmpb_9 ... ok
-cmpb_10 ... ok
-cmpb_11 ... ok
-cmpb_12 ... ok
-cmpb_13 ... ok
-cmpb_14 ... ok
-cmpb_15 ... ok
-cmpb_16 ... ok
-cmpb_17 ... ok
-cmpb_18 ... ok
-cmpb_19 ... ok
-cmpb_20 ... ok
-cmpb_21 ... ok
-cmpb_22 ... ok
-cmpb_23 ... ok
-cmpb_24 ... ok
-cmpb_25 ... ok
-cmpb_26 ... ok
-cmpb_27 ... ok
-cmpb_28 ... ok
-cmpb_29 ... ok
-cmpb_30 ... ok
-cmpb_31 ... ok
-cmpb_32 ... ok
-cmpb_33 ... ok
-cmpb_34 ... ok
-cmpb_35 ... ok
-cmpb_36 ... ok
-cmpb_37 ... ok
-cmpb_38 ... ok
-cmpb_39 ... ok
-cmpb_40 ... ok
-cmpb_41 ... ok
-cmpb_42 ... ok
-cmpb_43 ... ok
-cmpb_44 ... ok
-cmpb_45 ... ok
-cmpb_46 ... ok
-cmpb_47 ... ok
-cmpb_48 ... ok
-cmpb_49 ... ok
-cmpb_50 ... ok
-cmpb_51 ... ok
-cmpb_52 ... ok
-cmpb_53 ... ok
-cmpb_54 ... ok
-cmpb_55 ... ok
-cmpb_56 ... ok
-cmpb_57 ... ok
-cmpb_58 ... ok
-cmpb_59 ... ok
-cmpb_60 ... ok
-cmpw_1 ... ok
-cmpw_2 ... ok
-cmpw_3 ... ok
-cmpw_4 ... ok
-cmpw_5 ... ok
-cmpw_6 ... ok
-cmpw_7 ... ok
-cmpw_8 ... ok
-cmpw_9 ... ok
-cmpw_10 ... ok
-cmpw_11 ... ok
-cmpw_12 ... ok
-cmpw_13 ... ok
-cmpw_14 ... ok
-cmpw_15 ... ok
-cmpw_16 ... ok
-cmpw_17 ... ok
-cmpw_18 ... ok
-cmpw_19 ... ok
-cmpw_20 ... ok
-cmpw_21 ... ok
-cmpw_22 ... ok
-cmpw_23 ... ok
-cmpw_24 ... ok
-cmpw_25 ... ok
-cmpw_26 ... ok
-cmpw_27 ... ok
-cmpw_28 ... ok
-cmpw_29 ... ok
-cmpw_30 ... ok
-cmpw_31 ... ok
-cmpw_32 ... ok
-cmpw_33 ... ok
-cmpw_34 ... ok
-cmpw_35 ... ok
-cmpw_36 ... ok
-cmpw_37 ... ok
-cmpw_38 ... ok
-cmpw_39 ... ok
-cmpw_40 ... ok
-cmpw_41 ... ok
-cmpw_42 ... ok
-cmpw_43 ... ok
-cmpw_44 ... ok
-cmpw_45 ... ok
-cmpw_46 ... ok
-cmpw_47 ... ok
-cmpw_48 ... ok
-cmpw_49 ... ok
-cmpw_50 ... ok
-cmpw_51 ... ok
-cmpw_52 ... ok
-cmpw_53 ... ok
-cmpw_54 ... ok
-cmpw_55 ... ok
-cmpw_56 ... ok
-cmpw_57 ... ok
-cmpw_58 ... ok
-cmpw_59 ... ok
-cmpw_60 ... ok
-cmpw_61 ... ok
-cmpw_62 ... ok
-cmpw_63 ... ok
-cmpw_64 ... ok
-cmpw_65 ... ok
-cmpw_66 ... ok
-cmpw_67 ... ok
-cmpw_68 ... ok
-cmpw_69 ... ok
-cmpw_70 ... ok
-cmpw_71 ... ok
-cmpw_72 ... ok
-cmpw_73 ... ok
-cmpw_74 ... ok
-cmpw_75 ... ok
-cmpw_76 ... ok
-cmpw_77 ... ok
-cmpw_78 ... ok
-cmpw_79 ... ok
-cmpw_80 ... ok
-cmpl_1 ... ok
-cmpl_2 ... ok
-cmpl_3 ... ok
-cmpl_4 ... ok
-cmpl_5 ... ok
-cmpl_6 ... ok
-cmpl_7 ... ok
-cmpl_8 ... ok
-cmpl_9 ... ok
-cmpl_10 ... ok
-cmpl_11 ... ok
-cmpl_12 ... ok
-cmpl_13 ... ok
-cmpl_14 ... ok
-cmpl_15 ... ok
-cmpl_16 ... ok
-cmpl_17 ... ok
-cmpl_18 ... ok
-cmpl_19 ... ok
-cmpl_20 ... ok
-cmpl_21 ... ok
-cmpl_22 ... ok
-cmpl_23 ... ok
-cmpl_24 ... ok
-cmpl_25 ... ok
-cmpl_26 ... ok
-cmpl_27 ... ok
-cmpl_28 ... ok
-cmpl_29 ... ok
-cmpl_30 ... ok
-cmpl_31 ... ok
-cmpl_32 ... ok
-cmpl_33 ... ok
-cmpl_34 ... ok
-cmpl_35 ... ok
-cmpl_36 ... ok
-cmpl_37 ... ok
-cmpl_38 ... ok
-cmpl_39 ... ok
-cmpl_40 ... ok
-cmpl_41 ... ok
-cmpl_42 ... ok
-cmpl_43 ... ok
-cmpl_44 ... ok
-cmpl_45 ... ok
-cmpl_46 ... ok
-cmpl_47 ... ok
-cmpl_48 ... ok
-cmpl_49 ... ok
-cmpl_50 ... ok
-cmpl_51 ... ok
-cmpl_52 ... ok
-cmpl_53 ... ok
-cmpl_54 ... ok
-cmpl_55 ... ok
-cmpl_56 ... ok
-cmpl_57 ... ok
-cmpl_58 ... ok
-cmpl_59 ... ok
-cmpl_60 ... ok
-cmpl_61 ... ok
-cmpl_62 ... ok
-cmpl_63 ... ok
-cmpl_64 ... ok
-cmpl_65 ... ok
-cmpl_66 ... ok
-cmpl_67 ... ok
-cmpl_68 ... ok
-cmpl_69 ... ok
-cmpl_70 ... ok
-cmpl_71 ... ok
-cmpl_72 ... ok
-cmpl_73 ... ok
-cmpl_74 ... ok
-cmpl_75 ... ok
-cmpl_76 ... ok
-cmpl_77 ... ok
-cmpl_78 ... ok
-cmpl_79 ... ok
-cmpl_80 ... ok
-cmpxchgb_1 ... ok
-cmpxchgb_2 ... ok
-cmpxchgb_3 ... ok
-cmpxchgb_4 ... ok
-cmpxchgw_1 ... ok
-cmpxchgw_2 ... ok
-cmpxchgw_3 ... ok
-cmpxchgw_4 ... ok
-cmpxchgl_1 ... ok
-cmpxchgl_2 ... ok
-cmpxchgl_3 ... ok
-cmpxchgl_4 ... ok
-cwd_1 ... ok
-cwd_2 ... ok
-cwde_1 ... ok
-cwde_2 ... ok
-daa_1 ... ok
-daa_2 ... ok
-das_1 ... ok
-decb_1 ... ok
-decb_2 ... ok
-decw_1 ... ok
-decw_2 ... ok
-decl_1 ... ok
-decl_2 ... ok
-divb_1 ... ok
-divb_2 ... ok
-divw_1 ... ok
-divw_2 ... ok
-divl_1 ... ok
-divl_2 ... ok
-idivb_1 ... ok
-idivb_2 ... ok
-idivw_1 ... ok
-idivw_2 ... ok
-idivl_1 ... ok
-idivl_2 ... ok
-imulb_1 ... ok
-imulb_2 ... ok
-imulw_1 ... ok
-imulw_2 ... ok
-imull_1 ... ok
-imull_2 ... ok
-imulw_3 ... ok
-imulw_4 ... ok
-imulw_5 ... ok
-imulw_6 ... ok
-imulw_7 ... ok
-imulw_8 ... ok
-imulw_9 ... ok
-imulw_10 ... ok
-imull_3 ... ok
-imull_4 ... ok
-imull_5 ... ok
-imull_6 ... ok
-imull_7 ... ok
-imull_8 ... ok
-imull_9 ... ok
-imull_10 ... ok
-incb_1 ... ok
-incb_2 ... ok
-incw_1 ... ok
-incw_2 ... ok
-incl_1 ... ok
-incl_2 ... ok
-lahf_1 ... ok
-lahf_2 ... ok
-movb_1 ... ok
-movb_2 ... ok
-movb_3 ... ok
-movb_4 ... ok
-movb_5 ... ok
-movw_1 ... ok
-movw_2 ... ok
-movw_3 ... ok
-movw_4 ... ok
-movw_5 ... ok
-movl_1 ... ok
-movl_2 ... ok
-movl_3 ... ok
-movl_4 ... ok
-movl_5 ... ok
-movsbw_1 ... ok
-movsbw_2 ... ok
-movsbl_1 ... ok
-movsbl_2 ... ok
-movswl_1 ... ok
-movswl_2 ... ok
-movzbw_1 ... ok
-movzbw_2 ... ok
-movzbl_1 ... ok
-movzbl_2 ... ok
-movzwl_1 ... ok
-movzwl_2 ... ok
-mulb_1 ... ok
-mulb_2 ... ok
-mulw_1 ... ok
-mulw_2 ... ok
-mull_1 ... ok
-mull_2 ... ok
-negb_1 ... ok
-negb_2 ... ok
-negw_1 ... ok
-negw_2 ... ok
-negl_1 ... ok
-negl_2 ... ok
-notb_1 ... ok
-notb_2 ... ok
-notw_1 ... ok
-notw_2 ... ok
-notl_1 ... ok
-notl_2 ... ok
-orb_1 ... ok
-orb_2 ... ok
-orb_3 ... ok
-orb_4 ... ok
-orb_5 ... ok
-orb_6 ... ok
-orw_1 ... ok
-orw_2 ... ok
-orw_3 ... ok
-orw_4 ... ok
-orw_5 ... ok
-orw_6 ... ok
-orw_7 ... ok
-orl_1 ... ok
-orl_2 ... ok
-orl_3 ... ok
-orl_4 ... ok
-orl_5 ... ok
-orl_6 ... ok
-orl_7 ... ok
-rclb_1 ... ok
-rclb_2 ... ok
-rclb_3 ... ok
-rclb_4 ... ok
-rclb_5 ... ok
-rclb_6 ... ok
-rclw_1 ... ok
-rclw_2 ... ok
-rclw_3 ... ok
-rclw_4 ... ok
-rclw_5 ... ok
-rclw_6 ... ok
-rcll_1 ... ok
-rcll_2 ... ok
-rcll_3 ... ok
-rcll_4 ... ok
-rcll_5 ... ok
-rcll_6 ... ok
-rcrb_1 ... ok
-rcrb_2 ... ok
-rcrb_3 ... ok
-rcrb_4 ... ok
-rcrb_5 ... ok
-rcrb_6 ... ok
-rcrw_1 ... ok
-rcrw_2 ... ok
-rcrw_3 ... ok
-rcrw_4 ... ok
-rcrw_5 ... ok
-rcrw_6 ... ok
-rcrl_1 ... ok
-rcrl_2 ... ok
-rcrl_3 ... ok
-rcrl_4 ... ok
-rcrl_5 ... ok
-rcrl_6 ... ok
-rolb_1 ... ok
-rolb_2 ... ok
-rolb_3 ... ok
-rolb_4 ... ok
-rolb_5 ... ok
-rolb_6 ... ok
-rolw_1 ... ok
-rolw_2 ... ok
-rolw_3 ... ok
-rolw_4 ... ok
-rolw_5 ... ok
-rolw_6 ... ok
-roll_1 ... ok
-roll_2 ... ok
-roll_3 ... ok
-roll_4 ... ok
-roll_5 ... ok
-roll_6 ... ok
-rorb_1 ... ok
-rorb_2 ... ok
-rorb_3 ... ok
-rorb_4 ... ok
-rorb_5 ... ok
-rorb_6 ... ok
-rorw_1 ... ok
-rorw_2 ... ok
-rorw_3 ... ok
-rorw_4 ... ok
-rorw_5 ... ok
-rorw_6 ... ok
-rorl_1 ... ok
-rorl_2 ... ok
-rorl_3 ... ok
-rorl_4 ... ok
-rorl_5 ... ok
-rorl_6 ... ok
-sahf_1 ... ok
-sahf_2 ... ok
-salb_1 ... ok
-salb_2 ... ok
-salb_3 ... ok
-salb_4 ... ok
-salb_5 ... ok
-salb_6 ... ok
-salw_1 ... ok
-salw_2 ... ok
-salw_3 ... ok
-salw_4 ... ok
-salw_5 ... ok
-salw_6 ... ok
-sall_1 ... ok
-sall_2 ... ok
-sall_3 ... ok
-sall_4 ... ok
-sall_5 ... ok
-sall_6 ... ok
-sarb_1 ... ok
-sarb_2 ... ok
-sarb_3 ... ok
-sarb_4 ... ok
-sarb_5 ... ok
-sarb_6 ... ok
-sarw_1 ... ok
-sarw_2 ... ok
-sarw_3 ... ok
-sarw_4 ... ok
-sarw_5 ... ok
-sarw_6 ... ok
-sarl_1 ... ok
-sarl_2 ... ok
-sarl_3 ... ok
-sarl_4 ... ok
-sarl_5 ... ok
-sarl_6 ... ok
-sbbb_1 ... ok
-sbbb_2 ... ok
-sbbb_3 ... ok
-sbbb_4 ... ok
-sbbb_5 ... ok
-sbbb_6 ... ok
-sbbb_7 ... ok
-sbbb_8 ... ok
-sbbb_9 ... ok
-sbbb_10 ... ok
-sbbb_11 ... ok
-sbbb_12 ... ok
-sbbw_1 ... ok
-sbbw_2 ... ok
-sbbw_3 ... ok
-sbbw_4 ... ok
-sbbw_5 ... ok
-sbbw_6 ... ok
-sbbw_7 ... ok
-sbbw_8 ... ok
-sbbw_9 ... ok
-sbbw_10 ... ok
-sbbw_11 ... ok
-sbbw_12 ... ok
-sbbw_13 ... ok
-sbbw_14 ... ok
-sbbl_1 ... ok
-sbbl_2 ... ok
-sbbl_3 ... ok
-sbbl_4 ... ok
-sbbl_5 ... ok
-sbbl_6 ... ok
-sbbl_7 ... ok
-sbbl_8 ... ok
-sbbl_9 ... ok
-sbbl_10 ... ok
-sbbl_11 ... ok
-sbbl_12 ... ok
-sbbl_13 ... ok
-sbbl_14 ... ok
-seta_1 ... ok
-seta_2 ... ok
-seta_3 ... ok
-seta_4 ... ok
-seta_5 ... ok
-seta_6 ... ok
-seta_7 ... ok
-seta_8 ... ok
-setae_1 ... ok
-setae_2 ... ok
-setae_3 ... ok
-setae_4 ... ok
-setb_1 ... ok
-setb_2 ... ok
-setb_3 ... ok
-setb_4 ... ok
-setbe_1 ... ok
-setbe_2 ... ok
-setbe_3 ... ok
-setbe_4 ... ok
-setbe_5 ... ok
-setbe_6 ... ok
-setbe_7 ... ok
-setbe_8 ... ok
-setc_1 ... ok
-setc_2 ... ok
-setc_3 ... ok
-setc_4 ... ok
-sete_1 ... ok
-sete_2 ... ok
-sete_3 ... ok
-sete_4 ... ok
-setg_1 ... ok
-setg_2 ... ok
-setg_3 ... ok
-setg_4 ... ok
-setg_5 ... ok
-setg_6 ... ok
-setg_7 ... ok
-setg_8 ... ok
-setg_9 ... ok
-setg_10 ... ok
-setg_11 ... ok
-setg_12 ... ok
-setg_13 ... ok
-setg_14 ... ok
-setg_15 ... ok
-setg_16 ... ok
-setge_1 ... ok
-setge_2 ... ok
-setge_3 ... ok
-setge_4 ... ok
-setge_5 ... ok
-setge_6 ... ok
-setge_7 ... ok
-setge_8 ... ok
-setl_1 ... ok
-setl_2 ... ok
-setl_3 ... ok
-setl_4 ... ok
-setl_5 ... ok
-setl_6 ... ok
-setl_7 ... ok
-setl_8 ... ok
-setle_1 ... ok
-setle_2 ... ok
-setle_3 ... ok
-setle_4 ... ok
-setle_5 ... ok
-setle_6 ... ok
-setle_7 ... ok
-setle_8 ... ok
-setle_9 ... ok
-setle_10 ... ok
-setle_11 ... ok
-setle_12 ... ok
-setle_13 ... ok
-setle_14 ... ok
-setle_15 ... ok
-setle_16 ... ok
-setna_1 ... ok
-setna_2 ... ok
-setna_3 ... ok
-setna_4 ... ok
-setna_5 ... ok
-setna_6 ... ok
-setna_7 ... ok
-setna_8 ... ok
-setnae_1 ... ok
-setnae_2 ... ok
-setnae_3 ... ok
-setnae_4 ... ok
-setnb_1 ... ok
-setnb_2 ... ok
-setnb_3 ... ok
-setnb_4 ... ok
-setnbe_1 ... ok
-setnbe_2 ... ok
-setnbe_3 ... ok
-setnbe_4 ... ok
-setnbe_5 ... ok
-setnbe_6 ... ok
-setnbe_7 ... ok
-setnbe_8 ... ok
-setnc_1 ... ok
-setnc_2 ... ok
-setnc_3 ... ok
-setnc_4 ... ok
-setne_1 ... ok
-setne_2 ... ok
-setne_3 ... ok
-setne_4 ... ok
-setng_1 ... ok
-setng_2 ... ok
-setng_3 ... ok
-setng_4 ... ok
-setng_5 ... ok
-setng_6 ... ok
-setng_7 ... ok
-setng_8 ... ok
-setng_9 ... ok
-setng_10 ... ok
-setng_11 ... ok
-setng_12 ... ok
-setng_13 ... ok
-setng_14 ... ok
-setng_15 ... ok
-setng_16 ... ok
-setnge_1 ... ok
-setnge_2 ... ok
-setnge_3 ... ok
-setnge_4 ... ok
-setnge_5 ... ok
-setnge_6 ... ok
-setnge_7 ... ok
-setnge_8 ... ok
-setnl_1 ... ok
-setnl_2 ... ok
-setnl_3 ... ok
-setnl_4 ... ok
-setnl_5 ... ok
-setnl_6 ... ok
-setnl_7 ... ok
-setnl_8 ... ok
-setnle_1 ... ok
-setnle_2 ... ok
-setnle_3 ... ok
-setnle_4 ... ok
-setnle_5 ... ok
-setnle_6 ... ok
-setnle_7 ... ok
-setnle_8 ... ok
-setnle_9 ... ok
-setnle_10 ... ok
-setnle_11 ... ok
-setnle_12 ... ok
-setnle_13 ... ok
-setnle_14 ... ok
-setnle_15 ... ok
-setnle_16 ... ok
-setno_1 ... ok
-setno_2 ... ok
-setno_3 ... ok
-setno_4 ... ok
-setnp_1 ... ok
-setnp_2 ... ok
-setnp_3 ... ok
-setnp_4 ... ok
-setns_1 ... ok
-setns_2 ... ok
-setns_3 ... ok
-setns_4 ... ok
-setnz_1 ... ok
-setnz_2 ... ok
-setnz_3 ... ok
-setnz_4 ... ok
-seto_1 ... ok
-seto_2 ... ok
-seto_3 ... ok
-seto_4 ... ok
-setp_1 ... ok
-setp_2 ... ok
-setp_3 ... ok
-setp_4 ... ok
-sets_1 ... ok
-sets_2 ... ok
-sets_3 ... ok
-sets_4 ... ok
-setz_1 ... ok
-setz_2 ... ok
-setz_3 ... ok
-setz_4 ... ok
-shlb_1 ... ok
-shlb_2 ... ok
-shlb_3 ... ok
-shlb_4 ... ok
-shlb_5 ... ok
-shlb_6 ... ok
-shlw_1 ... ok
-shlw_2 ... ok
-shlw_3 ... ok
-shlw_4 ... ok
-shlw_5 ... ok
-shlw_6 ... ok
-shll_1 ... ok
-shll_2 ... ok
-shll_3 ... ok
-shll_4 ... ok
-shll_5 ... ok
-shll_6 ... ok
-shrb_1 ... ok
-shrb_2 ... ok
-shrb_3 ... ok
-shrb_4 ... ok
-shrb_5 ... ok
-shrb_6 ... ok
-shrw_1 ... ok
-shrw_2 ... ok
-shrw_3 ... ok
-shrw_4 ... ok
-shrw_5 ... ok
-shrw_6 ... ok
-shrl_1 ... ok
-shrl_2 ... ok
-shrl_3 ... ok
-shrl_4 ... ok
-shrl_5 ... ok
-shrl_6 ... ok
-shldw_1 ... ok
-shldw_2 ... ok
-shldw_3 ... ok
-shldw_4 ... ok
-shldw_5 ... ok
-shldw_6 ... ok
-shldw_7 ... ok
-shldw_8 ... ok
-shldl_1 ... ok
-shldl_2 ... ok
-shldl_3 ... ok
-shldl_4 ... ok
-shldl_5 ... ok
-shldl_6 ... ok
-shldl_7 ... ok
-shldl_8 ... ok
-shrdw_1 ... ok
-shrdw_2 ... ok
-shrdw_3 ... ok
-shrdw_4 ... ok
-shrdw_5 ... ok
-shrdw_6 ... ok
-shrdw_7 ... ok
-shrdw_8 ... ok
-shrdl_1 ... ok
-shrdl_2 ... ok
-shrdl_3 ... ok
-shrdl_4 ... ok
-shrdl_5 ... ok
-shrdl_6 ... ok
-shrdl_7 ... ok
-shrdl_8 ... ok
-stc_1 ... ok
-stc_2 ... ok
-std_1 ... ok
-std_2 ... ok
-subb_1 ... ok
-subb_2 ... ok
-subb_3 ... ok
-subb_4 ... ok
-subb_5 ... ok
-subb_6 ... ok
-subw_1 ... ok
-subw_2 ... ok
-subw_3 ... ok
-subw_4 ... ok
-subw_5 ... ok
-subw_6 ... ok
-subw_7 ... ok
-subl_1 ... ok
-subl_2 ... ok
-subl_3 ... ok
-subl_4 ... ok
-subl_5 ... ok
-subl_6 ... ok
-subl_7 ... ok
-testb_1 ... ok
-testb_2 ... ok
-testb_3 ... ok
-testb_4 ... ok
-testb_5 ... ok
-testb_6 ... ok
-testb_7 ... ok
-testb_8 ... ok
-testb_9 ... ok
-testb_10 ... ok
-testb_11 ... ok
-testb_12 ... ok
-testb_13 ... ok
-testb_14 ... ok
-testb_15 ... ok
-testb_16 ... ok
-testb_17 ... ok
-testb_18 ... ok
-testb_19 ... ok
-testb_20 ... ok
-testb_21 ... ok
-testb_22 ... ok
-testb_23 ... ok
-testb_24 ... ok
-testb_25 ... ok
-testw_1 ... ok
-testw_2 ... ok
-testw_3 ... ok
-testw_4 ... ok
-testw_5 ... ok
-testw_6 ... ok
-testw_7 ... ok
-testw_8 ... ok
-testw_9 ... ok
-testw_10 ... ok
-testw_11 ... ok
-testw_12 ... ok
-testw_13 ... ok
-testw_14 ... ok
-testw_15 ... ok
-testw_16 ... ok
-testw_17 ... ok
-testw_18 ... ok
-testw_19 ... ok
-testw_20 ... ok
-testw_21 ... ok
-testw_22 ... ok
-testw_23 ... ok
-testw_24 ... ok
-testw_25 ... ok
-testl_1 ... ok
-testl_2 ... ok
-testl_3 ... ok
-testl_4 ... ok
-testl_5 ... ok
-testl_6 ... ok
-testl_7 ... ok
-testl_8 ... ok
-testl_9 ... ok
-testl_10 ... ok
-testl_11 ... ok
-testl_12 ... ok
-testl_13 ... ok
-testl_14 ... ok
-testl_15 ... ok
-testl_16 ... ok
-testl_17 ... ok
-testl_18 ... ok
-testl_19 ... ok
-testl_20 ... ok
-testl_21 ... ok
-testl_22 ... ok
-testl_23 ... ok
-testl_24 ... ok
-testl_25 ... ok
-xaddb_1 ... ok
-xaddb_2 ... ok
-xaddw_1 ... ok
-xaddw_2 ... ok
-xaddl_1 ... ok
-xaddl_2 ... ok
-xchgb_1 ... ok
-xchgb_2 ... ok
-xchgb_3 ... ok
-xchgw_1 ... ok
-xchgw_2 ... ok
-xchgw_3 ... ok
-xchgw_4 ... ok
-xchgw_5 ... ok
-xchgl_1 ... ok
-xchgl_2 ... ok
-xchgl_3 ... ok
-xchgl_4 ... ok
-xchgl_5 ... ok
-xorb_1 ... ok
-xorb_2 ... ok
-xorb_3 ... ok
-xorb_4 ... ok
-xorb_5 ... ok
-xorb_6 ... ok
-xorw_1 ... ok
-xorw_2 ... ok
-xorw_3 ... ok
-xorw_4 ... ok
-xorw_5 ... ok
-xorw_6 ... ok
-xorw_7 ... ok
-xorl_1 ... ok
-xorl_2 ... ok
-xorl_3 ... ok
-xorl_4 ... ok
-xorl_5 ... ok
-xorl_6 ... ok
-xorl_7 ... ok
diff --git a/old-helgrind/tests/x86/insn_basic.vgtest b/old-helgrind/tests/x86/insn_basic.vgtest
deleted file mode 100644 (file)
index 0e57872..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-vgopts: -q
-prog: ../../../none/tests/x86/insn_basic
diff --git a/old-helgrind/tests/x86/insn_cmov.stderr.exp b/old-helgrind/tests/x86/insn_cmov.stderr.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/old-helgrind/tests/x86/insn_cmov.stdout.exp b/old-helgrind/tests/x86/insn_cmov.stdout.exp
deleted file mode 100644 (file)
index 31ac172..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-cmova_1 ... ok
-cmova_2 ... ok
-cmova_3 ... ok
-cmova_4 ... ok
-cmova_5 ... ok
-cmova_6 ... ok
-cmova_7 ... ok
-cmova_8 ... ok
-cmovae_1 ... ok
-cmovae_2 ... ok
-cmovae_3 ... ok
-cmovae_4 ... ok
-cmovb_1 ... ok
-cmovb_2 ... ok
-cmovb_3 ... ok
-cmovb_4 ... ok
-cmovbe_1 ... ok
-cmovbe_2 ... ok
-cmovbe_3 ... ok
-cmovbe_4 ... ok
-cmovbe_5 ... ok
-cmovbe_6 ... ok
-cmovbe_7 ... ok
-cmovbe_8 ... ok
-cmovc_1 ... ok
-cmovc_2 ... ok
-cmovc_3 ... ok
-cmovc_4 ... ok
-cmove_1 ... ok
-cmove_2 ... ok
-cmove_3 ... ok
-cmove_4 ... ok
-cmovg_1 ... ok
-cmovg_2 ... ok
-cmovg_3 ... ok
-cmovg_4 ... ok
-cmovg_5 ... ok
-cmovg_6 ... ok
-cmovg_7 ... ok
-cmovg_8 ... ok
-cmovg_9 ... ok
-cmovg_10 ... ok
-cmovg_11 ... ok
-cmovg_12 ... ok
-cmovg_13 ... ok
-cmovg_14 ... ok
-cmovg_15 ... ok
-cmovg_16 ... ok
-cmovge_1 ... ok
-cmovge_2 ... ok
-cmovge_3 ... ok
-cmovge_4 ... ok
-cmovge_5 ... ok
-cmovge_6 ... ok
-cmovge_7 ... ok
-cmovge_8 ... ok
-cmovl_1 ... ok
-cmovl_2 ... ok
-cmovl_3 ... ok
-cmovl_4 ... ok
-cmovl_5 ... ok
-cmovl_6 ... ok
-cmovl_7 ... ok
-cmovl_8 ... ok
-cmovle_1 ... ok
-cmovle_2 ... ok
-cmovle_3 ... ok
-cmovle_4 ... ok
-cmovle_5 ... ok
-cmovle_6 ... ok
-cmovle_7 ... ok
-cmovle_8 ... ok
-cmovle_9 ... ok
-cmovle_10 ... ok
-cmovle_11 ... ok
-cmovle_12 ... ok
-cmovle_13 ... ok
-cmovle_14 ... ok
-cmovle_15 ... ok
-cmovle_16 ... ok
-cmovna_1 ... ok
-cmovna_2 ... ok
-cmovna_3 ... ok
-cmovna_4 ... ok
-cmovna_5 ... ok
-cmovna_6 ... ok
-cmovna_7 ... ok
-cmovna_8 ... ok
-cmovnae_1 ... ok
-cmovnae_2 ... ok
-cmovnae_3 ... ok
-cmovnae_4 ... ok
-cmovnb_1 ... ok
-cmovnb_2 ... ok
-cmovnb_3 ... ok
-cmovnb_4 ... ok
-cmovnbe_1 ... ok
-cmovnbe_2 ... ok
-cmovnbe_3 ... ok
-cmovnbe_4 ... ok
-cmovnbe_5 ... ok
-cmovnbe_6 ... ok
-cmovnbe_7 ... ok
-cmovnbe_8 ... ok
-cmovnc_1 ... ok
-cmovnc_2 ... ok
-cmovnc_3 ... ok
-cmovnc_4 ... ok
-cmovne_1 ... ok
-cmovne_2 ... ok
-cmovne_3 ... ok
-cmovne_4 ... ok
-cmovng_1 ... ok
-cmovng_2 ... ok
-cmovng_3 ... ok
-cmovng_4 ... ok
-cmovng_5 ... ok
-cmovng_6 ... ok
-cmovng_7 ... ok
-cmovng_8 ... ok
-cmovng_9 ... ok
-cmovng_10 ... ok
-cmovng_11 ... ok
-cmovng_12 ... ok
-cmovng_13 ... ok
-cmovng_14 ... ok
-cmovng_15 ... ok
-cmovng_16 ... ok
-cmovnge_1 ... ok
-cmovnge_2 ... ok
-cmovnge_3 ... ok
-cmovnge_4 ... ok
-cmovnge_5 ... ok
-cmovnge_6 ... ok
-cmovnge_7 ... ok
-cmovnge_8 ... ok
-cmovnl_1 ... ok
-cmovnl_2 ... ok
-cmovnl_3 ... ok
-cmovnl_4 ... ok
-cmovnl_5 ... ok
-cmovnl_6 ... ok
-cmovnl_7 ... ok
-cmovnl_8 ... ok
-cmovnle_1 ... ok
-cmovnle_2 ... ok
-cmovnle_3 ... ok
-cmovnle_4 ... ok
-cmovnle_5 ... ok
-cmovnle_6 ... ok
-cmovnle_7 ... ok
-cmovnle_8 ... ok
-cmovnle_9 ... ok
-cmovnle_10 ... ok
-cmovnle_11 ... ok
-cmovnle_12 ... ok
-cmovnle_13 ... ok
-cmovnle_14 ... ok
-cmovnle_15 ... ok
-cmovnle_16 ... ok
-cmovno_1 ... ok
-cmovno_2 ... ok
-cmovno_3 ... ok
-cmovno_4 ... ok
-cmovnp_1 ... ok
-cmovnp_2 ... ok
-cmovnp_3 ... ok
-cmovnp_4 ... ok
-cmovns_1 ... ok
-cmovns_2 ... ok
-cmovns_3 ... ok
-cmovns_4 ... ok
-cmovnz_1 ... ok
-cmovnz_2 ... ok
-cmovnz_3 ... ok
-cmovnz_4 ... ok
-cmovo_1 ... ok
-cmovo_2 ... ok
-cmovo_3 ... ok
-cmovo_4 ... ok
-cmovp_1 ... ok
-cmovp_2 ... ok
-cmovp_3 ... ok
-cmovp_4 ... ok
-cmovs_1 ... ok
-cmovs_2 ... ok
-cmovs_3 ... ok
-cmovs_4 ... ok
-cmovz_1 ... ok
-cmovz_2 ... ok
-cmovz_3 ... ok
-cmovz_4 ... ok
-cmova_9 ... ok
-cmova_10 ... ok
-cmova_11 ... ok
-cmova_12 ... ok
-cmova_13 ... ok
-cmova_14 ... ok
-cmova_15 ... ok
-cmova_16 ... ok
-cmovae_5 ... ok
-cmovae_6 ... ok
-cmovae_7 ... ok
-cmovae_8 ... ok
-cmovb_5 ... ok
-cmovb_6 ... ok
-cmovb_7 ... ok
-cmovb_8 ... ok
-cmovbe_9 ... ok
-cmovbe_10 ... ok
-cmovbe_11 ... ok
-cmovbe_12 ... ok
-cmovbe_13 ... ok
-cmovbe_14 ... ok
-cmovbe_15 ... ok
-cmovbe_16 ... ok
-cmovc_5 ... ok
-cmovc_6 ... ok
-cmovc_7 ... ok
-cmovc_8 ... ok
-cmove_5 ... ok
-cmove_6 ... ok
-cmove_7 ... ok
-cmove_8 ... ok
-cmovg_17 ... ok
-cmovg_18 ... ok
-cmovg_19 ... ok
-cmovg_20 ... ok
-cmovg_21 ... ok
-cmovg_22 ... ok
-cmovg_23 ... ok
-cmovg_24 ... ok
-cmovg_25 ... ok
-cmovg_26 ... ok
-cmovg_27 ... ok
-cmovg_28 ... ok
-cmovg_29 ... ok
-cmovg_30 ... ok
-cmovg_31 ... ok
-cmovg_32 ... ok
-cmovge_9 ... ok
-cmovge_10 ... ok
-cmovge_11 ... ok
-cmovge_12 ... ok
-cmovge_13 ... ok
-cmovge_14 ... ok
-cmovge_15 ... ok
-cmovge_16 ... ok
-cmovl_9 ... ok
-cmovl_10 ... ok
-cmovl_11 ... ok
-cmovl_12 ... ok
-cmovl_13 ... ok
-cmovl_14 ... ok
-cmovl_15 ... ok
-cmovl_16 ... ok
-cmovle_17 ... ok
-cmovle_18 ... ok
-cmovle_19 ... ok
-cmovle_20 ... ok
-cmovle_21 ... ok
-cmovle_22 ... ok
-cmovle_23 ... ok
-cmovle_24 ... ok
-cmovle_25 ... ok
-cmovle_26 ... ok
-cmovle_27 ... ok
-cmovle_28 ... ok
-cmovle_29 ... ok
-cmovle_30 ... ok
-cmovle_31 ... ok
-cmovle_32 ... ok
-cmovna_9 ... ok
-cmovna_10 ... ok
-cmovna_11 ... ok
-cmovna_12 ... ok
-cmovna_13 ... ok
-cmovna_14 ... ok
-cmovna_15 ... ok
-cmovna_16 ... ok
-cmovnae_5 ... ok
-cmovnae_6 ... ok
-cmovnae_7 ... ok
-cmovnae_8 ... ok
-cmovnb_5 ... ok
-cmovnb_6 ... ok
-cmovnb_7 ... ok
-cmovnb_8 ... ok
-cmovnbe_9 ... ok
-cmovnbe_10 ... ok
-cmovnbe_11 ... ok
-cmovnbe_12 ... ok
-cmovnbe_13 ... ok
-cmovnbe_14 ... ok
-cmovnbe_15 ... ok
-cmovnbe_16 ... ok
-cmovnc_5 ... ok
-cmovnc_6 ... ok
-cmovnc_7 ... ok
-cmovnc_8 ... ok
-cmovne_5 ... ok
-cmovne_6 ... ok
-cmovne_7 ... ok
-cmovne_8 ... ok
-cmovng_17 ... ok
-cmovng_18 ... ok
-cmovng_19 ... ok
-cmovng_20 ... ok
-cmovng_21 ... ok
-cmovng_22 ... ok
-cmovng_23 ... ok
-cmovng_24 ... ok
-cmovng_25 ... ok
-cmovng_26 ... ok
-cmovng_27 ... ok
-cmovng_28 ... ok
-cmovng_29 ... ok
-cmovng_30 ... ok
-cmovng_31 ... ok
-cmovng_32 ... ok
-cmovnge_9 ... ok
-cmovnge_10 ... ok
-cmovnge_11 ... ok
-cmovnge_12 ... ok
-cmovnge_13 ... ok
-cmovnge_14 ... ok
-cmovnge_15 ... ok
-cmovnge_16 ... ok
-cmovnl_9 ... ok
-cmovnl_10 ... ok
-cmovnl_11 ... ok
-cmovnl_12 ... ok
-cmovnl_13 ... ok
-cmovnl_14 ... ok
-cmovnl_15 ... ok
-cmovnl_16 ... ok
-cmovnle_17 ... ok
-cmovnle_18 ... ok
-cmovnle_19 ... ok
-cmovnle_20 ... ok
-cmovnle_21 ... ok
-cmovnle_22 ... ok
-cmovnle_23 ... ok
-cmovnle_24 ... ok
-cmovnle_25 ... ok
-cmovnle_26 ... ok
-cmovnle_27 ... ok
-cmovnle_28 ... ok
-cmovnle_29 ... ok
-cmovnle_30 ... ok
-cmovnle_31 ... ok
-cmovnle_32 ... ok
-cmovno_5 ... ok
-cmovno_6 ... ok
-cmovno_7 ... ok
-cmovno_8 ... ok
-cmovnp_5 ... ok
-cmovnp_6 ... ok
-cmovnp_7 ... ok
-cmovnp_8 ... ok
-cmovns_5 ... ok
-cmovns_6 ... ok
-cmovns_7 ... ok
-cmovns_8 ... ok
-cmovnz_5 ... ok
-cmovnz_6 ... ok
-cmovnz_7 ... ok
-cmovnz_8 ... ok
-cmovo_5 ... ok
-cmovo_6 ... ok
-cmovo_7 ... ok
-cmovo_8 ... ok
-cmovp_5 ... ok
-cmovp_6 ... ok
-cmovp_7 ... ok
-cmovp_8 ... ok
-cmovs_5 ... ok
-cmovs_6 ... ok
-cmovs_7 ... ok
-cmovs_8 ... ok
-cmovz_5 ... ok
-cmovz_6 ... ok
-cmovz_7 ... ok
-cmovz_8 ... ok
diff --git a/old-helgrind/tests/x86/insn_cmov.vgtest b/old-helgrind/tests/x86/insn_cmov.vgtest
deleted file mode 100644 (file)
index 28f108c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-vgopts: -q
-prog: ../../../none/tests/x86/insn_cmov
-prereq: ../../../tests/cputest x86-cmov
diff --git a/old-helgrind/tests/x86/insn_fpu.stderr.exp b/old-helgrind/tests/x86/insn_fpu.stderr.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/old-helgrind/tests/x86/insn_fpu.stdout.exp b/old-helgrind/tests/x86/insn_fpu.stdout.exp
deleted file mode 100644 (file)
index 2dbaa07..0000000
+++ /dev/null
@@ -1,452 +0,0 @@
-fabs_1 ... ok
-fabs_2 ... ok
-fabs_3 ... ok
-fabs_4 ... ok
-fadds_1 ... ok
-fadds_2 ... ok
-fadds_3 ... ok
-fadds_4 ... ok
-faddl_1 ... ok
-faddl_2 ... ok
-faddl_3 ... ok
-faddl_4 ... ok
-fadd_1 ... ok
-fadd_2 ... ok
-fadd_3 ... ok
-fadd_4 ... ok
-fadd_5 ... ok
-fadd_6 ... ok
-fadd_7 ... ok
-fadd_8 ... ok
-fadd_9 ... ok
-fadd_10 ... ok
-fadd_11 ... ok
-fadd_12 ... ok
-fadd_13 ... ok
-fadd_14 ... ok
-fadd_15 ... ok
-fadd_16 ... ok
-faddp_1 ... ok
-faddp_2 ... ok
-faddp_3 ... ok
-faddp_4 ... ok
-faddp_5 ... ok
-faddp_6 ... ok
-faddp_7 ... ok
-faddp_8 ... ok
-faddp_9 ... ok
-faddp_10 ... ok
-faddp_11 ... ok
-faddp_12 ... ok
-faddp_13 ... ok
-faddp_14 ... ok
-faddp_15 ... ok
-faddp_16 ... ok
-fiadds_1 ... ok
-fiadds_2 ... ok
-fiadds_3 ... ok
-fiadds_4 ... ok
-fiadds_5 ... ok
-fiadds_6 ... ok
-fiadds_7 ... ok
-fiadds_8 ... ok
-fiaddl_1 ... ok
-fiaddl_2 ... ok
-fiaddl_3 ... ok
-fiaddl_4 ... ok
-fiaddl_5 ... ok
-fiaddl_6 ... ok
-fiaddl_7 ... ok
-fiaddl_8 ... ok
-fcomi_1 ... ok
-fcomi_2 ... ok
-fcomi_3 ... ok
-fcomi_4 ... ok
-fcomi_5 ... ok
-fcomi_6 ... ok
-fcomip_1 ... ok
-fcomip_2 ... ok
-fcomip_3 ... ok
-fcomip_4 ... ok
-fcomip_5 ... ok
-fcomip_6 ... ok
-fucomi_1 ... ok
-fucomi_2 ... ok
-fucomi_3 ... ok
-fucomi_4 ... ok
-fucomi_5 ... ok
-fucomi_6 ... ok
-fucomip_1 ... ok
-fucomip_2 ... ok
-fucomip_3 ... ok
-fucomip_4 ... ok
-fucomip_5 ... ok
-fucomip_6 ... ok
-fchs_1 ... ok
-fchs_2 ... ok
-fchs_3 ... ok
-fchs_4 ... ok
-fdivs_1 ... ok
-fdivs_2 ... ok
-fdivs_3 ... ok
-fdivs_4 ... ok
-fdivl_1 ... ok
-fdivl_2 ... ok
-fdivl_3 ... ok
-fdivl_4 ... ok
-fdiv_1 ... ok
-fdiv_2 ... ok
-fdiv_3 ... ok
-fdiv_4 ... ok
-fdiv_5 ... ok
-fdiv_6 ... ok
-fdiv_7 ... ok
-fdiv_8 ... ok
-fdiv_9 ... ok
-fdiv_10 ... ok
-fdiv_11 ... ok
-fdiv_12 ... ok
-fdiv_13 ... ok
-fdiv_14 ... ok
-fdiv_15 ... ok
-fdiv_16 ... ok
-fdivp_1 ... ok
-fdivp_2 ... ok
-fdivp_3 ... ok
-fdivp_4 ... ok
-fdivp_5 ... ok
-fdivp_6 ... ok
-fdivp_7 ... ok
-fdivp_8 ... ok
-fdivp_9 ... ok
-fdivp_10 ... ok
-fdivp_11 ... ok
-fdivp_12 ... ok
-fdivp_13 ... ok
-fdivp_14 ... ok
-fdivp_15 ... ok
-fdivp_16 ... ok
-fidivs_1 ... ok
-fidivs_2 ... ok
-fidivs_3 ... ok
-fidivs_4 ... ok
-fidivs_5 ... ok
-fidivs_6 ... ok
-fidivs_7 ... ok
-fidivs_8 ... ok
-fidivl_1 ... ok
-fidivl_2 ... ok
-fidivl_3 ... ok
-fidivl_4 ... ok
-fidivl_5 ... ok
-fidivl_6 ... ok
-fidivl_7 ... ok
-fidivl_8 ... ok
-fdivrs_1 ... ok
-fdivrs_2 ... ok
-fdivrs_3 ... ok
-fdivrs_4 ... ok
-fdivrl_1 ... ok
-fdivrl_2 ... ok
-fdivrl_3 ... ok
-fdivrl_4 ... ok
-fdivr_1 ... ok
-fdivr_2 ... ok
-fdivr_3 ... ok
-fdivr_4 ... ok
-fdivr_5 ... ok
-fdivr_6 ... ok
-fdivr_7 ... ok
-fdivr_8 ... ok
-fdivr_9 ... ok
-fdivr_10 ... ok
-fdivr_11 ... ok
-fdivr_12 ... ok
-fdivr_13 ... ok
-fdivr_14 ... ok
-fdivr_15 ... ok
-fdivr_16 ... ok
-fdivrp_1 ... ok
-fdivrp_2 ... ok
-fdivrp_3 ... ok
-fdivrp_4 ... ok
-fdivrp_5 ... ok
-fdivrp_6 ... ok
-fdivrp_7 ... ok
-fdivrp_8 ... ok
-fdivrp_9 ... ok
-fdivrp_10 ... ok
-fdivrp_11 ... ok
-fdivrp_12 ... ok
-fdivrp_13 ... ok
-fdivrp_14 ... ok
-fdivrp_15 ... ok
-fdivrp_16 ... ok
-fidivrs_1 ... ok
-fidivrs_2 ... ok
-fidivrs_3 ... ok
-fidivrs_4 ... ok
-fidivrs_5 ... ok
-fidivrs_6 ... ok
-fidivrs_7 ... ok
-fidivrs_8 ... ok
-fidivrl_1 ... ok
-fidivrl_2 ... ok
-fidivrl_3 ... ok
-fidivrl_4 ... ok
-fidivrl_5 ... ok
-fidivrl_6 ... ok
-fidivrl_7 ... ok
-fidivrl_8 ... ok
-filds_1 ... ok
-filds_2 ... ok
-filds_3 ... ok
-filds_4 ... ok
-fildl_1 ... ok
-fildl_2 ... ok
-fildl_3 ... ok
-fildl_4 ... ok
-fildq_1 ... ok
-fildq_2 ... ok
-fildq_3 ... ok
-fildq_4 ... ok
-fists_1 ... ok
-fists_2 ... ok
-fists_3 ... ok
-fists_4 ... ok
-fists_5 ... ok
-fists_6 ... ok
-fists_7 ... ok
-fists_8 ... ok
-fistl_1 ... ok
-fistl_2 ... ok
-fistl_3 ... ok
-fistl_4 ... ok
-fistl_5 ... ok
-fistl_6 ... ok
-fistl_7 ... ok
-fistl_8 ... ok
-fistps_1 ... ok
-fistps_2 ... ok
-fistps_3 ... ok
-fistps_4 ... ok
-fistps_5 ... ok
-fistps_6 ... ok
-fistps_7 ... ok
-fistps_8 ... ok
-fistpl_1 ... ok
-fistpl_2 ... ok
-fistpl_3 ... ok
-fistpl_4 ... ok
-fistpl_5 ... ok
-fistpl_6 ... ok
-fistpl_7 ... ok
-fistpl_8 ... ok
-fistpq_1 ... ok
-fistpq_2 ... ok
-fistpq_3 ... ok
-fistpq_4 ... ok
-fistpq_5 ... ok
-fistpq_6 ... ok
-fistpq_7 ... ok
-fistpq_8 ... ok
-flds_1 ... ok
-flds_2 ... ok
-fldl_1 ... ok
-fldl_2 ... ok
-fld_1 ... ok
-fld_2 ... ok
-fld_3 ... ok
-fld1_1 ... ok
-fldl2t_1 ... ok
-fldl2e_1 ... ok
-fldpi_1 ... ok
-fldlg2_1 ... ok
-fldln2_1 ... ok
-fldz_1 ... ok
-fmuls_1 ... ok
-fmuls_2 ... ok
-fmuls_3 ... ok
-fmuls_4 ... ok
-fmull_1 ... ok
-fmull_2 ... ok
-fmull_3 ... ok
-fmull_4 ... ok
-fmul_1 ... ok
-fmul_2 ... ok
-fmul_3 ... ok
-fmul_4 ... ok
-fmul_5 ... ok
-fmul_6 ... ok
-fmul_7 ... ok
-fmul_8 ... ok
-fmul_9 ... ok
-fmul_10 ... ok
-fmul_11 ... ok
-fmul_12 ... ok
-fmul_13 ... ok
-fmul_14 ... ok
-fmul_15 ... ok
-fmul_16 ... ok
-fmulp_1 ... ok
-fmulp_2 ... ok
-fmulp_3 ... ok
-fmulp_4 ... ok
-fmulp_5 ... ok
-fmulp_6 ... ok
-fmulp_7 ... ok
-fmulp_8 ... ok
-fmulp_9 ... ok
-fmulp_10 ... ok
-fmulp_11 ... ok
-fmulp_12 ... ok
-fmulp_13 ... ok
-fmulp_14 ... ok
-fmulp_15 ... ok
-fmulp_16 ... ok
-fimuls_1 ... ok
-fimuls_2 ... ok
-fimuls_3 ... ok
-fimuls_4 ... ok
-fimuls_5 ... ok
-fimuls_6 ... ok
-fimuls_7 ... ok
-fimuls_8 ... ok
-fimull_1 ... ok
-fimull_2 ... ok
-fimull_3 ... ok
-fimull_4 ... ok
-fimull_5 ... ok
-fimull_6 ... ok
-fimull_7 ... ok
-fimull_8 ... ok
-frndint_1 ... ok
-frndint_2 ... ok
-frndint_3 ... ok
-frndint_4 ... ok
-frndint_5 ... ok
-frndint_6 ... ok
-frndint_7 ... ok
-frndint_8 ... ok
-frndint_9 ... ok
-frndint_10 ... ok
-frndint_11 ... ok
-frndint_12 ... ok
-frndint_13 ... ok
-frndint_14 ... ok
-frndint_15 ... ok
-frndint_16 ... ok
-fsubs_1 ... ok
-fsubs_2 ... ok
-fsubs_3 ... ok
-fsubs_4 ... ok
-fsubl_1 ... ok
-fsubl_2 ... ok
-fsubl_3 ... ok
-fsubl_4 ... ok
-fsub_1 ... ok
-fsub_2 ... ok
-fsub_3 ... ok
-fsub_4 ... ok
-fsub_5 ... ok
-fsub_6 ... ok
-fsub_7 ... ok
-fsub_8 ... ok
-fsub_9 ... ok
-fsub_10 ... ok
-fsub_11 ... ok
-fsub_12 ... ok
-fsub_13 ... ok
-fsub_14 ... ok
-fsub_15 ... ok
-fsub_16 ... ok
-fsubp_1 ... ok
-fsubp_2 ... ok
-fsubp_3 ... ok
-fsubp_4 ... ok
-fsubp_5 ... ok
-fsubp_6 ... ok
-fsubp_7 ... ok
-fsubp_8 ... ok
-fsubp_9 ... ok
-fsubp_10 ... ok
-fsubp_11 ... ok
-fsubp_12 ... ok
-fsubp_13 ... ok
-fsubp_14 ... ok
-fsubp_15 ... ok
-fsubp_16 ... ok
-fisubs_1 ... ok
-fisubs_2 ... ok
-fisubs_3 ... ok
-fisubs_4 ... ok
-fisubs_5 ... ok
-fisubs_6 ... ok
-fisubs_7 ... ok
-fisubs_8 ... ok
-fisubl_1 ... ok
-fisubl_2 ... ok
-fisubl_3 ... ok
-fisubl_4 ... ok
-fisubl_5 ... ok
-fisubl_6 ... ok
-fisubl_7 ... ok
-fisubl_8 ... ok
-fsubrs_1 ... ok
-fsubrs_2 ... ok
-fsubrs_3 ... ok
-fsubrs_4 ... ok
-fsubrl_1 ... ok
-fsubrl_2 ... ok
-fsubrl_3 ... ok
-fsubrl_4 ... ok
-fsubr_1 ... ok
-fsubr_2 ... ok
-fsubr_3 ... ok
-fsubr_4 ... ok
-fsubr_5 ... ok
-fsubr_6 ... ok
-fsubr_7 ... ok
-fsubr_8 ... ok
-fsubr_9 ... ok
-fsubr_10 ... ok
-fsubr_11 ... ok
-fsubr_12 ... ok
-fsubr_13 ... ok
-fsubr_14 ... ok
-fsubr_15 ... ok
-fsubr_16 ... ok
-fsubrp_1 ... ok
-fsubrp_2 ... ok
-fsubrp_3 ... ok
-fsubrp_4 ... ok
-fsubrp_5 ... ok
-fsubrp_6 ... ok
-fsubrp_7 ... ok
-fsubrp_8 ... ok
-fsubrp_9 ... ok
-fsubrp_10 ... ok
-fsubrp_11 ... ok
-fsubrp_12 ... ok
-fsubrp_13 ... ok
-fsubrp_14 ... ok
-fsubrp_15 ... ok
-fsubrp_16 ... ok
-fisubrs_1 ... ok
-fisubrs_2 ... ok
-fisubrs_3 ... ok
-fisubrs_4 ... ok
-fisubrs_5 ... ok
-fisubrs_6 ... ok
-fisubrs_7 ... ok
-fisubrs_8 ... ok
-fisubrl_1 ... ok
-fisubrl_2 ... ok
-fisubrl_3 ... ok
-fisubrl_4 ... ok
-fisubrl_5 ... ok
-fisubrl_6 ... ok
-fisubrl_7 ... ok
-fisubrl_8 ... ok
-fxch_1 ... ok
-fxch_2 ... ok
diff --git a/old-helgrind/tests/x86/insn_fpu.vgtest b/old-helgrind/tests/x86/insn_fpu.vgtest
deleted file mode 100644 (file)
index 278e8b7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-vgopts: -q
-prog: ../../../none/tests/x86/insn_fpu
-prereq: ../../../tests/cputest x86-fpu
diff --git a/old-helgrind/tests/x86/insn_mmx.stderr.exp b/old-helgrind/tests/x86/insn_mmx.stderr.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/old-helgrind/tests/x86/insn_mmx.stdout.exp b/old-helgrind/tests/x86/insn_mmx.stdout.exp
deleted file mode 100644 (file)
index 95cbae1..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-movd_1 ... ok
-movd_2 ... ok
-movd_3 ... ok
-movd_4 ... ok
-movq_1 ... ok
-movq_2 ... ok
-movq_3 ... ok
-packssdw_1 ... ok
-packssdw_2 ... ok
-packsswb_1 ... ok
-packsswb_2 ... ok
-packuswb_1 ... ok
-packuswb_2 ... ok
-paddb_1 ... ok
-paddb_2 ... ok
-paddd_1 ... ok
-paddd_2 ... ok
-paddsb_1 ... ok
-paddsb_2 ... ok
-paddsw_1 ... ok
-paddsw_2 ... ok
-paddusb_1 ... ok
-paddusb_2 ... ok
-paddusw_1 ... ok
-paddusw_2 ... ok
-paddw_1 ... ok
-paddw_2 ... ok
-pand_1 ... ok
-pand_2 ... ok
-pandn_1 ... ok
-pandn_2 ... ok
-pcmpeqb_1 ... ok
-pcmpeqb_2 ... ok
-pcmpeqd_1 ... ok
-pcmpeqd_2 ... ok
-pcmpeqw_1 ... ok
-pcmpeqw_2 ... ok
-pcmpgtb_1 ... ok
-pcmpgtb_2 ... ok
-pcmpgtd_1 ... ok
-pcmpgtd_2 ... ok
-pcmpgtw_1 ... ok
-pcmpgtw_2 ... ok
-pmaddwd_1 ... ok
-pmaddwd_2 ... ok
-pmulhw_1 ... ok
-pmulhw_2 ... ok
-pmullw_1 ... ok
-pmullw_2 ... ok
-por_1 ... ok
-por_2 ... ok
-pslld_1 ... ok
-pslld_2 ... ok
-pslld_3 ... ok
-psllq_1 ... ok
-psllq_2 ... ok
-psllq_3 ... ok
-psllw_1 ... ok
-psllw_2 ... ok
-psllw_3 ... ok
-psrad_1 ... ok
-psrad_2 ... ok
-psrad_3 ... ok
-psraw_1 ... ok
-psraw_2 ... ok
-psraw_3 ... ok
-psrld_1 ... ok
-psrld_2 ... ok
-psrld_3 ... ok
-psrlq_1 ... ok
-psrlq_2 ... ok
-psrlq_3 ... ok
-psrlw_1 ... ok
-psrlw_2 ... ok
-psrlw_3 ... ok
-psubb_1 ... ok
-psubb_2 ... ok
-psubd_1 ... ok
-psubd_2 ... ok
-psubsb_1 ... ok
-psubsb_2 ... ok
-psubsw_1 ... ok
-psubsw_2 ... ok
-psubusb_1 ... ok
-psubusb_2 ... ok
-psubusw_1 ... ok
-psubusw_2 ... ok
-psubw_1 ... ok
-psubw_2 ... ok
-punpckhbw_1 ... ok
-punpckhbw_2 ... ok
-punpckhdq_1 ... ok
-punpckhdq_2 ... ok
-punpckhwd_1 ... ok
-punpckhwd_2 ... ok
-punpcklbw_1 ... ok
-punpcklbw_2 ... ok
-punpckldq_1 ... ok
-punpckldq_2 ... ok
-punpcklwd_1 ... ok
-punpcklwd_2 ... ok
-pxor_1 ... ok
-pxor_2 ... ok
diff --git a/old-helgrind/tests/x86/insn_mmx.vgtest b/old-helgrind/tests/x86/insn_mmx.vgtest
deleted file mode 100644 (file)
index d0ffcf4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-vgopts: -q
-prog: ../../../none/tests/x86/insn_mmx
-prereq: ../../../tests/cputest x86-mmx
diff --git a/old-helgrind/tests/x86/insn_mmxext.stderr.exp b/old-helgrind/tests/x86/insn_mmxext.stderr.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/old-helgrind/tests/x86/insn_mmxext.stdout.exp b/old-helgrind/tests/x86/insn_mmxext.stdout.exp
deleted file mode 100644 (file)
index 23b2e55..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-movntq_1 ... ok
-pavgb_1 ... ok
-pavgb_2 ... ok
-pavgw_1 ... ok
-pavgw_2 ... ok
-pextrw_1 ... ok
-pextrw_2 ... ok
-pextrw_3 ... ok
-pextrw_4 ... ok
-pinsrw_1 ... ok
-pinsrw_2 ... ok
-pinsrw_3 ... ok
-pinsrw_4 ... ok
-pmaxsw_1 ... ok
-pmaxsw_2 ... ok
-pmaxub_1 ... ok
-pmaxub_2 ... ok
-pminsw_1 ... ok
-pminsw_2 ... ok
-pminub_1 ... ok
-pminub_2 ... ok
-pmovmskb_1 ... ok
-pmulhuw_1 ... ok
-pmulhuw_2 ... ok
-psadbw_1 ... ok
-psadbw_2 ... ok
-pshufw_1 ... ok
-pshufw_2 ... ok
-sfence_1 ... ok
diff --git a/old-helgrind/tests/x86/insn_mmxext.vgtest b/old-helgrind/tests/x86/insn_mmxext.vgtest
deleted file mode 100644 (file)
index 2f5d9ef..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-vgopts: -q
-prog: ../../../none/tests/x86/insn_mmxext
-prereq: ../../../tests/cputest x86-mmxext
diff --git a/old-helgrind/tests/x86/insn_sse.stderr.exp b/old-helgrind/tests/x86/insn_sse.stderr.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/old-helgrind/tests/x86/insn_sse.stdout.exp b/old-helgrind/tests/x86/insn_sse.stdout.exp
deleted file mode 100644 (file)
index ae892af..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-addps_1 ... ok
-addps_2 ... ok
-addss_1 ... ok
-addss_2 ... ok
-andnps_1 ... ok
-andnps_2 ... ok
-andps_1 ... ok
-andps_2 ... ok
-cmpeqps_1 ... ok
-cmpeqps_2 ... ok
-cmpeqss_1 ... ok
-cmpeqss_2 ... ok
-cmpleps_1 ... ok
-cmpleps_2 ... ok
-cmpless_1 ... ok
-cmpless_2 ... ok
-cmpltps_1 ... ok
-cmpltps_2 ... ok
-cmpltss_1 ... ok
-cmpltss_2 ... ok
-cmpneqps_1 ... ok
-cmpneqps_2 ... ok
-cmpneqss_1 ... ok
-cmpneqss_2 ... ok
-cmpnleps_1 ... ok
-cmpnleps_2 ... ok
-cmpnless_1 ... ok
-cmpnless_2 ... ok
-cmpnltps_1 ... ok
-cmpnltps_2 ... ok
-cmpnltss_1 ... ok
-cmpnltss_2 ... ok
-comiss_1 ... ok
-comiss_2 ... ok
-comiss_3 ... ok
-comiss_4 ... ok
-comiss_5 ... ok
-comiss_6 ... ok
-cvtpi2ps_1 ... ok
-cvtpi2ps_2 ... ok
-cvtps2pi_1 ... ok
-cvtps2pi_2 ... ok
-cvtsi2ss_1 ... ok
-cvtsi2ss_2 ... ok
-cvtss2si_1 ... ok
-cvtss2si_2 ... ok
-cvttps2pi_1 ... ok
-cvttps2pi_2 ... ok
-cvttss2si_1 ... ok
-cvttss2si_2 ... ok
-divps_1 ... ok
-divps_2 ... ok
-divss_1 ... ok
-divss_2 ... ok
-maxps_1 ... ok
-maxps_2 ... ok
-maxss_1 ... ok
-maxss_2 ... ok
-minps_1 ... ok
-minps_2 ... ok
-minss_1 ... ok
-minss_2 ... ok
-movaps_1 ... ok
-movaps_2 ... ok
-movhlps_1 ... ok
-movhps_1 ... ok
-movhps_2 ... ok
-movlhps_1 ... ok
-movlps_1 ... ok
-movlps_2 ... ok
-movmskps_1 ... ok
-movntps_1 ... ok
-movntq_1 ... ok
-movss_1 ... ok
-movss_2 ... ok
-movss_3 ... ok
-movups_1 ... ok
-movups_2 ... ok
-mulps_1 ... ok
-mulps_2 ... ok
-mulss_1 ... ok
-mulss_2 ... ok
-orps_1 ... ok
-orps_2 ... ok
-pavgb_1 ... ok
-pavgb_2 ... ok
-pavgw_1 ... ok
-pavgw_2 ... ok
-pextrw_1 ... ok
-pextrw_2 ... ok
-pextrw_3 ... ok
-pextrw_4 ... ok
-pinsrw_1 ... ok
-pinsrw_2 ... ok
-pinsrw_3 ... ok
-pinsrw_4 ... ok
-pinsrw_5 ... ok
-pinsrw_6 ... ok
-pinsrw_7 ... ok
-pinsrw_8 ... ok
-pmaxsw_1 ... ok
-pmaxsw_2 ... ok
-pmaxub_1 ... ok
-pmaxub_2 ... ok
-pminsw_1 ... ok
-pminsw_2 ... ok
-pminub_1 ... ok
-pminub_2 ... ok
-pmovmskb_1 ... ok
-pmulhuw_1 ... ok
-pmulhuw_2 ... ok
-psadbw_1 ... ok
-psadbw_2 ... ok
-pshufw_1 ... ok
-pshufw_2 ... ok
-rcpps_1 ... ok
-rcpps_2 ... ok
-rcpss_1 ... ok
-rcpss_2 ... ok
-rsqrtps_1 ... ok
-rsqrtps_2 ... ok
-rsqrtss_1 ... ok
-rsqrtss_2 ... ok
-sfence_1 ... ok
-shufps_1 ... ok
-shufps_2 ... ok
-sqrtps_1 ... ok
-sqrtps_2 ... ok
-sqrtss_1 ... ok
-sqrtss_2 ... ok
-subps_1 ... ok
-subps_2 ... ok
-subss_1 ... ok
-subss_2 ... ok
-ucomiss_1 ... ok
-ucomiss_2 ... ok
-ucomiss_3 ... ok
-ucomiss_4 ... ok
-ucomiss_5 ... ok
-ucomiss_6 ... ok
-unpckhps_1 ... ok
-unpckhps_2 ... ok
-unpcklps_1 ... ok
-unpcklps_2 ... ok
-xorps_1 ... ok
-xorps_2 ... ok
diff --git a/old-helgrind/tests/x86/insn_sse.vgtest b/old-helgrind/tests/x86/insn_sse.vgtest
deleted file mode 100644 (file)
index be56cc9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-vgopts: -q
-prog: ../../../none/tests/x86/insn_sse
-prereq: ../../../tests/cputest x86-sse
diff --git a/old-helgrind/tests/x86/insn_sse2.stderr.exp b/old-helgrind/tests/x86/insn_sse2.stderr.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/old-helgrind/tests/x86/insn_sse2.stdout.exp b/old-helgrind/tests/x86/insn_sse2.stdout.exp
deleted file mode 100644 (file)
index 344df89..0000000
+++ /dev/null
@@ -1,302 +0,0 @@
-addpd_1 ... ok
-addpd_2 ... ok
-addsd_1 ... ok
-addsd_2 ... ok
-andpd_1 ... ok
-andpd_2 ... ok
-andnpd_1 ... ok
-andnpd_2 ... ok
-cmpeqpd_1 ... ok
-cmpeqpd_2 ... ok
-cmpltpd_1 ... ok
-cmpltpd_2 ... ok
-cmplepd_1 ... ok
-cmplepd_2 ... ok
-cmpneqpd_1 ... ok
-cmpneqpd_2 ... ok
-cmpnltpd_1 ... ok
-cmpnltpd_2 ... ok
-cmpnlepd_1 ... ok
-cmpnlepd_2 ... ok
-cmpeqsd_1 ... ok
-cmpeqsd_2 ... ok
-cmpltsd_1 ... ok
-cmpltsd_2 ... ok
-cmplesd_1 ... ok
-cmplesd_2 ... ok
-cmpneqsd_1 ... ok
-cmpneqsd_2 ... ok
-cmpnltsd_1 ... ok
-cmpnltsd_2 ... ok
-cmpnlesd_1 ... ok
-cmpnlesd_2 ... ok
-comisd_1 ... ok
-comisd_2 ... ok
-comisd_3 ... ok
-comisd_4 ... ok
-comisd_5 ... ok
-comisd_6 ... ok
-cvtdq2pd_1 ... ok
-cvtdq2pd_2 ... ok
-cvtdq2ps_1 ... ok
-cvtdq2ps_2 ... ok
-cvtpd2dq_1 ... ok
-cvtpd2dq_2 ... ok
-cvtpd2pi_1 ... ok
-cvtpd2pi_2 ... ok
-cvtpd2ps_1 ... ok
-cvtpd2ps_2 ... ok
-cvtpi2pd_1 ... ok
-cvtpi2pd_2 ... ok
-cvtps2dq_1 ... ok
-cvtps2dq_2 ... ok
-cvtps2pd_1 ... ok
-cvtps2pd_2 ... ok
-cvtsd2si_1 ... ok
-cvtsd2si_2 ... ok
-cvtsd2ss_1 ... ok
-cvtsd2ss_2 ... ok
-cvtsi2sd_1 ... ok
-cvtsi2sd_2 ... ok
-cvtss2sd_1 ... ok
-cvtss2sd_2 ... ok
-cvttpd2pi_1 ... ok
-cvttpd2pi_2 ... ok
-cvttpd2dq_1 ... ok
-cvttpd2dq_2 ... ok
-cvttps2dq_1 ... ok
-cvttps2dq_2 ... ok
-cvttsd2si_1 ... ok
-cvttsd2si_2 ... ok
-divpd_1 ... ok
-divpd_2 ... ok
-divsd_1 ... ok
-divsd_2 ... ok
-lfence_1 ... ok
-maxpd_1 ... ok
-maxpd_2 ... ok
-maxsd_1 ... ok
-maxsd_2 ... ok
-mfence_1 ... ok
-minpd_1 ... ok
-minpd_2 ... ok
-minsd_1 ... ok
-minsd_2 ... ok
-movapd_1 ... ok
-movapd_2 ... ok
-movd_1 ... ok
-movd_2 ... ok
-movd_3 ... ok
-movd_4 ... ok
-movdqa_1 ... ok
-movdqa_2 ... ok
-movdqa_3 ... ok
-movdqu_1 ... ok
-movdqu_2 ... ok
-movdqu_3 ... ok
-movdq2q_1 ... ok
-movhpd_1 ... ok
-movhpd_2 ... ok
-movlpd_1 ... ok
-movlpd_2 ... ok
-movmskpd_1 ... ok
-movntdq_1 ... ok
-movnti_1 ... ok
-movntpd_1 ... ok
-movq2dq_1 ... ok
-movsd_1 ... ok
-movsd_2 ... ok
-movsd_3 ... ok
-movupd_1 ... ok
-movupd_2 ... ok
-mulpd_1 ... ok
-mulpd_2 ... ok
-mulsd_1 ... ok
-mulsd_2 ... ok
-orpd_1 ... ok
-orpd_2 ... ok
-packssdw_1 ... ok
-packssdw_2 ... ok
-packsswb_1 ... ok
-packsswb_2 ... ok
-packuswb_1 ... ok
-packuswb_2 ... ok
-paddb_1 ... ok
-paddb_2 ... ok
-paddd_1 ... ok
-paddd_2 ... ok
-paddq_1 ... ok
-paddq_2 ... ok
-paddq_3 ... ok
-paddq_4 ... ok
-paddsb_1 ... ok
-paddsb_2 ... ok
-paddsw_1 ... ok
-paddsw_2 ... ok
-paddusb_1 ... ok
-paddusb_2 ... ok
-paddusw_1 ... ok
-paddusw_2 ... ok
-paddw_1 ... ok
-paddw_2 ... ok
-pand_1 ... ok
-pand_2 ... ok
-pandn_1 ... ok
-pandn_2 ... ok
-pavgb_1 ... ok
-pavgb_2 ... ok
-pavgw_1 ... ok
-pavgw_2 ... ok
-pcmpeqb_1 ... ok
-pcmpeqb_2 ... ok
-pcmpeqd_1 ... ok
-pcmpeqd_2 ... ok
-pcmpeqw_1 ... ok
-pcmpeqw_2 ... ok
-pcmpgtb_1 ... ok
-pcmpgtb_2 ... ok
-pcmpgtd_1 ... ok
-pcmpgtd_2 ... ok
-pcmpgtw_1 ... ok
-pcmpgtw_2 ... ok
-pextrw_1 ... ok
-pextrw_2 ... ok
-pextrw_3 ... ok
-pextrw_4 ... ok
-pextrw_5 ... ok
-pextrw_6 ... ok
-pextrw_7 ... ok
-pextrw_8 ... ok
-pinsrw_1 ... ok
-pinsrw_2 ... ok
-pinsrw_3 ... ok
-pinsrw_4 ... ok
-pinsrw_5 ... ok
-pinsrw_6 ... ok
-pinsrw_7 ... ok
-pinsrw_8 ... ok
-pinsrw_9 ... ok
-pinsrw_10 ... ok
-pinsrw_11 ... ok
-pinsrw_12 ... ok
-pinsrw_13 ... ok
-pinsrw_14 ... ok
-pinsrw_15 ... ok
-pinsrw_16 ... ok
-pmaddwd_1 ... ok
-pmaddwd_2 ... ok
-pmaxsw_1 ... ok
-pmaxsw_2 ... ok
-pmaxub_1 ... ok
-pmaxub_2 ... ok
-pminsw_1 ... ok
-pminsw_2 ... ok
-pminub_1 ... ok
-pminub_2 ... ok
-pmovmskb_1 ... ok
-pmulhuw_1 ... ok
-pmulhuw_2 ... ok
-pmulhw_1 ... ok
-pmulhw_2 ... ok
-pmullw_1 ... ok
-pmullw_2 ... ok
-pmuludq_1 ... ok
-pmuludq_2 ... ok
-pmuludq_3 ... ok
-pmuludq_4 ... ok
-por_1 ... ok
-por_2 ... ok
-psadbw_1 ... ok
-psadbw_2 ... ok
-pshufd_1 ... ok
-pshufd_2 ... ok
-pshufhw_1 ... ok
-pshufhw_2 ... ok
-pshuflw_1 ... ok
-pshuflw_2 ... ok
-pslld_1 ... ok
-pslld_2 ... ok
-pslld_3 ... ok
-pslldq_1 ... ok
-pslldq_2 ... ok
-psllq_1 ... ok
-psllq_2 ... ok
-psllq_3 ... ok
-psllw_1 ... ok
-psllw_2 ... ok
-psllw_3 ... ok
-psrad_1 ... ok
-psrad_2 ... ok
-psrad_3 ... ok
-psraw_1 ... ok
-psraw_2 ... ok
-psraw_3 ... ok
-psrld_1 ... ok
-psrld_2 ... ok
-psrld_3 ... ok
-psrldq_1 ... ok
-psrldq_2 ... ok
-psrlq_1 ... ok
-psrlq_2 ... ok
-psrlq_3 ... ok
-psrlw_1 ... ok
-psrlw_2 ... ok
-psrlw_3 ... ok
-psubb_1 ... ok
-psubb_2 ... ok
-psubd_1 ... ok
-psubd_2 ... ok
-psubq_1 ... ok
-psubq_2 ... ok
-psubq_3 ... ok
-psubq_4 ... ok
-psubsb_1 ... ok
-psubsb_2 ... ok
-psubsw_1 ... ok
-psubsw_2 ... ok
-psubusb_1 ... ok
-psubusb_2 ... ok
-psubusw_1 ... ok
-psubusw_2 ... ok
-psubw_1 ... ok
-psubw_2 ... ok
-punpckhbw_1 ... ok
-punpckhbw_2 ... ok
-punpckhdq_1 ... ok
-punpckhdq_2 ... ok
-punpckhqdq_1 ... ok
-punpckhqdq_2 ... ok
-punpckhwd_1 ... ok
-punpckhwd_2 ... ok
-punpcklbw_1 ... ok
-punpcklbw_2 ... ok
-punpckldq_1 ... ok
-punpckldq_2 ... ok
-punpcklqdq_1 ... ok
-punpcklqdq_2 ... ok
-punpcklwd_1 ... ok
-punpcklwd_2 ... ok
-pxor_1 ... ok
-pxor_2 ... ok
-shufpd_1 ... ok
-shufpd_2 ... ok
-sqrtpd_1 ... ok
-sqrtpd_2 ... ok
-sqrtsd_1 ... ok
-sqrtsd_2 ... ok
-subpd_1 ... ok
-subpd_2 ... ok
-subsd_1 ... ok
-subsd_2 ... ok
-ucomisd_1 ... ok
-ucomisd_2 ... ok
-ucomisd_3 ... ok
-ucomisd_4 ... ok
-ucomisd_5 ... ok
-ucomisd_6 ... ok
-unpckhpd_1 ... ok
-unpckhpd_2 ... ok
-unpcklpd_1 ... ok
-unpcklpd_2 ... ok
-xorpd_1 ... ok
-xorpd_2 ... ok
diff --git a/old-helgrind/tests/x86/insn_sse2.vgtest b/old-helgrind/tests/x86/insn_sse2.vgtest
deleted file mode 100644 (file)
index 346e5c4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-vgopts: -q
-prog: ../../../none/tests/x86/insn_sse2
-prereq: ../../../tests/cputest x86-sse2