Search
lxdream.org :: lxdream :: r949:d7833018931f
lxdream 0.9.1
released Jun 29
Download Now
changeset949:d7833018931f lxdream-mem
parent948:545c85cc56f1
child950:cc1e88104360
authornkeynes
dateWed Jan 07 04:39:58 2009 +0000 (12 years ago)
branchlxdream-mem
Add missed file from previous commit - remove sh4_translate_flush_cache, change
exit to use pre-recovery
src/sh4/sh4trans.c
1.1 --- a/src/sh4/sh4trans.c Wed Jan 07 04:39:04 2009 +0000
1.2 +++ b/src/sh4/sh4trans.c Wed Jan 07 04:39:58 2009 +0000
1.3 @@ -176,7 +176,7 @@
1.4 void *pc = xlat_get_native_pc( code, size );
1.5 if( pc != NULL ) {
1.6 // could be null if we're not actually running inside the translator
1.7 - xlat_recovery_record_t recover = xlat_get_post_recovery(code, pc, TRUE);
1.8 + xlat_recovery_record_t recover = xlat_get_pre_recovery(code, pc);
1.9 if( recover != NULL ) {
1.10 // Can be null if there is no recovery necessary
1.11 sh4_translate_run_recovery(recover);
1.12 @@ -211,38 +211,6 @@
1.13 sh4_core_exit( CORE_EXIT_BREAKPOINT );
1.14 }
1.15
1.16 -/**
1.17 - * Exit the current block at the end of the current instruction, flush the
1.18 - * translation cache (completely) and return control to sh4_xlat_run_slice.
1.19 - *
1.20 - * As a special case, if the current instruction is actually the last
1.21 - * instruction in the block (ie it's in a delay slot), this function
1.22 - * returns to allow normal completion of the translation block. Otherwise
1.23 - * this function never returns.
1.24 - *
1.25 - * Must only be invoked (indirectly) from within translated code.
1.26 - */
1.27 -gboolean sh4_translate_flush_cache()
1.28 -{
1.29 - void *code = xlat_get_code_by_vma( sh4r.pc );
1.30 - if( code != NULL ) {
1.31 - uint32_t size = xlat_get_code_size( code );
1.32 - void *pc = xlat_get_native_pc( code, size );
1.33 - assert( pc != NULL );
1.34 -
1.35 - xlat_recovery_record_t recover = xlat_get_post_recovery(code, pc, FALSE);
1.36 - if( recover != NULL ) {
1.37 - // Can be null if there is no recovery necessary
1.38 - sh4_translate_run_recovery(recover);
1.39 - xlat_flush_cache();
1.40 - return TRUE;
1.41 - } else {
1.42 - xlat_flush_cache();
1.43 - return FALSE;
1.44 - }
1.45 - }
1.46 -}
1.47 -
1.48 void * FASTCALL xlat_get_code_by_vma( sh4vma_t vma )
1.49 {
1.50 void *result = NULL;
.