Search
lxdream.org :: lxdream/src/sh4/sh4trans.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4trans.c
changeset 591:7b9612fd2395
prev588:978ec0b33545
next592:4343cbfdd21b
author nkeynes
date Thu Jan 17 10:11:37 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Add flag to skip breakpoints when it's the very first instruction of a run
(ie, so executing dreamcast_run() when the current pc is a breakpoint doesn't
just return immediately)
file annotate diff log raw
1.1 --- a/src/sh4/sh4trans.c Wed Jan 16 09:37:08 2008 +0000
1.2 +++ b/src/sh4/sh4trans.c Thu Jan 17 10:11:37 2008 +0000
1.3 @@ -36,7 +36,6 @@
1.4
1.5 /**
1.6 * Execute a timeslice using translated code only (ie translate/execute loop)
1.7 - * Note this version does not support breakpoints
1.8 */
1.9 uint32_t sh4_xlat_run_slice( uint32_t nanosecs )
1.10 {
1.11 @@ -95,6 +94,7 @@
1.12 }
1.13
1.14 xlat_running = FALSE;
1.15 + sh4_starting = FALSE;
1.16
1.17 if( sh4r.sh4_state != SH4_STATE_STANDBY ) {
1.18 TMU_run_slice( nanosecs );
1.19 @@ -222,6 +222,14 @@
1.20 longjmp(xlat_jmp_buf, exit_code);
1.21 }
1.22
1.23 +void sh4_translate_breakpoint_hit(uint32_t pc)
1.24 +{
1.25 + if( sh4_starting && sh4r.slice_cycle == 0 && pc == sh4r.pc ) {
1.26 + return;
1.27 + }
1.28 + sh4_translate_exit( XLAT_EXIT_BREAKPOINT );
1.29 +}
1.30 +
1.31 /**
1.32 * Exit the current block at the end of the current instruction, flush the
1.33 * translation cache (completely) and return control to sh4_xlat_run_slice.
.