1.1 --- a/src/sh4/sh4trans.c Thu Jan 17 10:17:32 2008 +0000
1.2 +++ b/src/sh4/sh4trans.c Thu Jan 17 21:26:58 2008 +0000
1.4 code = xlat_get_code_by_vma( sh4r.pc );
1.6 code = sh4_translate_basic_block( sh4r.pc );
1.7 +// xlat_check_integrity();
1.11 @@ -152,21 +153,17 @@
1.15 - if( eob - xlat_output < EPILOGUE_SIZE ) {
1.16 + int epilogue_size = sh4_translate_end_block_size();
1.17 + uint32_t recovery_size = sizeof(struct xlat_recovery_record)*xlat_recovery_posn;
1.18 + uint32_t finalsize = xlat_output - block->code + epilogue_size + recovery_size;
1.19 + if( eob - xlat_output < finalsize ) {
1.20 uint8_t *oldstart = block->code;
1.21 - block = xlat_extend_block( xlat_output - oldstart + EPILOGUE_SIZE );
1.22 + block = xlat_extend_block( finalsize );
1.23 xlat_output = block->code + (xlat_output - oldstart);
1.25 sh4_translate_end_block(pc);
1.27 /* Write the recovery records onto the end of the code block */
1.28 - uint32_t recovery_size = sizeof(struct xlat_recovery_record)*xlat_recovery_posn;
1.29 - uint32_t finalsize = xlat_output - block->code + recovery_size;
1.30 - if( finalsize > block->size ) {
1.31 - uint8_t *oldstart = block->code;
1.32 - block = xlat_extend_block( finalsize );
1.33 - xlat_output = block->code + (xlat_output - oldstart);
1.35 memcpy( xlat_output, xlat_recovery, recovery_size);
1.36 block->recover_table_offset = xlat_output - (uint8_t *)block->code;
1.37 block->recover_table_size = xlat_recovery_posn;