Search
lxdream.org :: lxdream/src/sh4/sh4trans.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4trans.c
changeset 1187:266e7a1bae90
prev1149:da6124fceec6
next1188:1cc9bb0b3848
author nkeynes
date Tue Nov 29 17:52:43 2011 +1000 (10 years ago)
permissions -rw-r--r--
last change Refactor event processing into sh4_handle_pending_events()
file annotate diff log raw
1.1 --- a/src/sh4/sh4trans.c Wed Nov 10 08:37:42 2010 +1000
1.2 +++ b/src/sh4/sh4trans.c Tue Nov 29 17:52:43 2011 +1000
1.3 @@ -34,18 +34,10 @@
1.4 */
1.5 uint32_t sh4_translate_run_slice( uint32_t nanosecs )
1.6 {
1.7 - void * (*code)() = NULL;
1.8 event_schedule( EVENT_ENDTIMESLICE, nanosecs );
1.9 for(;;) {
1.10 if( sh4r.event_pending <= sh4r.slice_cycle ) {
1.11 - if( sh4r.event_types & PENDING_EVENT ) {
1.12 - event_execute();
1.13 - }
1.14 - /* Eventq execute may (quite likely) deliver an immediate IRQ */
1.15 - if( sh4r.event_types & PENDING_IRQ ) {
1.16 - sh4_accept_interrupt();
1.17 - code = NULL;
1.18 - }
1.19 + sh4_handle_pending_events();
1.20 if( sh4r.slice_cycle >= nanosecs )
1.21 return nanosecs;
1.22 }
1.23 @@ -57,7 +49,7 @@
1.24 syscall_invoke( pc );
1.25 }
1.26
1.27 - code = xlat_get_code_by_vma( sh4r.pc );
1.28 + void * (*code)() = xlat_get_code_by_vma( sh4r.pc );
1.29 if( code != NULL ) {
1.30 while( sh4r.xlat_sh4_mode != XLAT_BLOCK_MODE(code) ) {
1.31 code = XLAT_BLOCK_CHAIN(code);
.