]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
18 years agoFix various cases where the instruction decoder asserted/paniced
Julian Seward [Thu, 5 Apr 2007 15:06:56 +0000 (15:06 +0000)] 
Fix various cases where the instruction decoder asserted/paniced
instead of doing the normal SIGILL thing.  Fixes #143354.

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

18 years agoFold Add8(t,t) ==> t << 1. Fixes #143817 (Unused bitfield pad bits
Julian Seward [Wed, 4 Apr 2007 22:48:06 +0000 (22:48 +0000)] 
Fold Add8(t,t) ==> t << 1.  Fixes #143817 (Unused bitfield pad bits
confuse memcheck)

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

18 years agoCounterpart to r1745: teach the amd64 back end how to generate 'lea'
Julian Seward [Sat, 31 Mar 2007 19:12:38 +0000 (19:12 +0000)] 
Counterpart to r1745: teach the amd64 back end how to generate 'lea'
instructions, and generate them in an important place.

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

18 years agoTeach the x86 back end how generate 'lea' instructions, and generate
Julian Seward [Sat, 31 Mar 2007 14:30:12 +0000 (14:30 +0000)] 
Teach the x86 back end how generate 'lea' instructions, and generate
them in a couple of places which are important.  This reduces the
amount of generated code for memcheck and none by about 1%, and (in
very unscientific tests on perf/bz2) speeds memcheck up by about 1%.

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

18 years agox86 back end: use 80-bit loads/stores for floating point spills rather
Julian Seward [Sun, 25 Mar 2007 04:14:58 +0000 (04:14 +0000)] 
x86 back end: use 80-bit loads/stores for floating point spills rather
than 64-bit ones, to reduce accuracy loss.  To support this, in
reg-alloc, allocate 2 64-bit spill slots for each HRcFlt64 vreg
instead of just 1.

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

18 years agoamd64 equivalents of vx1742 (synthesise SIGILL in the normal way for
Julian Seward [Wed, 21 Mar 2007 00:21:56 +0000 (00:21 +0000)] 
amd64 equivalents of vx1742 (synthesise SIGILL in the normal way for
some obscure invalid instruction cases, rather than asserting)

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

18 years agox86 front end: synthesise SIGILL in the normal way for some obscure
Julian Seward [Tue, 20 Mar 2007 14:18:45 +0000 (14:18 +0000)] 
x86 front end: synthesise SIGILL in the normal way for some obscure
invalid instruction cases, rather than asserting, as happened in
#143079 and #142279.  amd64 equivalents to follow.

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

18 years agoSupport 'INT $3' instruction on amd64 (counterpart to vx1736).
Julian Seward [Mon, 12 Mar 2007 00:43:59 +0000 (00:43 +0000)] 
Support 'INT $3' instruction on amd64 (counterpart to vx1736).

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

18 years agoTolerate redundant REX.W prefix produced by Mono for 'fsqrt' (a lame
Julian Seward [Sun, 11 Mar 2007 19:34:13 +0000 (19:34 +0000)] 
Tolerate redundant REX.W prefix produced by Mono for 'fsqrt' (a lame
kludge).

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

18 years agoWhen generating 64-bit code, ensure that any addresses used in 4 or 8
Julian Seward [Fri, 9 Mar 2007 18:07:00 +0000 (18:07 +0000)] 
When generating 64-bit code, ensure that any addresses used in 4 or 8
byte loads or stores of the form reg+imm have the lowest 2 bits of imm
set to zero, so that they can safely be used in ld/ldu/lda/std/stdu
instructions.  This boils down to doing an extra check in
iselWordExpr_AMode and avoiding the reg+imm case in cases where the
amode might end up in any of the abovementioned instructions.

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

18 years agoComment-only changes.
Julian Seward [Fri, 9 Mar 2007 14:24:38 +0000 (14:24 +0000)] 
Comment-only changes.

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

18 years agoHandle the (bizarre) no-op "26 2E 64 65 90 %es:%cs:%fs:%gs:nop". This
Julian Seward [Thu, 1 Mar 2007 18:42:07 +0000 (18:42 +0000)] 
Handle the (bizarre) no-op "26 2E 64 65 90 %es:%cs:%fs:%gs:nop".  This
makes it possible to run Sun's JVM 1.5.0 on Valgrind.

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

18 years agoSupport 'INT $3' instruction.
Julian Seward [Wed, 28 Feb 2007 23:31:42 +0000 (23:31 +0000)] 
Support 'INT $3' instruction.

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

18 years agoHandle FCOM and FCOMPP in 64-bit mode (see #141790)
Julian Seward [Fri, 23 Feb 2007 08:48:22 +0000 (08:48 +0000)] 
Handle FCOM and FCOMPP in 64-bit mode (see #141790)

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

18 years agoMore IRBB -> IRSB renaming.
Julian Seward [Tue, 6 Feb 2007 01:52:52 +0000 (01:52 +0000)] 
More IRBB -> IRSB renaming.

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

18 years agoFill in missing cases in eqIRConst. This stops iropt's CSE pass from
Julian Seward [Sat, 27 Jan 2007 00:46:28 +0000 (00:46 +0000)] 
Fill in missing cases in eqIRConst.  This stops iropt's CSE pass from
asserting in the presence of V128 immediates, which is a regression
in valgrind 3.2.2.

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

18 years agoConstant fold XorV128(t,t) -> 0. Effect is that memcheck 'knows'
Julian Seward [Tue, 16 Jan 2007 19:19:55 +0000 (19:19 +0000)] 
Constant fold  XorV128(t,t) -> 0.  Effect is that memcheck 'knows'
that pxor %xmm_n, %xmm_n does not depend on the previous contents
of %xmm_n.

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

18 years agoUpdate.
Julian Seward [Fri, 12 Jan 2007 20:31:49 +0000 (20:31 +0000)] 
Update.

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

18 years agoImplement rcl{b,w,l,q} on amd64.
Julian Seward [Fri, 12 Jan 2007 20:29:01 +0000 (20:29 +0000)] 
Implement rcl{b,w,l,q} on amd64.

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

18 years agoImplement FXSAVE on amd64. Mysteriously my Athlon64 does not seem to
Julian Seward [Wed, 10 Jan 2007 04:59:33 +0000 (04:59 +0000)] 
Implement FXSAVE on amd64.  Mysteriously my Athlon64 does not seem to
write all the fields that the AMD documentation says it should: it
skips ROP, RIP and RDP, so vex's implementation writes zeroes there.

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

18 years agoAdd 'missing' primop Iop_ReinterpF32asI32 and code generation support
Julian Seward [Tue, 9 Jan 2007 15:20:07 +0000 (15:20 +0000)] 
Add 'missing' primop Iop_ReinterpF32asI32 and code generation support
for it on x86 hosts.

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

18 years agoStraggler
Julian Seward [Mon, 8 Jan 2007 06:02:53 +0000 (06:02 +0000)] 
Straggler

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

18 years agoUpdate copyright dates.
Julian Seward [Mon, 8 Jan 2007 05:51:05 +0000 (05:51 +0000)] 
Update copyright dates.

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

18 years agoAdd mkIRExprVec_6/7.
Julian Seward [Mon, 8 Jan 2007 05:09:55 +0000 (05:09 +0000)] 
Add mkIRExprVec_6/7.

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

18 years agoUse 'ifndef' in the makefile correctly.
Julian Seward [Thu, 4 Jan 2007 16:13:14 +0000 (16:13 +0000)] 
Use 'ifndef' in the makefile correctly.

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

18 years agoTidy up flags spec fn, and add a rule for INCW-CondZ.
Julian Seward [Fri, 29 Dec 2006 01:54:36 +0000 (01:54 +0000)] 
Tidy up flags spec fn, and add a rule for INCW-CondZ.

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

18 years agoTidy up and finalise x86/amd64 flag spec rules for 3.2.2.
Julian Seward [Thu, 28 Dec 2006 04:40:12 +0000 (04:40 +0000)] 
Tidy up and finalise x86/amd64 flag spec rules for 3.2.2.
x86 COPY-CondP/NP needs re-verification.

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

18 years agoHandle recent binutils padding "nopw %cs:0x0(%eax,%eax,1)"
Julian Seward [Thu, 28 Dec 2006 01:49:29 +0000 (01:49 +0000)] 
Handle recent binutils padding "nopw %cs:0x0(%eax,%eax,1)"

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

18 years agoEnable support for altivec prefetches: dss, dst, dstt, dstst, dststt.
Julian Seward [Wed, 27 Dec 2006 23:59:31 +0000 (23:59 +0000)] 
Enable support for altivec prefetches: dss, dst, dstt, dstst, dststt.

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

18 years agoEnable lvxl and stvxl.
Julian Seward [Wed, 27 Dec 2006 21:21:14 +0000 (21:21 +0000)] 
Enable lvxl and stvxl.

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

18 years agoImplement mfspr 268 and 269. Fixes #139050.
Julian Seward [Wed, 27 Dec 2006 18:39:46 +0000 (18:39 +0000)] 
Implement mfspr 268 and 269.  Fixes #139050.

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

18 years agox86 front end: Implement MASKMOVQ (MMX class insn, introduced in SSE1)
Julian Seward [Wed, 27 Dec 2006 01:15:29 +0000 (01:15 +0000)] 
x86 front end: Implement MASKMOVQ (MMX class insn, introduced in SSE1)
and MASKMOVDQU (SSE class insn, introduced in SSE2).

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

18 years agoA large but non-functional commit: as suggested by Nick, rename some
Julian Seward [Sun, 24 Dec 2006 02:20:24 +0000 (02:20 +0000)] 
A large but non-functional commit: as suggested by Nick, rename some
IR types, structure fields and functions to make IR a bit easier to
understand.  Specifically:

  dopyIR* -> deepCopyIR*

  sopyIR* -> shallowCopyIR*

  The presence of a .Tmp union in both IRExpr and IRStmt is
  confusing.  It has been renamed to RdTmp in IRExpr, reflecting
  the fact that here we are getting the value of an IRTemp, and to
  WrTmp in IRStmt, reflecting the fact that here we are assigning
  to an IRTemp.

  IRBB (IR Basic Block) is renamed to IRSB (IR SuperBlock),
  reflecting the reality that Vex does not really operate in terms
  of basic blocks, but in terms of superblocks - single entry,
  multiple exit sequences.

  IRArray is renamed to IRRegArray, to make it clearer it refers
  to arrays of guest registers and not arrays in memory.

  VexMiscInfo is renamed to VexAbiInfo, since that's what it is
  -- relevant facts about the ABI (calling conventions, etc) for
  both the guest and host platforms.

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

18 years agoMake compilable again.
Julian Seward [Sun, 17 Dec 2006 17:40:36 +0000 (17:40 +0000)] 
Make compilable again.

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

18 years agoMake this compilable again.
Julian Seward [Sun, 17 Dec 2006 14:24:05 +0000 (14:24 +0000)] 
Make this compilable again.

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

18 years agoChange a stupid algorithm that deals with real register live
Julian Seward [Fri, 1 Dec 2006 02:59:17 +0000 (02:59 +0000)] 
Change a stupid algorithm that deals with real register live
ranges into a less stupid one.  Prior to this change, the complexity
of reg-alloc included an expensive term

O(#instrs in code sequence x #real-register live ranges in code sequence)

This commit changes that term to essentially

O(#instrs in code sequence) + O(time to sort real-reg-L-R array)

On amd64 this nearly halves the cost of register allocation and means
Valgrind performs better in translation-intensive situations (a.k.a
starting programs).  Eg, firefox start/exit falls from 119 to 113
seconds.  The effect will be larger on ppc32/64 as there are more real
registers and hence real-reg live ranges to consider, and will be
smaller on x86 for the same reason.

The actual code the JIT produces should be unchanged.  This commit
merely modifies how the register allocator handles one of its
important data structures.

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

18 years agoAdd a couple of %rflags spec rules which improve performance of amd64
Julian Seward [Mon, 27 Nov 2006 04:09:52 +0000 (04:09 +0000)] 
Add a couple of %rflags spec rules which improve performance of amd64
FP comparisons.

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

18 years agoNew function dopyIRBBExceptStmts which makes it a bit easier to write
Julian Seward [Fri, 24 Nov 2006 23:32:55 +0000 (23:32 +0000)] 
New function dopyIRBBExceptStmts which makes it a bit easier to write
tools.

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

18 years agoSpecialise computation of carry flag after ADDL.
Julian Seward [Wed, 22 Nov 2006 23:31:37 +0000 (23:31 +0000)] 
Specialise computation of carry flag after ADDL.

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

18 years agoEven more flag-spec rules: SUBL-CondNL, SUBL-CondNBE, SUBL-NB and redo
Julian Seward [Wed, 22 Nov 2006 17:39:51 +0000 (17:39 +0000)] 
Even more flag-spec rules: SUBL-CondNL, SUBL-CondNBE, SUBL-NB and redo
SUBL-CondNS.

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

18 years agoA couple more x86 spec rules: COPY-CondNZ and SUBL-CondNS.
Julian Seward [Wed, 22 Nov 2006 16:01:45 +0000 (16:01 +0000)] 
A couple more x86 spec rules: COPY-CondNZ and SUBL-CondNS.

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

18 years agoOn amd64, allow the register allocator to use %r10 which it previously
Julian Seward [Sun, 19 Nov 2006 02:05:47 +0000 (02:05 +0000)] 
On amd64, allow the register allocator to use %r10 which it previously
did not.  This gives a 0%-3% speedup, mostly closer to the 0% end.

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

18 years agoHandle long-form encoding of 'push{l,w} %reg'.
Julian Seward [Sat, 18 Nov 2006 22:56:46 +0000 (22:56 +0000)] 
Handle long-form encoding of 'push{l,w} %reg'.

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

18 years agoHandle JCXZ.
Julian Seward [Thu, 16 Nov 2006 10:42:02 +0000 (10:42 +0000)] 
Handle JCXZ.

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

18 years agoAdd many extra comments describing the IR.
Julian Seward [Wed, 15 Nov 2006 02:57:05 +0000 (02:57 +0000)] 
Add many extra comments describing the IR.

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

18 years agoHandle 'ret imm16'. Fixes #136650.
Julian Seward [Tue, 14 Nov 2006 17:50:16 +0000 (17:50 +0000)] 
Handle 'ret imm16'.  Fixes #136650.

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

18 years agoAdd an %eflags rule for COPY-CondP.
Julian Seward [Tue, 14 Nov 2006 17:46:12 +0000 (17:46 +0000)] 
Add an %eflags rule for COPY-CondP.

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

18 years agoRe-enable 'repne movs' (fix for original bug in #126147).
Julian Seward [Tue, 14 Nov 2006 15:33:05 +0000 (15:33 +0000)] 
Re-enable 'repne movs' (fix for original bug in #126147).

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

18 years agoRe-enable 'repne stos' (fix for Gernot Tenchio's part of #126147).
Julian Seward [Tue, 14 Nov 2006 15:13:55 +0000 (15:13 +0000)] 
Re-enable 'repne stos' (fix for Gernot Tenchio's part of #126147).

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

18 years agoImplement 'xlat' (fixes #125959 and #135012).
Julian Seward [Sun, 12 Nov 2006 22:25:21 +0000 (22:25 +0000)] 
Implement 'xlat' (fixes #125959 and #135012).

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

18 years agoWhen doing rlwinm in 64-bit mode, bind the intermediate 32-bit result
Julian Seward [Thu, 19 Oct 2006 03:01:09 +0000 (03:01 +0000)] 
When doing rlwinm in 64-bit mode, bind the intermediate 32-bit result
to a temporary so it is only computed once.  What's there currently
causes it to be computed twice.

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

18 years agoppc64: detect rldicl/rldicr which are simply 64-bit shifts left/right
Julian Seward [Thu, 19 Oct 2006 00:15:25 +0000 (00:15 +0000)] 
ppc64: detect rldicl/rldicr which are simply 64-bit shifts left/right
and emit IR directly as such.  Improves performance of 64-bit code (a
bit).

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

18 years agoMerge r1663-r1666:
Julian Seward [Tue, 17 Oct 2006 00:28:22 +0000 (00:28 +0000)] 
Merge r1663-r1666:

- AIX5 build changes

- genoffsets.c: print the offsets of a few more ppc registers

- Get rid of a bunch of ad-hoc hacks which hardwire in certain
  assumptions about guest and host ABIs.  Instead pass that info
  in a VexMiscInfo structure.  This cleans up various grotty bits.

- Add to ppc32 guest state, redirection-stack stuff already present
  in ppc64 guest state.  This is to enable function redirection/
  wrapping in the presence of TOC pointers in 32-bit mode.

- Add to both ppc32 and ppc64 guest states, a new pseudo-register
  LR_AT_SC.  This holds the link register value at the most recent
  'sc', so that AIX can back up to restart a syscall if needed.

- Add to both ppc32 and ppc64 guest states, a SPRG3 register.

- Use VexMiscInfo to handle 'sc' on AIX differently from Linux:
  on AIX, 'sc' continues at the location stated in the link
  register, not at the next insn.

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

18 years agoReinstate support for 'mcrfs'.
Julian Seward [Wed, 4 Oct 2006 17:46:11 +0000 (17:46 +0000)] 
Reinstate support for 'mcrfs'.

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

18 years agoAnother day, another %eflags reduction rule.
Julian Seward [Sun, 17 Sep 2006 10:02:35 +0000 (10:02 +0000)] 
Another day, another %eflags reduction rule.

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

18 years agoSupport pextrw when the destination register is 64 bits too. Fixes
Julian Seward [Mon, 11 Sep 2006 14:37:27 +0000 (14:37 +0000)] 
Support pextrw when the destination register is 64 bits too.  Fixes
#133678.

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

18 years agoAdd support for amd64 'fprem' (fixes bug 132918). This isn't exactly
Julian Seward [Mon, 11 Sep 2006 11:07:34 +0000 (11:07 +0000)] 
Add support for amd64 'fprem' (fixes bug 132918).  This isn't exactly
right; the C3/2/1/0 FPU flags sometimes don't get set the same as
natively, and I can't figure out why.

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

18 years ago64-bit counterpart to v1652 (Stop mkU16 asserting if d32 is a negative
Julian Seward [Mon, 28 Aug 2006 18:54:18 +0000 (18:54 +0000)] 
64-bit counterpart to v1652 (Stop mkU16 asserting if d32 is a negative
16-bit number (bug #132813)).

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

18 years agoStop mkU16 asserting if d32 is a negative 16-bit number (bug #132813).
Julian Seward [Mon, 28 Aug 2006 18:04:33 +0000 (18:04 +0000)] 
Stop mkU16 asserting if d32 is a negative 16-bit number (bug #132813).

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

18 years agoMore reduction rules, which further reduce memcheck's false error
Julian Seward [Fri, 25 Aug 2006 12:52:19 +0000 (12:52 +0000)] 
More reduction rules, which further reduce memcheck's false error
rate on optimised x86 and amd64 code.

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

18 years agoFix previous commit (r1640?) so that it's actually correct :-)
Julian Seward [Sat, 19 Aug 2006 22:18:53 +0000 (22:18 +0000)] 
Fix previous commit (r1640?) so that it's actually correct :-)

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

18 years agoComparing a reg with itself produces a result which doesn't depend on
Julian Seward [Sat, 19 Aug 2006 18:31:53 +0000 (18:31 +0000)] 
Comparing a reg with itself produces a result which doesn't depend on
the contents of the reg.  Therefore remove the false dependency, which
has been known to cause memcheck to produce false errors for
xlc-compiled code.

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

18 years agoImplement amd64 insns cmpxchg8b and cmpxchg16b. Fixes #127521.
Julian Seward [Thu, 17 Aug 2006 01:20:01 +0000 (01:20 +0000)] 
Implement amd64 insns cmpxchg8b and cmpxchg16b.  Fixes #127521.

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

18 years agoGenerate less verbose IR for amd64 'bswapq'. Fixes #132146.
Julian Seward [Wed, 16 Aug 2006 00:25:28 +0000 (00:25 +0000)] 
Generate less verbose IR for amd64 'bswapq'.  Fixes #132146.

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

18 years agoamd64 insn printing fix.
Julian Seward [Wed, 16 Aug 2006 00:23:21 +0000 (00:23 +0000)] 
amd64 insn printing fix.

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

19 years ago64-bit equivalent to r1635: handle all SSE3 instructions except
Julian Seward [Fri, 4 Aug 2006 14:51:19 +0000 (14:51 +0000)] 
64-bit equivalent to r1635: handle all SSE3 instructions except
monitor and mwait in 64-bit mode.  Regression tests to follow soon.

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

19 years agoHandle all SSE3 instructions except monitor and mwait. 64-bit
Julian Seward [Thu, 3 Aug 2006 15:03:19 +0000 (15:03 +0000)] 
Handle all SSE3 instructions except monitor and mwait.  64-bit
equivalents to follow soon.

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

19 years agoHandle nop-with-an-amode (sheesh. Mutancy. whatever next?) for x86 and
Julian Seward [Tue, 1 Aug 2006 18:36:25 +0000 (18:36 +0000)] 
Handle nop-with-an-amode (sheesh. Mutancy. whatever next?) for x86 and
amd64.  Fixes #131481 and #131298.

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

19 years agoAllow a redundant REX prefix for pushfq. Fixes #130785.
Julian Seward [Mon, 24 Jul 2006 09:09:36 +0000 (09:09 +0000)] 
Allow a redundant REX prefix for pushfq.  Fixes #130785.

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

19 years agoImplement SSE2 'psadbw'. Fixes #128917.
Julian Seward [Mon, 24 Jul 2006 08:51:16 +0000 (08:51 +0000)] 
Implement SSE2 'psadbw'.  Fixes #128917.

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

19 years agoMore copyright updates.
Julian Seward [Mon, 5 Jun 2006 23:26:23 +0000 (23:26 +0000)] 
More copyright updates.

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

19 years agoUpdate copyright dates.
Julian Seward [Mon, 5 Jun 2006 23:13:19 +0000 (23:13 +0000)] 
Update copyright dates.

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

19 years agoSpecialisation rule which reduces memcheck false error rate for
Julian Seward [Thu, 25 May 2006 18:48:12 +0000 (18:48 +0000)] 
Specialisation rule which reduces memcheck false error rate for
KDE on SuSE 10.1 (amd64).

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

19 years agoComment-only change.
Julian Seward [Thu, 25 May 2006 17:08:03 +0000 (17:08 +0000)] 
Comment-only change.

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

19 years agoYet another %eflags folding rule - this one for performance reasons.
Julian Seward [Thu, 25 May 2006 01:04:05 +0000 (01:04 +0000)] 
Yet another %eflags folding rule - this one for performance reasons.

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

19 years agoppc backend: handle vector constant of zero.
Cerion Armour-Brown [Mon, 22 May 2006 12:41:19 +0000 (12:41 +0000)] 
ppc backend: handle vector constant of zero.

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

19 years agoGet rid of assertion getting in the way of handling 'sbbb G,E' where E
Julian Seward [Sun, 21 May 2006 15:38:38 +0000 (15:38 +0000)] 
Get rid of assertion getting in the way of handling 'sbbb G,E' where E
is memory.  Fixes #127631.

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

19 years agoGot a sudden attach of the implicit-type-casting paranoias whilst
Julian Seward [Sun, 21 May 2006 12:02:44 +0000 (12:02 +0000)] 
Got a sudden attach of the implicit-type-casting paranoias whilst
looking for (non-) bug in running Python.

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

19 years agoA couple of IR simplification hacks for the amd64 front end, so as to
Julian Seward [Sun, 21 May 2006 01:02:31 +0000 (01:02 +0000)] 
A couple of IR simplification hacks for the amd64 front end, so as to
avoid false errors from memcheck.  Analogous to some of the recent
bunch of commits to x86 front end.

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

19 years agoClear up yet another gcc-4.1.0 stunt leading to false uninitialised
Julian Seward [Fri, 19 May 2006 23:09:03 +0000 (23:09 +0000)] 
Clear up yet another gcc-4.1.0 stunt leading to false uninitialised
value errors on SuSE 10.1 (x86) running konqueror.

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

19 years agoA few more x86 eflags-helper rewrite cases, which further reduce the
Julian Seward [Mon, 15 May 2006 12:23:17 +0000 (12:23 +0000)] 
A few more x86 eflags-helper rewrite cases, which further reduce the
false error rate of memcheck on optimised code.

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

19 years agoAdd an IR folding rule to convert Add32(x,x) into Shl32(x,1). This
Julian Seward [Sun, 14 May 2006 18:46:55 +0000 (18:46 +0000)] 
Add an IR folding rule to convert Add32(x,x) into Shl32(x,1).  This
fixes #118466 and it also gets rid of a bunch of false positives for
KDE 3.5.2 built by gcc-4.0.2 on x86, of the form shown below.

  Use of uninitialised value of size 4
    at 0x4BFC342: QIconSet::pixmap(QIconSet::Size, QIconSet::Mode,
                                   QIconSet::State) const (qiconset.cpp:530)
    by 0x4555BE7: KToolBarButton::drawButton(QPainter*)
                  (ktoolbarbutton.cpp:536)
    by 0x4CB8A0A: QButton::paintEvent(QPaintEvent*) (qbutton.cpp:887)

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

19 years agoAdd specialisation rules to simplify the IR for 'testl .. ; js ..',
Julian Seward [Sat, 13 May 2006 23:08:06 +0000 (23:08 +0000)] 
Add specialisation rules to simplify the IR for 'testl .. ; js ..',
'testw .. ; js ..' and 'testb .. ; js ..'.  This gets rid of a bunch of
false errors in Memcheck of the form

==2398== Conditional jump or move depends on uninitialised value(s)
==2398==    at 0x6C51B61: KHTMLPart::clear() (khtml_part.cpp:1370)
==2398==    by 0x6C61A72: KHTMLPart::begin(KURL const&, int, int)
                          (khtml_part.cpp:1881)

(KDE 3.5.2 compiled by gcc-4.0.2, -g -O).

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

19 years agoEnable 'SHLDv imm8,Gv,Ev'. Fixes #126583.
Julian Seward [Fri, 12 May 2006 21:03:48 +0000 (21:03 +0000)] 
Enable 'SHLDv imm8,Gv,Ev'.  Fixes #126583.

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

19 years agoEnable 'sbb $imm,%al'. Fixes #126668.
Julian Seward [Fri, 12 May 2006 20:45:59 +0000 (20:45 +0000)] 
Enable 'sbb $imm,%al'.  Fixes #126668.

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

19 years agoImplement CLC/STC/CMC. Fixes #125651.
Julian Seward [Fri, 12 May 2006 20:15:33 +0000 (20:15 +0000)] 
Implement CLC/STC/CMC.  Fixes #125651.

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

19 years ago(1) Fix longstanding bug causing erroneous register zeroing for 'btl'.
Julian Seward [Fri, 12 May 2006 17:47:21 +0000 (17:47 +0000)] 
(1) Fix longstanding bug causing erroneous register zeroing for 'btl'.
(2) Implement 16-bit versions of bt/bts/btr/btc.  (Fixes #125607)

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

19 years agoSupport 'popw m16'. Fixes #126243.
Julian Seward [Fri, 12 May 2006 14:04:48 +0000 (14:04 +0000)] 
Support 'popw m16'.  Fixes #126243.

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

19 years agoFix for 32-bit mode, as per comment.
Julian Seward [Sat, 6 May 2006 14:40:40 +0000 (14:40 +0000)] 
Fix for 32-bit mode, as per comment.

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

19 years agoImplement sthbrx.
Julian Seward [Fri, 5 May 2006 13:44:17 +0000 (13:44 +0000)] 
Implement sthbrx.

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

19 years agoImplement lhbrx.
Julian Seward [Fri, 5 May 2006 13:26:14 +0000 (13:26 +0000)] 
Implement lhbrx.

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

19 years agoFix incorrect behaviour of mov{s,z}bw (#126253).
Julian Seward [Wed, 3 May 2006 17:57:15 +0000 (17:57 +0000)] 
Fix incorrect behaviour of mov{s,z}bw (#126253).

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

19 years agoCounterpart to r1605: in the ppc insn selector, don't use the bits
Julian Seward [Mon, 1 May 2006 02:14:17 +0000 (02:14 +0000)] 
Counterpart to r1605: in the ppc insn selector, don't use the bits
VexArchInfo.hwcaps to distinguish ppc32 and ppc64.  Instead pass
the host arch around.  And associated plumbing.

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

19 years agoDon't use the bits VexArchInfo.hwcaps to distinguish ppc32 and ppc64,
Julian Seward [Sun, 30 Apr 2006 23:37:32 +0000 (23:37 +0000)] 
Don't use the bits VexArchInfo.hwcaps to distinguish ppc32 and ppc64,
since that doesn't work properly.  Instead pass the guest arch around
too.  Small change with lots of associated plumbing.

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

19 years agoFix for instruction-decoding failures reported in #124499.
Julian Seward [Thu, 13 Apr 2006 22:06:35 +0000 (22:06 +0000)] 
Fix for instruction-decoding failures reported in #124499.

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

19 years agoAllow 'repe scas' (possible fix for #124892).
Julian Seward [Wed, 12 Apr 2006 17:30:46 +0000 (17:30 +0000)] 
Allow 'repe scas' (possible fix for #124892).

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

19 years agoImplement amd64 pmaddwd for SSE2.
Julian Seward [Sat, 8 Apr 2006 16:15:53 +0000 (16:15 +0000)] 
Implement amd64 pmaddwd for SSE2.

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

19 years agoAdd a function to set/clear the x86 carry flag. (untested)
Julian Seward [Mon, 20 Mar 2006 12:05:42 +0000 (12:05 +0000)] 
Add a function to set/clear the x86 carry flag.  (untested)

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

19 years agoFix some segment register pushes/pops.
Julian Seward [Sat, 18 Mar 2006 11:29:25 +0000 (11:29 +0000)] 
Fix some segment register pushes/pops.

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

19 years agoupmerge r1597 (ppc32 needs a lot of spill slots sometimes)
Julian Seward [Thu, 16 Mar 2006 11:29:13 +0000 (11:29 +0000)] 
upmerge r1597 (ppc32 needs a lot of spill slots sometimes)

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