On 7/9/21 9:04 AM, Jonathan Albrecht wrote:
Currently when a compare-and-trap instruction is executed, qemu will always raise a SIGILL signal. On real hardware, a SIGFPE is raised.Change the PGM_DATA case in cpu_loop to follow the behavior in linux kernel /arch/s390/kernel/traps.c. * Only raise SIGILL if DXC == 0 * If DXC matches a non-simulated IEEE exception, raise SIGFPE with correct si_code * Raise SIGFPE with si_code == 0 for everything else When applied [email protected], this fixes crashes in the java jdk such as the linked bug. Buglink:https://bugs.launchpad.net/qemu/+bug/1920913 Resolves:https://gitlab.com/qemu-project/qemu/-/issues/319 Signed-off-by: Jonathan Albrecht<[email protected]> --- linux-user/s390x/cpu_loop.c | 54 +++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 20 deletions(-)
Reviewed-by: Richard Henderson <[email protected]> r~
