Search
lxdream.org :: lxdream/src/test/testsh4x86.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/test/testsh4x86.c
changeset 905:4c17ebd9ef5e
prev884:2dcd6a3829fa
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/test/testsh4x86.c Mon Oct 20 03:15:08 2008 +0000
1.2 +++ b/src/test/testsh4x86.c Wed Oct 29 23:51:58 2008 +0000
1.3 @@ -58,15 +58,15 @@
1.4 { "_sh4_write_long", sh4_write_long }
1.5 };
1.6
1.7 -int32_t sh4_read_byte( uint32_t addr )
1.8 +int32_t FASTCALL sh4_read_byte( uint32_t addr )
1.9 {
1.10 return *(uint8_t *)(inbuf+(addr-start_addr));
1.11 }
1.12 -int32_t sh4_read_word( uint32_t addr )
1.13 +int32_t FASTCALL sh4_read_word( uint32_t addr )
1.14 {
1.15 return *(uint16_t *)(inbuf+(addr-start_addr));
1.16 }
1.17 -int32_t sh4_read_long( uint32_t addr )
1.18 +int32_t FASTCALL sh4_read_long( uint32_t addr )
1.19 {
1.20 return *(uint32_t *)(inbuf+(addr-start_addr));
1.21 }
1.22 @@ -83,27 +83,27 @@
1.23 void TMU_run_slice( uint32_t nanos ) {}
1.24 void PMM_write_control( int ctr, uint32_t val ) { }
1.25 void SCIF_run_slice( uint32_t nanos ) {}
1.26 -void sh4_write_byte( uint32_t addr, uint32_t val ) {}
1.27 -void sh4_write_word( uint32_t addr, uint32_t val ) {}
1.28 -void sh4_write_long( uint32_t addr, uint32_t val ) {}
1.29 -void sh4_write_fpscr( uint32_t val ) { }
1.30 +void FASTCALL sh4_write_byte( uint32_t addr, uint32_t val ) {}
1.31 +void FASTCALL sh4_write_word( uint32_t addr, uint32_t val ) {}
1.32 +void FASTCALL sh4_write_long( uint32_t addr, uint32_t val ) {}
1.33 +void FASTCALL sh4_write_fpscr( uint32_t val ) { }
1.34 +void FASTCALL sh4_write_sr( uint32_t val ) { }
1.35 +uint32_t FASTCALL sh4_read_sr( void ) { return 0; }
1.36 +void FASTCALL sh4_sleep() { }
1.37 +void FASTCALL sh4_fsca( uint32_t angle, float *fr ) { }
1.38 +void FASTCALL sh4_ftrv( float *fv ) { }
1.39 +void FASTCALL signsat48(void) { }
1.40 void sh4_switch_fr_banks() { }
1.41 void mem_copy_to_sh4( sh4addr_t addr, sh4ptr_t src, size_t size ) { }
1.42 -void sh4_write_sr( uint32_t val ) { }
1.43 gboolean sh4_has_page( sh4vma_t vma ) { return TRUE; }
1.44 void syscall_invoke( uint32_t val ) { }
1.45 void dreamcast_stop() {}
1.46 void dreamcast_reset() {}
1.47 -uint32_t sh4_read_sr( void ) { return 0; }
1.48 -gboolean sh4_raise_reset( int exc ) { return TRUE; }
1.49 -gboolean sh4_raise_exception( int exc ) { return TRUE; }
1.50 -gboolean sh4_raise_tlb_exception( int exc ) { return TRUE; }
1.51 -gboolean sh4_raise_trap( int exc ) { return TRUE; }
1.52 -void sh4_sleep() { }
1.53 +gboolean FASTCALL sh4_raise_reset( int exc ) { return TRUE; }
1.54 +gboolean FASTCALL sh4_raise_exception( int exc ) { return TRUE; }
1.55 +gboolean FASTCALL sh4_raise_tlb_exception( int exc ) { return TRUE; }
1.56 +gboolean FASTCALL sh4_raise_trap( int exc ) { return TRUE; }
1.57 uint32_t sh4_sleep_run_slice(uint32_t nanosecs) { return nanosecs; }
1.58 -void sh4_fsca( uint32_t angle, float *fr ) { }
1.59 -void sh4_ftrv( float *fv ) { }
1.60 -void signsat48(void) { }
1.61 gboolean gui_error_dialog( const char *fmt, ... ) { return TRUE; }
1.62 struct sh4_icache_struct sh4_icache;
1.63
.