Search
lxdream.org :: lxdream/src/sh4/sh4stat.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4stat.in
changeset 945:787729653236
prev905:4c17ebd9ef5e
next1074:397d77b6e346
author nkeynes
date Mon Jan 05 04:19:46 2009 +0000 (12 years ago)
branchlxdream-mem
permissions -rw-r--r--
last change Move address space decls to mmu.h
Finally remove sh4_read_long and friends
file annotate diff log raw
1.1 --- a/src/sh4/sh4stat.in Wed Oct 29 23:51:58 2008 +0000
1.2 +++ b/src/sh4/sh4stat.in Mon Jan 05 04:19:46 2009 +0000
1.3 @@ -19,6 +19,7 @@
1.4 #include "dream.h"
1.5 #include "sh4/sh4stat.h"
1.6 #include "sh4/sh4core.h"
1.7 +#include "sh4/mmu.h"
1.8
1.9 static uint64_t sh4_stats[SH4_INSTRUCTION_COUNT+1];
1.10 static uint64_t sh4_stats_total;
1.11 @@ -194,7 +195,8 @@
1.12
1.13 void sh4_stats_add_by_pc( uint32_t pc )
1.14 {
1.15 - uint16_t ir = sh4_read_word(pc);
1.16 + sh4addr_t addr = mmu_vma_to_phys_disasm(pc);
1.17 + uint16_t ir = ext_address_space[addr>>12]->read_word(addr);
1.18 #define UNDEF(ir) sh4_stats[0]++
1.19 %%
1.20 ADD Rm, Rn {: sh4_stats[I_ADD]++; :}
.