Bug 502324 - s390x: Fix memcheck false positives with TMxx
The 16-bit "test under mask" instructions TMLL, TMLH, TMHL, and TMHH can
yield memcheck false positives when:
* some of the operand bits in the tested 16-bit chunk (but outside the
mask) are undefined
* the resulting condition code is used in a different block
In this case the condition code is computed by the helper
s390_call_calculate_cond, with the full 16-bit chunk and the given mask as
arguments. Since the 16-bit chunk is not fully defined, memcheck
complains.
To fix this, AND the operand with the given mask before storing it for use
as a helper argument. Also, optimize the frequent case of testing a
single bit. For this purpose, add S390_CC_OP_BITWISE2 as a new way of
computing the condition code.