1 |
|
/* |
2 |
< |
* UAE - The Un*x Amiga Emulator |
2 |
> |
* fpu/fpu_ieee.cpp |
3 |
|
* |
4 |
< |
* MC68881/MC68040 emulation |
4 |
> |
* Basilisk II (C) 1997-2008 Christian Bauer |
5 |
|
* |
6 |
< |
* Copyright 1996 Herman ten Brugge |
6 |
> |
* MC68881/68040 fpu emulation |
7 |
|
* |
8 |
+ |
* Original UAE FPU, copyright 1996 Herman ten Brugge |
9 |
+ |
* Rewrite for x86, copyright 1999-2000 Lauri Pesonen |
10 |
+ |
* New framework, copyright 2000 Gwenole Beauchesne |
11 |
+ |
* Adapted for JIT compilation (c) Bernd Meyer, 2000 |
12 |
+ |
* |
13 |
+ |
* This program is free software; you can redistribute it and/or modify |
14 |
+ |
* it under the terms of the GNU General Public License as published by |
15 |
+ |
* the Free Software Foundation; either version 2 of the License, or |
16 |
+ |
* (at your option) any later version. |
17 |
|
* |
18 |
+ |
* This program is distributed in the hope that it will be useful, |
19 |
+ |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 |
+ |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 |
+ |
* GNU General Public License for more details. |
22 |
+ |
* |
23 |
+ |
* You should have received a copy of the GNU General Public License |
24 |
+ |
* along with this program; if not, write to the Free Software |
25 |
+ |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
26 |
+ |
*/ |
27 |
+ |
|
28 |
+ |
/* |
29 |
|
* Following fixes by Lauri Pesonen, July 1999: |
30 |
|
* |
31 |
|
* FMOVEM list handling: |
200 |
|
#if 1 |
201 |
|
// Use a single, otherwise some checks for NaN, Inf, Zero would have to |
202 |
|
// be performed |
203 |
< |
fpu_single result; |
203 |
> |
fpu_single result = 0; // = 0 to workaround a compiler bug on SPARC |
204 |
|
fp_declare_init_shape(srp, result, single); |
205 |
|
srp->ieee.negative = (value >> 31) & 1; |
206 |
|
srp->ieee.exponent = (value >> 23) & FP_SINGLE_EXP_MAX; |
1648 |
|
break; |
1649 |
|
#if USE_LONG_DOUBLE || USE_QUAD_DOUBLE |
1650 |
|
case 0x3c: |
1651 |
< |
FPU registers[reg] = 1.0e512; |
1651 |
> |
FPU registers[reg] = 1.0e512L; |
1652 |
|
fpu_debug(("FP const: 1.0e512\n")); |
1653 |
|
break; |
1654 |
|
case 0x3d: |
1655 |
< |
FPU registers[reg] = 1.0e1024; |
1655 |
> |
FPU registers[reg] = 1.0e1024L; |
1656 |
|
fpu_debug(("FP const: 1.0e1024\n")); |
1657 |
|
break; |
1658 |
|
case 0x3e: |
1659 |
< |
FPU registers[reg] = 1.0e2048; |
1659 |
> |
FPU registers[reg] = 1.0e2048L; |
1660 |
|
fpu_debug(("FP const: 1.0e2048\n")); |
1661 |
|
break; |
1662 |
|
case 0x3f: |
1663 |
< |
FPU registers[reg] = 1.0e4096; |
1663 |
> |
FPU registers[reg] = 1.0e4096L; |
1664 |
|
fpu_debug(("FP const: 1.0e4096\n")); |
1665 |
|
#endif |
1666 |
|
break; |