filename | src/sh4/mmux86.c |
changeset | 1292:799fdd4f704a |
prev | 1067:d3c00ffccfcd |
author | nkeynes |
date | Fri Aug 24 08:53:50 2012 +1000 (8 years ago) |
permissions | -rw-r--r-- |
last change | Move the generated prologue/epilogue code out into a common entry stub (reduces space requirements) and pre-save all saved registers. Change FASTCALL to use 3 regs instead of 2 since we can now keep everything in regs. |
file | annotate | diff | log | raw |
1.1 --- a/src/sh4/mmux86.c Sun Jul 05 13:54:48 2009 +10001.2 +++ b/src/sh4/mmux86.c Fri Aug 24 08:53:50 2012 +10001.3 @@ -70,10 +70,10 @@1.4 int rel = (*fn - xlat_output);1.5 JMP_prerel( rel ); // 51.6 } else {1.7 - MOVL_r32_r32( REG_ARG1, REG_ECX ); // 21.8 - SHRL_imm_r32( 12, REG_ECX ); // 31.9 - XLAT(addr_space, REG_ECX); // 141.10 - JMP_r32disp(REG_ECX, (((uintptr_t)out) - ((uintptr_t)&page->fn)) ); // 31.11 + MOVL_r32_r32( REG_ARG1, REG_CALLPTR ); // 21.12 + SHRL_imm_r32( 12, REG_CALLPTR ); // 31.13 + XLAT(addr_space, REG_CALLPTR); // 141.14 + JMP_r32disp(REG_CALLPTR, (((uintptr_t)out) - ((uintptr_t)&page->fn)) ); // 31.15 }1.16 }1.18 @@ -105,21 +105,21 @@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)) ); // 31.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)) ); // 31.32 }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)) ); // 31.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)) ); // 31.47 }1.49 }
.