Search
lxdream.org :: lxdream/src/sh4/sh4core.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4core.in
changeset 1187:266e7a1bae90
prev1125:9dd5dee45db9
next1192:ba3df0bf2c23
author nkeynes
date Tue Nov 29 17:52:43 2011 +1000 (12 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/sh4core.in Mon Sep 13 10:13:42 2010 +1000
1.2 +++ b/src/sh4/sh4core.in Tue Nov 29 17:52:43 2011 +1000
1.3 @@ -47,13 +47,7 @@
1.4 if( sh4_breakpoint_count == 0 ) {
1.5 for( ; sh4r.slice_cycle < nanosecs; sh4r.slice_cycle += sh4_cpu_period ) {
1.6 if( SH4_EVENT_PENDING() ) {
1.7 - if( sh4r.event_types & PENDING_EVENT ) {
1.8 - event_execute();
1.9 - }
1.10 - /* Eventq execute may (quite likely) deliver an immediate IRQ */
1.11 - if( sh4r.event_types & PENDING_IRQ ) {
1.12 - sh4_accept_interrupt();
1.13 - }
1.14 + sh4_handle_pending_events();
1.15 }
1.16 if( !sh4_execute_instruction() ) {
1.17 break;
1.18 @@ -62,13 +56,7 @@
1.19 } else {
1.20 for( ;sh4r.slice_cycle < nanosecs; sh4r.slice_cycle += sh4_cpu_period ) {
1.21 if( SH4_EVENT_PENDING() ) {
1.22 - if( sh4r.event_types & PENDING_EVENT ) {
1.23 - event_execute();
1.24 - }
1.25 - /* Eventq execute may (quite likely) deliver an immediate IRQ */
1.26 - if( sh4r.event_types & PENDING_IRQ ) {
1.27 - sh4_accept_interrupt();
1.28 - }
1.29 + sh4_handle_pending_events();
1.30 }
1.31
1.32 if( !sh4_execute_instruction() )
.