revision 1196:a14dbddafd13
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 1196:a14dbddafd13 |
parent | 1195:072131b61d2a |
child | 1197:904fba59a705 |
author | Nathan Keynes <nkeynes@lxdream.org> |
date | Wed Dec 14 21:51:55 2011 +1000 (12 years ago) |
Update maximum epilogue size
1.1 --- a/src/sh4/sh4trans.h Mon Dec 12 21:15:44 2011 +10001.2 +++ b/src/sh4/sh4trans.h Wed Dec 14 21:51:55 2011 +10001.3 @@ -34,7 +34,7 @@1.4 /** Maximum size of the translation epilogue (current real size is 116 bytes, so1.5 * allows a little room1.6 */1.7 -#define EPILOGUE_SIZE 1361.8 +#define EPILOGUE_SIZE 1391.10 /** Maximum number of recovery records for a translated block (2048 based on1.11 * 1 record per SH4 instruction in a 4K page).
2.1 --- a/src/sh4/sh4x86.in Mon Dec 12 21:15:44 2011 +10002.2 +++ b/src/sh4/sh4x86.in Wed Dec 14 21:51:55 2011 +10002.3 @@ -121,12 +121,15 @@2.4 static uint32_t save_fcw; /* save value for fpu control word */2.5 static uint32_t trunc_fcw = 0x0F7F; /* fcw value for truncation mode */2.7 +static void FASTCALL sh4_translate_get_code_and_backpatch( uint32_t pc );2.8 +2.9 static struct x86_symbol x86_symbol_table[] = {2.10 { "sh4r+128", ((char *)&sh4r)+128 },2.11 { "sh4_cpu_period", &sh4_cpu_period },2.12 { "sh4_address_space", NULL },2.13 { "sh4_user_address_space", NULL },2.14 { "sh4_translate_breakpoint_hit", sh4_translate_breakpoint_hit },2.15 + { "sh4_translate_get_code_and_backpatch", sh4_translate_get_code_and_backpatch },2.16 { "sh4_write_fpscr", sh4_write_fpscr },2.17 { "sh4_write_sr", sh4_write_sr },2.18 { "sh4_read_sr", sh4_read_sr },2.19 @@ -520,11 +523,16 @@2.21 uint32_t sh4_translate_end_block_size()2.22 {2.23 + uint32_t epilogue_size = EPILOGUE_SIZE;2.24 + if( sh4_x86.end_callback ) {2.25 + epilogue_size += (CALL1_PTR_MIN_SIZE - 1);2.26 + }2.27 if( sh4_x86.backpatch_posn <= 3 ) {2.28 - return EPILOGUE_SIZE + (sh4_x86.backpatch_posn*(12+CALL1_PTR_MIN_SIZE));2.29 + epilogue_size += (sh4_x86.backpatch_posn*(12+CALL1_PTR_MIN_SIZE));2.30 } else {2.31 - return EPILOGUE_SIZE + (3*(12+CALL1_PTR_MIN_SIZE)) + (sh4_x86.backpatch_posn-3)*(15+CALL1_PTR_MIN_SIZE);2.32 + epilogue_size += (3*(12+CALL1_PTR_MIN_SIZE)) + (sh4_x86.backpatch_posn-3)*(15+CALL1_PTR_MIN_SIZE);2.33 }2.34 + return epilogue_size;2.35 }
.