Search
lxdream.org :: lxdream/src/sh4/mmux86.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/mmux86.c
changeset 1292:799fdd4f704a
prev1067:d3c00ffccfcd
author nkeynes
date Fri May 29 18:47:05 2015 +1000 (8 years ago)
permissions -rw-r--r--
last change Fix test case
file annotate diff log raw
1.1 --- a/src/sh4/mmux86.c Sun Jul 05 13:54:48 2009 +1000
1.2 +++ b/src/sh4/mmux86.c Fri May 29 18:47:05 2015 +1000
1.3 @@ -70,10 +70,10 @@
1.4 int rel = (*fn - xlat_output);
1.5 JMP_prerel( rel ); // 5
1.6 } else {
1.7 - MOVL_r32_r32( REG_ARG1, REG_ECX ); // 2
1.8 - SHRL_imm_r32( 12, REG_ECX ); // 3
1.9 - XLAT(addr_space, REG_ECX); // 14
1.10 - JMP_r32disp(REG_ECX, (((uintptr_t)out) - ((uintptr_t)&page->fn)) ); // 3
1.11 + MOVL_r32_r32( REG_ARG1, REG_CALLPTR ); // 2
1.12 + SHRL_imm_r32( 12, REG_CALLPTR ); // 3
1.13 + XLAT(addr_space, REG_CALLPTR); // 14
1.14 + JMP_r32disp(REG_CALLPTR, (((uintptr_t)out) - ((uintptr_t)&page->fn)) ); // 3
1.15 }
1.16 }
1.17
1.18 @@ -105,21 +105,21 @@
1.19
1.20 for( i=0; i<9; i++, out++ ) {
1.21 *out = xlat_output;
1.22 - MOVL_r32_r32( REG_ARG1, REG_ECX );
1.23 - SHRL_imm_r32( 10, REG_ECX );
1.24 - ANDL_imms_r32( 0x3, REG_ECX );
1.25 - XLAT( (uintptr_t)&entry->subpages[0], REG_ECX );
1.26 - JMP_r32disp(REG_ECX, (((uintptr_t)out) - ((uintptr_t)&entry->fn)) ); // 3
1.27 + MOVL_r32_r32( REG_ARG1, REG_CALLPTR );
1.28 + SHRL_imm_r32( 10, REG_CALLPTR );
1.29 + ANDL_imms_r32( 0x3, REG_CALLPTR );
1.30 + XLAT( (uintptr_t)&entry->subpages[0], REG_CALLPTR );
1.31 + JMP_r32disp(REG_CALLPTR, (((uintptr_t)out) - ((uintptr_t)&entry->fn)) ); // 3
1.32 }
1.33
1.34 out = (uint8_t **)&entry->user_fn;
1.35 for( i=0; i<9; i++, out++ ) {
1.36 *out = xlat_output;
1.37 - MOVL_r32_r32( REG_ARG1, REG_ECX );
1.38 - SHRL_imm_r32( 10, REG_ECX );
1.39 - ANDL_imms_r32( 0x3, REG_ECX );
1.40 - XLAT( (uintptr_t)&entry->user_subpages[0], REG_ECX );
1.41 - JMP_r32disp(REG_ECX, (((uintptr_t)out) - ((uintptr_t)&entry->user_fn)) ); // 3
1.42 + MOVL_r32_r32( REG_ARG1, REG_CALLPTR );
1.43 + SHRL_imm_r32( 10, REG_CALLPTR );
1.44 + ANDL_imms_r32( 0x3, REG_CALLPTR );
1.45 + XLAT( (uintptr_t)&entry->user_subpages[0], REG_CALLPTR );
1.46 + JMP_r32disp(REG_CALLPTR, (((uintptr_t)out) - ((uintptr_t)&entry->user_fn)) ); // 3
1.47 }
1.48
1.49 }
.