Search
lxdream.org :: lxdream :: r95:7c0dac698ea2
lxdream 0.9.1
released Jun 29
Download Now
changeset95:7c0dac698ea2
parent94:8d80d9c7cc7d
child96:3ec45b6525ba
authornkeynes
dateWed Feb 15 12:38:50 2006 +0000 (14 years ago)
Fix DR FMOV functions to allow reference to the back bank
src/sh4/sh4core.c
src/sh4/sh4core.h
1.1 --- a/src/sh4/sh4core.c Sun Feb 05 04:05:27 2006 +0000
1.2 +++ b/src/sh4/sh4core.c Wed Feb 15 12:38:50 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: sh4core.c,v 1.19 2006-02-05 04:02:57 nkeynes Exp $
1.6 + * $Id: sh4core.c,v 1.20 2006-02-15 12:38:50 nkeynes Exp $
1.7 *
1.8 * SH4 emulation core, and parent module for all the SH4 peripheral
1.9 * modules.
1.10 @@ -320,8 +320,8 @@
1.11 #define FRM(ir) FR(FRMn(ir))
1.12 #define FRNi(ir) (*((uint32_t *)&FR(FRNn(ir))))
1.13 #define FRMi(ir) (*((uint32_t *)&FR(FRMn(ir))))
1.14 -#define DRN(ir) DR(DRNn(ir))
1.15 -#define DRM(ir) DR(DRMn(ir))
1.16 +#define DRN(ir) DRb(DRNn(ir), ir&0x0100)
1.17 +#define DRM(ir) DRb(DRMn(ir),ir&0x0010)
1.18 #define DRNi(ir) (*((uint64_t *)&DR(FRNn(ir))))
1.19 #define DRMi(ir) (*((uint64_t *)&DR(FRMn(ir))))
1.20 #define FPULf *((float *)&sh4r.fpul)
2.1 --- a/src/sh4/sh4core.h Sun Feb 05 04:05:27 2006 +0000
2.2 +++ b/src/sh4/sh4core.h Wed Feb 15 12:38:50 2006 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: sh4core.h,v 1.11 2006-01-21 11:38:36 nkeynes Exp $
2.6 + * $Id: sh4core.h,v 1.12 2006-02-15 12:38:50 nkeynes Exp $
2.7 *
2.8 * This file defines the internal functions exported/used by the SH4 core,
2.9 * except for disassembly functions defined in sh4dasm.h
2.10 @@ -159,7 +159,8 @@
2.11 #define FR(x) sh4r.fr[(sh4r.fpscr&FPSCR_FR)>>21][(x)^1]
2.12 #define DR(x) ((double *)(sh4r.fr[(sh4r.fpscr&FPSCR_FR)>>21]))[x]
2.13 #define XF(x) sh4r.fr[((~sh4r.fpscr)&FPSCR_FR)>>21][(x)^1]
2.14 -
2.15 +#define XDR(x) ((double *)(sh4r.fr[((~sh4r.fpscr)&FPSCR_FR)>>21]))[x]
2.16 +#define DRb(x,b) ((double *)(sh4r.fr[((b ? (~sh4r.fpscr) : sh4r.fpscr)&FPSCR_FR)>>21]))[x]
2.17 /* Exceptions (for use with sh4_raise_exception) */
2.18
2.19 #define EX_ILLEGAL_INSTRUCTION 0x180, 0x100
.