]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
14 years agoImplement (ARM): REV, REV16, SMMUL.
Julian Seward [Wed, 22 Sep 2010 22:26:40 +0000 (22:26 +0000)] 
Implement (ARM): REV, REV16, SMMUL.

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

14 years agoFix incorrect handling of VTRN.32 insn. (Dmitry Zhurikhin, zhur@ispras.ru)
Julian Seward [Wed, 22 Sep 2010 16:27:08 +0000 (16:27 +0000)] 
Fix incorrect handling of VTRN.32 insn.  (Dmitry Zhurikhin, zhur@ispras.ru)

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

14 years agoAccept d16-d31 register arguments in VFP code. Fixes #244493.
Julian Seward [Wed, 22 Sep 2010 16:15:50 +0000 (16:15 +0000)] 
Accept d16-d31 register arguments in VFP code.  Fixes #244493.
(Dmitry Zhurikhin, zhur@ispras.ru)

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

14 years agoAdd some 32-bit SIMD integer primops, and use these to shorten up the
Julian Seward [Wed, 22 Sep 2010 00:56:37 +0000 (00:56 +0000)] 
Add some 32-bit SIMD integer primops, and use these to shorten up the
implementation of some ARM media v6 instructions.

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

14 years agoImplement UHADD8.
Julian Seward [Tue, 21 Sep 2010 00:24:11 +0000 (00:24 +0000)] 
Implement UHADD8.

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

14 years agoImplement SSUB8.
Julian Seward [Mon, 20 Sep 2010 23:58:57 +0000 (23:58 +0000)] 
Implement SSUB8.

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

14 years agoIn ARM mode: enable LDRD/STRD of the form "reg, [reg], reg"
Julian Seward [Mon, 20 Sep 2010 23:34:43 +0000 (23:34 +0000)] 
In ARM mode: enable LDRD/STRD of the form "reg, [reg], reg"

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

14 years agoImplement SADD16, SSUB16, SASX, SMLAWB, SMLAWT.
Julian Seward [Mon, 20 Sep 2010 22:35:35 +0000 (22:35 +0000)] 
Implement SADD16, SSUB16, SASX, SMLAWB, SMLAWT.

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

14 years agoIf the host does not support Neon, then don't accept Neon instructions
Julian Seward [Thu, 9 Sep 2010 07:27:24 +0000 (07:27 +0000)] 
If the host does not support Neon, then don't accept Neon instructions
on the guest-side.  Related to #249775.

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

14 years agoHandle 16Uto64, which can now show up at the back end as a
Julian Seward [Thu, 9 Sep 2010 07:14:31 +0000 (07:14 +0000)] 
Handle 16Uto64, which can now show up at the back end as a
result of more iropt folding introduced in r2030.

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

14 years agoMinor amd64 instruction selection improvements, leading to a
Julian Seward [Wed, 8 Sep 2010 08:34:52 +0000 (08:34 +0000)] 
Minor amd64 instruction selection improvements, leading to a
1% generated code size reduction for perf/bz2.c running on
Memcheck:

- reduce the amount of pointless cast-of-a-cast code by
  rewriting it out at tree-creation time in ir_opt.c

- generate movslq for 32Sto64

- generate movzbq for 8Uto64(LD(...)), ditto movzwq for 16-bit loads

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

14 years agoSupport new PowerISA_2.05 instructions available on Power6 CPUs.
Julian Seward [Fri, 3 Sep 2010 23:37:02 +0000 (23:37 +0000)] 
Support new PowerISA_2.05 instructions available on Power6 CPUs.
(Maynard Johnson, maynardj@us.ibm.com)

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

14 years agoSupport the DCBZL instruction. Also, query the host CPU at startup
Julian Seward [Fri, 3 Sep 2010 15:49:57 +0000 (15:49 +0000)] 
Support the DCBZL instruction.  Also, query the host CPU at startup
time to find out how much space DCBZL really clears, and make the
guest CPU act accordingly.  (VEX-side changes)
(Dave Goodell, goodell@mcs.anl.gov)

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

14 years agoEnable BX PC in Thumb mode. Partial fix for #249775.
Julian Seward [Thu, 2 Sep 2010 21:14:10 +0000 (21:14 +0000)] 
Enable BX PC in Thumb mode.  Partial fix for #249775.

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

14 years agoHandle RBIT (bit-reverse) in Thumb mode. Partial fix for #249924.
Julian Seward [Thu, 2 Sep 2010 21:02:47 +0000 (21:02 +0000)] 
Handle RBIT (bit-reverse) in Thumb mode.  Partial fix for #249924.

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

14 years agoAvoid genSpill/genReload asserts for VFP spills/reloads with offsets
Julian Seward [Wed, 1 Sep 2010 10:25:51 +0000 (10:25 +0000)] 
Avoid genSpill/genReload asserts for VFP spills/reloads with offsets
greater than 1024 from the baseblock pointer.

Also, update comments on the use of r12.

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

14 years agoReduce to 5 the number of available Q (128-bit) registers available
Julian Seward [Tue, 31 Aug 2010 09:32:40 +0000 (09:32 +0000)] 
Reduce to 5 the number of available Q (128-bit) registers available
to the allocator, in an attempt to make register allocation a bit
faster on ARM.

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

14 years agoSupport the PLI instruction (icache preload hint) in ARM mode, so
Julian Seward [Tue, 31 Aug 2010 09:31:06 +0000 (09:31 +0000)] 
Support the PLI instruction (icache preload hint) in ARM mode, so
as to make self-hosting on ARM work.

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

14 years agoFix debug printing for Neon VLDn/VSTn instructions.
Julian Seward [Tue, 31 Aug 2010 09:29:51 +0000 (09:29 +0000)] 
Fix debug printing for Neon VLDn/VSTn instructions.
(Kirill Batuzov <batuzovk@ispras.ru)

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

14 years agoFix generation of writeback values in Neon VLDn/VSTn instructions.
Julian Seward [Tue, 31 Aug 2010 09:18:22 +0000 (09:18 +0000)] 
Fix generation of writeback values in Neon VLDn/VSTn instructions.

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

14 years agoAdd support for v6 media instructions in both ARM and Thumb modes.
Julian Seward [Sun, 29 Aug 2010 12:33:02 +0000 (12:33 +0000)] 
Add support for v6 media instructions in both ARM and Thumb modes.
(Donna Robinson, donna@valgrind.org)

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

14 years agoHandle "Special" instructions in Thumb mode: "R3 = guest_NRADDR" and
Julian Seward [Sun, 22 Aug 2010 22:21:19 +0000 (22:21 +0000)] 
Handle "Special" instructions in Thumb mode: "R3 = guest_NRADDR" and
"branch-and-link-to-noredir R4".  This makes function wrapping work in
Thumb mode.

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

14 years agoFix some compiler complaints when building on 64-bit platforms.
Julian Seward [Sun, 22 Aug 2010 18:47:30 +0000 (18:47 +0000)] 
Fix some compiler complaints when building on 64-bit platforms.

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

14 years agoFix various compiler warnings and remove an unused function.
Julian Seward [Sun, 22 Aug 2010 18:24:51 +0000 (18:24 +0000)] 
Fix various compiler warnings and remove an unused function.

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

14 years agoMerge from branches/THUMB: new IR primops and associated
Julian Seward [Sun, 22 Aug 2010 12:59:02 +0000 (12:59 +0000)] 
Merge from branches/THUMB: new IR primops and associated
infrastructure, needed to represent NEON instructions.  Way more new
ones than I would like, but I can't see a way to avoid having them.

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

14 years agoMerge from branches/THUMB: hwcaps for ARM. May get simplified since
Julian Seward [Sun, 22 Aug 2010 12:54:56 +0000 (12:54 +0000)] 
Merge from branches/THUMB: hwcaps for ARM.  May get simplified since
in fact ARM v5 and v6 are not supported targets -- ARMv7 remains the
minimum supported target.

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

14 years agoMerge from branches/THUMB: back end changes to support NEON code generation.
Julian Seward [Sun, 22 Aug 2010 12:48:28 +0000 (12:48 +0000)] 
Merge from branches/THUMB: back end changes to support NEON code generation.

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

14 years agoMerge from branches/THUMB: front end changes to support:
Julian Seward [Sun, 22 Aug 2010 12:44:20 +0000 (12:44 +0000)] 
Merge from branches/THUMB: front end changes to support:
* Thumb integer instructions
* NEON in both ARM and Thumb mode
* VFP in both ARM and Thumb mode
* infrastructure to support APSR.Q flag representation

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

14 years agoMerge from branches/THUMB: A spechelper interface change that allows
Julian Seward [Sun, 22 Aug 2010 12:38:53 +0000 (12:38 +0000)] 
Merge from branches/THUMB: A spechelper interface change that allows
the helper to look back at the previous IR statements.  May be backed
out if it turns out no longer to be needed for optimising Thumb
translations.

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

14 years agoEnable SSE 4.1 and 4.2 by default on x86_64. (x86 remains stuck
Julian Seward [Thu, 19 Aug 2010 13:25:10 +0000 (13:25 +0000)] 
Enable SSE 4.1 and 4.2 by default on x86_64.  (x86 remains stuck
at SSE3, at least for the time being.)

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

14 years agoAdd a moderately comprehensive implementation of the SSE4.2 string
Julian Seward [Tue, 17 Aug 2010 22:52:08 +0000 (22:52 +0000)] 
Add a moderately comprehensive implementation of the SSE4.2 string
instructions PCMP{I,E}STR{I,M}.  They are an absolute nightmare of
complexity.  Most of the 8-bit data processing variants are supported,
but none of the 16-bit variants.

Also add support for PINSRB and PTEST.

With these changes, I believe Valgrind supports all the SSE4.2
instructions used in glibc-2.11 on x86_64-linux, as well as anything
that gcc can emit.  So that gives fairly good coverage.

Currently these instructions are handled, but CPUID still claims to be
an older, non-SSE4 capable Core 2, so that software that correctly
checks CPU features should not use them.  Following further testing I
will enable the relevant SSE4.2 bits in CPUID.

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

15 years agoAdd partial support for the SSE 4.2 PCMPISTRI instruction, at least
Julian Seward [Fri, 6 Aug 2010 07:59:38 +0000 (07:59 +0000)] 
Add partial support for the SSE 4.2 PCMPISTRI instruction, at least
for (some of) the sub-cases that glibc uses (64-bit mode only).  Also,
prepare for transitioning CPUID in 64-bit mode to indicate SSE4.2
support (not yet enabled).

Be warned, this commit will require a from-clean rebuild of Valgrind.

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

15 years agoUpdate for Core iX.
Julian Seward [Fri, 6 Aug 2010 07:55:29 +0000 (07:55 +0000)] 
Update for Core iX.

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

15 years agoDon't trash the ELF ABI redzone for amd64 when emulating BT{,S,R,C}
Julian Seward [Thu, 29 Jul 2010 18:10:51 +0000 (18:10 +0000)] 
Don't trash the ELF ABI redzone for amd64 when emulating BT{,S,R,C}
reg,reg.  Fixes (well, at least, makes an appalling kludge a bit less
appalling) #245925.

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

15 years agoAdd a folding rule for 32Sto64.
Julian Seward [Thu, 29 Jul 2010 16:12:41 +0000 (16:12 +0000)] 
Add a folding rule for 32Sto64.

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

15 years agoOnly decode LZCNT if the host supports it, since otherwise we risk
Julian Seward [Thu, 29 Jul 2010 15:39:05 +0000 (15:39 +0000)] 
Only decode LZCNT if the host supports it, since otherwise we risk
confusing it with BSR.  Followup to #212335.

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

15 years agoSupport the amd SSE4.something LZCNT instruction. Fixes #212335
Julian Seward [Thu, 29 Jul 2010 11:34:38 +0000 (11:34 +0000)] 
Support the amd SSE4.something LZCNT instruction.  Fixes #212335
and its various clones, at least #227551, #241290 and #240639.

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

15 years agoHandle mov[ua[pd G(xmm) -> E(xmm) case, which is something binutils
Julian Seward [Thu, 29 Jul 2010 07:19:30 +0000 (07:19 +0000)] 
Handle mov[ua[pd G(xmm) -> E(xmm) case, which is something binutils
doesn't produce, presumably because it uses the E->G encoding for xmm
reg-reg moves.  Fixes #238713.  (Pierre Willenbrock,
pierre@pirsoft.de).

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

15 years agox86/amd64 FXTRACT: mimic the Core i5 behaviour when the argument is a
Julian Seward [Thu, 29 Jul 2010 07:01:29 +0000 (07:01 +0000)] 
x86/amd64 FXTRACT: mimic the Core i5 behaviour when the argument is a
negative NaN.

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

15 years agoIgnore a redundant REX.W prefix on an MMX pinsrw instruction
Julian Seward [Thu, 29 Jul 2010 05:13:58 +0000 (05:13 +0000)] 
Ignore a redundant REX.W prefix on an MMX pinsrw instruction
(Dan Gohman, dgohman@gmail.com).  Fixes #239992.

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

15 years agoAdd a program for printing out cpuid info.
Julian Seward [Wed, 28 Jul 2010 19:26:59 +0000 (19:26 +0000)] 
Add a program for printing out cpuid info.

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

15 years agoSupport the SSE4 insn 'roundss' in 32-bit mode. Lack of this was
Julian Seward [Fri, 23 Jul 2010 21:23:25 +0000 (21:23 +0000)] 
Support the SSE4 insn 'roundss' in 32-bit mode.  Lack of this was
causing problems for people running 32-bit apps on MacOSX 10.6 on
newer hardware.  Fixes #241377.

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

15 years agoImplement ROUNDSS (partial implementation, in the case where
Julian Seward [Sun, 27 Jun 2010 09:06:34 +0000 (09:06 +0000)] 
Implement ROUNDSS (partial implementation, in the case where
the rounding mode is specified within the instruction itself).

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

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