revision 472:8a3ae91eb215
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 472:8a3ae91eb215 |
parent | 471:826c89a6f12c |
child | 473:bbbeca9ccf13 |
author | nkeynes |
date | Wed Oct 31 09:02:18 2007 +0000 (16 years ago) |
Ensure xlat cache is flushed on state load and reset
src/sh4/sh4.c | view | annotate | diff | log |
1.1 --- a/src/sh4/sh4.c Wed Oct 31 09:00:50 2007 +00001.2 +++ b/src/sh4/sh4.c Wed Oct 31 09:02:18 2007 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: sh4.c,v 1.5 2007-10-06 09:03:24 nkeynes Exp $1.6 + * $Id: sh4.c,v 1.6 2007-10-31 09:02:18 nkeynes Exp $1.7 *1.8 * SH4 parent module for all CPU modes and SH4 peripheral1.9 * modules.1.10 @@ -75,6 +75,10 @@1.12 void sh4_reset(void)1.13 {1.14 + if( sh4_module.run_time_slice == sh4_xlat_run_slice ) {1.15 + xlat_flush_cache();1.16 + }1.17 +1.18 /* zero everything out, for the sake of having a consistent state. */1.19 memset( &sh4r, 0, sizeof(sh4r) );1.21 @@ -122,6 +126,9 @@1.23 int sh4_load_state( FILE * f )1.24 {1.25 + if( sh4_module.run_time_slice == sh4_xlat_run_slice ) {1.26 + xlat_flush_cache();1.27 + }1.28 fread( &sh4r, sizeof(sh4r), 1, f );1.29 sh4r.fr_bank = &sh4r.fr[(sh4r.fpscr&FPSCR_FR)>>21][0]; // Fixup internal FR pointer1.30 MMU_load_state( f );
.