Search
lxdream.org :: lxdream/src/sh4/sh4mem.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4mem.c
changeset 905:4c17ebd9ef5e
prev828:b42865f00fb5
next910:661367ef919d
author nkeynes
date Wed Oct 29 23:51:58 2008 +0000 (12 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/sh4mem.c Mon Aug 25 09:15:42 2008 +0000
1.2 +++ b/src/sh4/sh4mem.c Wed Oct 29 23:51:58 2008 +0000
1.3 @@ -68,7 +68,7 @@
1.4 extern struct mem_region mem_rgn[];
1.5 extern struct mmio_region *P4_io[];
1.6
1.7 -int32_t sh4_read_p4( sh4addr_t addr )
1.8 +int32_t FASTCALL sh4_read_p4( sh4addr_t addr )
1.9 {
1.10 struct mmio_region *io = P4_io[(addr&0x1FFFFFFF)>>19];
1.11 if( !io ) {
1.12 @@ -96,7 +96,7 @@
1.13 }
1.14 }
1.15
1.16 -void sh4_write_p4( sh4addr_t addr, int32_t val )
1.17 +void FASTCALL sh4_write_p4( sh4addr_t addr, int32_t val )
1.18 {
1.19 struct mmio_region *io = P4_io[(addr&0x1FFFFFFF)>>19];
1.20 if( !io ) {
1.21 @@ -153,13 +153,13 @@
1.22 /**
1.23 * Convenience function to read a quad-word (implemented as two long reads).
1.24 */
1.25 -int64_t sh4_read_quad( sh4addr_t addr )
1.26 +int64_t FASTCALL sh4_read_quad( sh4addr_t addr )
1.27 {
1.28 return ((int64_t)((uint32_t)sh4_read_long(addr))) |
1.29 (((int64_t)((uint32_t)sh4_read_long(addr+4))) << 32);
1.30 }
1.31
1.32 -int32_t sh4_read_long( sh4addr_t addr )
1.33 +int32_t FASTCALL sh4_read_long( sh4addr_t addr )
1.34 {
1.35 sh4ptr_t page;
1.36
1.37 @@ -191,7 +191,7 @@
1.38 }
1.39 }
1.40
1.41 -int32_t sh4_read_word( sh4addr_t addr )
1.42 +int32_t FASTCALL sh4_read_word( sh4addr_t addr )
1.43 {
1.44 sh4ptr_t page;
1.45
1.46 @@ -223,7 +223,7 @@
1.47 }
1.48 }
1.49
1.50 -int32_t sh4_read_byte( sh4addr_t addr )
1.51 +int32_t FASTCALL sh4_read_byte( sh4addr_t addr )
1.52 {
1.53 sh4ptr_t page;
1.54
1.55 @@ -259,13 +259,13 @@
1.56 /**
1.57 * Convenience function to write a quad-word (implemented as two long writes).
1.58 */
1.59 -void sh4_write_quad( sh4addr_t addr, uint64_t val )
1.60 +void FASTCALL sh4_write_quad( sh4addr_t addr, uint64_t val )
1.61 {
1.62 sh4_write_long( addr, (uint32_t)val );
1.63 sh4_write_long( addr+4, (uint32_t)(val>>32) );
1.64 }
1.65
1.66 -void sh4_write_long( sh4addr_t addr, uint32_t val )
1.67 +void FASTCALL sh4_write_long( sh4addr_t addr, uint32_t val )
1.68 {
1.69 sh4ptr_t page;
1.70
1.71 @@ -311,7 +311,7 @@
1.72 }
1.73 }
1.74
1.75 -void sh4_write_word( sh4addr_t addr, uint32_t val )
1.76 +void FASTCALL sh4_write_word( sh4addr_t addr, uint32_t val )
1.77 {
1.78 sh4ptr_t page;
1.79
1.80 @@ -351,7 +351,7 @@
1.81 }
1.82 }
1.83
1.84 -void sh4_write_byte( sh4addr_t addr, uint32_t val )
1.85 +void FASTCALL sh4_write_byte( sh4addr_t addr, uint32_t val )
1.86 {
1.87 sh4ptr_t page;
1.88
.