Search
lxdream.org :: lxdream/src/sh4/ia64abi.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/ia64abi.h
changeset 570:d2893980fbf5
prev569:a1c49e1e8776
next571:9bc09948d0f2
author nkeynes
date Sun Jan 06 12:24:18 2008 +0000 (12 years ago)
branchlxdream-mmu
permissions -rw-r--r--
last change Change to generate different code for mmu on/off cases
file annotate diff log raw
1.1 --- a/src/sh4/ia64abi.h Fri Jan 04 11:54:17 2008 +0000
1.2 +++ b/src/sh4/ia64abi.h Sun Jan 06 12:24:18 2008 +0000
1.3 @@ -102,6 +102,7 @@
1.4 sh4_x86.branch_taken = FALSE;
1.5 sh4_x86.backpatch_posn = 0;
1.6 sh4_x86.block_start_pc = pc;
1.7 + sh4_x86.tlb_on = MMIO_READ(MMU,MMUCR)&MMUCR_AT;
1.8 sh4_x86.tstate = TSTATE_NONE;
1.9 }
1.10
1.11 @@ -114,7 +115,11 @@
1.12 load_imm32( R_ECX, ((pc - sh4_x86.block_start_pc)>>1)*sh4_cpu_period ); // 5
1.13 ADD_r32_sh4r( R_ECX, REG_OFFSET(slice_cycle) ); // 6
1.14 load_spreg( R_EAX, REG_OFFSET(pc) );
1.15 - call_func1(xlat_get_code_by_vma,R_EAX);
1.16 + if( sh4_x86.tlb_on ) {
1.17 + call_func1(xlat_get_code_by_vma,R_EAX);
1.18 + } else {
1.19 + call_func1(xlat_get_code,R_EAX);
1.20 + }
1.21 POP_r32(R_EBP);
1.22 RET();
1.23 }
1.24 @@ -157,7 +162,11 @@
1.25
1.26 call_func0( sh4_raise_exception );
1.27 load_spreg( R_EAX, REG_OFFSET(pc) );
1.28 - call_func1(xlat_get_code_by_vma,R_EAX);
1.29 + if( sh4_x86.tlb_on ) {
1.30 + call_func1(xlat_get_code_by_vma,R_EAX);
1.31 + } else {
1.32 + call_func1(xlat_get_code,R_EAX);
1.33 + }
1.34 POP_r32(R_EBP);
1.35 RET();
1.36
1.37 @@ -171,7 +180,11 @@
1.38 MUL_r32( R_EDX );
1.39 ADD_r32_sh4r( R_EAX, REG_OFFSET(slice_cycle) );
1.40 load_spreg( R_EAX, REG_OFFSET(pc) );
1.41 - call_func1(xlat_get_code_by_vma,R_EAX);
1.42 + if( sh4_x86.tlb_on ) {
1.43 + call_func1(xlat_get_code_by_vma,R_EAX);
1.44 + } else {
1.45 + call_func1(xlat_get_code,R_EAX);
1.46 + }
1.47 POP_r32(R_EBP);
1.48 RET();
1.49
.