filename | src/sh4/sh4trans.c |
changeset | 901:32c5cf5e206f |
prev | 809:8bdbf4d95da4 |
next | 905:4c17ebd9ef5e |
author | nkeynes |
date | Sun Oct 26 02:28:29 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Move the precision/size tests to translation-time rather than execution-time, and flush/retranslate on a mismatch. Shaves a few percent off the core runtime |
file | annotate | diff | log | raw |
1.1 --- a/src/sh4/sh4trans.c Sat Aug 09 10:48:03 2008 +00001.2 +++ b/src/sh4/sh4trans.c Sun Oct 26 02:28:29 2008 +00001.3 @@ -52,7 +52,7 @@1.4 }1.6 code = xlat_get_code_by_vma( sh4r.pc );1.7 - if( code == NULL ) {1.8 + if( code == NULL || (sh4r.fpscr & (FPSCR_PR|FPSCR_SZ)) != XLAT_BLOCK_FPSCR(code) ) {1.9 code = sh4_translate_basic_block( sh4r.pc );1.10 }1.11 }1.12 @@ -138,6 +138,8 @@1.13 memcpy( xlat_output, xlat_recovery, recovery_size);1.14 xlat_current_block->recover_table_offset = xlat_output - (uint8_t *)xlat_current_block->code;1.15 xlat_current_block->recover_table_size = xlat_recovery_posn;1.16 + xlat_current_block->fpscr = sh4r.fpscr & (FPSCR_PR|FPSCR_SZ);1.17 + xlat_current_block->fpscr_mask = (FPSCR_PR|FPSCR_SZ);1.18 xlat_commit_block( finalsize, pc-start );1.19 return xlat_current_block->code;1.20 }
.