Search
lxdream.org :: lxdream/src/sh4/sh4core.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4core.h
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/sh4core.h Tue Sep 02 11:53:16 2008 +0000
1.2 +++ b/src/sh4/sh4core.h Wed Oct 29 23:51:58 2008 +0000
1.3 @@ -170,14 +170,14 @@
1.4 uint32_t sh4_emulate_run_slice(uint32_t);
1.5
1.6 /* SH4 instruction support methods */
1.7 -void sh4_sleep( void );
1.8 -void sh4_fsca( uint32_t angle, float *fr );
1.9 -void sh4_ftrv( float *fv );
1.10 -uint32_t sh4_read_sr(void);
1.11 -void sh4_write_sr(uint32_t val);
1.12 -void sh4_write_fpscr(uint32_t val);
1.13 -void sh4_switch_fr_banks(void);
1.14 -void signsat48(void);
1.15 +void FASTCALL sh4_sleep( void );
1.16 +void FASTCALL sh4_fsca( uint32_t angle, float *fr );
1.17 +void FASTCALL sh4_ftrv( float *fv );
1.18 +uint32_t FASTCALL sh4_read_sr(void);
1.19 +void FASTCALL sh4_write_sr(uint32_t val);
1.20 +void FASTCALL sh4_write_fpscr(uint32_t val);
1.21 +void FASTCALL sh4_switch_fr_banks(void);
1.22 +void FASTCALL signsat48(void);
1.23 gboolean sh4_has_page( sh4vma_t vma );
1.24
1.25 /* SH4 Memory */
1.26 @@ -190,7 +190,7 @@
1.27 * invalidated, but the function will still return TRUE.
1.28 * @return FALSE if an MMU exception was raised, otherwise TRUE.
1.29 */
1.30 -gboolean mmu_update_icache( sh4vma_t addr );
1.31 +gboolean FASTCALL mmu_update_icache( sh4vma_t addr );
1.32
1.33 /**
1.34 * Resolve a virtual address through the TLB for a read operation, returning
1.35 @@ -199,20 +199,20 @@
1.36 * @return An external address (0x00000000-0x1FFFFFFF), a P4 address
1.37 * (0xE0000000 - 0xFFFFFFFF), or MMU_VMA_ERROR.
1.38 */
1.39 -sh4addr_t mmu_vma_to_phys_read( sh4vma_t addr );
1.40 -sh4addr_t mmu_vma_to_phys_write( sh4vma_t addr );
1.41 -sh4addr_t mmu_vma_to_phys_disasm( sh4vma_t addr );
1.42 +sh4addr_t FASTCALL mmu_vma_to_phys_read( sh4vma_t addr );
1.43 +sh4addr_t FASTCALL mmu_vma_to_phys_write( sh4vma_t addr );
1.44 +sh4addr_t FASTCALL mmu_vma_to_phys_disasm( sh4vma_t addr );
1.45
1.46 -int64_t sh4_read_quad( sh4addr_t addr );
1.47 -int32_t sh4_read_long( sh4addr_t addr );
1.48 -int32_t sh4_read_word( sh4addr_t addr );
1.49 -int32_t sh4_read_byte( sh4addr_t addr );
1.50 -void sh4_write_quad( sh4addr_t addr, uint64_t val );
1.51 -void sh4_write_long( sh4addr_t addr, uint32_t val );
1.52 -void sh4_write_word( sh4addr_t addr, uint32_t val );
1.53 -void sh4_write_byte( sh4addr_t addr, uint32_t val );
1.54 +int64_t FASTCALL sh4_read_quad( sh4addr_t addr );
1.55 +int32_t FASTCALL sh4_read_long( sh4addr_t addr );
1.56 +int32_t FASTCALL sh4_read_word( sh4addr_t addr );
1.57 +int32_t FASTCALL sh4_read_byte( sh4addr_t addr );
1.58 +void FASTCALL sh4_write_quad( sh4addr_t addr, uint64_t val );
1.59 +void FASTCALL sh4_write_long( sh4addr_t addr, uint32_t val );
1.60 +void FASTCALL sh4_write_word( sh4addr_t addr, uint32_t val );
1.61 +void FASTCALL sh4_write_byte( sh4addr_t addr, uint32_t val );
1.62 int32_t sh4_read_phys_word( sh4addr_t addr );
1.63 -gboolean sh4_flush_store_queue( sh4addr_t addr );
1.64 +gboolean FASTCALL sh4_flush_store_queue( sh4addr_t addr );
1.65
1.66 /* SH4 Exceptions */
1.67 #define EXC_POWER_RESET 0x000 /* reset vector */
1.68 @@ -235,12 +235,12 @@
1.69 #define EXV_TLBMISS 0x400 /* TLB-miss exception vector */
1.70 #define EXV_INTERRUPT 0x600 /* External interrupt vector */
1.71
1.72 -gboolean sh4_raise_exception( int );
1.73 -gboolean sh4_raise_reset( int );
1.74 -gboolean sh4_raise_trap( int );
1.75 -gboolean sh4_raise_slot_exception( int, int );
1.76 -gboolean sh4_raise_tlb_exception( int );
1.77 -void sh4_accept_interrupt( void );
1.78 +gboolean FASTCALL sh4_raise_exception( int );
1.79 +gboolean FASTCALL sh4_raise_reset( int );
1.80 +gboolean FASTCALL sh4_raise_trap( int );
1.81 +gboolean FASTCALL sh4_raise_slot_exception( int, int );
1.82 +gboolean FASTCALL sh4_raise_tlb_exception( int );
1.83 +void FASTCALL sh4_accept_interrupt( void );
1.84
1.85 #define SIGNEXT4(n) ((((int32_t)(n))<<28)>>28)
1.86 #define SIGNEXT8(n) ((int32_t)((int8_t)(n)))
.