unicorn/qemu/target/m68k
Mark Cave-Ayland 9777741703 target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature
According to the M68040UM Appendix D the requirement for data accesses to be
word aligned is only for the 68000, 68008 and 68010 CPUs. Later CPUs from the
68020 onwards will allow unaligned data accesses but at the cost of being less
efficient.

Add a new M68K_FEATURE_UNALIGNED_DATA feature to specify that data accesses are
not required to be word aligned, and don't perform the alignment on the stack
pointer when taking an exception if this feature is not selected.

This is required because the MacOS DAFB driver attempts to call an A-trap
with a byte-aligned stack pointer during initialisation and without this the
stack pointer is off by one when the A-trap returns.

Backports a9431a03f70c8c711a870d4c1a0439bdbb4703cf
2021-03-12 14:55:43 -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: add M68K_FEATURE_UNALIGNED_DATA feature 2021-03-12 14:55:43 -05:00
cpu.h target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature 2021-03-12 14:55:43 -05:00
fpu_helper.c target/m68k: implement opcode fetoxm1 2020-06-14 21:13:29 -04:00
helper.c m68k: add MSP detection support for stack pointer swap helpers 2021-03-12 14:53:48 -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 target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature 2021-03-12 14:55:43 -05: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 m68k: MOVEC insn. should generate exception if wrong CR is accessed 2021-03-12 14:50:16 -05: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