1.1 --- a/src/sh4/sh4x86.in Fri Mar 27 06:13:34 2009 +0000
1.2 +++ b/src/sh4/sh4x86.in Sat Apr 04 10:17:57 2009 +0000
1.4 TESTL_imms_r32( 0x00000007, x86reg ); \
1.5 JNE_exc(EXC_DATA_ADDR_WRITE);
1.7 +#define address_space() ((sh4r.xlat_sh4_mode&SR_MD) ? (uintptr_t)sh4_address_space : (uintptr_t)sh4_user_address_space)
1.10 /* Note: For SR.MD == 1 && MMUCR.AT == 0, there are no memory exceptions, so
1.11 * don't waste the cycles expecting them. Otherwise we need to save the exception pointer.
1.13 #ifdef HAVE_FRAME_ADDRESS
1.14 static void call_read_func(int addr_reg, int value_reg, int offset, int pc)
1.16 - decode_address(addr_reg);
1.17 + decode_address(address_space(), addr_reg);
1.18 if( !sh4_x86.tlb_on && (sh4r.xlat_sh4_mode & SR_MD) ) {
1.19 CALL1_r32disp_r32(REG_ECX, offset, addr_reg);
1.23 static void call_write_func(int addr_reg, int value_reg, int offset, int pc)
1.25 - decode_address(addr_reg);
1.26 + decode_address(address_space(), addr_reg);
1.27 if( !sh4_x86.tlb_on && (sh4r.xlat_sh4_mode & SR_MD) ) {
1.28 CALL2_r32disp_r32_r32(REG_ECX, offset, addr_reg, value_reg);
1.32 static void call_read_func(int addr_reg, int value_reg, int offset, int pc)
1.34 - decode_address(addr_reg);
1.35 + decode_address(address_space(), addr_reg);
1.36 CALL1_r32disp_r32(REG_ECX, offset, addr_reg);
1.37 if( value_reg != REG_RESULT1 ) {
1.38 MOVL_r32_r32( REG_RESULT1, value_reg );
1.41 static void call_write_func(int addr_reg, int value_reg, int offset, int pc)
1.43 - decode_address(addr_reg);
1.44 + decode_address(address_space(), addr_reg);
1.45 CALL2_r32disp_r32_r32(REG_ECX, offset, addr_reg, value_reg);
1.49 void sh4_translate_begin_block( sh4addr_t pc )
1.52 + MOVP_immptr_rptr( ((uint8_t *)&sh4r) + 128, REG_EBP );
1.53 sh4_x86.in_delay_slot = FALSE;
1.54 sh4_x86.fpuen_checked = FALSE;
1.55 sh4_x86.branch_taken = FALSE;