Search
lxdream.org :: lxdream :: r1014:f5914b2fd0db
lxdream 0.9.1
released Jun 29
Download Now
changeset1014:f5914b2fd0db
parent1010:a506a2f66180
child1015:ad448bedc48a
authornkeynes
dateSun May 24 08:30:35 2009 +0000 (14 years ago)
000068: Handle sh4_finalize_instruction being called from a syscall (assertion failure)
(Also introduce IS_SYSCALL() macro to tidy up slightly)
src/sh4/sh4core.in
src/sh4/sh4trans.c
src/syscall.h
1.1 --- a/src/sh4/sh4core.in Sun Apr 12 02:04:27 2009 +0000
1.2 +++ b/src/sh4/sh4core.in Sun May 24 08:30:35 2009 +0000
1.3 @@ -239,6 +239,9 @@
1.4 unsigned short ir;
1.5 uint32_t tmp;
1.6
1.7 + if( IS_SYSCALL(sh4r.pc) ) {
1.8 + return;
1.9 + }
1.10 assert( IS_IN_ICACHE(sh4r.pc) );
1.11 ir = *(uint16_t *)GET_ICACHE_PTR(sh4r.pc);
1.12
2.1 --- a/src/sh4/sh4trans.c Sun Apr 12 02:04:27 2009 +0000
2.2 +++ b/src/sh4/sh4trans.c Sun May 24 08:30:35 2009 +0000
2.3 @@ -46,7 +46,7 @@
2.4 }
2.5
2.6 if( code == NULL ) {
2.7 - if( sh4r.pc > 0xFFFFFF00 ) {
2.8 + if( IS_SYSCALL(sh4r.pc) ) {
2.9 syscall_invoke( sh4r.pc );
2.10 sh4r.in_delay_slot = 0;
2.11 sh4r.pc = sh4r.pr;
2.12 @@ -220,7 +220,7 @@
2.13 return xlat_get_code( GET_ICACHE_PHYS(vma) );
2.14 }
2.15
2.16 - if( vma > 0xFFFFFF00 ) {
2.17 + if( IS_SYSCALL(vma) ) {
2.18 // lxdream hook
2.19 return NULL;
2.20 }
3.1 --- a/src/syscall.h Sun Apr 12 02:04:27 2009 +0000
3.2 +++ b/src/syscall.h Sun May 24 08:30:35 2009 +0000
3.3 @@ -71,6 +71,8 @@
3.4 */
3.5 void dcload_set_allow_unsafe( gboolean allow );
3.6
3.7 +#define IS_SYSCALL(pc) (((uint32_t)pc)>=0xFFFFFF00)
3.8 +
3.9 #ifdef __cplusplus
3.10 }
3.11 #endif
.