Search
lxdream.org :: lxdream/src/sh4/xltcache.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/xltcache.c
changeset 592:4343cbfdd21b
prev586:2a3ba82cf243
next596:dfc0c93d882e
author nkeynes
date Thu Jan 17 10:17:32 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Change recovery table to offset rather than pointer (so as to survive block moves)
file annotate diff log raw
1.1 --- a/src/sh4/xltcache.c Tue Jan 15 20:50:23 2008 +0000
1.2 +++ b/src/sh4/xltcache.c Thu Jan 17 10:17:32 2008 +0000
1.3 @@ -213,7 +213,7 @@
1.4 if( code != NULL ) {
1.5 xlat_cache_block_t block = BLOCK_FOR_CODE(code);
1.6 uint32_t count = block->recover_table_size;
1.7 - xlat_recovery_record_t records = block->recover_table;
1.8 + xlat_recovery_record_t records = (xlat_recovery_record_t)(&block->code[block->recover_table_offset]);
1.9 uint32_t posn;
1.10 if( recover_after ) {
1.11 if( records[count-1].xlat_pc <= (uintptr_t)native_pc ) {
1.12 @@ -263,10 +263,10 @@
1.13 uint32_t xlat_get_code_size( void *block )
1.14 {
1.15 xlat_cache_block_t xlt = (xlat_cache_block_t)(((char *)block)-sizeof(struct xlat_cache_block));
1.16 - if( xlt->recover_table == NULL ) {
1.17 + if( xlt->recover_table_offset == 0 ) {
1.18 return xlt->size;
1.19 } else {
1.20 - return ((uint8_t *)xlt->recover_table) - ((uint8_t *)block);
1.21 + return xlt->recover_table_offset;
1.22 }
1.23 }
1.24
.