Improve accuracy of definedness tracking through the x86 PMOVMSKB and
BSF instructions, as the lack of it causes false positives (VEX side).
Fixes #308627.  Combined efforts of Patrick J. LoPresti
<lopresti@gmail.com> and me.



git-svn-id: svn://svn.valgrind.org/vex/trunk@2559 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Add support for binary DFP operations (64-bit).
Patch by Maran (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2560 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Fix type mixup. Spotted by GCC, analysed by Julian.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2561 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Add a special-case implementation of PCMPISTRI $0x3A, which generates
in-line IR instead of calling helpers.  This is so that Memcheck can
do exact definedness propagation through it.  This is important for
dealing with inlined PCMPISTRI-based strlen calls.

#309921, comment 6.  (Patrick J. LoPresti , lopresti@gmail.com)



git-svn-id: svn://svn.valgrind.org/vex/trunk@2562 8f6e269a-dfd6-0310-a8e1-e2731360e62c
VEX, ppc fix use of modified value in the Iop_32HLto64 implementation

The issue with the Iop_32HLto64, as explained by Julian:
One of the "rules of the game" of instruction selection is that the register
returned by any of the isel* functions may not be modified -- if it needs to
be modified, first copy the value off to a different register. The rule exists
because, in this case, e->Iex.Binop.arg2 might be an IRExpr_RdTmp, in which
case iselWordExpr_R simply returns the register which holds the value of the
relevant IR temporary. And so if r_Lo is modified then any subsequent uses of
that IR temporary will get the wrong value. In this case, r_Lo is
modified without first copying it.

This patch fixes the issue by assigning the result of the AND operation to
a temporary and then using the temporary result in the OR operation thus
avoiding using a modified value.

This patch is for bugzilla 309922.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2563 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Changes for -Wwrite-strings


git-svn-id: svn://svn.valgrind.org/vex/trunk@2564 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Correctly model LL/SC on MIPS.

As the issue with RMW on MIPS does not block execution anymore (see Valgrind
patch r13136), we can switch back to model it through LoadL and StoreC instead
of using incorrect Load and Store.

This will give back correct output to memcheck/tests/atomic_incs on MIPS.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2565 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Make some function parameters pointer to const.
Companion patch to valgrind r13138.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2566 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Formatting only change.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2567 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Fix typo.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2575 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Fix implementation of LAA for atomic update.
Patch by Divya Vyas (divyvyas@linux.vnet.ibm.com).
Part of fixing BZ #306035.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2576 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Refactor the code based on s390_irgen_LAA.
New functions: s390_irgen_load_and_add32/64 and 
s390_irgen_load_and_bitwise32/64.

Part of fixing BZ #306035.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2577 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Use "load on condition" insns, if availably, to implement
S390_INSN_COND_MOVE.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2578 8f6e269a-dfd6-0310-a8e1-e2731360e62c
In the past, the implementation of STFLE returned the facilities of the host
machine. This was not consistent in the following sense: Suppose the host
has a facility F installed and this facility implies the availability of an
insn X. Suppose further, that insn X is not supported in valgrind. 
An application progrm that tests the availability of insn X by checking
for its associated facility F will fail under valgrind when using X because
valgrind will SIGILL. Not so good.

This patch changes the STFLE behaviour to adjust the facilities of the
virtual machine according to what the set of insns that is actually
supported. It's an approximation, because for some facilities we only
support a subset of the insns enabled by that facility.

Fixes BZ 310931.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2579 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Recognise insns for zEC12 in the decoder.
There is no IR generation for these insns yet.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2580 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Re-enable XADD Gb,Eb.  Fixes #307106.  (Jakub Jelinek, jakub@redhat.com)


git-svn-id: svn://svn.valgrind.org/vex/trunk@2581 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Make diagnostics for SIGILL more controllable (VEX part).
Fixes #309425.  (Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/vex/trunk@2582 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Complete the decoder. All published opcodes are now handled.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2583 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Use VEX types.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2584 8f6e269a-dfd6-0310-a8e1-e2731360e62c
Move definition of facility bits to libvex_s390x_common.h so we
can use them in m_machine.c. Rename LSCOND facility to LSC.


git-svn-id: svn://svn.valgrind.org/vex/trunk@2585 8f6e269a-dfd6-0310-a8e1-e2731360e62c