Search
lxdream.org :: lxdream/src/sh4/mmux86.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/mmux86.c
changeset 995:eb9d43e8aa08
prev991:60c7fab9c880
next1067:d3c00ffccfcd
author nkeynes
date Thu Mar 05 21:42:35 2009 +0000 (13 years ago)
permissions -rw-r--r--
last change Cleanup ABI headers - most of the content made consistent between versions, and moved into sh4x86.in proper
file annotate diff log raw
1.1 --- a/src/sh4/mmux86.c Wed Mar 04 23:12:21 2009 +0000
1.2 +++ b/src/sh4/mmux86.c Thu Mar 05 21:42:35 2009 +0000
1.3 @@ -25,8 +25,6 @@
1.4 #include "xlat/x86/x86op.h"
1.5
1.6 #if SIZEOF_VOID_P == 8
1.7 -#define ARG1 REG_RDI
1.8 -#define ARG2 REG_RSI
1.9 #define XLAT(addr_space, reg) \
1.10 MOVQ_imm64_r64( (uintptr_t)addr_space, REG_RAX ); \
1.11 MOVP_sib_rptr( 3, reg, REG_RAX, 0, reg );
1.12 @@ -34,8 +32,6 @@
1.13 MOVQ_imm64_r64((uintptr_t)p, REG_EAX ); \
1.14 ADDL_imms_r32disp(imm, REG_EAX, 0);
1.15 #else
1.16 -#define ARG1 REG_EAX
1.17 -#define ARG2 R_EDX
1.18 #define XLAT(addr_space, reg) \
1.19 MOVP_sib_rptr( 2, reg, -1, (uintptr_t)addr_space, reg );
1.20 #define ADDP_imms_ptr(imm,p) \
1.21 @@ -68,13 +64,13 @@
1.22 if( i != 9 ) { /* read_byte_for_write doesn't increment mmu_urc, everything else does */
1.23 ADDP_imms_ptr(1, &mmu_urc);
1.24 }
1.25 - ADDL_imms_r32( ppn-vpn, ARG1 ); // 6
1.26 + ADDL_imms_r32( ppn-vpn, REG_ARG1 ); // 6
1.27 if( ent->mask >= 0xFFFFF000 ) {
1.28 // Maps to a single page, so jump directly there
1.29 int rel = (*fn - xlat_output);
1.30 JMP_prerel( rel ); // 5
1.31 } else {
1.32 - MOVL_r32_r32( ARG1, REG_ECX ); // 2
1.33 + MOVL_r32_r32( REG_ARG1, REG_ECX ); // 2
1.34 SHRL_imm_r32( 12, REG_ECX ); // 3
1.35 XLAT(addr_space, REG_ECX); // 14
1.36 JMP_r32disp(REG_ECX, (((uintptr_t)out) - ((uintptr_t)&page->fn)) ); // 3
1.37 @@ -96,7 +92,7 @@
1.38
1.39 page->fn.prefetch = (mem_prefetch_fn_t)xlat_output;
1.40 ADDP_imms_ptr(1, &mmu_urc);
1.41 - ADDL_imms_r32( ppn-vpn, ARG1 );
1.42 + ADDL_imms_r32( ppn-vpn, REG_ARG1 );
1.43 int rel = ((uint8_t *)ccn_storequeue_prefetch_tlb) - xlat_output;
1.44 JMP_prerel( rel );
1.45 }
1.46 @@ -109,7 +105,7 @@
1.47
1.48 for( i=0; i<9; i++, out++ ) {
1.49 *out = xlat_output;
1.50 - MOVL_r32_r32( ARG1, REG_ECX );
1.51 + MOVL_r32_r32( REG_ARG1, REG_ECX );
1.52 SHRL_imm_r32( 10, REG_ECX );
1.53 ANDL_imms_r32( 0x3, REG_ECX );
1.54 XLAT( (uintptr_t)&entry->subpages[0], REG_ECX );
1.55 @@ -119,7 +115,7 @@
1.56 out = (uint8_t **)&entry->user_fn;
1.57 for( i=0; i<9; i++, out++ ) {
1.58 *out = xlat_output;
1.59 - MOVL_r32_r32( ARG1, REG_ECX );
1.60 + MOVL_r32_r32( REG_ARG1, REG_ECX );
1.61 SHRL_imm_r32( 10, REG_ECX );
1.62 ANDL_imms_r32( 0x3, REG_ECX );
1.63 XLAT( (uintptr_t)&entry->user_subpages[0], REG_ECX );
.