]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
15 years agoImplement ROUNDSD (partial implementation, in the case where
Julian Seward [Fri, 25 Jun 2010 10:25:54 +0000 (10:25 +0000)] 
Implement ROUNDSD (partial implementation, in the case where
the rounding mode is specified within the instruction itself).
Fixes #197266.

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

15 years agoImplement SSE4 instructions: PCMPGTQ PMAXUD PMINUD PMAXSB PMINSB PMULLD
Julian Seward [Fri, 18 Jun 2010 08:17:41 +0000 (08:17 +0000)] 
Implement SSE4 instructions: PCMPGTQ PMAXUD PMINUD PMAXSB PMINSB PMULLD
I believe this covers everything that gcc-4.4 and gcc-4.5 will generate
with "-O3 -msse4.2".  Note, this commit changes the set of IR ops and so
requires a from-scratch rebuild of the tree.

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

15 years agoImplement more SSE4 instructions:
Julian Seward [Mon, 14 Jun 2010 21:29:35 +0000 (21:29 +0000)] 
Implement more SSE4 instructions:
PINSRD PMINUD POPCNTW POPCNTL POPCNTQ

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

15 years agoImplement SIDT and SGDT as pass-throughs to the host. It's a pretty
Julian Seward [Mon, 7 Jun 2010 16:22:22 +0000 (16:22 +0000)] 
Implement SIDT and SGDT as pass-throughs to the host.  It's a pretty
bad thing to do, but I can't think of a way to virtualise these
properly.  Patch from Alexander Potapenko.  See
https://bugs.kde.org/show_bug.cgi?id=205241#c38

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

15 years agoImplement XADD reg,reg (Nicolas Sauzede, nicolas.sauzede@st.com).
Julian Seward [Mon, 10 May 2010 20:51:22 +0000 (20:51 +0000)] 
Implement XADD reg,reg (Nicolas Sauzede, nicolas.sauzede@st.com).
Fixes #195662.

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

15 years agoEnable FISTS. Fixes #234037. (Bradley Baetz, bbaetz@gmail.com)
Julian Seward [Mon, 10 May 2010 20:08:12 +0000 (20:08 +0000)] 
Enable FISTS.  Fixes #234037.  (Bradley Baetz, bbaetz@gmail.com)

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

15 years agoHandle v7 memory fence instructions: ISB DSB DMB and their v6 equivalents:
Julian Seward [Tue, 4 May 2010 08:48:43 +0000 (08:48 +0000)] 
Handle v7 memory fence instructions: ISB DSB DMB and their v6 equivalents:
mcr 15,0,r0,c7,c5,4     mcr 15,0,r0,c7,c10,4    mcr 15,0,r0,c7,c10,5
respectively.  Re-emit them in the v6 form so as not to inhibit possible
support for v6-only platforms in the future.  Extended version of a patch
from Alexander Potapenko (glider@google.com).  Fixes bug 228060.

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

15 years agoHandle more x86 NOP forms, as required by Fedora 13. Fixes bug
Julian Seward [Mon, 3 May 2010 21:58:22 +0000 (21:58 +0000)] 
Handle more x86 NOP forms, as required by Fedora 13.  Fixes bug
233576.  Jakub Jelinek <jakub@redhat.com>.

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

15 years agoUpdate copyright dates to 2010 and change license to standard GPL2+.
Julian Seward [Mon, 3 May 2010 21:38:49 +0000 (21:38 +0000)] 
Update copyright dates to 2010 and change license to standard GPL2+.

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

15 years ago(re-commit r1976):
Julian Seward [Thu, 29 Apr 2010 08:52:00 +0000 (08:52 +0000)] 
(re-commit r1976):
Added new SSE4.1 instruction:
  PMAXUD

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

15 years ago(re-commit r1975):
Julian Seward [Thu, 29 Apr 2010 08:50:09 +0000 (08:50 +0000)] 
(re-commit r1975):
Added new SSE4.1 instruction:
  PINSRQ

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

15 years ago(re-commit r1974):
Julian Seward [Thu, 29 Apr 2010 08:48:09 +0000 (08:48 +0000)] 
(re-commit r1974):
Fix up printing for some of the SSE4.1 insns.

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

15 years ago(re-commit r1973):
Julian Seward [Thu, 29 Apr 2010 08:46:38 +0000 (08:46 +0000)] 
(re-commit r1973):
Added new SSE4.1 instructions:
  PEXTRW, PEXTRQ, PEXTRD, PEXTRB

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

15 years ago(re-commit r1972):
Julian Seward [Thu, 29 Apr 2010 08:44:13 +0000 (08:44 +0000)] 
(re-commit r1972):
Fixed copy+paste error in R1971

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

15 years ago(re-commit r1971)
Julian Seward [Thu, 29 Apr 2010 08:42:37 +0000 (08:42 +0000)] 
(re-commit r1971)
Added new SSE4 instructions PMINSD, PMAXSD.

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

15 years ago(re-commit r1970):
Julian Seward [Thu, 29 Apr 2010 08:39:18 +0000 (08:39 +0000)] 
(re-commit r1970):
Tested BLENDPS
Added new SSE4 instructions DPPD and DPPS

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

15 years agoiselVecExpr_wrk: 128-bit constants: handle all 16 cases
Donna Robinson [Fri, 2 Apr 2010 14:15:58 +0000 (14:15 +0000)] 
iselVecExpr_wrk: 128-bit constants: handle all 16 cases
                 of the form 0x0000 .. 0xFFFF.

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

15 years agoAdded new SSE4 instruction BLENDPS (backend needs a fix before testing)
Donna Robinson [Fri, 2 Apr 2010 13:17:50 +0000 (13:17 +0000)] 
Added new SSE4 instruction BLENDPS (backend needs a fix before testing)
Tested PMOVSXBW
Tested INSERTPS
Tested BLENDPD and fixed typo

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

15 years agoEnable PMOVSXBW and fix lane shift widths.
Julian Seward [Fri, 2 Apr 2010 11:31:22 +0000 (11:31 +0000)] 
Enable PMOVSXBW and fix lane shift widths.

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

15 years agoHandle a few more cases in 128-bit constant generation, needed by
Julian Seward [Fri, 2 Apr 2010 11:29:23 +0000 (11:29 +0000)] 
Handle a few more cases in 128-bit constant generation, needed by
front end changes in r1965.

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

15 years agoAdded new SSE4 instructions:
Donna Robinson [Thu, 1 Apr 2010 23:08:59 +0000 (23:08 +0000)] 
Added new SSE4 instructions:
  BLENDPD, INSERTPS (closes Bug #232069), PMOVSX, PMOVZX.

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

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