41 Commits

Author SHA1 Message Date
Florian Krohm
bd3b47c9e3 Fix V-bit tester failures introduced by VEX r2815.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13807
2014-02-14 09:08:39 +00:00
Florian Krohm
5b0ce0cc5e Fix V-bit tester failures introduced by VEX r2812.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13790
2014-02-06 18:53:30 +00:00
Dejan Jevtic
8eec882079 mips32: Change the tests values so that the result is
the same on all mips32 platforms. Add extra cases in 
vbit-test for mips32.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13687
2013-10-23 14:07:15 +00:00
Carl Love
30565b278a This commit adds testing support for the following instructions:
vaddcuq, vadduqm, vaddecuq, vaddeuqm,
  vsubcuq, vsubuqm, vsubecuq, vsubeuqm,
  vbpermq and vgbbd.

The completes adding the Power ISA 2.07 support.

Bugzilla 325816

VEX commit id 2790


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13653
2013-10-18 01:20:11 +00:00
Carl Love
d143dd1f43 Power 8 support, phase 5
This commit adds the testcases for the following instructions:

  vpmsumb, vpmsumh, vpmsumw, vpmsumd, vpermxor, vcipher, vcipherlast,
  vncipher, vncipherlast, vsbox,
  vclzb, vclzw, vclzh, vclzd,
  vpopcntb, vpopcnth, vpopcntw, vpopcntd,
  vnand, vorc, veqv,
  vshasigmaw, vshasigmad,
  bcdadd, bcdsub

The VEX commit that added the support for the above instructions was 
commit 2789.

The patch is for Bugzilla 325628


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13646
2013-10-15 18:13:21 +00:00
Dejan Jevtic
f0b787e8bf mips32: Don't test Iops that aren't supported in VEX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13629
2013-10-09 08:33:18 +00:00
Dejan Jevtic
961e487650 mips64: add extra Iop cases in VEX and fix compiler
warning.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13624
2013-10-07 10:27:31 +00:00
Carl Love
d568595cd1 Add tests for the phase 3 ISA 2.07 code patch
This patch adds testcases to an existing testcase
source file to test the new instructions which were
added to VEX support in the phase 3 ISA 2.07 code patch.
The patch also makes a small change to memcheck's
vbit tester code to allow successful execution.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>        

Bugzilla 324894.   Corresponding VEX commit 2779

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13594
2013-10-01 15:50:09 +00:00
Dejan Jevtic
72825d3c36 mips32/64: add extra test cases in vbit-test for mips32/64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13569
2013-09-19 13:36:12 +00:00
Dejan Jevtic
72bf3648cb mips64: add extra test cases in vbit-test for mips64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13540
2013-09-11 15:35:33 +00:00
Dejan Jevtic
6fa3517d39 mips64: Add some test cases for mips64 in vbit-test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13517
2013-08-28 10:03:45 +00:00
Carl Love
95d8477491 Initial ISA 2.07 support for POWER8-tuned libc
The IBM Power ISA 2.07 has been published on power.org, and IBM's new POWER8
processor is under development to implement that ISA. This patch provides
initial runtime and testsuite support for running Valgrind on POWER8 systems
running a soon-to-be released Linux distribution. This Linux distro will
include a POWER8-tuned libc that uses a subset of the new instructions from
ISA 2.07.  Since virtually all applications link with libc, it would be
impossible to run an application under Valgrind on this distro without adding
support for these new instructions to Valgrind, so that's the intent of this
patch. Note that applications built on this distro will *not* employ new POWER8
instructions by default. There are roughly 150 new instructions in the Power
ISA 2.07, including hardware transaction management (HTM). Support for these
new instructions (modulo the subset included in this bug) will be added to
Valgrind in a phased approach, similar to what we did for Power ISA 2.06.

Bugzilla 322294, VEX commit 2740

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13494
2013-08-12 18:04:22 +00:00
Florian Krohm
849b105814 valgrind side changes to support the new IRops introduced
in VEX r2727 (conversion ops between binary floating point and
decimal floating point).
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13428
2013-06-17 19:04:24 +00:00
Florian Krohm
1260ec88fa valgrind side support for
Iop_F64toD64, Iop_D64toF64
Iop_F64toD128, Iop_D128toF64,
Iop_F128toD128, Iop_D128toF128

Companion patch of VEX r2717.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13382
2013-05-05 15:05:42 +00:00
Mark Wielaard
cc1ee7885f Add new MISC vector Iops to memcheck/tests/vbit-test/irops.c.
memcheck/tests/vbit-test fails with unknown opcode after introduction
of new Iops for AVX2, BMI, FMA support #317506

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13347
2013-03-28 21:24:57 +00:00
Florian Krohm
1f53bd2199 s390: Testcases and vbit-tester changes for the following
DFP insns:
- extract basied exponent
- insert biased exponent
- quantize
- reround to significance
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13286
2013-02-14 14:28:22 +00:00
Florian Krohm
6965adf43e s390: Add testcase for these DFP insns: CDGTRA, CXGTR, CGXTR, and CGDTR (VEX r2680).
Update vbit tester. Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13285
2013-02-08 23:34:31 +00:00
Carl Love
fa4ebebbd7 Fix implementation of the DFP integer operands.
The implementation of integer operands doesn't really match the documentation
for the Iop. Take for example Iop_ExtractExpD64. It is documented as
D64 -> I64 but the implementation of the UNARY is defined as
UNARY(Ity_D64, Ity_D64). The result is an integer that is stored in an integer
format in a floating point register. On the IBM s390 however, the architecture
stores the integer value in a general purpose register (GPR) not a floating
point register. This issue exists with the implementation of 11 Iops where the
PPC implementation has either a source or destination whose value is an integer
but the value is stored in a floating point register in an integer format. After
reviewing the PPC implementation with the s390 developer, it was agreed the
cleanest way to fix this is to change the PPC implementation. The BINOP will be
changed to be consistent with the Iop description. This means the PPC
instruction implementation of the PPC instruction in guest_ppc_toIR.c will need
to reinterpret integer source operands as integers which will move the value
from a floating point register to an integer register before calling binop().
The underlying PPC implementation of the unop() for the specific Iop will also
need to change to move the value from the integer register back to the floating
point register so the native instruction can be issued with the integer value
in a floating point register. It was decided that making the changed in PPC,
rather then having the s390 reinterpret integers as DFP and then move the value
back to an integer register, was preferable as it makes the implementation of
the unop(), binops(), triop() consistent with the definition of the Iop.

This patch also includes the needed changes for the vbit tester.  The Iop
definitions in memcheck/tests/vbit-test/util.c had to be updated to be consitent
with the changes in the Iops as documented below.  Also, the function mkLazy3()
in memcheck/mc_translate.c had to be updated to handle the I32 x I8 x I64 -> I64
and I32 x I8 x I128 -> I128 cases.

The specific list of changes are as follows:

Iop name in pub/libvex_ir.h
   documented type
     type of UNARY/BINARY/TERNARY in priv/ir_defs.c
-------------------------------------------------------

Iop_ExtractExpD64
   D64 -> I64
      UNARY(Ity_D64, Ity_D64); (current)
      UNARY(Ity_D64, Ity_I64); (fix)
 

Iop_ExtractExpD128
   D128 -> I64
       UNARY(Ity_D128, Ity_D64); (current)
       UNARY(Ity_D128, Ity_I64); (fix)

Iop_InsertExpD64
   I64 x I64 -> D64
   I64 x D64 -> D64 (fix definition)
       BINARY(Ity_D64,Ity_D64, Ity_D64); (current)
       BINARY(Ity_I64,Ity_D64, Ity_D64); (fix)

Iop_InsertExpD128
    I64 x I128 -> D128
    I64 x D128 -> D128 (fix definition)
        BINARY(Ity_D64,Ity_D128, Ity_D128); (current)
        BINARY(Ity_I64,Ity_D128, Ity_D128); (fix)

Iop_I64StoD128
    I64S -> D128
        UNARY(Ity_D64, Ity_D128); (current)
        UNARY(Ity_I64, Ity_D128); (fix)

Iop_D64toI64S
    IRRoundingModeDFP(I32) x D64 -> I64
        BINARY(ity_RMode, Ity_D64, Ity_D64) (current)
        BINARY(ity_RMode, Ity_D64, Ity_I64) (fix)

Iop_D128toI64S
    IRRoundingModeDFP(I32) x D128 -> I64
        BINARY(ity_RMode, Ity_D128, Ity_D64); (current)
        BINARY(ity_RMode, Ity_D128, Ity_I64); (fix)

Iop_I64StoD64
    IRRoundingModeDFP(I32) x I64 -> D64
        BINARY(ity_RMode, Ity_D64, Ity_D64); (current)
        BINARY(ity_RMode, Ity_I64, Ity_D64); (fix)

Iop_SignificanceRoundD64
    IRRoundingModeDFP(I32) x I8 x D64 -> D64
        TERNARY(ity_RMode,Ity_D64,Ity_D64, Ity_D64); (current)
        TERNARY(ity_RMode,Ity_I8,Ity_D64, Ity_D64); (fix)

Iop_SignificanceRoundD128
    IRRoundingModeDFP(I32) x I8 x D128 -> D128
         TERNARY(ity_RMode,Ity_D128,Ity_D128, Ity_D128); (current)
         TERNARY(ity_RMode,Ity_I8,Ity_D128, Ity_D128); (fix)

The patch is for bugzilla 311100
VEX Committed revision 2652

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13260
2013-01-22 20:26:34 +00:00
Florian Krohm
436730a4f6 Fix a comment. Spotted by Maran.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13242
2013-01-19 02:50:41 +00:00
Florian Krohm
1d18d1618e Minor code cleanup. These cases cannot occur.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13230
2013-01-15 03:09:16 +00:00
Florian Krohm
ee6b67bd79 Add memcheck support for the IROps added in VEX r2631.
Adapt vbit-tester.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13224
2013-01-12 22:04:00 +00:00
Florian Krohm
8f42be9d61 valgrind-side support for Iop_ExtractSigD64 and Iop_ExtractSigD128.
See also companion patch VEX r2621.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13211
2012-12-27 20:06:18 +00:00
Florian Krohm
60d31488c0 vbit-tester: In test_ternary_op return number of tests executed.
I don't recall gcc complaining about this. But clang did.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13205
2012-12-27 03:00:49 +00:00
Florian Krohm
3df5c8e140 valgrind side changes to support Iop_CmpExpD64 and Iop_CmpExpD128.
VEX buddy patch is r2617.
Enhance testcase for CEDTR and CEXTR. Adapt vbit tester.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
This is part of fixing BZ 307113.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13203
2012-12-26 17:48:46 +00:00
Florian Krohm
46ee8bb20a Companion patch to VEX r2605. Adds a few testcases and adapts the vbit
tester. This is part of fixing BZ #307113. 
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13195
2012-12-21 18:34:48 +00:00
Florian Krohm
3f257e267c Fix vbit tester for Iop_D32toD64 and Iop_D64toD32.
Spotted and fixed by Maran (maranp@linux.vnet.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13188
2012-12-19 04:21:09 +00:00
Julian Seward
4cbf48c509 Valgrind-side changes for new primop Iop_GetMSBs8x16, introduced in
vex r2590.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13179
2012-12-13 18:31:49 +00:00
Carl Love
59fc40a7f3 vbit-tester, add counts for the number of 1, 2, 3 and 4 operand tests.
This patch adds code to count the number of each type of test.  The
number of 1, 2, 3 and 4 operand tests that are generated by the vbit-tester
are counted and printed by the vbit-tester.  The user should refer to the
Valgrind output to see if any of the tests failed.

The existing two verbose levels was increased by one level and the the
new output giving the number of tests was inserted as the first verbose
level.  The verbose levels are now:

-v        shows the number of 1, 2, 3 and 4 operand tests that are generated
-v -v     shows IROps being tested
-v -v -v  extreme edition, shows input values

This patch is for bugzilla 309229

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13124
2012-11-16 19:41:21 +00:00
Carl Love
adfd3e03b1 Valgrind, V-bit tester: Add support for Iop_CmpORD class iops
The Iop_CmpORD class of iops  support the POWER specific comparison
instructions.  The instructions take two 32-bit or 64-bit operands
and produce a result of the same size.  However, only the lower bits
of the result are set by the instruction.  The bits are set by the instruction
to indicate if the comparison is "less then", "greater then", or "equal".

This patch adds support to the V-bit tester to verify the propagation
of the undefined bits in the inputs to the output for the Iop_CmpORd iops.
The output bits are always set to undefined if any of the input bits are not
defined.

This patch is for bugzilla 310169 

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13123
2012-11-16 18:58:08 +00:00
Julian Seward
1ef2516cd3 Improve accuracy of definedness tracking through the x86 PMOVMSKB and
BSF instructions, as the lack of it causes false positives (Valgrind
side).  Fixes #308627.  (Patrick J. LoPresti <lopresti@gmail.com>)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13108
2012-11-08 10:58:16 +00:00
Florian Krohm
a74d1dcf0e Fix memory leak.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13075
2012-10-21 19:58:04 +00:00
Florian Krohm
a46b1219e1 Add missing header files. Building from tarball works again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12990
2012-09-17 18:54:44 +00:00
Florian Krohm
f9979eceb1 Adjust the vbit tester to deal with shift operations that require
an immediate constant as the shift amount. This is needed for
powerpc Iop_ShlD64 etc. What it basically means that we do not
iterate over the bits in the 2nd operand because there are no
V-bits to set. An immediate constant is always completely defined.
Fixes bugzilla #305948.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12969
2012-09-13 19:41:12 +00:00
Julian Seward
f0ef4bf583 Enable testing of primops on ARM platforms. (Florian Krohm)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12957
2012-09-03 21:59:28 +00:00
Florian Krohm
1229190124 s390: Valgrind-side changes to fixing bugzilla #274695:
Testcase, vbit tester update, memcheck support for the new IROps,
NEWS announcement and opcode list update.
Patch by Christian Borntraeger (borntraeger@de.ibm.com).
Vbit tester tweaks by myself.
Fixes bugzilla #274695.
See also companion patch VEX r2496.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12921
2012-09-01 00:15:45 +00:00
Florian Krohm
20c2f83060 Fix build on Darwin. Patch by Rich Coe (rcoe@wi.rr.com).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12917
2012-08-30 15:12:59 +00:00
Florian Krohm
ecfd85ebe2 Enable V-bit testing on x86.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12916
2012-08-29 22:40:50 +00:00
Florian Krohm
89b8922886 Enable V-bit testing on ppc32.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12914
2012-08-29 17:45:13 +00:00
Florian Krohm
113df09b13 Fix printf formats for uint64_t values.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12913
2012-08-29 15:21:15 +00:00
Florian Krohm
a4d1060ccf vbit tester: Disable Iop_CmpLT64S and Iop_CmpLE64S for ppc because
they cause assertion failures.
Do not test Iop_CmpORDxyz on ppc because the vbit tester does not 
support them. This is just so we don't have to add another .exp file for ppc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12910
2012-08-28 23:38:49 +00:00
Florian Krohm
0d0e6346db Add a tester for V-bit propagation through IROps.
The tester is located in memcheck/tests/vbit-test.
It needs the following support on the valgrind / VEX side:
(1) a new client request VG_USERREQ__VEX_INIT_FOR_IRI
(2) a new "special instruction" on all architectures inserted via
    VALGRIND_VEX_INJECT_IR
(3) VEX changes to detect the special insn and insert IR (ir_inject.c)

The README file in vbit-test has some more information.
See also VEX r2490.  Fixes bugzilla #300102.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12906
2012-08-28 16:50:39 +00:00