OSDN Git Service

target/m68k: fix FPSR quotient byte for fmod instruction
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sat, 14 Jan 2023 23:29:58 +0000 (23:29 +0000)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 16 Jan 2023 08:47:31 +0000 (09:47 +0100)
commitad6dae3b3369433ab43a1b190bb3a8aacabb1bbf
treec8d1c2c400ba7d5d429109832519bc38a831acee
parent60b598df6e3e3d76dae6967e03d4418f6aac6064
target/m68k: fix FPSR quotient byte for fmod instruction

The FPSR quotient byte should be set to the value of the quotient and not the
result. Switch from using floatx80_mod() to floatx80_modrem() which returns
the quotient as a uint64_t which can be used for the quotient byte.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230114232959.118224-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
target/m68k/fpu_helper.c