--- a/src/sh4/ia64abi.h Fri Jan 25 05:38:26 2008 +0000 +++ b/src/sh4/ia64abi.h Mon May 12 10:00:13 2008 +0000 @@ -95,7 +95,7 @@ { PUSH_r32(R_EBP); /* mov &sh4r, ebp */ - load_ptr( R_EBP, &sh4r ); + load_ptr( R_EBP, ((uint8_t *)&sh4r) + 128 ); sh4_x86.in_delay_slot = FALSE; sh4_x86.priv_checked = FALSE; @@ -259,7 +259,8 @@ _Unwind_Reason_Code xlat_check_frame( struct _Unwind_Context *context, void *arg ) { void *rbp = (void *)_Unwind_GetGR(context, 6); - if( rbp == (void *)&sh4r ) { + void *expect = (((uint8_t *)&sh4r) + 128 ) + if( rbp == expect ) { void **result = (void **)arg; *result = (void *)_Unwind_GetIP(context); return _URC_NORMAL_STOP;