]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
18 years agoMerge r1736 and r1741: int $3 support (x86 and amd64)
Julian Seward [Sun, 29 Apr 2007 09:40:56 +0000 (09:40 +0000)] 
Merge r1736 and r1741: int $3 support (x86 and amd64)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1751

18 years agoMerge r1735 (Handle FCOM and FCOMPP in 64-bit mode (see #141790))
Julian Seward [Sun, 29 Apr 2007 09:28:21 +0000 (09:28 +0000)] 
Merge r1735 (Handle FCOM and FCOMPP in 64-bit mode (see #141790))

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1750

18 years agoMerge r1731 (Fill in missing cases in eqIRConst.)
Julian Seward [Mon, 29 Jan 2007 00:58:10 +0000 (00:58 +0000)] 
Merge r1731 (Fill in missing cases in eqIRConst.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1732

18 years agoMerge r1728 (Constant fold XorV128(t,t) -> 0.)
Julian Seward [Tue, 16 Jan 2007 22:02:35 +0000 (22:02 +0000)] 
Merge r1728 (Constant fold  XorV128(t,t) -> 0.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1729

18 years agoMerge r1725 (Implement rcl{b,w,l,q} on amd64.)
Julian Seward [Fri, 12 Jan 2007 21:26:51 +0000 (21:26 +0000)] 
Merge r1725 (Implement rcl{b,w,l,q} on amd64.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1727

18 years agoMerge r1722 (Implement FXSAVE on amd64.)
Julian Seward [Wed, 10 Jan 2007 05:22:03 +0000 (05:22 +0000)] 
Merge r1722 (Implement FXSAVE on amd64.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1724

18 years agoUpdate copyright dates.
Julian Seward [Wed, 10 Jan 2007 05:13:42 +0000 (05:13 +0000)] 
Update copyright dates.

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1723

18 years agoMerge r1716 (Use 'ifndef' in the makefile correctly.)
Julian Seward [Thu, 4 Jan 2007 16:20:53 +0000 (16:20 +0000)] 
Merge r1716 (Use 'ifndef' in the makefile correctly.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1717

18 years agoSync x86/amd64 flag helpers with the trunk.
Julian Seward [Fri, 29 Dec 2006 05:06:51 +0000 (05:06 +0000)] 
Sync x86/amd64 flag helpers with the trunk.

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1715

18 years agoMerge r1711 (Handle recent binutils padding "nopw %cs:0x0(%eax,%eax,1)")
Julian Seward [Thu, 28 Dec 2006 02:03:07 +0000 (02:03 +0000)] 
Merge r1711 (Handle recent binutils padding "nopw %cs:0x0(%eax,%eax,1)")

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1712

18 years agoMerge r1709 (Enable support for altivec prefetches: dss, dst, dstt,
Julian Seward [Thu, 28 Dec 2006 00:03:25 +0000 (00:03 +0000)] 
Merge r1709 (Enable support for altivec prefetches: dss, dst, dstt,
dstst, dststt.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1710

18 years agoMerge r1707 (Enable lvxl and stvxl.)
Julian Seward [Wed, 27 Dec 2006 21:38:35 +0000 (21:38 +0000)] 
Merge r1707 (Enable lvxl and stvxl.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1708

18 years agoMerge r1705 (Implement mfspr 268 and 269. Fixes #139050.)
Julian Seward [Wed, 27 Dec 2006 19:04:45 +0000 (19:04 +0000)] 
Merge r1705 (Implement mfspr 268 and 269.  Fixes #139050.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1706

18 years agoMerge r1677 (comment-only change: IR comments)
Julian Seward [Wed, 27 Dec 2006 04:52:17 +0000 (04:52 +0000)] 
Merge r1677 (comment-only change: IR comments)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1704

18 years agoMerge r1702 (x86 front end: Implement MASKMOVQ and MASKMOVDQU)
Julian Seward [Wed, 27 Dec 2006 04:21:05 +0000 (04:21 +0000)] 
Merge r1702 (x86 front end: Implement MASKMOVQ and MASKMOVDQU)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1703

18 years agoMerge r1686 (speed up register allocator by using a less braindead
Julian Seward [Tue, 26 Dec 2006 02:37:38 +0000 (02:37 +0000)] 
Merge r1686 (speed up register allocator by using a less braindead
algorithm for maintenance of real register live ranges)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1701

18 years agoMerge r1669 (ppc64 be imm64 improvements)
Julian Seward [Tue, 26 Dec 2006 02:34:31 +0000 (02:34 +0000)] 
Merge r1669 (ppc64 be imm64 improvements)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1700

18 years agoMerge r1670/1 (ppc64 fe rld/rlw improvements)
Julian Seward [Tue, 26 Dec 2006 02:31:01 +0000 (02:31 +0000)] 
Merge r1670/1 (ppc64 fe rld/rlw improvements)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1699

18 years agoMerge r1678 (jcxz (x86))
Julian Seward [Tue, 26 Dec 2006 02:25:46 +0000 (02:25 +0000)] 
Merge r1678 (jcxz (x86))

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1698

18 years agoMerge r1675 (x86 COPY-CondP rule)
Julian Seward [Tue, 26 Dec 2006 02:24:12 +0000 (02:24 +0000)] 
Merge r1675 (x86 COPY-CondP rule)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1697

18 years agoDuh; fix compile breakage caused by r1694.
Julian Seward [Tue, 26 Dec 2006 02:22:38 +0000 (02:22 +0000)] 
Duh; fix compile breakage caused by r1694.

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1696

18 years agoMerge r1679 (x86 Grp5(R) case 6)
Julian Seward [Tue, 26 Dec 2006 02:08:21 +0000 (02:08 +0000)] 
Merge r1679 (x86 Grp5(R) case 6)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1695

18 years agoMerge r1676 (amd64 ret imm16)
Julian Seward [Tue, 26 Dec 2006 02:06:09 +0000 (02:06 +0000)] 
Merge r1676 (amd64 ret imm16)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1694

18 years agoMerge r1673/4 (x86 repne movsw)
Julian Seward [Tue, 26 Dec 2006 02:04:04 +0000 (02:04 +0000)] 
Merge r1673/4 (x86 repne movsw)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1693

18 years agoMerge r1672 (x86 xlat)
Julian Seward [Tue, 26 Dec 2006 02:01:37 +0000 (02:01 +0000)] 
Merge r1672 (x86 xlat)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1692

18 years agoMerge r1667 (ppc32/64: support mcrfs)
Julian Seward [Tue, 26 Dec 2006 01:58:54 +0000 (01:58 +0000)] 
Merge r1667 (ppc32/64: support mcrfs)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1691

18 years agoMerge r1660 (%eflags rule for SUBL-CondNLE)
Julian Seward [Tue, 26 Dec 2006 01:56:49 +0000 (01:56 +0000)] 
Merge r1660 (%eflags rule for SUBL-CondNLE)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1690

18 years agoMerge r1656 (Support pextrw when the destination register is 64 bits
Julian Seward [Mon, 11 Sep 2006 16:59:25 +0000 (16:59 +0000)] 
Merge r1656 (Support pextrw when the destination register is 64 bits
too.  Fixes #133678.)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1658

18 years agoMerge r1655 (amd64 'fprem' (fixes bug 132918))
Julian Seward [Mon, 11 Sep 2006 16:54:29 +0000 (16:54 +0000)] 
Merge r1655 (amd64 'fprem' (fixes bug 132918))

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1657

18 years agoMerge r1652,3 (fix for: Assertion at priv/guest-x86/toIR.c:652 fails)
Julian Seward [Mon, 28 Aug 2006 21:31:32 +0000 (21:31 +0000)] 
Merge r1652,3 (fix for: Assertion at priv/guest-x86/toIR.c:652 fails)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1654

18 years agoMerge r1642 (x86/amd64 iropt e/rflag reduction rules)
Julian Seward [Mon, 28 Aug 2006 13:34:58 +0000 (13:34 +0000)] 
Merge r1642 (x86/amd64 iropt e/rflag reduction rules)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1651

18 years agoMerge r1640,1 (ppc cmp reg,reg fix)
Julian Seward [Mon, 28 Aug 2006 13:32:48 +0000 (13:32 +0000)] 
Merge r1640,1 (ppc cmp reg,reg fix)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1650

18 years agoMerge r1639 (amd64->IR: 0xF0 0x48 0xF 0xC7 (cmpxchg8b))
Julian Seward [Mon, 28 Aug 2006 13:30:48 +0000 (13:30 +0000)] 
Merge r1639 (amd64->IR: 0xF0 0x48 0xF 0xC7 (cmpxchg8b))

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1649

18 years agoMerge r1638 (Programs with long sequences of bswap[l,q]s)
Julian Seward [Mon, 28 Aug 2006 13:28:48 +0000 (13:28 +0000)] 
Merge r1638 (Programs with long sequences of bswap[l,q]s)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1648

18 years agoMerge r1637 (amd64 insn printing fix)
Julian Seward [Mon, 28 Aug 2006 13:24:08 +0000 (13:24 +0000)] 
Merge r1637 (amd64 insn printing fix)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1647

18 years agoMerge r1635,6 (SSE3 support for x86 and amd64)
Julian Seward [Mon, 28 Aug 2006 13:22:14 +0000 (13:22 +0000)] 
Merge r1635,6 (SSE3 support for x86 and amd64)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1646

18 years agoMerge r1634 (fix for:(HINT_NOP) vex x86->IR: 0xF 0x1F 0x0 0xF)
Julian Seward [Mon, 28 Aug 2006 13:19:06 +0000 (13:19 +0000)] 
Merge r1634 (fix for:(HINT_NOP) vex x86->IR: 0xF 0x1F 0x0 0xF)

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1645

18 years agoMerge r1633 (fix for: amd64->IR: unhandled instruction "pushfq")
Julian Seward [Mon, 28 Aug 2006 13:17:08 +0000 (13:17 +0000)] 
Merge r1633 (fix for: amd64->IR: unhandled instruction "pushfq")

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1644

18 years agoMerge r1632 (fix for: amd64->IR: 0x66 0xF 0xF6 0xC4 (psadbw,SSE2))
Julian Seward [Mon, 28 Aug 2006 13:15:19 +0000 (13:15 +0000)] 
Merge r1632 (fix for: amd64->IR: 0x66 0xF 0xF6 0xC4 (psadbw,SSE2))

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1643

19 years agoCreate branches/VEX_3_2_BRANCH from trunk r1628 for Valgrind 3.2.0.
Julian Seward [Wed, 7 Jun 2006 01:10:46 +0000 (01:10 +0000)] 
Create branches/VEX_3_2_BRANCH from trunk r1628 for Valgrind 3.2.0.

git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH@1630

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

19 years agoMove the helper function for x86 'fxtract' to g_generic_x87.c so
Julian Seward [Tue, 7 Mar 2006 01:15:50 +0000 (01:15 +0000)] 
Move the helper function for x86 'fxtract' to g_generic_x87.c so
it can be shared by the x86 and amd64 front ends, then use it to
implement fxtract on amd64.

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

19 years agoImplement fnstsw.
Julian Seward [Tue, 7 Mar 2006 00:22:02 +0000 (00:22 +0000)] 
Implement fnstsw.

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

19 years agoFix debug printing.
Julian Seward [Mon, 6 Mar 2006 19:17:17 +0000 (19:17 +0000)] 
Fix debug printing.

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

19 years agoImplement fcmovnu.
Julian Seward [Mon, 6 Mar 2006 19:05:07 +0000 (19:05 +0000)] 
Implement fcmovnu.

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

19 years agoImplement 3DNow! prefetch insn (prefetch, prefetchw). Fixes #120410.
Julian Seward [Mon, 6 Mar 2006 14:07:58 +0000 (14:07 +0000)] 
Implement 3DNow! prefetch insn (prefetch, prefetchw).  Fixes #120410.

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

19 years agoHandle byte-size 'xadd reg,mem'. Also, don't bomb out for the
Julian Seward [Mon, 6 Mar 2006 13:35:42 +0000 (13:35 +0000)] 
Handle byte-size 'xadd reg,mem'.  Also, don't bomb out for the
unhandled 'xadd reg,reg' case; instead synth a SIGILL in the usual
way.  Fixes #121662.

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

19 years agoImplement mtocrf/mfocrf.
Julian Seward [Wed, 1 Mar 2006 18:58:39 +0000 (18:58 +0000)] 
Implement mtocrf/mfocrf.

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

19 years agoOops, stuff that should have been part of r1573 (4-arg primop change).
Julian Seward [Thu, 9 Feb 2006 02:54:03 +0000 (02:54 +0000)] 
Oops, stuff that should have been part of r1573 (4-arg primop change).

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

19 years agoRedo the way FP multiply-accumulate insns are done on ppc32/64.
Julian Seward [Wed, 8 Feb 2006 19:30:46 +0000 (19:30 +0000)] 
Redo the way FP multiply-accumulate insns are done on ppc32/64.
Instead of splitting them up into a multiply and an add/sub, add 4 new
primops which keeps the operation as a single unit.  Then, in the back
end, re-emit the as a single instruction.

Reason for this is that so-called fused-multiply-accumulate -- which
is what ppc does -- generates a double-double length intermediate
result (of the multiply, 112 mantissa bits) before doing the add, and
so it is impossible to do a bit-accurate simulation of it using AddF64
and MulF64.

Unfortunately the new primops unavoidably take 4 args (a rounding mode
+ 3 FP args) and so there is a new IRExpr expression type, IRExpr_Qop
and associated supporting junk.

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

19 years agoWord size fixes for twi/tdi (is trickier than it looks :-). Also add
Julian Seward [Tue, 7 Feb 2006 20:55:08 +0000 (20:55 +0000)] 
Word size fixes for twi/tdi (is trickier than it looks :-).  Also add
missing DIP macros.

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

19 years agoppc32/64: handle twi/tdi (conditional trap) instructions
Julian Seward [Tue, 7 Feb 2006 16:42:39 +0000 (16:42 +0000)] 
ppc32/64: handle twi/tdi (conditional trap) instructions

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

19 years agofre: observe the current rounding mode
Julian Seward [Mon, 6 Feb 2006 22:19:17 +0000 (22:19 +0000)] 
fre: observe the current rounding mode

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

19 years agoRedo x86g_calculate_FXTRACT to only use integer arithmetic.
Julian Seward [Mon, 6 Feb 2006 22:18:38 +0000 (22:18 +0000)] 
Redo x86g_calculate_FXTRACT to only use integer arithmetic.

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

19 years agoComment-only changes
Julian Seward [Mon, 6 Feb 2006 03:58:31 +0000 (03:58 +0000)] 
Comment-only changes

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

19 years agoFixups following recent FP rounding mode changes.
Julian Seward [Sun, 5 Feb 2006 16:06:26 +0000 (16:06 +0000)] 
Fixups following recent FP rounding mode changes.

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

19 years agoMake the CSE pass more aggressive. It now commons up Mux0X and GetI
Julian Seward [Sat, 4 Feb 2006 15:24:00 +0000 (15:24 +0000)] 
Make the CSE pass more aggressive.  It now commons up Mux0X and GetI
expressions too.  This generates somewhat better FP code on x86 since
it removes more redundant artefacts from the x87 FP stack simulation.
Unfortunately commoning up GetIs complicates CSEs, since it is now
possible that "available expressions" collected by the CSEr will
become invalidated by writes to the guest state as we work through the
block.  So there is additional code to check for this case.

Some supporting functions (getAliasingRelation_IC and
getAliasingRelation_II) have been moved earlier in the file.

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

19 years agoMore x86 tidying up following rounding changes.
Julian Seward [Sat, 4 Feb 2006 15:20:13 +0000 (15:20 +0000)] 
More x86 tidying up following rounding changes.

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

19 years agoFollowup to r1562: fixes for x86
Julian Seward [Fri, 3 Feb 2006 22:54:17 +0000 (22:54 +0000)] 
Followup to r1562: fixes for x86

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

19 years agoFollowup to r1562: fixes for ppc64
Julian Seward [Fri, 3 Feb 2006 19:12:17 +0000 (19:12 +0000)] 
Followup to r1562: fixes for ppc64

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

19 years agoAn overhaul of VEX's floating point handling, to facilitate correct
Julian Seward [Fri, 3 Feb 2006 16:08:03 +0000 (16:08 +0000)] 
An overhaul of VEX's floating point handling, to facilitate correct
simulation of IEEE rounding modes in all FP operations.

The fundamental change is to add a third argument to the basic
floating point primops, eg AddF64, MulF64, etc, indicating the
(IR-encoded) rounding mode to be used for that operation.

Unfortunately IR did not have any way to support three-argument
primops, which means a new kind of IRExpr has been added: a ternary
op, IRExpr_Triop, which is simply a 3-argument form of the existing IR
binary operation node.  The unfortunate side effect is that the size
of the union type IRExpr has increased from 16 to 20 bytes on 32-bit
platforms, and hence the JIT chews through more memory, but this does
not appear to have a measurable effect on the JIT's performance, at
least as measured by Valgrind's perf suite.

* Add IRExpr_Triop, and add handling code to dozens of places which
  examine IRExprs.

* Rename/retype a bunch of floating point IR primops to take a 3rd
  rounding mode argument (which is always the first arg).

* Add extra primops AddF64r32 et al, which do double-precision FP
  operations and then round to single precision, still within a 64-bit
  type.  This is needed to simulate PPC's fadds et al without double
  rounding.

* Adjust the PPC->IR front end, to generate these new primops and
  rounding modes.

* Cause the IR optimiser to do a CSE pass on blocks containing any
  floating point operations.  This commons up the IR rounding mode
  computations, which is important for generating efficient code from
  the backend.

* Adjust the IR->PPC back end, so as to emit instructions to set the
  rounding mode before each FP operation.  Well, at least in
  principle.  In practice there is a bit of cleverness to avoid
  repeatedly setting it to the same value.  This depends on both the
  abovementioned CSE pass, and on the SSA property of IR (cool stuff,
  SSA!).  The effect is that for most blocks containing FP code, the
  rounding mode is set just once, at the start of the block, and the
  resulting overhead is minimal.  See comment on
  set_FPU_rounding_mode().

This change requires followup changes in memcheck.  Also, the
x86/amd64 front/back ends are temporarily broken.

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

19 years agoDo fre/fres in a way which makes minimal demands on the backend.
Julian Seward [Tue, 31 Jan 2006 16:32:25 +0000 (16:32 +0000)] 
Do fre/fres in a way which makes minimal demands on the backend.

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

19 years agoF64i isel fix.
Julian Seward [Tue, 31 Jan 2006 16:31:44 +0000 (16:31 +0000)] 
F64i isel fix.

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

19 years agoHandle fre and frsqrtes. Even though the IBM docs manage to
Julian Seward [Sun, 29 Jan 2006 17:07:57 +0000 (17:07 +0000)] 
Handle fre and frsqrtes.  Even though the IBM docs manage to
contradict themselves about whether these insns exist or not.

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

19 years agoMake lsw work in 64-bit mode.
Julian Seward [Sat, 28 Jan 2006 17:07:19 +0000 (17:07 +0000)] 
Make lsw work in 64-bit mode.

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

19 years agoUn-break ppc64 following recent hw-capabilities hackery. (sigh)
Julian Seward [Fri, 27 Jan 2006 22:05:55 +0000 (22:05 +0000)] 
Un-break ppc64 following recent hw-capabilities hackery.  (sigh)

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

19 years agoUnbreak ppc32 following recent hw-capabilities hackery.
Julian Seward [Fri, 27 Jan 2006 21:52:19 +0000 (21:52 +0000)] 
Unbreak ppc32 following recent hw-capabilities hackery.

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

19 years agoChange the way Vex represents architecture variants into something
Julian Seward [Fri, 27 Jan 2006 21:20:15 +0000 (21:20 +0000)] 
Change the way Vex represents architecture variants into something
more flexible.  Prior to this change, the type VexSubArch effectively
imposed a total ordering on subarchitecture capabilities, which was
overly restrictive.  This change moves to effectively using a bit-set,
allowing some features (instruction groups) to be supported or not
supported independently of each other.

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

19 years agoRe-enable stfiwx.
Julian Seward [Fri, 27 Jan 2006 16:05:49 +0000 (16:05 +0000)] 
Re-enable stfiwx.

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

19 years agoHandle ppc32/64 fres, frsqrte.
Julian Seward [Fri, 27 Jan 2006 15:09:35 +0000 (15:09 +0000)] 
Handle ppc32/64 fres, frsqrte.

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

19 years agoIn 32-bit mode, handle F64toI64 and I64toF64.
Julian Seward [Thu, 26 Jan 2006 03:02:26 +0000 (03:02 +0000)] 
In 32-bit mode, handle F64toI64 and I64toF64.

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