qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] target/m68k: add M68K_FEATURE_NO_DALIGN feature


From: Mark Cave-Ayland
Subject: Re: [PATCH 2/2] target/m68k: add M68K_FEATURE_NO_DALIGN feature
Date: Mon, 8 Mar 2021 12:05:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

On 08/03/2021 01:03, Richard Henderson wrote:

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?

Sure - I'll update that, and send out a v2.

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.

That's probably true, although all the images I have here for testing are for 040 CPUs only. There is another set of m68k fixes I'd like to get in before freeze which also affect Linux, so those are next on my priority list.

I'll send out v2 tentatively with Laurent's R-B tags added, and then leave it to others to decide whether detecting alignment errors can be done as a follow-up later (certainly with the last patch there should be no regression).


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]