Search
lxdream.org :: lxdream/src/sh4/sh4x86.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4x86.in
changeset 941:c67574ed4355
prev939:6f2302afeb89
next946:d41ee7994db7
author nkeynes
date Sat Jan 03 08:55:15 2009 +0000 (13 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change Implement CORE_EXIT_EXCEPTION for use when direct frame messing about doesn't work
file annotate diff log raw
1.1 --- a/src/sh4/sh4x86.in Sat Jan 03 03:30:26 2009 +0000
1.2 +++ b/src/sh4/sh4x86.in Sat Jan 03 08:55:15 2009 +0000
1.3 @@ -292,12 +292,18 @@
1.4 /* Note: For SR.MD == 1 && MMUCR.AT == 0, there are no memory exceptions, so
1.5 * don't waste the cycles expecting them. Otherwise we need to save the exception pointer.
1.6 */
1.7 +
1.8 +#ifdef HAVE_FRAME_ADDRESS
1.9 #define _CALL_READ(addr_reg, fn) if( !sh4_x86.tlb_on && (sh4r.xlat_sh4_mode & SR_MD) ) { \
1.10 call_func1_r32disp8(R_ECX, MEM_REGION_PTR(fn), addr_reg); } else { \
1.11 call_func1_r32disp8_exc(R_ECX, MEM_REGION_PTR(fn), addr_reg, pc); }
1.12 #define _CALL_WRITE(addr_reg, val_reg, fn) if( !sh4_x86.tlb_on && (sh4r.xlat_sh4_mode & SR_MD) ) { \
1.13 call_func2_r32disp8(R_ECX, MEM_REGION_PTR(fn), addr_reg, val_reg); } else { \
1.14 - call_func2_r32disp8_exc(R_ECX, MEM_REGION_PTR(fn), addr_reg, val_reg, pc); }
1.15 + call_func2_r32disp8_exc(R_ECX, MEM_REGION_PTR(fn), addr_reg, val_reg, pc); }
1.16 +#else
1.17 +#define _CALL_READ(addr_reg, fn) call_func1_r32disp8(R_ECX, MEM_REGION_PTR(fn), addr_reg)
1.18 +#define _CALL_WRITE(addr_reg, val_reg, fn) call_func2_r32disp8(R_ECX, MEM_REGION_PTR(fn), addr_reg, val_reg)
1.19 +#endif
1.20
1.21 #define MEM_READ_BYTE( addr_reg, value_reg ) decode_address(addr_reg); _CALL_READ(addr_reg, read_byte); MEM_RESULT(value_reg)
1.22 #define MEM_READ_WORD( addr_reg, value_reg ) decode_address(addr_reg); _CALL_READ(addr_reg, read_word); MEM_RESULT(value_reg)
.