filename | src/sh4/sh4.c |
changeset | 948:545c85cc56f1 |
prev | 941:c67574ed4355 |
next | 951:63483914846f |
author | nkeynes |
date | Wed Jan 07 04:39:04 2009 +0000 (15 years ago) |
branch | lxdream-mem |
permissions | -rw-r--r-- |
last change | Introduce sh4_finalize_instruction to clean-up on instruction exits Remove the sh4_flush_icache special cases, now works through the general case. |
file | annotate | diff | log | raw |
1.1 --- a/src/sh4/sh4.c Sat Jan 03 08:55:15 2009 +00001.2 +++ b/src/sh4/sh4.c Wed Jan 07 04:39:04 2009 +00001.3 @@ -209,24 +209,15 @@1.4 }1.5 }1.6 #endif1.7 + if( exit_code != CORE_EXIT_EXCEPTION ) {1.8 + sh4_finalize_instruction();1.9 + }1.10 // longjmp back into sh4_run_slice1.11 sh4_running = FALSE;1.12 longjmp(sh4_exit_jmp_buf, exit_code);1.13 }1.14 }1.16 -void sh4_flush_icache()1.17 -{1.18 -#ifdef SH4_TRANSLATOR1.19 - // FIXME: Special case needs to be generalized1.20 - if( sh4_use_translator ) {1.21 - if( sh4_translate_flush_cache() ) {1.22 - longjmp(sh4_exit_jmp_buf, CORE_EXIT_CONTINUE);1.23 - }1.24 - }1.25 -#endif1.26 -}1.27 -1.28 void sh4_save_state( FILE *f )1.29 {1.30 if( sh4_use_translator ) {1.31 @@ -377,10 +368,7 @@1.32 sh4r.pc = sh4r.vbr + v; \1.33 sh4r.new_pc = sh4r.pc + 2; \1.34 sh4_write_sr( sh4r.ssr |SR_MD|SR_BL|SR_RB ); \1.35 - if( sh4r.in_delay_slot ) { \1.36 - sh4r.in_delay_slot = 0; \1.37 - sh4r.spc -= 2; \1.38 - } \1.39 + sh4r.in_delay_slot = 0; \1.40 } \1.41 return TRUE; } while(0)
.