]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
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

11 years agoSupport extra instruction bits and pieces, enough to get Firefox started:
Julian Seward [Fri, 7 Mar 2014 22:52:19 +0000 (22:52 +0000)] 
Support extra instruction bits and pieces, enough to get Firefox started:
* more scalar int <-> FP conversions
* more vector integer narrowing
* a few more vector shift by imm cases
* FCVTAS (kludged)

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

11 years agomips32: Fix the problem with reading the guest_FCSR register from the wrong guest...
Dejan Jevtic [Mon, 3 Mar 2014 14:13:37 +0000 (14:13 +0000)] 
mips32: Fix the problem with reading the guest_FCSR register from the wrong guest state.

When Valgrind isn't executed in mode64, register fcsr need to read from the VexGuestMIPS32State.

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

11 years agoFix error in 64-bit and smaller load versions of
Julian Seward [Mon, 3 Mar 2014 08:42:16 +0000 (08:42 +0000)] 
Fix error in 64-bit and smaller load versions of
LDR/STR (immediate, SIMD&FP, unsigned offset)

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

11 years agoImplement REV16, REV32, FCVTN, SHL (vector, immediate), NEG (vector)
Julian Seward [Sun, 2 Mar 2014 12:47:18 +0000 (12:47 +0000)] 
Implement REV16, REV32, FCVTN, SHL (vector, immediate), NEG (vector)

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

11 years agoRemove redundant FMOV (vector, immediate) case.
Julian Seward [Sat, 1 Mar 2014 11:19:45 +0000 (11:19 +0000)] 
Remove redundant FMOV (vector, immediate) case.
Minor comment fixes.
Fix bugs in {U,S}{MIN,MAX}V, {U,S}{MIN,MAX}, {S,U}SSHL

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

11 years agoSelect and emit insns for
Julian Seward [Sat, 1 Mar 2014 11:16:57 +0000 (11:16 +0000)] 
Select and emit insns for
Iop_ZeroHI64ofV128 Iop_Max8Sx16 Iop_Min8Sx16

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

11 years agomips32: Fpu guest registers are ULong and the initial values need to be
Dejan Jevtic [Thu, 27 Feb 2014 14:17:19 +0000 (14:17 +0000)] 
mips32: Fpu guest registers are ULong and the initial values need to be
extended.

Because we are supporting both big and little endian mips32 we need to
make sure that the initial values for the fpu registers are the same for both
endian.

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

11 years agoImplement a few more integer instructions:
Julian Seward [Thu, 27 Feb 2014 11:10:19 +0000 (11:10 +0000)] 
Implement a few more integer instructions:
NOP
LDA{R,RH,RB}
STL{R,RH,RB}
RBIT

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

11 years agomips32: Fix the problem with the floating point compare instruction on mips32.
Dejan Jevtic [Tue, 25 Feb 2014 15:25:49 +0000 (15:25 +0000)] 
mips32: Fix the problem with the floating point compare instruction on mips32.

This patch is fixing the problem with emitting Iop_CmpF64.
Problem was introduced while running Valgrind for mips with v8 javascript engine.

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

11 years ago* add a kludgey fix for "mrs rT, dczid_el0"
Julian Seward [Fri, 21 Feb 2014 14:49:44 +0000 (14:49 +0000)] 
* add a kludgey fix for "mrs rT, dczid_el0"
* make ISB and DSB really generate memory barriers

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

11 years agoFirst pass at implementation of load/store exclusive and
Julian Seward [Thu, 20 Feb 2014 17:43:38 +0000 (17:43 +0000)] 
First pass at implementation of load/store exclusive and
load/store exclusive w/ read-acquire/store-release:
LD{,A}X{R,RH,RB}
ST{,L}X{R,RH,RB}

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

11 years agoImplement unchainXDirect_ARM64.
Julian Seward [Wed, 19 Feb 2014 17:42:59 +0000 (17:42 +0000)] 
Implement unchainXDirect_ARM64.

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

11 years agomips32: VEX Support for 64bit FPU on MIPS32 platforms.
Dejan Jevtic [Wed, 19 Feb 2014 11:56:29 +0000 (11:56 +0000)] 
mips32: VEX Support for 64bit FPU on MIPS32 platforms.

This patch is adding support for mips32 with 64bit FPU.
Assume that floating-point registers are 64 bits wide.

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

11 years agoImplement more aarch64 vector insns:
Julian Seward [Mon, 17 Feb 2014 11:00:53 +0000 (11:00 +0000)] 
Implement more aarch64 vector insns:
CM{EQ,HI,HS,GE,GT,TST,LE,LT} (vector)
{EOR,BSL,BIT,BIF} (vector)
{USHR,SSHR} (vector, immediate)
{U,S}SHLL{,2}
INS (general)
FABD Vd,Vn,Vm

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

11 years agomips64: add support for load indexed instructions from DSP ASE
Petar Jovanovic [Fri, 14 Feb 2014 17:28:15 +0000 (17:28 +0000)] 
mips64: add support for load indexed instructions from DSP ASE

Handling lwx, ldx and lbux for MIPS-Cavium processors.

Patch by Zahid Anwar, with some changes.

Related to Bugzilla issue 326444.

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

11 years agoFix comments and code snippets that were making incorrect claims about
Florian Krohm [Fri, 14 Feb 2014 08:55:32 +0000 (08:55 +0000)] 
Fix comments and code snippets that were making incorrect claims about
the alignment requirement of the guest state, shadow areas, and register
spill area sizes.
The size of these areas ought to be a multiple of 16 bytes.

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

11 years agos390: Fix s390_amode_for_guest_state. In general the offset relative
Florian Krohm [Tue, 11 Feb 2014 09:23:01 +0000 (09:23 +0000)] 
s390: Fix s390_amode_for_guest_state. In general the offset relative
to the guest state pointer may be more than the B12 addressing mode can
handle. Fall back and use a B20 addressing mode in those cases.

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

11 years agoFix the ppc32 special-instruction magic sequence so it really does
Julian Seward [Mon, 10 Feb 2014 12:27:29 +0000 (12:27 +0000)] 
Fix the ppc32 special-instruction magic sequence so it really does
preserve the value of r0, as claimed.  Fixes #278808 (VEX side).

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

11 years agoImplement more aarch64 vector insns:
Julian Seward [Mon, 10 Feb 2014 10:28:13 +0000 (10:28 +0000)] 
Implement more aarch64 vector insns:
{S,U}{MIN,MAX}  Vd.T, Vn.T, Vm.T (8bitx16lane variants)
{S,U}{MIN,MAX}V Vd.T, Vn.T, Vm.T (8bitx16lane variants)
FMOV (vector, immediate)
MOVI (vector, immediate)
FABS (vector)
FNEG (vector)
FMLA (vector)
FMLS (vector)
{AND,BIC,ORR,ORN} (vector)

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

11 years agoAdd support for syscall on x86
Tom Hughes [Sun, 9 Feb 2014 11:40:20 +0000 (11:40 +0000)] 
Add support for syscall on x86

Patch from Ivo Raisr via BZ#330939 also fixes BZ#308729

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

11 years agoImplement a few more vector aarch64 insns:
Julian Seward [Thu, 6 Feb 2014 12:57:58 +0000 (12:57 +0000)] 
Implement a few more vector aarch64 insns:
LD1 {vT.8h}, [xN|SP], #16
LD1 {vT.16b}, [xN|SP], #16
ST1 {vT.4h}, [xN|SP], #8
MUL  Vd.T, Vn.T, Vm.T
PMUL Vd.T, Vn.T, Vm.T  (fe only)
MLA  Vd.T, Vn.T, Vm.T
MLS  Vd.T, Vn.T, Vm.T
UMOV Xd/Wd, Vn.Ts[index]
SMOV Xd/Wd, Vn.Ts[index]

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

11 years agoImplement a few more vector aarch64 insns:
Julian Seward [Wed, 5 Feb 2014 11:01:19 +0000 (11:01 +0000)] 
Implement a few more vector aarch64 insns:
LD1 {vT.4s}, [xN|SP], #16
ADD Dd, Dn, Dm
SUB Dd, Dn, Dm
SMIN Vd.T, Vn.T, Vm.T
UMIN Vd.T, Vn.T, Vm.T
SMAX Vd.T, Vn.T, Vm.T
UMAX Vd.T, Vn.T, Vm.T
SMINV Vd.T, Vn.T, Vm.T
UMINV Vd.T, Vn.T, Vm.T
SMAXV Vd.T, Vn.T, Vm.T
UMAXV Vd.T, Vn.T, Vm.T
DUP Vd.T, Rn
FADD/FSUB/FMUL/FDIV32x4

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

11 years agomips64: Support for Cavium-specific load indexed instructions
Petar Jovanovic [Fri, 31 Jan 2014 12:14:20 +0000 (12:14 +0000)] 
mips64: Support for Cavium-specific load indexed instructions

Support for lhux, lwux, lbx for Cavium.

Patch by Zahid Anwar, with style changes.

Related to Bugzilla issue 326444.

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