mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
target/m68k: use M68K_FEATURE_MOVEFROMSR_PRIV feature for move_from_sr privilege check
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-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220925134804.139706-3-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
2dc7bf63cf
commit
b342e56b23
3 changed files with 8 additions and 1 deletions
|
@ -537,6 +537,8 @@ enum m68k_features {
|
|||
M68K_FEATURE_UNALIGNED_DATA,
|
||||
/* TRAPcc insn. (680[2346]0, and CPU32) */
|
||||
M68K_FEATURE_TRAPCC,
|
||||
/* MOVE from SR privileged (from 68010) */
|
||||
M68K_FEATURE_MOVEFROMSR_PRIV,
|
||||
};
|
||||
|
||||
static inline bool m68k_feature(CPUM68KState *env, int feature)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue