Search
lxdream.org :: lxdream/src/sh4/sh4dasm.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4dasm.in
changeset 939:6f2302afeb89
prev873:cb3a8c502727
next963:1c3a0f67c603
author nkeynes
date Sat Jan 03 03:30:26 2009 +0000 (12 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change MMU work-in-progress
* Move SDRAM out into separate sdram.c
* Move all page-table management into mmu.c
* Convert UTLB management to use the new page-tables
* Rip out all calls to mmu_vma_to_phys_* and replace with direct access
file annotate diff log raw
1.1 --- a/src/sh4/sh4dasm.in Tue Oct 14 07:02:42 2008 +0000
1.2 +++ b/src/sh4/sh4dasm.in Sat Jan 03 03:30:26 2009 +0000
1.3 @@ -51,7 +51,8 @@
1.4 uint32_t sh4_disasm_instruction( sh4vma_t pc, char *buf, int len, char *opcode )
1.5 {
1.6 sh4addr_t addr = mmu_vma_to_phys_disasm(pc);
1.7 - uint16_t ir = sh4_read_word(addr);
1.8 + uint32_t tmp;
1.9 + uint16_t ir = ext_address_space[addr>>12]->read_word(addr);
1.10
1.11 #define UNDEF(ir) snprintf( buf, len, "???? " );
1.12 #define RN(ir) ((ir&0x0F00)>>8)
1.13 @@ -189,7 +190,10 @@
1.14 MOV.L @Rm+, Rn {: snprintf( buf, len, "MOV.L @R%d+, R%d", Rm, Rn ); :}
1.15 MOV.L @(R0, Rm), Rn {: snprintf( buf, len, "MOV.L @(R0, R%d), R%d", Rm, Rn ); :}
1.16 MOV.L @(disp, GBR), R0 {: snprintf( buf, len, "MOV.L @(%d, GBR), R0",disp ); :}
1.17 -MOV.L @(disp, PC), Rn {: snprintf( buf, len, "MOV.L @($%xh), R%d ; <- #%08x", disp + (pc & 0xFFFFFFFC) + 4, Rn, sh4_read_long(disp+(addr&0xFFFFFFFC)+4) ); :}
1.18 +MOV.L @(disp, PC), Rn {:
1.19 + tmp = mmu_vma_to_phys_disasm(disp + (pc&0xFFFFFFFC) + 4);
1.20 + snprintf( buf, len, "MOV.L @($%xh), R%d ; <- #%08x", disp + (pc&0xFFFFFFFC)+4, Rn, ext_address_space[tmp>>12]->read_long(tmp) );
1.21 +:}
1.22 MOV.L @(disp, Rm), Rn {: snprintf( buf, len, "MOV.L @(%d, R%d), R%d", disp, Rm, Rn ); :}
1.23 MOV.W Rm, @Rn {: snprintf( buf, len, "MOV.W R%d, @R%d", Rm, Rn ); :}
1.24 MOV.W Rm, @-Rn {: snprintf( buf, len, "MOV.W R%d, @-R%d", Rm, Rn ); :}
1.25 @@ -200,7 +204,10 @@
1.26 MOV.W @Rm+, Rn {: snprintf( buf, len, "MOV.W @R%d+, R%d", Rm, Rn ); :}
1.27 MOV.W @(R0, Rm), Rn {: snprintf( buf, len, "MOV.W @(R0, R%d), R%d", Rm, Rn ); :}
1.28 MOV.W @(disp, GBR), R0 {: snprintf( buf, len, "MOV.W @(%d, GBR), R0", disp ); :}
1.29 -MOV.W @(disp, PC), Rn {: snprintf( buf, len, "MOV.W @($%xh), R%d ; <- #%08x", disp + pc + 4, Rn, sh4_read_word(disp+addr+4) ); :}
1.30 +MOV.W @(disp, PC), Rn {:
1.31 + tmp = mmu_vma_to_phys_disasm(disp+pc+4);
1.32 + snprintf( buf, len, "MOV.W @($%xh), R%d ; <- #%08x", disp+pc+4, Rn, ext_address_space[tmp>>12]->read_word(tmp) );
1.33 +:}
1.34 MOV.W @(disp, Rm), R0 {: snprintf( buf, len, "MOV.W @(%d, R%d), R0", disp, Rm ); :}
1.35 MOVA @(disp, PC), R0 {: snprintf( buf, len, "MOVA @($%xh), R0", disp + (pc&0xFFFFFFFC) + 4 ); :}
1.36 MOVCA.L R0, @Rn {: snprintf( buf, len, "MOVCA.L R0, @R%d", Rn ); :}
.