mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/m68k: Fix exception frame format for 68010
From the 68010 a word with the frame format and exception vector are placed on the stack before the PC and SR. M68K_FEATURE_QUAD_MULDIV is currently checked to workout if to do this or not for the configured CPU but that flag isn't set for 68010 so currently the exception stack when 68010 is configured is incorrect. It seems like checking M68K_FEATURE_MOVEFROMSR_PRIV would do but adding a new flag that shows exactly what is going on here is maybe clearer. Add a new flag for the behaviour, M68K_FEATURE_EXCEPTION_FORMAT_VEC, and set it for 68010 and above, and then use it to control if the format and vector word are pushed/pop during exception entry/exit. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2164 Signed-off-by: Daniel Palmer <daniel@0x0f.com> Message-ID: <20240115101643.2165387-1-daniel@0x0f.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
3d54cbf269
commit
f3c6376c84
3 changed files with 7 additions and 3 deletions
|
@ -550,6 +550,8 @@ enum m68k_features {
|
|||
M68K_FEATURE_TRAPCC,
|
||||
/* MOVE from SR privileged (from 68010) */
|
||||
M68K_FEATURE_MOVEFROMSR_PRIV,
|
||||
/* Exception frame with format+vector (from 68010) */
|
||||
M68K_FEATURE_EXCEPTION_FORMAT_VEC,
|
||||
};
|
||||
|
||||
static inline bool m68k_feature(CPUM68KState *env, int feature)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue