s390x/tcg: Fix TEST DATA CLASS instructions
commitfc7cc951b606c9ea9044cd4b96cbdf9720761c64
authorDavid Hildenbrand <david@redhat.com>
Mon, 18 Feb 2019 12:26:56 +0000 (18 13:26 +0100)
committerCornelia Huck <cohuck@redhat.com>
Mon, 4 Mar 2019 10:49:31 +0000 (4 11:49 +0100)
tree0efb61480e33726cf17dfe02ed9c5503dd726ca5
parent6d9303322ed9580ff6c61e38a427b549410464c7
s390x/tcg: Fix TEST DATA CLASS instructions

Let's detect normal and denormal ("subnormal") numbers reliably. Also
test for quiet NaN's. As only one class is possible, test common cases
first.

While at it, use a better check to test for the mask bits in the data
class mask. The data class mask has 12 bits, whereby bit 0 is the
leftmost bit and bit 11 the rightmost bit. In the PoP an easy to read
table with the numbers is provided for the VECTOR FP TEST DATA CLASS
IMMEDIATE instruction, the table for TEST DATA CLASS is more confusing
as it is based on 64 bit values.

Factor the checks out into separate functions, as they will also be
needed for floating point vector instructions. We can use a makro to
generate the functions.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190218122710.23639-2-david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/fpu_helper.c