On 3/7/21 12:26 PM, Mark Cave-Ayland wrote:
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_NO_DALIGN 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.
How about a positive, rather than negative name, like
M68K_FEATURE_UNALIGNED_DATA?
This points out that we should be raising Address Error without this feature.
This requires a moderate amount of cleanup in translate, manipulating
MO_ALIGN{,_2} as part of the MemOp parameter to tcg_gen_qemu_{ld,st}_i32.
r~