Hide the extended-precision definitions from __mc68010__.

This commit is contained in:
kleink 2003-10-26 10:08:02 +00:00
parent 9396a5ae34
commit 7bc235809e
2 changed files with 16 additions and 2 deletions

View File

@ -1,8 +1,9 @@
/* $NetBSD: float.h,v 1.17 2003/10/23 23:26:06 kleink Exp $ */
/* $NetBSD: float.h,v 1.18 2003/10/26 10:08:02 kleink Exp $ */
#ifndef _M68K_FLOAT_H_
#define _M68K_FLOAT_H_
#ifndef __mc68010__
#define LDBL_MANT_DIG 64
#define LDBL_EPSILON 1.0842021724855044340E-19L
#define LDBL_DIG 18
@ -12,9 +13,11 @@
#define LDBL_MAX_EXP 16384
#define LDBL_MAX 1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP 4932
#endif
#include <sys/float_ieee754.h>
#ifndef __mc68010__
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE) || \
((__STDC_VERSION__ - 0) >= 199901L) || \
@ -23,5 +26,6 @@
defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
#define DECIMAL_DIG 21
#endif /* !defined(_ANSI_SOURCE) && ... */
#endif /* !__mc68010__ */
#endif /* !_M68K_FLOAT_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee.h,v 1.4 2003/10/23 16:57:20 kleink Exp $ */
/* $NetBSD: ieee.h,v 1.5 2003/10/26 10:08:02 kleink Exp $ */
/*
* Copyright (c) 1992, 1993
@ -80,8 +80,10 @@
#define DBL_EXPBITS 11
#define DBL_FRACBITS 52
#ifndef __mc68010__
#define EXT_EXPBITS 15
#define EXT_FRACBITS 64
#endif
struct ieee_single {
u_int sng_sign:1;
@ -96,6 +98,7 @@ struct ieee_double {
u_int dbl_fracl;
};
#ifndef __mc68010__
struct ieee_ext {
u_int ext_sign:1;
u_int ext_exp:15;
@ -104,6 +107,7 @@ struct ieee_ext {
u_int ext_frach:31;
u_int ext_fracl;
};
#endif
/*
* Floats whose exponent is in [1..INFNAN) (of whatever type) are
@ -116,17 +120,23 @@ struct ieee_ext {
*/
#define SNG_EXP_INFNAN 255
#define DBL_EXP_INFNAN 2047
#ifndef __mc68010__
#define EXT_EXP_INFNAN 32767
#endif
#if 0
#define SNG_QUIETNAN (1 << 22)
#define DBL_QUIETNAN (1 << 19)
#ifndef __mc68010__
#define EXT_QUIETNAN (1 << 15)
#endif
#endif
/*
* Exponent biases.
*/
#define SNG_EXP_BIAS 127
#define DBL_EXP_BIAS 1023
#ifndef __mc68010__
#define EXT_EXP_BIAS 16383
#endif