]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
15 years agoSupport FTOUIS, UXTAB, SXTAH.
Julian Seward [Mon, 8 Mar 2010 14:49:03 +0000 (14:49 +0000)] 
Support FTOUIS, UXTAB, SXTAH.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1964

15 years agoHandle SBB Eb,Gb.
Julian Seward [Sun, 28 Feb 2010 04:53:07 +0000 (04:53 +0000)] 
Handle SBB Eb,Gb.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1963

15 years agoFix incorrect spec rule for LE after INCB, for end-of range cases (arg = 0x7F).
Julian Seward [Sun, 28 Feb 2010 04:51:02 +0000 (04:51 +0000)] 
Fix incorrect spec rule for LE after INCB, for end-of range cases (arg = 0x7F).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1962

15 years agoCVTPI2PD (which converts 2 x I32 in M64 or MMX to 2 x F64 in XMM):
Julian Seward [Sun, 21 Feb 2010 20:40:53 +0000 (20:40 +0000)] 
CVTPI2PD (which converts 2 x I32 in M64 or MMX to 2 x F64 in XMM):
only switch the x87 FPU to MMX mode in the case where the source
operand is in memory, not in an MMX register.  This fixes #210264.

This is all very fishy.

* it's inconsistent with all other instructions which convert between
  values in (MMX or M64) and XMM, in that they put the FPU in MMX mode
  even if the source is memory, not MMX.  (for example, CVTPI2PS).
  At least, that's what the Intel docs appear to say.

* the AMD documentation makes no mention at all of this.  For example
  it makes no differentiation in this matter between CVTPI2PD and
  CVTPI2PS.

I wonder if Intel surreptitiously changed the behaviour of CVTPI2PD
since this code was written circa 5 years ago.  Or, whether the Intel
and AMD implementations differ in this respect.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1961

15 years agoMajorly improved implementation of self-checking for translations.
Julian Seward [Thu, 18 Feb 2010 23:01:26 +0000 (23:01 +0000)] 
Majorly improved implementation of self-checking for translations.
This reduces the overhead of --smc-check=all by a factor of between 2
and 3.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1960

15 years agox86/amd64 front ends: don't chase a conditional branch that leads
Julian Seward [Sun, 17 Jan 2010 15:47:01 +0000 (15:47 +0000)] 
x86/amd64 front ends: don't chase a conditional branch that leads
back to the start of the trace.  It's better to leave the IR loop
unroller to handle such cases.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1959

15 years agoEnable (optionally) chasing through conditional branches during trace
Julian Seward [Sun, 17 Jan 2010 09:36:11 +0000 (09:36 +0000)] 
Enable (optionally) chasing through conditional branches during trace
construction, on ARM.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1958

15 years agoAdd logic to allow front ends to speculatively continue adding guest
Julian Seward [Fri, 15 Jan 2010 10:53:21 +0000 (10:53 +0000)] 
Add logic to allow front ends to speculatively continue adding guest
instructions into IRSBs (superblocks) after conditional branches.
Currently only the x86 and amd64 front ends support this.  The
assumption is that backwards conditional branches are taken and
forwards conditional branches are not taken, which is generally
regarded as plausible and is particularly effective with code compiled
by gcc at -O2, -O3 or -O -freorder-blocks (-freorder-blocks is enabled
by default at -O2 and above).

Is disabled by default.  Has been seen to provide notable speedups
(eg, --tool=none for perf/bz2), and reduces the number of
block-to-block transitions dramatically, by up to half, but usually
makes programs run more slowly.  Increases the amount of generated
code by at least 15%-20% and so is a net liability in terms of icache
misses and JIT time.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1957

15 years agoamd64: add a couple more spec cases: NLE after SUBL, and NZ after LOGICB.
Julian Seward [Fri, 15 Jan 2010 09:54:55 +0000 (09:54 +0000)] 
amd64: add a couple more spec cases: NLE after SUBL, and NZ after LOGICB.
x86: add commented out (ATC) spec case for C flag after SMULL.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1956

15 years agoFor 32-bit reads of integer guest registers, generate a 64-bit Get
Julian Seward [Mon, 11 Jan 2010 10:46:18 +0000 (10:46 +0000)] 
For 32-bit reads of integer guest registers, generate a 64-bit Get
followed by a Iop_64to32 narrowing, rather than doing a 32-bit Get.
This makes the Put-to-Get-forwarding optimisation work seamlessly for
code which does 32-bit register operations (very common), which it
never did before.  Also add a folding rule to remove the resulting
32-to-64-to-32 widen-narrow chains.

This reduces the amount of code generated overall about 3%, but gives
a much larger speedup, of about 11% for Memcheck running perf/bz2.c.
Not sure why this is, perhaps due to reducing store bandwidth
requirements in the generated code, or due to avoiding
store-forwarding stalls when writing/reading the guest state.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1955

15 years ago* support PLD (cache-preload-hint) instructions
Julian Seward [Sat, 9 Jan 2010 11:43:21 +0000 (11:43 +0000)] 
* support PLD (cache-preload-hint) instructions
* start of a framework for decoding instructions in NV space
* fix a couple of unused/untested RRX shifter operand cases

git-svn-id: svn://svn.valgrind.org/vex/trunk@1954

15 years agoDon't force alignment for LDMxx/STMxx when presented with a misaligned
Julian Seward [Sun, 3 Jan 2010 01:20:59 +0000 (01:20 +0000)] 
Don't force alignment for LDMxx/STMxx when presented with a misaligned
address; instead just press on regardless.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1953

15 years agogen{Spill,Reload}_PPC: track recent change in genSpill/Reload
Julian Seward [Sat, 2 Jan 2010 13:23:54 +0000 (13:23 +0000)] 
gen{Spill,Reload}_PPC: track recent change in genSpill/Reload
signature.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1952

15 years agoGenerate a couple more ARM specific offsets; also R1 on ppc32/64.
Julian Seward [Fri, 1 Jan 2010 19:19:08 +0000 (19:19 +0000)] 
Generate a couple more ARM specific offsets; also R1 on ppc32/64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1951

15 years agoMake the x86 and amd64 back ends use the revised prototypes for
Julian Seward [Thu, 31 Dec 2009 19:26:03 +0000 (19:26 +0000)] 
Make the x86 and amd64 back ends use the revised prototypes for
genSpill and genReload.  ppc32/64 backends are still broken.
Also, tidy up associated pointer-type casting in main_main.c.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1950

15 years agoMerge r1925:1948 from branches/ARM. This temporarily breaks all other
Julian Seward [Thu, 31 Dec 2009 18:00:12 +0000 (18:00 +0000)] 
Merge r1925:1948 from branches/ARM.  This temporarily breaks all other
targets, because a few IR primops to do with int<->float conversions
have been renamed, and because an internal interface for creating
spill/reload instructions has changed.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1949

15 years agoTesting hacklet, to fill the vex tmp allocation area before each
Julian Seward [Thu, 3 Dec 2009 09:50:38 +0000 (09:50 +0000)] 
Testing hacklet, to fill the vex tmp allocation area before each
translation, with 0x00 or 0xFF or whatever.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1938

15 years agoChange the IR representation of load linked and store conditional.
Julian Seward [Thu, 26 Nov 2009 17:17:37 +0000 (17:17 +0000)] 
Change the IR representation of load linked and store conditional.
They are now moved out into their own new IRStmt kind (IRStmt_LLSC),
and are not treated merely as variants of standard loads (IRExpr_Load)
or store (IRStmt_Store).  This is necessary because load linked is a
load with a side effect (lodging a reservation), hence it cannot be an
IRExpr since IRExprs denote side-effect free value computations.

Fix up all front and back ends accordingly; also iropt.

Fixes #215771.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1930

15 years agoUse a shorter instruction encoding for "mov $smallish positive int, %reg".
Julian Seward [Sun, 22 Nov 2009 23:43:17 +0000 (23:43 +0000)] 
Use a shorter instruction encoding for "mov $smallish positive int, %reg".
Reduces generated code size by about 1% for Memcheck.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1929

15 years agoSpecialise "S after 32-bit SUB/CMP"; improves performance by about 2%
Julian Seward [Sun, 22 Nov 2009 23:38:01 +0000 (23:38 +0000)] 
Specialise "S after 32-bit SUB/CMP"; improves performance by about 2%
for Memcheck running bzip2.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1928

15 years agoTrack recent file renaming.
Julian Seward [Sun, 6 Sep 2009 20:45:21 +0000 (20:45 +0000)] 
Track recent file renaming.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1920

15 years agoUpdate ("cand1" committed for real use in immediately preceding r1918).
Julian Seward [Sat, 5 Sep 2009 00:03:52 +0000 (00:03 +0000)] 
Update ("cand1" committed for real use in immediately preceding r1918).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1919

15 years agoUse a much faster hash function to do the self-modifying-code checks.
Julian Seward [Sat, 5 Sep 2009 00:03:07 +0000 (00:03 +0000)] 
Use a much faster hash function to do the self-modifying-code checks.
This reduces the extra overhead of --smc-check=all when running
Memcheck from about 75% to about 45%.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1918

15 years agoAdd test program for experimentation with smc-check hashing schemes
Julian Seward [Mon, 31 Aug 2009 08:53:26 +0000 (08:53 +0000)] 
Add test program for experimentation with smc-check hashing schemes
(very incomplete).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1917

15 years agoPrint raw machine code in an easier-to-parse way.
Julian Seward [Mon, 31 Aug 2009 08:50:02 +0000 (08:50 +0000)] 
Print raw machine code in an easier-to-parse way.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1916

16 years agoImplement mfpvr (mfspr 287) (bug #201585).
Julian Seward [Sun, 2 Aug 2009 14:35:45 +0000 (14:35 +0000)] 
Implement mfpvr (mfspr 287) (bug #201585).

Also, fix a type mismatch in the generated IR for mfspr 268/269 which
would have caused an IR checker assertion failure when handling those
insns on ppc64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1913

16 years agoTell the register allocator on x86 that xmm0..7 are trashed across
Julian Seward [Wed, 22 Jul 2009 11:06:17 +0000 (11:06 +0000)] 
Tell the register allocator on x86 that xmm0..7 are trashed across
function calls.  This forces it to handle them as caller-saved, which
is (to the extent that it's possible to tell) what the ELF ABI
requires.  Lack of this has been observed to corrupt floating point
computations in tools that use the xmm registers in the helper
functions called from generated code.  This change brings the x86
backend into line with the amd64 backend, the latter of which has
always treated the xmm regs as caller-saved.

The x87 registers are still incorrectly handled as callee-saved.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1912

16 years agoSupport LODS on amd64. Fixes #189737.
Julian Seward [Wed, 22 Jul 2009 09:29:13 +0000 (09:29 +0000)] 
Support LODS on amd64.  Fixes #189737.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1911

16 years agodeepCopyIRCAS: handle NULL dataHi and expdHi without segfaulting.
Julian Seward [Fri, 17 Jul 2009 16:34:30 +0000 (16:34 +0000)] 
deepCopyIRCAS: handle NULL dataHi and expdHi without segfaulting.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1910

16 years agoGet rid of LibVEX_Version().
Julian Seward [Wed, 15 Jul 2009 15:24:49 +0000 (15:24 +0000)] 
Get rid of LibVEX_Version().

git-svn-id: svn://svn.valgrind.org/vex/trunk@1909

16 years agoFix disassembly printing of cmpxchg insns (don't print "lock" twice).
Julian Seward [Sun, 12 Jul 2009 13:01:17 +0000 (13:01 +0000)] 
Fix disassembly printing of cmpxchg insns (don't print "lock" twice).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1908

16 years agoAdd new integer comparison primitives Iop_CasCmp{EQ,NE}{8,16,32,64},
Julian Seward [Sun, 12 Jul 2009 12:56:53 +0000 (12:56 +0000)] 
Add new integer comparison primitives Iop_CasCmp{EQ,NE}{8,16,32,64},
which are semantically identical to Iop_Cmp{EQ,NE}{8,16,32,64}.  Use
these new primitives instead of the normal ones, in the tests
following IR-level compare-and-swap operations, which establish
whether or not the CAS succeeded.  This is all for Memcheck's benefit,
as it really needs to be able to identify which comparisons are
CAS-success tests and which aren't.  This is all described in great
detail in memcheck/mc_translate.c in the comment
"COMMENT_ON_CasCmpEQ".

git-svn-id: svn://svn.valgrind.org/vex/trunk@1907

16 years agoFix ppc64 guest layout description following recent DCAS hackery.
Julian Seward [Sat, 4 Jul 2009 13:07:30 +0000 (13:07 +0000)] 
Fix ppc64 guest layout description following recent DCAS hackery.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1906

16 years agoUnbreak the svn-version thing following r1904.
Julian Seward [Thu, 2 Jul 2009 12:36:08 +0000 (12:36 +0000)] 
Unbreak the svn-version thing following r1904.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1905

16 years agoFlatten out the directory structure in the priv/ side, by pulling all
Julian Seward [Thu, 2 Jul 2009 12:21:59 +0000 (12:21 +0000)] 
Flatten out the directory structure in the priv/ side, by pulling all
files into priv/ and giving them unique names.  This makes it easier
to use automake to build all this stuff in Valgrind.  It also tidies
up a directory structure which had become a bit pointlessly complex.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1904

16 years agoDouble the size of the spill area. Fixes #195838.
Julian Seward [Wed, 1 Jul 2009 08:45:02 +0000 (08:45 +0000)] 
Double the size of the spill area.  Fixes #195838.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1903

16 years agoRename 'Makefile' to 'Makefile-gcc' so as to be compatible with recent
Julian Seward [Wed, 1 Jul 2009 08:07:29 +0000 (08:07 +0000)] 
Rename 'Makefile' to 'Makefile-gcc' so as to be compatible with recent
Valgrind build-system changes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1902

16 years agoMerge in branches/DCAS:
Julian Seward [Wed, 1 Jul 2009 08:06:34 +0000 (08:06 +0000)] 
Merge in branches/DCAS:

This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

The change adds a new IR statement kind, IRStmt_CAS, which represents
single- and doubleword compare-and-swap.  This is used as the basis
for the translation of all LOCK-prefixed instructions on x86 and
amd64.

The change also extends IRExpr_Load and IRStmt_Store so that
load-linked and store-conditional operations can be represented.  This
facilitates correct translation of l[wd]arx and st[wd]cx. on ppc in
the sense that these instructions will now eventually be regenerated
at the end of the compilation pipeline.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1901

16 years agoUse more POSIX-standard flags for 'ar'. See #195287.
Julian Seward [Tue, 9 Jun 2009 23:00:49 +0000 (23:00 +0000)] 
Use more POSIX-standard flags for 'ar'.  See #195287.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1900

16 years agoMake VexGuestAMD64State have a 16-aligned size once again, following
Julian Seward [Thu, 19 Mar 2009 23:59:01 +0000 (23:59 +0000)] 
Make VexGuestAMD64State have a 16-aligned size once again, following
r1886.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1888

16 years agoCalculate next %rip correctly in palignr instructions (mmx and xmm-class).
Julian Seward [Thu, 19 Mar 2009 23:43:43 +0000 (23:43 +0000)] 
Calculate next %rip correctly in palignr instructions (mmx and xmm-class).
Fixes #186238.

MERGE TO 3_4_BRANCH.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1887

16 years agoIn order to make it possible for Valgrind to restart client syscalls
Julian Seward [Thu, 19 Mar 2009 22:21:40 +0000 (22:21 +0000)] 
In order to make it possible for Valgrind to restart client syscalls
that have been interrupted by signals, on Darwin, generalise an idea
which first emerged in the guest ppc32/64 stuff, in order to solve the
same problem on AIX.

Idea is: make all guests have a pseudo-register "IP_AT_SYSCALL", which
records the address of the most recently executed system call
instruction.  Then, to back up the guest over the most recent syscall,
simply make its program counter equal to this value.  This idea
already existing in the for ppc32/64 guests, but the register was
called "CIA_AT_SC".

Currently is not set in guest-amd64.

This commit will break the Valgrind svn trunk (temporarily).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1886

16 years agoChange underscores in the middle of library names into dashes.
Julian Seward [Sun, 22 Feb 2009 23:38:55 +0000 (23:38 +0000)] 
Change underscores in the middle of library names into dashes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1884

16 years agoHandle redundant REX.W on PUNPCKHgg. Fixes test case dated 2009-01-22
Julian Seward [Sat, 24 Jan 2009 10:34:19 +0000 (10:34 +0000)] 
Handle redundant REX.W on PUNPCKHgg.  Fixes test case dated 2009-01-22
of #173751.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1882

16 years agoHandle both %gs and %fs prefixes on amd64 a bit more "properly".
Julian Seward [Thu, 22 Jan 2009 20:40:22 +0000 (20:40 +0000)] 
Handle both %gs and %fs prefixes on amd64 a bit more "properly".

git-svn-id: svn://svn.valgrind.org/vex/trunk@1881

16 years agogenoffsets.c: don't use __builtin_offset since older gcc's don't
Julian Seward [Fri, 19 Dec 2008 09:32:25 +0000 (09:32 +0000)] 
genoffsets.c: don't use __builtin_offset since older gcc's don't
know about it.  Also add some comments.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1878

16 years agoChange the way pub/libvex_guest_offsets.h is created, so that it is
Julian Seward [Wed, 17 Dec 2008 22:37:49 +0000 (22:37 +0000)] 
Change the way pub/libvex_guest_offsets.h is created, so that it is
correct for a cross-compiled build.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1877

16 years agoHandle some redundant REX.W prefixes on code from IPP (Intel
Julian Seward [Sat, 13 Dec 2008 16:49:46 +0000 (16:49 +0000)] 
Handle some redundant REX.W prefixes on code from IPP (Intel
Performance Primitives).  This fixes #173751, at least for the test
cases so far provided.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1876

16 years agoAdd to the VexAbiInfo structure, two new fields:
Julian Seward [Thu, 4 Dec 2008 00:05:12 +0000 (00:05 +0000)] 
Add to the VexAbiInfo structure, two new fields:
  guest_amd64_assume_fs_is_zero
  guest_amd64_assume_gs_is_0x60

and use them to properly enable %fs/%gs prefix decoding for
guest-amd64.  This is needed to support amd64-darwin cleanly.

Unfortunately the VexAbiInfo needs to be plumbed to every single where
an address is decoded, which means the patch is vast, although very
trivial.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1875

16 years agoInitial VEX-end support for Darwin (x86 and amd64).
Julian Seward [Wed, 3 Dec 2008 21:29:59 +0000 (21:29 +0000)] 
Initial VEX-end support for Darwin (x86 and amd64).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1874

16 years agoHandle "movsd G,E" for G and E both regs. This is the non-binutils
Julian Seward [Mon, 17 Nov 2008 20:25:37 +0000 (20:25 +0000)] 
Handle "movsd G,E" for G and E both regs.  This is the non-binutils
encoding.  Fixes #175150.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1873

16 years agoSupport "repe scas" on amd64. Fixes #168943.
Julian Seward [Sat, 8 Nov 2008 15:25:00 +0000 (15:25 +0000)] 
Support "repe scas" on amd64.  Fixes #168943.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1872

16 years agoTighten up decoding of isel instruction.
Julian Seward [Thu, 6 Nov 2008 09:22:05 +0000 (09:22 +0000)] 
Tighten up decoding of isel instruction.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1871

16 years agoSupport isel (integer conditional move).
Julian Seward [Thu, 6 Nov 2008 09:02:34 +0000 (09:02 +0000)] 
Support isel (integer conditional move).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1870

16 years agoHandle MOVSD reg,reg for the encoding which is not emitted by binutils.
Julian Seward [Tue, 4 Nov 2008 11:31:44 +0000 (11:31 +0000)] 
Handle MOVSD reg,reg for the encoding which is not emitted by binutils.
Fixes #171645.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1869

16 years agoFixes for compilation warnings from the apparently very strict
Julian Seward [Sat, 1 Nov 2008 23:54:45 +0000 (23:54 +0000)] 
Fixes for compilation warnings from the apparently very strict
gcc-4.3.2 shipped with Ubuntu 8.10.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1868

16 years agoIn 32-bit mode only, accept primary opcode 0x82 and treat it the same
Julian Seward [Fri, 31 Oct 2008 21:27:38 +0000 (21:27 +0000)] 
In 32-bit mode only, accept primary opcode 0x82 and treat it the same
as 0x80.  Fixes #172417.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1867

16 years agoStop gcc-4.4.0 (snapshot) complaining about strict-aliasing violations.
Julian Seward [Thu, 23 Oct 2008 09:47:47 +0000 (09:47 +0000)] 
Stop gcc-4.4.0 (snapshot) complaining about strict-aliasing violations.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1866

16 years agoSupport FPREM1 on amd64. Fixes #172563.
Julian Seward [Sat, 11 Oct 2008 10:07:55 +0000 (10:07 +0000)] 
Support FPREM1 on amd64.  Fixes #172563.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1865

16 years agoAdd a description of the FP offset/size to type VexGuestLayout.
Julian Seward [Tue, 19 Aug 2008 11:15:10 +0000 (11:15 +0000)] 
Add a description of the FP offset/size to type VexGuestLayout.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1864

16 years agoC89 fixes (stop gcc complaining).
Julian Seward [Mon, 18 Aug 2008 21:47:52 +0000 (21:47 +0000)] 
C89 fixes (stop gcc complaining).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1863

17 years agoHandle frin, frim, frip, friz, in 64-bit mode only, for now.
Julian Seward [Fri, 8 Aug 2008 08:37:06 +0000 (08:37 +0000)] 
Handle frin, frim, frip, friz, in 64-bit mode only, for now.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1862

17 years agoIgnore .EH bit in lwarx / ldarx as it appears to be merely a hint.
Julian Seward [Wed, 6 Aug 2008 19:13:42 +0000 (19:13 +0000)] 
Ignore .EH bit in lwarx / ldarx as it appears to be merely a hint.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1861

17 years agoAdd support needed for exp-ptrcheck on ppc32/64.
Julian Seward [Wed, 30 Jul 2008 09:56:45 +0000 (09:56 +0000)] 
Add support needed for exp-ptrcheck on ppc32/64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1860

17 years agoHandle Iop_ReinterpF32asI32, as needed for exp-ptrcheck.
Julian Seward [Tue, 29 Jul 2008 09:48:26 +0000 (09:48 +0000)] 
Handle Iop_ReinterpF32asI32, as needed for exp-ptrcheck.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1859

17 years agoMinor printing changes.
Julian Seward [Tue, 29 Jul 2008 09:47:21 +0000 (09:47 +0000)] 
Minor printing changes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1858

17 years agoAdd Imbe_SnoopedStoreBegin and Imbe_SnoopedStoreEnd, to be used for
Julian Seward [Mon, 30 Jun 2008 10:31:47 +0000 (10:31 +0000)] 
Add Imbe_SnoopedStoreBegin and Imbe_SnoopedStoreEnd, to be used for
bracketing snooped stores; fix up compilation pipeline to accept
(ignore) them.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1857

17 years agoTranslate "fnstsw %ax" in a slightly different way, which plays better
Julian Seward [Wed, 4 Jun 2008 09:10:38 +0000 (09:10 +0000)] 
Translate "fnstsw %ax" in a slightly different way, which plays better
with Memcheck's origin tracking stuff.  a.k.a. a lame kludge.  See
comments in source.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1855

17 years agoIn some obscure circumstances, the allocator would incorrectly omit a
Julian Seward [Fri, 30 May 2008 22:58:07 +0000 (22:58 +0000)] 
In some obscure circumstances, the allocator would incorrectly omit a
spill store on the basis that the register being spilled had the same
value as the spill slot being written to.  This change is believed to
make the equals-spill-slot optimisation correct.  Fixes a bug first
observed by Nuno Lopes and later by Marc-Oliver Straub.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1853

17 years agoAllow 64-byte line sizes (PA6T cpu).
Julian Seward [Thu, 29 May 2008 16:39:21 +0000 (16:39 +0000)] 
Allow 64-byte line sizes (PA6T cpu).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1851

17 years agoFix a couple of longstanding enum inconsistencies discovered by
Julian Seward [Wed, 28 May 2008 09:40:29 +0000 (09:40 +0000)] 
Fix a couple of longstanding enum inconsistencies discovered by
Florian Krohm's static checker.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1850

17 years agoSupport 8 bit xadd. Fixes #158744.
Julian Seward [Tue, 13 May 2008 21:21:16 +0000 (21:21 +0000)] 
Support 8 bit xadd.  Fixes #158744.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1848

17 years agoCompute the starting address of the instruction correctly. This has
Julian Seward [Sun, 11 May 2008 10:11:58 +0000 (10:11 +0000)] 
Compute the starting address of the instruction correctly.  This has
always been wrong and can cause the next-instruction-address to be
wrong in obscure circumstances.  Fixes #152818.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1838

17 years agoUpdate to check fxrstor too.
Julian Seward [Fri, 9 May 2008 13:27:47 +0000 (13:27 +0000)] 
Update to check fxrstor too.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1837

17 years agoHandle fxrstor on x86. Fixes #126389.
Julian Seward [Fri, 9 May 2008 13:24:43 +0000 (13:24 +0000)] 
Handle fxrstor on x86.  Fixes #126389.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1836

17 years agoAllow pushfw and popfw. Fixes #157748.
Julian Seward [Fri, 9 May 2008 09:34:06 +0000 (09:34 +0000)] 
Allow pushfw and popfw.  Fixes #157748.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1835

17 years agoEnable repne cmps{b,w,l}. Fixes #153196.
Julian Seward [Fri, 9 May 2008 08:53:50 +0000 (08:53 +0000)] 
Enable repne cmps{b,w,l}.  Fixes #153196.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1834

17 years agoSpecialise CondNZ after SUBW for both x86 and amd64.
Julian Seward [Fri, 2 May 2008 22:15:12 +0000 (22:15 +0000)] 
Specialise CondNZ after SUBW for both x86 and amd64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1833

17 years agoMerge branches/OTRACK_BY_INSTRUMENTATION into the trunk. This
Julian Seward [Thu, 1 May 2008 20:13:04 +0000 (20:13 +0000)] 
Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk.  This
provides vex-side support for origin tracking in Memcheck.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1832

17 years agoEnable FUCOMPP on amd64. Fixes #161378.
Julian Seward [Mon, 28 Apr 2008 21:05:33 +0000 (21:05 +0000)] 
Enable FUCOMPP on amd64.  Fixes #161378.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1826

17 years agoSpecialise CondNS after SUBB on amd64.
Julian Seward [Mon, 31 Mar 2008 21:57:17 +0000 (21:57 +0000)] 
Specialise CondNS after SUBB on amd64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1817

17 years agoSpecialise CondNS after SUBB. The lack of this was causing Memcheck to
Julian Seward [Mon, 31 Mar 2008 01:51:57 +0000 (01:51 +0000)] 
Specialise CondNS after SUBB.  The lack of this was causing Memcheck to
report false positives in some tricky bitfield code in OOo 2.4 (writer)
when loading MS Word docs.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1816

17 years agoShow x86 sreg offsets.
Julian Seward [Fri, 15 Feb 2008 17:18:18 +0000 (17:18 +0000)] 
Show x86 sreg offsets.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1812

17 years agoUpdate copyright dates ("200X-2007" --> "200X-2008").
Julian Seward [Mon, 11 Feb 2008 11:35:40 +0000 (11:35 +0000)] 
Update copyright dates ("200X-2007" --> "200X-2008").

git-svn-id: svn://svn.valgrind.org/vex/trunk@1811

17 years agoFix CPUID:
Julian Seward [Sun, 10 Feb 2008 13:29:19 +0000 (13:29 +0000)] 
Fix CPUID:
- when EAX=4, output also depends on ECX
- handle out-of-range EAX correctly

git-svn-id: svn://svn.valgrind.org/vex/trunk@1810

17 years agoFinalise SSSE3 support (counterpart to r1808):
Julian Seward [Sat, 9 Feb 2008 01:16:02 +0000 (01:16 +0000)] 
Finalise SSSE3 support (counterpart to r1808):

* support SSSE3 for 32-bit insns

* For 128-bit variants accessing memory, generate an exception
  if effective address is not 128-bit aligned

* Change CPUID output to be Core-2, so now it claims to
  be a Core 2 E6600

git-svn-id: svn://svn.valgrind.org/vex/trunk@1809

17 years agoAdd SSSE3 support. Currently only for 64-bit. TODO:
Julian Seward [Wed, 6 Feb 2008 11:42:45 +0000 (11:42 +0000)] 
Add SSSE3 support.  Currently only for 64-bit.  TODO:
* Check through IR generation
* For 128-bit variants accessing memory, generate an exception
  if effective address is not 128-bit aligned
* Change CPUID output to be Core-2 like
* Enable for 32-bit code too.

* Make Memcheck handle the new IROps
* Commit test cases

git-svn-id: svn://svn.valgrind.org/vex/trunk@1808

17 years agoVery kludgey implementation of IRET. May or may not fix #155011.
Julian Seward [Fri, 4 Jan 2008 01:22:41 +0000 (01:22 +0000)] 
Very kludgey implementation of IRET.  May or may not fix #155011.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1807

17 years agoGenerate code to handle 64-bit integer loads and stores on 32-bit
Julian Seward [Tue, 4 Dec 2007 19:04:17 +0000 (19:04 +0000)] 
Generate code to handle 64-bit integer loads and stores on 32-bit
targets, as this is needed by Massif in Valgrind 3.3.0.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1804

17 years agoHandle the case Add64(expr,const) a bit better. Apparently Massif The
Julian Seward [Tue, 27 Nov 2007 00:11:13 +0000 (00:11 +0000)] 
Handle the case Add64(expr,const) a bit better.  Apparently Massif The
Second does that kind of thing a lot.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1803

17 years agoFix stupid bug in x86 isel: when generating code for a 64-bit integer
Julian Seward [Mon, 26 Nov 2007 23:18:52 +0000 (23:18 +0000)] 
Fix stupid bug in x86 isel: when generating code for a 64-bit integer
store, don't generate code to compute the address expression twice.
Spotted by Nick N whilst peering at code generated for new Massif.
Preventative changes in amd64 back end (which doesn't appear to have
the same problem).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1802

17 years agoImplement lods{b,w,l}. Fixes #152818.
Julian Seward [Sun, 25 Nov 2007 01:34:03 +0000 (01:34 +0000)] 
Implement lods{b,w,l}.  Fixes #152818.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1801

17 years agoImplement DAA/DAS/AAA/AAS. Really stupid and ugly instructions which
Julian Seward [Fri, 23 Nov 2007 02:46:29 +0000 (02:46 +0000)] 
Implement DAA/DAS/AAA/AAS.  Really stupid and ugly instructions which
might have made sense in 1973, but not now.  Fixes #152501.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1800

17 years agoSupport in{b,w,l} and out{b,w,l} on amd64. Fixes #152357.
Julian Seward [Tue, 20 Nov 2007 17:29:08 +0000 (17:29 +0000)] 
Support in{b,w,l} and out{b,w,l} on amd64.  Fixes #152357.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1799

17 years agoFix this:
Julian Seward [Mon, 19 Nov 2007 00:39:23 +0000 (00:39 +0000)] 
Fix this:
vex: priv/guest-amd64/toIR.c:3741 (dis_Grp5): Assertion `sz == 4' failed.
(CALL Ev with sz==8) as reported in #150678 and #146252.  Also change a
bunch of assertions on undecoded instructions into proper decoding failures.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1798

17 years agogcc-4.3 build fixes.
Julian Seward [Fri, 16 Nov 2007 12:43:32 +0000 (12:43 +0000)] 
gcc-4.3 build fixes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1797

17 years agoImplement SALC. Fixes #147628.
Julian Seward [Fri, 16 Nov 2007 02:30:38 +0000 (02:30 +0000)] 
Implement SALC.  Fixes #147628.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1796

17 years agoEnable CMPXCHG Gb,Eb. Fixes #147498.
Julian Seward [Fri, 16 Nov 2007 00:18:44 +0000 (00:18 +0000)] 
Enable CMPXCHG Gb,Eb.  Fixes #147498.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1795

17 years agoHandle the "alternative" (non-binutils) encoding of 'adc' and tidy up
Julian Seward [Thu, 15 Nov 2007 23:30:16 +0000 (23:30 +0000)] 
Handle the "alternative" (non-binutils) encoding of 'adc' and tidy up
some other op-G-E / op-E-G decodings.  This fixes a bug which was
reported on valgrind-users@lists.sourceforge.net on 11 Aug 2007
("LibVEX called failure_exit() with 3.3.0svn-r6769 with Linux on
AMD64") I don't think it ever was formally filed as a bug report.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1794

17 years agoMerge changes from THRCHECK branch r1787. These changes are all to do
Julian Seward [Fri, 9 Nov 2007 21:15:04 +0000 (21:15 +0000)] 
Merge changes from THRCHECK branch r1787.  These changes are all to do
with making x86/amd64 LOCK prefixes properly visible in the IR, since
threading tools need to see them.  Probably would be no bad thing for
cachegrind/callgrind to notice them too, since asserting a bus lock on
a multiprocessor is an expensive event that programmers might like to
know about.

* amd64 front end: handle LOCK prefixes a lot more accurately

* x86 front end: ditto, and also a significant cleanup of prefix
  handling, which was a mess

* To represent prefixes, remove the IR 'Ist_MFence' construction
  and replace it with something more general: an IR Memory Bus
  Event statement (Ist_MBE), which can represent lock
  acquisition, lock release, and memory fences.

* Fix up all front ends and back ends to respectively generate
  and handle Ist_MBE.  Fix up the middle end (iropt) to deal with
  them.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1793