Search
lxdream.org :: lxdream/src/sh4/sh4.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4.c
changeset 1194:ee6ce5804608
prev1188:1cc9bb0b3848
next1218:be02e87f9f87
author nkeynes
date Mon Dec 12 21:13:36 2011 +1000 (10 years ago)
permissions -rw-r--r--
last change Handle memory exceptions thrown while in shadow mode
file annotate diff log raw
1.1 --- a/src/sh4/sh4.c Thu Dec 01 01:50:44 2011 +1000
1.2 +++ b/src/sh4/sh4.c Mon Dec 12 21:13:36 2011 +1000
1.3 @@ -550,6 +550,17 @@
1.4 sh4r.in_delay_slot = 0;
1.5 }
1.6
1.7 +void FASTCALL sh4_reraise_exception( sh4addr_t exception_pc )
1.8 +{
1.9 + sh4r.spc = sh4r.pc;
1.10 + sh4r.ssr = sh4_read_sr();
1.11 + sh4r.sgr = sh4r.r[15];
1.12 + sh4r.pc = exception_pc;
1.13 + sh4r.new_pc = sh4r.pc + 2;
1.14 + sh4_write_sr( sh4r.ssr |SR_MD|SR_BL|SR_RB );
1.15 + sh4r.in_delay_slot = 0;
1.16 +}
1.17 +
1.18 void FASTCALL sh4_accept_interrupt( void )
1.19 {
1.20 uint32_t code = intc_accept_interrupt();
.