Search
lxdream.org :: lxdream/src/sh4/xltcache.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/xltcache.c
changeset 950:cc1e88104360
prev938:e377bd827c54
author nkeynes
date Wed Jan 07 04:54:32 2009 +0000 (13 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change Remove xlat_get_post_recovery - no longer used and doesn't work correctly anyway
file annotate diff log raw
1.1 --- a/src/sh4/xltcache.c Sat Dec 27 04:09:17 2008 +0000
1.2 +++ b/src/sh4/xltcache.c Wed Jan 07 04:54:32 2009 +0000
1.3 @@ -202,29 +202,6 @@
1.4 return result;
1.5 }
1.6
1.7 -xlat_recovery_record_t xlat_get_post_recovery( void *code, void *native_pc, gboolean with_terminal )
1.8 -{
1.9 - if( code != NULL ) {
1.10 - uintptr_t pc_offset = ((uint8_t *)native_pc) - ((uint8_t *)code);
1.11 - xlat_cache_block_t block = XLAT_BLOCK_FOR_CODE(code);
1.12 - uint32_t count = block->recover_table_size;
1.13 - xlat_recovery_record_t records = (xlat_recovery_record_t)(&block->code[block->recover_table_offset]);
1.14 - uint32_t posn;
1.15 - if( count > 0 && !with_terminal )
1.16 - count--;
1.17 - if( records[count-1].xlat_offset < pc_offset ) {
1.18 - return NULL;
1.19 - }
1.20 - for( posn=count-1; posn > 0; posn-- ) {
1.21 - if( records[posn-1].xlat_offset < pc_offset ) {
1.22 - return &records[posn];
1.23 - }
1.24 - }
1.25 - return &records[0]; // shouldn't happen
1.26 - }
1.27 - return NULL;
1.28 -}
1.29 -
1.30 xlat_recovery_record_t xlat_get_pre_recovery( void *code, void *native_pc )
1.31 {
1.32 if( code != NULL ) {
.