Search
lxdream.org :: lxdream/src/sh4/sh4core.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4core.h
changeset 669:ab344e42bca9
prev617:476a717a54f3
next736:a02d1475ccfd
author nkeynes
date Mon May 12 10:00:13 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Cleanup most of the -Wall warnings (getting a bit sloppy...)
Convert FP code to use fixed banks rather than indirect pointer
(3-4% faster this way now)
file annotate diff log raw
1.1 --- a/src/sh4/sh4core.h Tue Jan 29 10:39:56 2008 +0000
1.2 +++ b/src/sh4/sh4core.h Mon May 12 10:00:13 2008 +0000
1.3 @@ -100,6 +100,7 @@
1.4 void SCIF_save_state( FILE *f );
1.5 int SCIF_load_state( FILE *f );
1.6 void SCIF_update_line_speed(void);
1.7 +void TMU_init( void );
1.8 void TMU_reset( void );
1.9 void TMU_run_slice( uint32_t );
1.10 void TMU_save_state( FILE * );
1.11 @@ -109,9 +110,11 @@
1.12 /* SH4 instruction support methods */
1.13 void sh4_sleep( void );
1.14 void sh4_fsca( uint32_t angle, float *fr );
1.15 -void sh4_ftrv( float *fv, float *xmtrx );
1.16 +void sh4_ftrv( float *fv );
1.17 uint32_t sh4_read_sr(void);
1.18 void sh4_write_sr(uint32_t val);
1.19 +void sh4_write_fpscr(uint32_t val);
1.20 +void sh4_switch_fr_banks(void);
1.21 void signsat48(void);
1.22 gboolean sh4_has_page( sh4vma_t vma );
1.23
1.24 @@ -216,14 +219,14 @@
1.25 #define IS_FPU_DOUBLESIZE() (sh4r.fpscr&FPSCR_SZ)
1.26 #define IS_FPU_ENABLED() ((sh4r.sr&SR_FD)==0)
1.27
1.28 -#define FR(x) sh4r.fr_bank[(x)^1]
1.29 -#define DRF(x) ((double *)sh4r.fr_bank)[x]
1.30 -#define XF(x) sh4r.fr[((~sh4r.fpscr)&FPSCR_FR)>>21][(x)^1]
1.31 -#define XDR(x) ((double *)(sh4r.fr[((~sh4r.fpscr)&FPSCR_FR)>>21]))[x]
1.32 -#define DRb(x,b) ((double *)(sh4r.fr[((b ? (~sh4r.fpscr) : sh4r.fpscr)&FPSCR_FR)>>21]))[x]
1.33 -#define DR(x) DRb((x>>1), (x&1))
1.34 -#define FPULf *((float *)&sh4r.fpul)
1.35 -#define FPULi (sh4r.fpul)
1.36 +#define FR(x) sh4r.fr[0][(x)^1]
1.37 +#define DRF(x) *((double *)&sh4r.fr[0][(x)<<1])
1.38 +#define XF(x) sh4r.fr[1][(x)^1]
1.39 +#define XDR(x) *((double *)&sh4r.fr[1][(x)<<1])
1.40 +#define DRb(x,b) *((double *)&sh4r.fr[b][(x)<<1])
1.41 +#define DR(x) *((double *)&sh4r.fr[x&1][x&0x0E])
1.42 +#define FPULf (sh4r.fpul.f)
1.43 +#define FPULi (sh4r.fpul.i)
1.44
1.45 #define SH4_WRITE_STORE_QUEUE(addr,val) sh4r.store_queue[(addr>>2)&0xF] = val;
1.46
.