target/i386: implement special cases for fxtract
commitc415f2c58296d86e9abb7e4a133111acf7031da3
authorJoseph Myers <joseph@codesourcery.com>
Thu, 7 May 2020 00:43:30 +0000 (7 00:43 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Jun 2020 16:10:16 +0000 (10 12:10 -0400)
tree9acea46806827e7ea693b48d7f55a1471c0e28bc
parent2b151297e44655e45c18f57ae0232780ee4ad45a
target/i386: implement special cases for fxtract

The implementation of the fxtract instruction treats all nonzero
operands as normal numbers, so yielding incorrect results for invalid
formats, infinities, NaNs and subnormal and pseudo-denormal operands.
Implement appropriate handling of all those cases.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <alpine.DEB.2.21.2005070042360.18350@digraph.polyomino.org.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/fpu_helper.c
tests/tcg/i386/test-i386-fxtract.c [new file with mode: 0644]