Search
lxdream.org :: lxdream/src/sh4/sh4x86.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4x86.in
changeset 1004:eae001858134
prev1003:7b2688cbbca3
next1006:3a169c224c12
next1008:4c8211637afc
author nkeynes
date Sat Apr 04 10:17:57 2009 +0000 (14 years ago)
permissions -rw-r--r--
last change Remove last lingering bits of SH4-specific code from the ABI headers
file annotate diff log raw
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.3 @@ -291,6 +291,8 @@
1.4 TESTL_imms_r32( 0x00000007, x86reg ); \
1.5 JNE_exc(EXC_DATA_ADDR_WRITE);
1.6
1.7 +#define address_space() ((sh4r.xlat_sh4_mode&SR_MD) ? (uintptr_t)sh4_address_space : (uintptr_t)sh4_user_address_space)
1.8 +
1.9 #define UNDEF(ir)
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.12 @@ -298,7 +300,7 @@
1.13 #ifdef HAVE_FRAME_ADDRESS
1.14 static void call_read_func(int addr_reg, int value_reg, int offset, int pc)
1.15 {
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.20 } else {
1.21 @@ -316,7 +318,7 @@
1.22
1.23 static void call_write_func(int addr_reg, int value_reg, int offset, int pc)
1.24 {
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.29 } else {
1.30 @@ -340,7 +342,7 @@
1.31 #else
1.32 static void call_read_func(int addr_reg, int value_reg, int offset, int pc)
1.33 {
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.39 @@ -349,7 +351,7 @@
1.40
1.41 static void call_write_func(int addr_reg, int value_reg, int offset, int pc)
1.42 {
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.46 }
1.47 #endif
1.48 @@ -369,6 +371,7 @@
1.49 void sh4_translate_begin_block( sh4addr_t pc )
1.50 {
1.51 enter_block();
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;
.