diff options
Diffstat (limited to 'target-m68k')
-rw-r--r-- | target-m68k/op.c | 7 | ||||
-rw-r--r-- | target-m68k/op_helper.c | 4 | ||||
-rw-r--r-- | target-m68k/translate.c | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/target-m68k/op.c b/target-m68k/op.c index 932c994357..466fdc2342 100644 --- a/target-m68k/op.c +++ b/target-m68k/op.c @@ -338,10 +338,7 @@ OP(ext16s32) OP(flush_flags) { - int cc_op = PARAM1; - if (cc_op == CC_OP_DYNAMIC) - cc_op = env->cc_op; - cpu_m68k_flush_flags(env, cc_op); + cpu_m68k_flush_flags(env, env->cc_op); FORCE_RET(); } @@ -480,7 +477,7 @@ OP(fp_result) OP(set_sr) { - env->sr = get_op(PARAM1); + env->sr = get_op(PARAM1) & 0xffff; m68k_switch_sp(env); FORCE_RET(); } diff --git a/target-m68k/op_helper.c b/target-m68k/op_helper.c index 4c423ca984..39cd5d7038 100644 --- a/target-m68k/op_helper.c +++ b/target-m68k/op_helper.c @@ -131,6 +131,8 @@ void do_interrupt(int is_hw) vector = env->exception_index << 2; + sp = env->aregs[7]; + fmt |= 0x40000000; fmt |= (sp & 3) << 28; fmt |= vector << 16; @@ -143,8 +145,6 @@ void do_interrupt(int is_hw) } m68k_switch_sp(env); - sp = env->aregs[7]; - /* ??? This could cause MMU faults. */ sp &= ~3; sp -= 4; diff --git a/target-m68k/translate.c b/target-m68k/translate.c index 1c0e431358..ad8faadc0c 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -345,7 +345,8 @@ static inline void gen_flush_flags(DisasContext *s) { if (s->cc_op == CC_OP_FLAGS) return; - gen_op_flush_flags(s->cc_op); + gen_flush_cc_op(s); + gen_op_flush_flags(); s->cc_op = CC_OP_FLAGS; } |