Search
lxdream.org :: lxdream/src/sh4/sh4core.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4core.h
changeset 84:b993a8d8fbf3
prev54:d8b73031289c
next95:7c0dac698ea2
author nkeynes
date Sat Jan 21 11:38:36 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Fix double-precision floating point
file annotate diff log raw
1.1 --- a/src/sh4/sh4core.h Sun Jan 01 08:08:40 2006 +0000
1.2 +++ b/src/sh4/sh4core.h Sat Jan 21 11:38:36 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: sh4core.h,v 1.10 2006-01-01 08:08:40 nkeynes Exp $
1.6 + * $Id: sh4core.h,v 1.11 2006-01-21 11:38:36 nkeynes Exp $
1.7 *
1.8 * This file defines the internal functions exported/used by the SH4 core,
1.9 * except for disassembly functions defined in sh4dasm.h
1.10 @@ -57,7 +57,8 @@
1.11 uint32_t r[16];
1.12 uint32_t r_bank[8]; /* hidden banked registers */
1.13 uint32_t sr, gbr, ssr, spc, sgr, dbr, vbr;
1.14 - uint32_t pr, pc, fpul, fpscr;
1.15 + uint32_t pr, pc, fpscr;
1.16 + int32_t fpul;
1.17 uint64_t mac;
1.18 uint32_t m, q, s, t; /* really boolean - 0 or 1 */
1.19 float fr[2][16];
1.20 @@ -155,8 +156,9 @@
1.21 #define IS_FPU_DOUBLESIZE() (sh4r.fpscr&FPSCR_SZ)
1.22 #define IS_FPU_ENABLED() ((sh4r.sr&SR_FD)==0)
1.23
1.24 -#define FR sh4r.fr[(sh4r.fpscr&FPSCR_FR)>>21]
1.25 -#define XF sh4r.fr[((~sh4r.fpscr)&FPSCR_FR)>>21]
1.26 +#define FR(x) sh4r.fr[(sh4r.fpscr&FPSCR_FR)>>21][(x)^1]
1.27 +#define DR(x) ((double *)(sh4r.fr[(sh4r.fpscr&FPSCR_FR)>>21]))[x]
1.28 +#define XF(x) sh4r.fr[((~sh4r.fpscr)&FPSCR_FR)>>21][(x)^1]
1.29
1.30 /* Exceptions (for use with sh4_raise_exception) */
1.31
.