Search
lxdream.org :: lxdream/src/sh4/sh4x86.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4x86.in
changeset 1196:a14dbddafd13
prev1194:ee6ce5804608
next1197:904fba59a705
author Nathan Keynes <nkeynes@lxdream.org>
date Wed Dec 14 21:51:55 2011 +1000 (8 years ago)
permissions -rw-r--r--
last change Update maximum epilogue size
file annotate diff log raw
1.1 --- a/src/sh4/sh4x86.in Mon Dec 12 21:13:36 2011 +1000
1.2 +++ b/src/sh4/sh4x86.in Wed Dec 14 21:51:55 2011 +1000
1.3 @@ -121,12 +121,15 @@
1.4 static uint32_t save_fcw; /* save value for fpu control word */
1.5 static uint32_t trunc_fcw = 0x0F7F; /* fcw value for truncation mode */
1.6
1.7 +static void FASTCALL sh4_translate_get_code_and_backpatch( uint32_t pc );
1.8 +
1.9 static struct x86_symbol x86_symbol_table[] = {
1.10 { "sh4r+128", ((char *)&sh4r)+128 },
1.11 { "sh4_cpu_period", &sh4_cpu_period },
1.12 { "sh4_address_space", NULL },
1.13 { "sh4_user_address_space", NULL },
1.14 { "sh4_translate_breakpoint_hit", sh4_translate_breakpoint_hit },
1.15 + { "sh4_translate_get_code_and_backpatch", sh4_translate_get_code_and_backpatch },
1.16 { "sh4_write_fpscr", sh4_write_fpscr },
1.17 { "sh4_write_sr", sh4_write_sr },
1.18 { "sh4_read_sr", sh4_read_sr },
1.19 @@ -520,11 +523,16 @@
1.20
1.21 uint32_t sh4_translate_end_block_size()
1.22 {
1.23 + uint32_t epilogue_size = EPILOGUE_SIZE;
1.24 + if( sh4_x86.end_callback ) {
1.25 + epilogue_size += (CALL1_PTR_MIN_SIZE - 1);
1.26 + }
1.27 if( sh4_x86.backpatch_posn <= 3 ) {
1.28 - return EPILOGUE_SIZE + (sh4_x86.backpatch_posn*(12+CALL1_PTR_MIN_SIZE));
1.29 + epilogue_size += (sh4_x86.backpatch_posn*(12+CALL1_PTR_MIN_SIZE));
1.30 } else {
1.31 - return EPILOGUE_SIZE + (3*(12+CALL1_PTR_MIN_SIZE)) + (sh4_x86.backpatch_posn-3)*(15+CALL1_PTR_MIN_SIZE);
1.32 + epilogue_size += (3*(12+CALL1_PTR_MIN_SIZE)) + (sh4_x86.backpatch_posn-3)*(15+CALL1_PTR_MIN_SIZE);
1.33 }
1.34 + return epilogue_size;
1.35 }
1.36
1.37
.