Search
lxdream.org :: lxdream/src/sh4/sh4trans.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4trans.c
changeset 914:72abecf5a315
prev906:268ea359f884
next936:f394309c399a
next953:f4a156508ad1
author nkeynes
date Wed Nov 05 10:05:08 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Fix (extremely boneheaded) failure to convert pc to physical address before
storing in the translation cache (in other words, the translation cache was
effectively disabled for MMU code). MMU code is now about 3 times faster...
file annotate diff log raw
1.1 --- a/src/sh4/sh4trans.c Thu Oct 30 00:06:49 2008 +0000
1.2 +++ b/src/sh4/sh4trans.c Wed Nov 05 10:05:08 2008 +0000
1.3 @@ -78,6 +78,7 @@
1.4 * Translate a linear basic block, ie all instructions from the start address
1.5 * (inclusive) until the next branch/jump instruction or the end of the page
1.6 * is reached.
1.7 + * @param start VMA of the block start (which must already be in the icache)
1.8 * @return the address of the translated block
1.9 * eg due to lack of buffer space.
1.10 */
1.11 @@ -86,7 +87,7 @@
1.12 sh4addr_t pc = start;
1.13 sh4addr_t lastpc = (pc&0xFFFFF000)+0x1000;
1.14 int done, i;
1.15 - xlat_current_block = xlat_start_block( start );
1.16 + xlat_current_block = xlat_start_block( GET_ICACHE_PHYS(start) );
1.17 xlat_output = (uint8_t *)xlat_current_block->code;
1.18 xlat_recovery_posn = 0;
1.19 uint8_t *eob = xlat_output + xlat_current_block->size;
.