Commit 0cf5c6771b216793d1fe57d25864d842570f32f6
1 parent
87ee1669
M68K status register fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2967 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
6 additions
and
8 deletions
target-m68k/op.c
| ... | ... | @@ -338,10 +338,7 @@ OP(ext16s32) |
| 338 | 338 | |
| 339 | 339 | OP(flush_flags) |
| 340 | 340 | { |
| 341 | - int cc_op = PARAM1; | |
| 342 | - if (cc_op == CC_OP_DYNAMIC) | |
| 343 | - cc_op = env->cc_op; | |
| 344 | - cpu_m68k_flush_flags(env, cc_op); | |
| 341 | + cpu_m68k_flush_flags(env, env->cc_op); | |
| 345 | 342 | FORCE_RET(); |
| 346 | 343 | } |
| 347 | 344 | |
| ... | ... | @@ -480,7 +477,7 @@ OP(fp_result) |
| 480 | 477 | |
| 481 | 478 | OP(set_sr) |
| 482 | 479 | { |
| 483 | - env->sr = get_op(PARAM1); | |
| 480 | + env->sr = get_op(PARAM1) & 0xffff; | |
| 484 | 481 | m68k_switch_sp(env); |
| 485 | 482 | FORCE_RET(); |
| 486 | 483 | } | ... | ... |
target-m68k/op_helper.c
| ... | ... | @@ -131,6 +131,8 @@ void do_interrupt(int is_hw) |
| 131 | 131 | |
| 132 | 132 | vector = env->exception_index << 2; |
| 133 | 133 | |
| 134 | + sp = env->aregs[7]; | |
| 135 | + | |
| 134 | 136 | fmt |= 0x40000000; |
| 135 | 137 | fmt |= (sp & 3) << 28; |
| 136 | 138 | fmt |= vector << 16; |
| ... | ... | @@ -143,8 +145,6 @@ void do_interrupt(int is_hw) |
| 143 | 145 | } |
| 144 | 146 | m68k_switch_sp(env); |
| 145 | 147 | |
| 146 | - sp = env->aregs[7]; | |
| 147 | - | |
| 148 | 148 | /* ??? This could cause MMU faults. */ |
| 149 | 149 | sp &= ~3; |
| 150 | 150 | sp -= 4; | ... | ... |
target-m68k/translate.c