Search
lxdream.org :: lxdream/src/sh4/mmu.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/mmu.c
changeset 905:4c17ebd9ef5e
prev841:808d64b05073
next911:2f6ba75b84d1
author nkeynes
date Wed Oct 29 23:51:58 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Use regparam calling conventions for all functions called from translated code,
along with a few other high-use functions. Can probably extend this to all functions,
but as it is this is a nice performance boost
file annotate diff log raw
1.1 --- a/src/sh4/mmu.c Tue Sep 02 11:53:16 2008 +0000
1.2 +++ b/src/sh4/mmu.c Wed Oct 29 23:51:58 2008 +0000
1.3 @@ -664,7 +664,7 @@
1.4 return result;
1.5 }
1.6
1.7 -sh4addr_t mmu_vma_to_phys_read( sh4vma_t addr )
1.8 +sh4addr_t FASTCALL mmu_vma_to_phys_read( sh4vma_t addr )
1.9 {
1.10 uint32_t mmucr = MMIO_READ(MMU,MMUCR);
1.11 if( addr & 0x80000000 ) {
1.12 @@ -722,7 +722,7 @@
1.13 }
1.14 }
1.15
1.16 -sh4addr_t mmu_vma_to_phys_write( sh4vma_t addr )
1.17 +sh4addr_t FASTCALL mmu_vma_to_phys_write( sh4vma_t addr )
1.18 {
1.19 uint32_t mmucr = MMIO_READ(MMU,MMUCR);
1.20 if( addr & 0x80000000 ) {
1.21 @@ -788,7 +788,7 @@
1.22 /**
1.23 * Update the icache for an untranslated address
1.24 */
1.25 -void mmu_update_icache_phys( sh4addr_t addr )
1.26 +static inline void mmu_update_icache_phys( sh4addr_t addr )
1.27 {
1.28 if( (addr & 0x1C000000) == 0x0C000000 ) {
1.29 /* Main ram */
1.30 @@ -820,7 +820,7 @@
1.31 * @return TRUE if the update completed (successfully or otherwise), FALSE
1.32 * if an exception was raised.
1.33 */
1.34 -gboolean mmu_update_icache( sh4vma_t addr )
1.35 +gboolean FASTCALL mmu_update_icache( sh4vma_t addr )
1.36 {
1.37 int entryNo;
1.38 if( IS_SH4_PRIVMODE() ) {
1.39 @@ -891,7 +891,7 @@
1.40 * protection bits. Returns the translated address, or MMU_VMA_ERROR
1.41 * on translation failure.
1.42 */
1.43 -sh4addr_t mmu_vma_to_phys_disasm( sh4vma_t vma )
1.44 +sh4addr_t FASTCALL mmu_vma_to_phys_disasm( sh4vma_t vma )
1.45 {
1.46 if( vma & 0x80000000 ) {
1.47 if( vma < 0xC0000000 ) {
1.48 @@ -920,7 +920,7 @@
1.49 }
1.50 }
1.51
1.52 -gboolean sh4_flush_store_queue( sh4addr_t addr )
1.53 +gboolean FASTCALL sh4_flush_store_queue( sh4addr_t addr )
1.54 {
1.55 uint32_t mmucr = MMIO_READ(MMU,MMUCR);
1.56 int queue = (addr&0x20)>>2;
.