xemu/target/m68k
Mark Cave-Ayland a9431a03f7 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.

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: <20210308121155.2476-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-03-11 21:12:32 +01:00
..
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 07:03:34 -07:00
cpu-qom.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
cpu.c target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature 2021-03-11 21:12:32 +01:00
cpu.h target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature 2021-03-11 21:12:32 +01:00
fpu_helper.c target/m68k: Add vmstate definition for M68kCPU 2020-12-12 18:12:39 +01:00
gdbstub.c gdbstub: extend GByteArray to read register helpers 2020-03-17 17:38:38 +00:00
helper.c target/m68k: Drop use of gdb_get_float64() and ldfq_p() 2021-02-15 09:38:40 +00:00
helper.h target/m68k: implement opcode fetoxm1 2020-06-02 13:59:02 +02:00
m68k-semi.c gdbstub: drop CPUEnv from gdb_exit() 2021-01-18 10:05:06 +00:00
meson.build meson: target 2020-08-21 06:30:35 -04:00
monitor.c hmp: Pass monitor to mon_get_cpu_env() 2020-11-13 12:45:51 +00:00
op_helper.c target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature 2021-03-11 21:12:32 +01:00
qregs.def target-m68k: use floatx80 internally 2017-06-21 22:10:29 +02:00
softfloat_fpsp_tables.h m68k comments break patch submission due to being incorrectly formatted 2019-06-26 17:14:39 +02:00
softfloat.c softfloat: merge floatx80_mod and floatx80_rem 2020-06-26 09:39:37 -04:00
softfloat.h softfloat: merge floatx80_mod and floatx80_rem 2020-06-26 09:39:37 -04:00
translate.c target/m68k: implement rtr instruction 2021-03-11 21:12:32 +01:00