Search
lxdream.org :: lxdream/src/sh4/sh4x86.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4x86.in
changeset 1149:da6124fceec6
prev1146:76c5d1064262
next1176:70feb1749427
author Nathan Keynes <nkeynes@lxdream.org>
date Tue May 10 20:31:14 2011 +1000 (13 years ago)
permissions -rw-r--r--
last change Fix SLEEP issue on timeslice border
- Don't update slice_cycle if we're already past it in sh4_sleep_run_slice
- Make sure we don't re-enter the main run_slice if we're sleeping
file annotate diff log raw
1.1 --- a/src/sh4/sh4x86.in Mon Nov 08 18:56:11 2010 +1000
1.2 +++ b/src/sh4/sh4x86.in Tue May 10 20:31:14 2011 +1000
1.3 @@ -521,6 +521,7 @@
1.4
1.5 /** Offset of xlat_sh4_mode field relative to the code pointer */
1.6 #define XLAT_SH4_MODE_CODE_OFFSET (uint32_t)(offsetof(struct xlat_cache_block, xlat_sh4_mode) - offsetof(struct xlat_cache_block,code) )
1.7 +#define XLAT_CHAIN_CODE_OFFSET (uint32_t)(offsetof(struct xlat_cache_block, chain) - offsetof(struct xlat_cache_block,code) )
1.8
1.9 /**
1.10 * Test if the loaded target code pointer in %eax is valid, and if so jump
1.11 @@ -528,6 +529,7 @@
1.12 */
1.13 static void jump_next_block()
1.14 {
1.15 + uint8_t *ptr = xlat_output;
1.16 TESTP_rptr_rptr(REG_EAX, REG_EAX);
1.17 JE_label(nocode);
1.18 if( sh4_x86.sh4_mode == SH4_MODE_UNKNOWN ) {
1.19 @@ -549,7 +551,11 @@
1.20 } else {
1.21 JMP_rptr(REG_EAX);
1.22 }
1.23 - JMP_TARGET(nocode); JMP_TARGET(wrongmode);
1.24 + JMP_TARGET(wrongmode);
1.25 + MOVL_r32disp_r32( REG_EAX, XLAT_CHAIN_CODE_OFFSET, REG_EAX );
1.26 + int rel = ptr - xlat_output;
1.27 + JMP_prerel(rel);
1.28 + JMP_TARGET(nocode);
1.29 }
1.30
1.31 static void exit_block()
.