Search
lxdream.org :: lxdream/src/sh4/sh4x86.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4x86.c
changeset 604:1024c3a9cb88
prev601:d8d1af0d133c
next626:a010e30a30e9
author nkeynes
date Tue Jan 22 11:30:37 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Fix backpatching when the block moves during translation
file annotate diff log raw
1.1 --- a/src/sh4/sh4x86.c Tue Jan 22 10:11:45 2008 +0000
1.2 +++ b/src/sh4/sh4x86.c Tue Jan 22 11:30:37 2008 +0000
1.3 @@ -35,7 +35,7 @@
1.4 #define DEFAULT_BACKPATCH_SIZE 4096
1.5
1.6 struct backpatch_record {
1.7 - uint32_t *fixup_addr;
1.8 + uint32_t fixup_offset;
1.9 uint32_t fixup_icount;
1.10 int32_t exc_code;
1.11 };
1.12 @@ -115,7 +115,8 @@
1.13 if( sh4_x86.in_delay_slot ) {
1.14 fixup_pc -= 2;
1.15 }
1.16 - sh4_x86.backpatch_list[sh4_x86.backpatch_posn].fixup_addr = (uint32_t *)fixup_addr;
1.17 + sh4_x86.backpatch_list[sh4_x86.backpatch_posn].fixup_offset =
1.18 + ((uint8_t *)fixup_addr) - ((uint8_t *)xlat_current_block->code);
1.19 sh4_x86.backpatch_list[sh4_x86.backpatch_posn].fixup_icount = (fixup_pc - sh4_x86.block_start_pc)>>1;
1.20 sh4_x86.backpatch_list[sh4_x86.backpatch_posn].exc_code = exc_code;
1.21 sh4_x86.backpatch_posn++;
.