]> git.proxmox.com Git - mirror_qemu.git/commit
s390x/tcg: Fix FP CONVERT TO (LOGICAL) FIXED NaN handling
authorDavid Hildenbrand <david@redhat.com>
Tue, 8 Jun 2021 09:23:12 +0000 (11:23 +0200)
committerCornelia Huck <cohuck@redhat.com>
Mon, 21 Jun 2021 06:48:20 +0000 (08:48 +0200)
commit0a3be7be73e594388ae2a91017b7ffafab15a7d9
treee26aaa57571872527864e5079871bd1e2c33dc0f
parent3fb3b122ac061859c20cdb14567313f137dbc152
s390x/tcg: Fix FP CONVERT TO (LOGICAL) FIXED NaN handling

In case we encounter a NaN, we have to return the smallest possible
number, corresponding to either 0 or the maximum negative number. This
seems to differ from IEEE handling as implemented in softfloat, whereby
we return the biggest possible number.

While at it, use float32_to_uint64() in the CLGEB handler.

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