]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: Handle EXCP_FPE properly for MIPS
authorAleksandar Markovic <amarkovic@wavecomp.com>
Fri, 28 Jun 2019 10:43:38 +0000 (12:43 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Tue, 2 Jul 2019 14:56:46 +0000 (16:56 +0200)
commit64ce541c0bde7f8bcf8b39a08c32e71ceab23268
tree49405c89d857aa927d57472336e2fa0bc51ad9c4
parent1272a6c4883db77e08a9cff1d2d3d1fa1f420865
linux-user: Handle EXCP_FPE properly for MIPS

Handle EXCP_FPE properly for MIPS in cpu loop.

Note that a vast majority of FP instructions are not affected by
the absence of the code in this patch, as they use alternative code
paths for handling floating point exceptions (see, for example,
invocations of update_fcr31()) - they rely on softfloat library for
keeping track on exceptions that needs to be raised. However, there
are few MIPS FP instructions (an example is CTC1) that use function
do_raise_exception() directly, and they need the case that is added
in this patch to propagate the FPE exception as designed.

The code is based on kernel's function force_fcr31_sig() in
arch/mips/kernel.traps.c.

Reported-by: Yunqiang Su <ysu@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1561718618-20218-6-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/mips/cpu_loop.c