qemu-e2k/tests/tcg
Joseph Myers 418b0f93d1 target/i386: fix IEEE SSE floating-point exception raising
The SSE instruction implementations all fail to raise the expected
IEEE floating-point exceptions because they do nothing to convert the
exception state from the softfloat machinery into the exception flags
in MXCSR.

Fix this by adding such conversions.  Unlike for x87, emulated SSE
floating-point operations might be optimized using hardware floating
point on the host, and so a different approach is taken that is
compatible with such optimizations.  The required invariant is that
all exceptions set in env->sse_status (other than "denormal operand",
for which the SSE semantics are different from those in the softfloat
code) are ones that are set in the MXCSR; the emulated MXCSR is
updated lazily when code reads MXCSR, while when code sets MXCSR, the
exceptions in env->sse_status are set accordingly.

A few instructions do not raise all the exceptions that would be
raised by the softfloat code, and those instructions are made to save
and restore the softfloat exception state accordingly.

Nothing is done about "denormal operand"; setting that (only for the
case when input denormals are *not* flushed to zero, the opposite of
the logic in the softfloat code for such an exception) will require
custom code for relevant instructions, or else architecture-specific
conditionals in the softfloat code for when to set such an exception
together with custom code for various SSE conversion and rounding
instructions that do not set that exception.

Nothing is done about trapping exceptions (for which there is minimal
and largely broken support in QEMU's emulation in the x87 case and no
support at all in the SSE case).

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Message-Id: <alpine.DEB.2.21.2006252358000.3832@digraph.polyomino.org.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-07-10 18:02:17 -04:00
..
aarch64 tests/tcg: ensure -cpu max also used for plugin run 2020-06-16 14:49:05 +01:00
alpha
arm tests/tcg: build plugin list from contents of src directory 2020-06-16 14:49:05 +01:00
cris tests/tcg: add a multiarch linux-user gdb test 2020-05-06 09:29:26 +01:00
hppa
i386 target/i386: fix IEEE SSE floating-point exception raising 2020-07-10 18:02:17 -04:00
lm32
m68k
minilib
mips
multiarch tests/tcg: add new threadcount test 2020-05-27 14:26:49 +01:00
openrisc
ppc
s390x tests/tcg: target/s390x: Test MVC 2019-09-23 09:28:29 +02:00
sh4
sparc64
x86_64 tests/tcg: remove extraneous pasting macros 2020-04-07 16:19:49 +01:00
xtensa
.gitignore
configure.sh tests/docker: use a gcc-10 based image for arm64 tests 2020-05-27 14:26:49 +01:00
Makefile.prereqs tests/tcg: ensure we re-configure if configure.sh is updated 2019-12-19 08:20:16 +00:00
Makefile.qemu
Makefile.target plugins: new lockstep plugin for debugging TCG changes 2020-06-16 14:49:05 +01:00
README

This directory contains various interesting guest programs for
regression testing. Tests are either multi-arch, meaning they can be
built for all guest architectures that support linux-user executable,
or they are architecture specific.

CRIS
====
The testsuite for CRIS is in tests/tcg/cris.  You can run it
with "make test-cris".

LM32
====
The testsuite for LM32 is in tests/tcg/lm32.  You can run it
with "make test-lm32".