On 9/17/22 13:25, Mark Cave-Ayland wrote:
Now that M68K_FEATURE_M68000 has been renamed to M68K_FEATURE_M68K it is easier
to see that the privilege exception check is wrong: it is currently only 
generated
for ColdFire CPUs when in fact it should also be generated for Motorola CPUs 
from
the 68010 onwards.

Introduce a new M68K_FEATURE_MOVEFROMSR_PRIV feature which is set for all non-
Motorola CPUs, and for all Motorola CPUs from the 68010 onwards and use it to
determine whether a privilege exception should be generated for the MOVE-from-SR
instruction.

Signed-off-by: Mark Cave-Ayland<mark.cave-ayl...@ilande.co.uk>
---
  target/m68k/cpu.c       | 5 +++++
  target/m68k/cpu.h       | 2 ++
  target/m68k/translate.c | 2 +-
  3 files changed, 8 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to