aboutsummaryrefslogtreecommitdiff
path: root/target/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'target/m68k')
-rw-r--r--target/m68k/cpu.c4
-rw-r--r--target/m68k/cpu.h2
-rw-r--r--target/m68k/op_helper.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 8a8392e..d5a71c6 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -142,7 +142,8 @@ static void m68000_cpu_initfn(Object *obj)
}
/*
- * Adds BKPT, MOVE-from-SR *now priv instr, and MOVEC, MOVES, RTD
+ * Adds BKPT, MOVE-from-SR *now priv instr, and MOVEC, MOVES, RTD,
+ * format+vector in exception frame.
*/
static void m68010_cpu_initfn(Object *obj)
{
@@ -155,6 +156,7 @@ static void m68010_cpu_initfn(Object *obj)
m68k_set_feature(env, M68K_FEATURE_BKPT);
m68k_set_feature(env, M68K_FEATURE_MOVEC);
m68k_set_feature(env, M68K_FEATURE_MOVEFROMSR_PRIV);
+ m68k_set_feature(env, M68K_FEATURE_EXCEPTION_FORMAT_VEC);
}
/*
diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index 646cacb..346427e 100644
--- a/target/m68k/cpu.h
+++ b/target/m68k/cpu.h
@@ -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)
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 47b4173..956e76e 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -52,7 +52,7 @@ throwaway:
sp += 2;
env->pc = cpu_ldl_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0);
sp += 4;
- if (m68k_feature(env, M68K_FEATURE_QUAD_MULDIV)) {
+ if (m68k_feature(env, M68K_FEATURE_EXCEPTION_FORMAT_VEC)) {
/* all except 68000 */
fmt = cpu_lduw_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0);
sp += 2;
@@ -256,7 +256,7 @@ static inline void do_stack_frame(CPUM68KState *env, uint32_t *sp,
uint16_t format, uint16_t sr,
uint32_t addr, uint32_t retaddr)
{
- if (m68k_feature(env, M68K_FEATURE_QUAD_MULDIV)) {
+ if (m68k_feature(env, M68K_FEATURE_EXCEPTION_FORMAT_VEC)) {
/* all except 68000 */
CPUState *cs = env_cpu(env);
switch (format) {