]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
10 years agoAdd support for four IROps that Memcheck generates on arm64, that
Julian Seward [Tue, 26 Aug 2014 18:30:48 +0000 (18:30 +0000)] 
Add support for four IROps that Memcheck generates on arm64, that
the front end doesn't generate.

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

10 years agoComment-only change.
Julian Seward [Tue, 26 Aug 2014 18:29:26 +0000 (18:29 +0000)] 
Comment-only change.

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

10 years agoarm64: implement:
Julian Seward [Sun, 24 Aug 2014 20:36:14 +0000 (20:36 +0000)] 
arm64: implement:
  {zip,uzp,trn}{1,2} (vector)
  urecpe, ursqrte (vector)

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

10 years agoRename IROps for reciprocal estimate, reciprocal step, reciprocal sqrt
Julian Seward [Sun, 24 Aug 2014 14:00:19 +0000 (14:00 +0000)] 
Rename IROps for reciprocal estimate, reciprocal step, reciprocal sqrt
estimate and reciprocal sqrt step, to be more consistent.  Remove
64FxWhatever versions of those ops since they are never used.  As a
side effect, observe that RSqrt32Fx4 and Rsqrte32Fx4 are the same and
hence fix the duplication, at the same time.  No functional change.

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

10 years agoBug 330319 - vex amd64->IR: unhandled instruction bytes: 0xF 0x1 0xD5 (xend)
Mark Wielaard [Thu, 21 Aug 2014 17:46:00 +0000 (17:46 +0000)] 
Bug 330319 - vex amd64->IR: unhandled instruction bytes: 0xF 0x1 0xD5 (xend)

We are never in an transaction (xbegin immediately aborts).
So this just always generates a General Protection Fault.

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

10 years agoputGST_masked: correctly handle the case where the mask is for
Julian Seward [Wed, 20 Aug 2014 08:54:06 +0000 (08:54 +0000)] 
putGST_masked: correctly handle the case where the mask is for
FPSCR.RN or FPSCR.DRN, but does not cover the entire field.  Then it
is important to update the exposed parts but leave the not-exposed
parts unchanged.  This is a regression relative to circa 5 years ago.

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

10 years agoarm64: implement:
Julian Seward [Mon, 18 Aug 2014 12:28:02 +0000 (12:28 +0000)] 
arm64: implement:
suqadd, usqadd (scalar)
suqadd, usqadd (vector)

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

10 years agoarm64: implement srhadd, urhadd (vector)
Julian Seward [Sun, 17 Aug 2014 19:59:09 +0000 (19:59 +0000)] 
arm64: implement srhadd, urhadd (vector)

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

10 years agoarm64: implement
Julian Seward [Sun, 17 Aug 2014 18:32:14 +0000 (18:32 +0000)] 
arm64: implement
  sshr, ushr, ssra, usra (scalar, imm)
  srshr, urshr, srsra, ursra (scalar, imm)
  srshr, urshr, srsra, ursra (vector, imm)
  sshl, srshl, ushl, urshl (scalar, imm)
  sshl, srshl, ushl, urshl (vector, vector)
  ssra, usra (vector, imm)

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

10 years agoNo functional change. Remove commented out code copied from the
Julian Seward [Fri, 15 Aug 2014 09:29:36 +0000 (09:29 +0000)] 
No functional change.  Remove commented out code copied from the
arm32 port, which is never going to get used.

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

10 years agoRename Iop_QSalN*, Iop_QShlN* and Iop_QShlN*S so as to more accurately
Julian Seward [Fri, 15 Aug 2014 09:11:08 +0000 (09:11 +0000)] 
Rename Iop_QSalN*, Iop_QShlN* and Iop_QShlN*S so as to more accurately
reflect what they actually do, which is a zero-fill shift left followed
by one of three flavours of saturation (S->S, U->U or S->U).

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

10 years agoarm64: implement: {uqshl, sqshl, sqshlu} (scalar, imm) and fix two
Julian Seward [Fri, 15 Aug 2014 05:35:35 +0000 (05:35 +0000)] 
arm64: implement: {uqshl, sqshl, sqshlu} (scalar, imm) and fix two
bugs in the implementation of the (vector, imm) variants.

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

10 years agoarm64: implement: {uqshl, sqshl, sqshlu} (vector, imm).
Julian Seward [Thu, 14 Aug 2014 22:26:52 +0000 (22:26 +0000)] 
arm64: implement: {uqshl, sqshl, sqshlu} (vector, imm).

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

10 years agoAdd a simple folding rule for Iop_ZeroHI64ofV128.
Julian Seward [Thu, 14 Aug 2014 22:25:31 +0000 (22:25 +0000)] 
Add a simple folding rule for Iop_ZeroHI64ofV128.

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

10 years agoarm64: implement: uqshrn{2}, sqrshrun{2}, sqshrun{2} (scalar, imm)
Julian Seward [Wed, 13 Aug 2014 13:10:47 +0000 (13:10 +0000)] 
arm64: implement: uqshrn{2}, sqrshrun{2}, sqshrun{2} (scalar, imm)

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

10 years agoSmall cleanups in VEX:
Philippe Waroquiers [Mon, 11 Aug 2014 22:45:47 +0000 (22:45 +0000)] 
Small cleanups in VEX:
  * rm unused arm64 function
  * ijk_nodecode: always set the 4 components of the result
    (avoid a compiler warning that a part is not initialised)

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

10 years agoarm64: implement:
Julian Seward [Mon, 11 Aug 2014 14:02:47 +0000 (14:02 +0000)] 
arm64: implement:
uqshrn{2}, sqrshrun{2}, sqshrun{2} (vector, imm)
sqxtn{2}, uqxtn{2}, sqxtun{2} (vector and scalar)

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

10 years agoAdd a new folding rule:
Julian Seward [Mon, 11 Aug 2014 14:01:00 +0000 (14:01 +0000)] 
Add a new folding rule:
ZeroHI64ofV128( ZeroHI64ofV128(x) ) --> ZeroHI64ofV128(x)

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

11 years agoUnbreak the build
Philippe Waroquiers [Sat, 9 Aug 2014 08:13:19 +0000 (08:13 +0000)] 
Unbreak the build
priv/guest_ppc_toIR.c: In function disInstr_PPC:
priv/guest_ppc_toIR.c:20160:7: error: dis undeclared (first use in this function)
       dis.continueAt   = 0;
       ^

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

11 years agoThis commit is for Bugzilla 334834.
Carl Love [Fri, 8 Aug 2014 22:26:31 +0000 (22:26 +0000)] 
This commit is for Bugzilla 334834.

The compiler is generating a message
"dres.continueAt’ may be used uninitialized in this function".

Setting dres.continueAT to zero since this is an error case
and we should not be continuing.

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

11 years agoThis commit is for Bugzilla 334834. The Bugzilla contains patch 2 of 3
Carl Love [Thu, 7 Aug 2014 23:25:23 +0000 (23:25 +0000)] 
This commit is for Bugzilla 334834.  The Bugzilla contains patch 2 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334384 and 334836.

POWER PC, add the functional Little Endian support, patch 2 VEX part

The IBM POWER processor now supports both Big Endian and Little Endian.
The ABI for Little Endian also changes.  Specifically, the function
descriptor is not used, the stack size changed, accessing the TOC
changed.  Functions now have a local and a global entry point.  Register
r2 contains the TOC for local calls and register r12 contains the TOC
for global calls.  This patch makes the functional changes to the
Valgrind tool.  The patch makes the changes needed for the
none/tests/ppc32 and none/tests/ppc64 Makefile.am.  A number of the
ppc specific tests have Endian dependencies that are not fixed in
this patch.  They are fixed in the next patch.

Per Julian's comments renamed coregrind/m_dispatch/dispatch-ppc64-linux.S
to coregrind/m_dispatch/dispatch-ppc64be-linux.S  Created new file for LE
coregrind/m_dispatch/dispatch-ppc64le-linux.S.  The same was done for
coregrind/m_syswrap/syscall-ppc-linux.S.

Signed-off-by: Carl Love <carll@us.ibm.com>
git-svn-id: svn://svn.valgrind.org/vex/trunk@2914

11 years agoarm64: add support for: sqshl, uqshl, sqrshl, uqrshl (reg) (vector and scalar)
Julian Seward [Mon, 4 Aug 2014 08:09:47 +0000 (08:09 +0000)] 
arm64: add support for: sqshl, uqshl, sqrshl, uqrshl (reg) (vector and scalar)

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

11 years agoAdd a folding rule: XorV128(t,0) ==> t.
Julian Seward [Mon, 4 Aug 2014 08:09:23 +0000 (08:09 +0000)] 
Add a folding rule: XorV128(t,0) ==> t.

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

11 years agoarm64: implement remaining SQDMULH and SQRDMULH cases.
Julian Seward [Sun, 3 Aug 2014 12:45:19 +0000 (12:45 +0000)] 
arm64: implement remaining SQDMULH and SQRDMULH cases.

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

11 years agoImprove infrastructure for dealing with endianness in VEX. This patch
Julian Seward [Thu, 24 Jul 2014 12:42:03 +0000 (12:42 +0000)] 
Improve infrastructure for dealing with endianness in VEX.  This patch
removes all decisions about endianness from VEX.  Instead, it requires
that the LibVEX_* calls pass in information about the guest or host
endianness (depending on context) and in turn it passes that info
through to all the places that need it:

* the front ends (xx_toIR.c)
* the back ends (xx_isel.c)
* the patcher functions (Chain, UnChain, PatchProfInc)

Mostly it is boring and ugly plumbing.  As far as types go, there is a
new type "VexEndness" that carries the endianness.  This also makes it
possible to stop using Bools to indicate endianness.  VexArchInfo has
a new field of type VexEndness.  Apart from that, no other changes in
types.

Followups: MIPS front and back ends have not yet been fixed up to use
the passed-in endianness information.  Currently they assume that the
endianness of both host and guest is the same as the endianness of the
target for which VEX is being compiled.

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

11 years agoarm64: implement:
Julian Seward [Tue, 22 Jul 2014 09:27:49 +0000 (09:27 +0000)] 
arm64: implement:
{sqdmlal,sqdmlsl,sqdmull}{d_s_s[],s_h_h[]}
{sqdmlal,sqdmlsl,sqdmull}{d_s_s,s_h_h}
{sqdmlal,sqdmlsl,sqdmull}{2d_(2s_2s)/(4s_4s), 4s_(4h_4h)/(8h_8h)}
sqrdmulh 4s,2s,8h,4h (vector)

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

11 years agoComment-only change.
Julian Seward [Tue, 22 Jul 2014 09:26:36 +0000 (09:26 +0000)] 
Comment-only change.

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

11 years agoarm64: implement: sqneg, {u,s}q{add,sub} (scalar),
Julian Seward [Mon, 21 Jul 2014 09:19:50 +0000 (09:19 +0000)] 
arm64: implement: sqneg, {u,s}q{add,sub} (scalar),
{sqdmlal,sqdmlsl,sqdmull} (vector x element)

As part of this, rename Iop_QDMulLong* to Iop_QDMull* so as to be
consistent with their non-saturating equivalents.

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

11 years agoInitialise a couple of scalars that gcc -Og thinks might be
Julian Seward [Mon, 21 Jul 2014 07:55:45 +0000 (07:55 +0000)] 
Initialise a couple of scalars that gcc -Og thinks might be
uninitialised, presumably because at -Og it doesn't do enough
block straightening-outening or whatever to see that they are
always assigned before use.

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

11 years agoAdd a few more algebraic optimisations for Iop_And8/16.
Florian Krohm [Fri, 18 Jul 2014 21:23:46 +0000 (21:23 +0000)] 
Add a few more algebraic optimisations for Iop_And8/16.
Observed on s390.

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

11 years agoRemove fields from VexAbiInfo that only had relevance to the old AIX5
Julian Seward [Wed, 16 Jul 2014 23:14:33 +0000 (23:14 +0000)] 
Remove fields from VexAbiInfo that only had relevance to the old AIX5
port: guest_ppc_sc_continues_at_LR and host_ppc32_regalign_int64_args.

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

11 years agoComment out an unsed function to avoid a compiler warning.
Florian Krohm [Wed, 16 Jul 2014 20:29:38 +0000 (20:29 +0000)] 
Comment out an unsed function to avoid a compiler warning.

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

11 years agoFix algebraic simplification for Iop_AndV256.
Florian Krohm [Wed, 16 Jul 2014 20:17:49 +0000 (20:17 +0000)] 
Fix algebraic simplification for Iop_AndV256.

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

11 years agoarm64: implement: LD1/ST1 (multi 1-elem structs, 2 regs, post index)
Julian Seward [Tue, 15 Jul 2014 11:08:42 +0000 (11:08 +0000)] 
arm64: implement: LD1/ST1 (multi 1-elem structs, 2 regs, post index)

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

11 years agoarm64: implement "mrs Xt, cntvct_el0" by pass-through to the host.
Julian Seward [Mon, 14 Jul 2014 20:39:23 +0000 (20:39 +0000)] 
arm64: implement "mrs Xt, cntvct_el0" by pass-through to the host.

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

11 years agoarm64: implement: {sli,sri} (vector & scalar), sqabs (vector & scalar)
Julian Seward [Fri, 11 Jul 2014 12:05:47 +0000 (12:05 +0000)] 
arm64: implement: {sli,sri} (vector & scalar), sqabs (vector & scalar)

Fix instruction decoding bug in dis_AdvSIMD_vector_x_indexed_elem
introduced in r2874 but not exposed until recently.

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

11 years agoarm64: implement: shll #imm, shrn #imm, rshrn #imm,
Julian Seward [Thu, 10 Jul 2014 14:22:45 +0000 (14:22 +0000)] 
arm64: implement: shll #imm, shrn #imm, rshrn #imm,
{smlal,umlal,smlsl,umlsl,smull,umull} (elem)

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

11 years agoarm32: support (ARM) PLDW [reg, reg]. The non-W variant was already
Julian Seward [Thu, 3 Jul 2014 12:27:21 +0000 (12:27 +0000)] 
arm32: support (ARM) PLDW [reg, reg].  The non-W variant was already
accepted.  Fixes #323178.  (vasily.golubev@gmail.com)

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

11 years agoarm32: support (ARM) PLDW [reg, #imm]. The non-W variant was already
Julian Seward [Thu, 3 Jul 2014 11:01:38 +0000 (11:01 +0000)] 
arm32: support (ARM) PLDW [reg, #imm].  The non-W variant was already
accepted.  Fixes #323179.  (vasily.golubev@gmail.com)

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

11 years agoarm64: implement: sadalp uadalp saddlp uaddlp saddlv uaddlv saddw{2}
Julian Seward [Mon, 30 Jun 2014 07:33:56 +0000 (07:33 +0000)] 
arm64: implement: sadalp uadalp saddlp uaddlp saddlv uaddlv saddw{2}
uaddw{2} ssubw{2} usubw{2} shadd uhadd shsub uhsub sqadd uqadd sqsub
uqsub smaxp umaxp sminp uminp

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

11 years agoarm64: change the representation of FPSR.QC so that it can be
Julian Seward [Sat, 28 Jun 2014 22:11:16 +0000 (22:11 +0000)] 
arm64: change the representation of FPSR.QC so that it can be
used efficiently to record SIMD saturation, and remove support
for all other bits of FPSR, since we don't model them anyway.

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

11 years agoarm64: implement: sabal uabal sabdl uabdl saddl uaddl ssubl usubl
Julian Seward [Sat, 28 Jun 2014 12:21:37 +0000 (12:21 +0000)] 
arm64: implement: sabal uabal sabdl uabdl saddl uaddl ssubl usubl
smlal umlal smlsl umlsl smull umull

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

11 years agoarm64:
Julian Seward [Fri, 27 Jun 2014 10:43:22 +0000 (10:43 +0000)] 
arm64:
* implement: rev32, rev64, saba, uaba, sabd, uabd.
* factor out a large number of duplicated expressions of the form
  bitQ == 0 ? unop(Iop_ZeroHI64ofV128, mkexpr(t)) : mkexpr(t)

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

11 years agoarm64: implement: rbit 16b,8b, rev16 16b,8b
Julian Seward [Thu, 26 Jun 2014 12:39:05 +0000 (12:39 +0000)] 
arm64: implement: rbit 16b,8b, rev16 16b,8b

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

11 years agoRename the vector subparts-of-lanes-reversal IROps to names
Julian Seward [Thu, 26 Jun 2014 10:49:33 +0000 (10:49 +0000)] 
Rename the vector subparts-of-lanes-reversal IROps to names
that are easier to understand.  No functional change.

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

11 years agoThe vector versions of the count leading zeros/sign bits primops
Julian Seward [Thu, 26 Jun 2014 08:18:08 +0000 (08:18 +0000)] 
The vector versions of the count leading zeros/sign bits primops
(Iop_Cls* and Iop_Clz*) misleadingly imply a signedness in the
incoming lanes.  Rename them to fix this.  Fixes #326026.

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

11 years agoarm64: implement pmull{2}.
Julian Seward [Thu, 26 Jun 2014 07:41:14 +0000 (07:41 +0000)] 
arm64: implement pmull{2}.

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

11 years agoarm64: implement:
Julian Seward [Wed, 25 Jun 2014 13:05:23 +0000 (13:05 +0000)] 
arm64: implement:
LD3/ST3 (multi 3-elem structs, 3 regs, post index) (2d variants only)
pmul 16b_16b_16b, 8b_8b_8b

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

11 years agoRemove commented out junk which is never going to get used.
Julian Seward [Wed, 25 Jun 2014 12:19:02 +0000 (12:19 +0000)] 
Remove commented out junk which is never going to get used.
No functional change.

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

11 years agoFix bogus-looking assertion.
Julian Seward [Wed, 25 Jun 2014 11:59:24 +0000 (11:59 +0000)] 
Fix bogus-looking assertion.

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

11 years agoImplement LD1/ST1 {3 regs . 16b}, [ea] (no offset)
Julian Seward [Tue, 24 Jun 2014 10:26:52 +0000 (10:26 +0000)] 
Implement LD1/ST1 {3 regs . 16b}, [ea]  (no offset)

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

11 years agoarm64: more SIMD instructions:
Julian Seward [Mon, 23 Jun 2014 09:09:41 +0000 (09:09 +0000)] 
arm64: more SIMD instructions:
ins (vec[], vec[])
mla, mls, mul (vec, vec, vec[])
various more movi/mvni cases
not 16b/8b

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

11 years agoFix an enum type confusion, PPCAvFpOp vs PPCAvOp, as excellently
Julian Seward [Fri, 20 Jun 2014 14:27:27 +0000 (14:27 +0000)] 
Fix an enum type confusion, PPCAvFpOp vs PPCAvOp, as excellently
detected by Clang.  Gcc, are you paying attention?

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

11 years agoIncrease the number of vector registers available for allocation from
Julian Seward [Fri, 20 Jun 2014 08:30:21 +0000 (08:30 +0000)] 
Increase the number of vector registers available for allocation from
3 to 5.

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

11 years agoImplement: dup_{d_d[], s_s[], h_h[], b_b[]}, ext
Julian Seward [Thu, 19 Jun 2014 22:20:47 +0000 (22:20 +0000)] 
Implement: dup_{d_d[], s_s[], h_h[], b_b[]}, ext

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

11 years agoImplement: orr_{8h,4h}_imm8_shifted, orr_{4s,2s}_imm8_shifted,
Julian Seward [Thu, 19 Jun 2014 14:21:37 +0000 (14:21 +0000)] 
Implement: orr_{8h,4h}_imm8_shifted, orr_{4s,2s}_imm8_shifted,
bic_{8h,4h}_imm8_shifted, bic_{4s,2s}_imm8_shifted, cls_std6_std6,
cm{eq,ge,gt,hi,hs,tst}_d_d_d, cm{ge,gt,le,lt}_d_d_zero,
cnt_{16,8}b_{16,8}b

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

11 years agoarm64: implement: addp std7_std7_std7, addv vector, addp d_2d
Julian Seward [Sun, 15 Jun 2014 21:55:33 +0000 (21:55 +0000)] 
arm64: implement: addp std7_std7_std7, addv vector, addp d_2d

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

11 years agoarm64: implement: abs d_d, neg d_d, abs std7_std7, addhn, subhn, raddhn, rsubhn
Julian Seward [Sun, 15 Jun 2014 19:36:29 +0000 (19:36 +0000)] 
arm64: implement: abs d_d, neg d_d, abs std7_std7, addhn, subhn, raddhn, rsubhn

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

11 years agoRemove temporary front end scaffolding for Cat{Even,Odd}Lanes
Julian Seward [Sun, 15 Jun 2014 08:17:35 +0000 (08:17 +0000)] 
Remove temporary front end scaffolding for Cat{Even,Odd}Lanes
and Interleave{LO,HI} operations, and instead generate real
UZP1/UZP2/ZIP1/ZIP2 instructions in the back end.

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

11 years agoImplement LD1R (single structure, replicate).
Julian Seward [Sat, 14 Jun 2014 18:05:30 +0000 (18:05 +0000)] 
Implement LD1R (single structure, replicate).

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

11 years agoImplement FMUL 2d_2d_d[], 4s_4s_s[], 2s_2s_s[].
Julian Seward [Thu, 12 Jun 2014 13:16:01 +0000 (13:16 +0000)] 
Implement FMUL 2d_2d_d[], 4s_4s_s[], 2s_2s_s[].

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

11 years agoRemove the old SIMD decoder entirely.
Julian Seward [Thu, 12 Jun 2014 10:15:46 +0000 (10:15 +0000)] 
Remove the old SIMD decoder entirely.

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

11 years agoMove remaining implemented SIMD instructions into the new SIMD/FP
Julian Seward [Wed, 11 Jun 2014 20:57:23 +0000 (20:57 +0000)] 
Move remaining implemented SIMD instructions into the new SIMD/FP
decoding framework.

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

11 years agoReimplement the SIMD and FP instruction decoder, so as to avoid huge
Julian Seward [Tue, 10 Jun 2014 22:52:05 +0000 (22:52 +0000)] 
Reimplement the SIMD and FP instruction decoder, so as to avoid huge
amounts of duplicated decode, and to follow the documentation more
closely.

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

11 years agomips: Fix non mips compiler warning.
Dejan Jevtic [Mon, 9 Jun 2014 10:54:49 +0000 (10:54 +0000)] 
mips: Fix non mips compiler warning.

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

11 years agoSupport ADC/ADCS/SBC/SBCS. Fixes #335496. (dimitry@google.com)
Julian Seward [Wed, 4 Jun 2014 13:09:44 +0000 (13:09 +0000)] 
Support ADC/ADCS/SBC/SBCS.  Fixes #335496.  (dimitry@google.com)

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

11 years agoSupport the "ishst" variant of "dmb". Fixes #335263. (dimitry@google.com)
Julian Seward [Wed, 4 Jun 2014 11:44:45 +0000 (11:44 +0000)] 
Support the "ishst" variant of "dmb".  Fixes #335263.  (dimitry@google.com)

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

11 years agoSupport movi_{16b,8b}_#imm8. Fixes #335262. (dimitry@google.com)
Julian Seward [Wed, 4 Jun 2014 11:36:54 +0000 (11:36 +0000)] 
Support movi_{16b,8b}_#imm8.  Fixes #335262.  (dimitry@google.com)

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

11 years agomips64: Support for Cavium MIPS Octeon Atomic and Count Instructions.
Dejan Jevtic [Wed, 4 Jun 2014 11:28:07 +0000 (11:28 +0000)] 
mips64: Support for Cavium MIPS Octeon Atomic and Count Instructions.

Implement Cavium MIPS specific instructions:
baddu, pop, dpop, saa, saad, laa, laad, lai, laid, lad, ladd, law, lawd,
las, lasd, lac, lacd

Fixes BZ #327223.

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

11 years agoImplement PCMPxSTRx cases 0x0E, 0x34, 0x14, and reformat some of the
Julian Seward [Wed, 21 May 2014 14:42:04 +0000 (14:42 +0000)] 
Implement PCMPxSTRx cases 0x0E, 0x34, 0x14, and reformat some of the
associated switch statements.  Fixes #326469, #327639, #328878
respectively.

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

11 years agoImplement SHL_d_d_#imm.
Julian Seward [Fri, 16 May 2014 11:20:07 +0000 (11:20 +0000)] 
Implement SHL_d_d_#imm.

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

11 years agoInitial front-end fixings needed to handle code generated by gcc-4.9
Julian Seward [Thu, 15 May 2014 16:49:21 +0000 (16:49 +0000)] 
Initial front-end fixings needed to handle code generated by gcc-4.9
on arm64-linux.

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

11 years agoImplement VFPv4 VFMA and VFMS (F32 and F64 versions). Fixes #331057.
Julian Seward [Wed, 14 May 2014 23:38:23 +0000 (23:38 +0000)] 
Implement VFPv4 VFMA and VFMS (F32 and F64 versions).  Fixes #331057.
Patch from Janne Hellsten (jjhellst@gmail.com) with algebraic
rearrangement for the VFMS cases so as to make result signs match with
the hardware when some of the inputs are infinities.

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

11 years agoThumb encoding: fix assertion failure caused by
Julian Seward [Tue, 13 May 2014 15:54:14 +0000 (15:54 +0000)] 
Thumb encoding: fix assertion failure caused by
"ldr.w pc, [reg, #imm]".  Fixes #333428.  (dimitry@google.com)

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

11 years agoThumb encoding: correctly deal with misaligned loads of the form
Julian Seward [Tue, 13 May 2014 14:44:21 +0000 (14:44 +0000)] 
Thumb encoding: correctly deal with misaligned loads of the form
   LD Rt, [Rn +/- #imm12]  when Rn == PC
Fixes #333145.  (dimitry@google.com)

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

11 years agoRecognize MPX instructions and bnd prefix. Bug #333666.
Mark Wielaard [Fri, 9 May 2014 11:41:06 +0000 (11:41 +0000)] 
Recognize MPX instructions and bnd prefix. Bug #333666.

Recognize and parse operands of new MPX instructions BNDMK, BNDCL,
BNDCU, BNDCN, BNDMOV, BNDLDX and BNDSTX. Also recognize bnd (F2) prefix
for CALL (E8,FF/2), RET (C2,C3), JMP (EB,E9,FF/4) and Jcc (70-7F,0F 80-8F).
All new MPX instructions are currently NOPs and the bnd prefix is ignored.

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

11 years agoHandle "blr lr" correctly -- read the destination register
Julian Seward [Wed, 7 May 2014 11:09:28 +0000 (11:09 +0000)] 
Handle "blr lr" correctly -- read the destination register
_before_ writing the return address in LR.

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

11 years agoEnable 'smulh'.
Julian Seward [Wed, 7 May 2014 09:41:40 +0000 (09:41 +0000)] 
Enable 'smulh'.

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

11 years agoHandle IRStmt::STle of type F32.
Julian Seward [Wed, 7 May 2014 09:20:59 +0000 (09:20 +0000)] 
Handle IRStmt::STle of type F32.

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

11 years agoAllow early-writeback for the cases
Julian Seward [Wed, 7 May 2014 09:20:11 +0000 (09:20 +0000)] 
Allow early-writeback for the cases
   stp d, d, [sp,#-imm]!
   stp s, s, [sp,#-imm]!
as well as for the existing case
   stp q, q, [sp,#-imm]!

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

11 years agoFix assertion failures resulting from change of arity of
Julian Seward [Mon, 5 May 2014 10:03:56 +0000 (10:03 +0000)] 
Fix assertion failures resulting from change of arity of
Iop_{Add,Sub,Mul}32Fx4 introduced in r2809, in which said IROps
acquired a rounding-mode argument.

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

11 years agoRenaming only (no functional change): rename IR artefacts to do
Julian Seward [Sun, 4 May 2014 10:52:11 +0000 (10:52 +0000)] 
Renaming only (no functional change): rename IR artefacts to do
with i-cache invalidation to be more consistent with new d-cache
invalidation functionality:
  Ijk_TInval          -> Ijk_InvalICache
  TISTART             -> CMSTART (CM == "Cache Management")
  TILEN               -> CMLEN
  VEX_TRC_JMP_TINVAL  -> VEX_TRC_JMP_INVALICACHE

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

11 years agoARM64: add support for cache management instructions (VEX side):
Julian Seward [Sat, 3 May 2014 21:20:56 +0000 (21:20 +0000)] 
ARM64: add support for cache management instructions (VEX side):
  dc cvau, regX
  ic ivau, regX
  mrs regX, ctr_el0
Fixes #333228 and #333230.

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

11 years agox87 instructions FSIN, FCOS, FSINCOS and FPTAN: handle out-of-range
Julian Seward [Wed, 30 Apr 2014 22:50:34 +0000 (22:50 +0000)] 
x87 instructions FSIN, FCOS, FSINCOS and FPTAN: handle out-of-range
arguments correctly.  Mozilla bug 995564.

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

11 years agoFinish off vector integer comparison instructions, and
Julian Seward [Sun, 27 Apr 2014 12:02:12 +0000 (12:02 +0000)] 
Finish off vector integer comparison instructions, and
vector shift-by-immediates (Shr/Shl/Sar) instructions.

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

11 years agoHandle Iop_Max32U, so as to make origin tracking in Memcheck work.
Julian Seward [Tue, 8 Apr 2014 15:24:15 +0000 (15:24 +0000)] 
Handle Iop_Max32U, so as to make origin tracking in Memcheck work.

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

11 years ago{FMOV,MOVI} (vector, immediate): fix incorrect DIP format string
Julian Seward [Tue, 8 Apr 2014 15:23:42 +0000 (15:23 +0000)] 
{FMOV,MOVI} (vector, immediate): fix incorrect DIP format string

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

11 years agoImplement
Julian Seward [Thu, 3 Apr 2014 23:03:32 +0000 (23:03 +0000)] 
Implement
LD2/ST2 (multiple structures, post index) (some cases)
LD1/ST1 (multiple structures, no offset)  (some cases)

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

11 years agoImplement TBL and TBX instructions.
Julian Seward [Thu, 3 Apr 2014 13:48:54 +0000 (13:48 +0000)] 
Implement TBL and TBX instructions.

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

11 years agoAdd a couple more constant folding rules for vectors.
Julian Seward [Thu, 3 Apr 2014 13:48:21 +0000 (13:48 +0000)] 
Add a couple more constant folding rules for vectors.

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

11 years agoBug 332658 - ldrd.w r1, r2, [PC, #imm] does not adjust for 32bit alignment
Julian Seward [Tue, 1 Apr 2014 11:00:36 +0000 (11:00 +0000)] 
Bug 332658 - ldrd.w r1, r2, [PC, #imm] does not adjust for 32bit alignment
(dimitry@google.com)

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

11 years agoImplement FCM{EQ,GE,GT}, FAC{GE,GT} (vector).
Julian Seward [Thu, 27 Mar 2014 18:59:00 +0000 (18:59 +0000)] 
Implement FCM{EQ,GE,GT}, FAC{GE,GT} (vector).

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

11 years agomips32: Avoid compiler warnings.
Dejan Jevtic [Wed, 19 Mar 2014 11:10:51 +0000 (11:10 +0000)] 
mips32: Avoid compiler warnings.

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

11 years agoUn-break the arm32 compilation pipeline following the change of
Julian Seward [Sat, 15 Mar 2014 11:41:39 +0000 (11:41 +0000)] 
Un-break the arm32 compilation pipeline following the change of
arity of Iop_Mul32Fx4, Iop_Sub32Fx4, Iop_Add32Fx4 in r2809.

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

11 years agoLDRD/STRD reg+/-#imm8: allow PC as the base register in the
Julian Seward [Sat, 15 Mar 2014 08:33:06 +0000 (08:33 +0000)] 
LDRD/STRD reg+/-#imm8: allow PC as the base register in the
case "ldrd Rt, Rt2, [PC, #+/-imm8]".  n-i-bz.

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

11 years agoCorrectly handle add(hi) when the destination register is the PC.
Julian Seward [Sat, 15 Mar 2014 08:14:06 +0000 (08:14 +0000)] 
Correctly handle add(hi) when the destination register is the PC.
Fixes #332037.

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

11 years agoBack-end handling of Iop_CmpNEZ32x4, Iop_CmpNEZ16x8, Iop_CmpNEZ8x16,
Julian Seward [Mon, 10 Mar 2014 10:40:48 +0000 (10:40 +0000)] 
Back-end handling of Iop_CmpNEZ32x4, Iop_CmpNEZ16x8, Iop_CmpNEZ8x16,
needed for Memchecking of SIMD arm64 code.

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

11 years agoImplement a couple of backend artefacts needed by Memcheck on large
Julian Seward [Sun, 9 Mar 2014 09:41:56 +0000 (09:41 +0000)] 
Implement a couple of backend artefacts needed by Memcheck on large
applications:
  Iop_CmpNEZ64x2 expressions
  Ijk_NoRedir block terminators

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

11 years agoDo early writeback of the base register for the following instruction
Julian Seward [Sun, 9 Mar 2014 09:40:23 +0000 (09:40 +0000)] 
Do early writeback of the base register for the following instruction
forms, to stop Memcheck complaining about writes below the stack
pointer:
  str x3, [sp,#-16]!
  stp q0, q1, [sp,#-512]!

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

11 years ago* iselIntExpr_AMode_wrk: generate correct code for the case
Julian Seward [Sat, 8 Mar 2014 13:08:17 +0000 (13:08 +0000)] 
* iselIntExpr_AMode_wrk: generate correct code for the case
  "Sub64(expr,simm9)."

* handle 1Uto64(arbitrary-expression)

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