unicorn/qemu/target/m68k
Joseph Myers b08d204a37 softfloat: merge floatx80_mod and floatx80_rem
The m68k-specific softfloat code includes a function floatx80_mod that
is extremely similar to floatx80_rem, but computing the remainder
based on truncating the quotient toward zero rather than rounding it
to nearest integer. This is also useful for emulating the x87 fprem
and fprem1 instructions. Change the floatx80_rem implementation into
floatx80_modrem that can perform either operation, with both
floatx80_rem and floatx80_mod as thin wrappers available for all
targets.

There does not appear to be any use for the _mod operation for other
floating-point formats in QEMU (the only other architectures using
_rem at all are linux-user/arm/nwfpe, for FPA emulation, and openrisc,
for instructions that have been removed in the latest version of the
architecture), so no change is made to the code for other formats.

Backports commit 6b8b0136ab3018e4b552b485f808bf66bcf19ead from qemu
2021-02-25 13:34:05 -05:00
..
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 19:35:46 -04:00
cpu-qom.h m68k comments break patch submission due to being incorrectly formatted 2019-08-08 14:26:45 -04:00
cpu.c target/m68k: only change valid bits in CACR 2020-01-14 08:17:14 -05:00
cpu.h target/m68k: only change valid bits in CACR 2020-01-14 08:17:14 -05:00
fpu_helper.c target/m68k: implement opcode fetoxm1 2020-06-14 21:13:29 -04:00
helper.c target/m68k: only change valid bits in CACR 2020-01-14 08:17:14 -05:00
helper.h target/m68k: implement opcode fetoxm1 2020-06-14 21:13:29 -04:00
Makefile.objs target/m68k: add fmod/frem 2018-03-09 01:28:58 -05:00
op_helper.c m68k comments break patch submission due to being incorrectly formatted 2019-08-08 14:26:45 -04:00
qregs.def target-m68k: use floatx80 internally 2018-03-03 19:35:17 -05:00
softfloat.c softfloat: merge floatx80_mod and floatx80_rem 2021-02-25 13:34:05 -05:00
softfloat.h softfloat: merge floatx80_mod and floatx80_rem 2021-02-25 13:34:05 -05:00
softfloat_fpsp_tables.h m68k comments break patch submission due to being incorrectly formatted 2019-08-08 14:26:45 -04:00
translate.c target/m68k: implement opcode fetoxm1 2020-06-14 21:13:29 -04:00
unicorn.c Use DEFINE_MACHINE() to register all machines 2018-03-11 15:12:46 -04:00
unicorn.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00