Remove unused NaN's integer representation definitions

By previous commit, strto{d|ld} ("nan")
does not use the definition of NaN.
There is no other function that uses the definitions.

This commit remove the definitions.
This commit is contained in:
Masamichi Hosoda 2018-08-16 09:46:43 +09:00 committed by Corinna Vinschen
parent 6c212a8b78
commit 4c8fa88e4d
6 changed files with 8 additions and 93 deletions

View File

@ -1,53 +0,0 @@
#ifdef __IEEE_BIG_ENDIAN
#if !defined(__mips)
#define f_QNAN 0x7fc00000
#define d_QNAN0 0x7ff80000
#define d_QNAN1 0x0
#define ld_QNAN0 0x7ff80000
#define ld_QNAN1 0x0
#define ld_QNAN2 0x0
#define ld_QNAN3 0x0
#define ldus_QNAN0 0x7ff8
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
#define ldus_QNAN3 0x0
#define ldus_QNAN4 0x0
#elif defined(__mips_nan2008)
#define f_QNAN 0x7fc00000
#define d_QNAN0 0x7ff80000
#define d_QNAN1 0x0
#else
#define f_QNAN 0x7fbfffff
#define d_QNAN0 0x7ff7ffff
#define d_QNAN1 0xffffffff
#endif
#elif defined(__IEEE_LITTLE_ENDIAN)
#if !defined(__mips)
#define f_QNAN 0xffc00000
#define d_QNAN0 0x0
#define d_QNAN1 0xfff80000
#define ld_QNAN0 0x0
#define ld_QNAN1 0xc0000000
#define ld_QNAN2 0xffff
#define ld_QNAN3 0x0
#define ldus_QNAN0 0x0
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
#define ldus_QNAN3 0xc000
#define ldus_QNAN4 0xffff
#elif defined(__mips_nan2008)
#define f_QNAN 0x7fc00000
#define d_QNAN0 0x0
#define d_QNAN1 0x7ff80000
#else
#define f_QNAN 0x7fbfffff
#define d_QNAN0 0xffffffff
#define d_QNAN1 0x7ff7ffff
#endif
#else
#error IEEE endian not defined
#endif

View File

@ -35,7 +35,6 @@ THIS SOFTWARE.
#include <locale.h>
#include "mprec.h"
#include "gdtoa.h"
#include "gd_qnan.h"
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) && !defined(_SMALL_HEXDIG)
const unsigned char __hexdig[256]=

View File

@ -265,39 +265,6 @@ typedef union { double d; __ULong i[2]; } U;
#define INFNAN_CHECK
#endif
/*
* NAN_WORD0 and NAN_WORD1 are only referenced in strtod.c. Prior to
* 20050115, they used to be hard-wired here (to 0x7ff80000 and 0,
* respectively), but now are determined by compiling and running
* qnan.c to generate gd_qnan.h, which specifies d_QNAN0 and d_QNAN1.
* Formerly gdtoaimp.h recommended supplying suitable -DNAN_WORD0=...
* and -DNAN_WORD1=... values if necessary. This should still work.
* (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.)
*/
#ifdef IEEE_Arith
#ifdef IEEE_MC68k
#define _0 0
#define _1 1
#ifndef NAN_WORD0
#define NAN_WORD0 d_QNAN0
#endif
#ifndef NAN_WORD1
#define NAN_WORD1 d_QNAN1
#endif
#else
#define _0 1
#define _1 0
#ifndef NAN_WORD0
#define NAN_WORD0 d_QNAN1
#endif
#ifndef NAN_WORD1
#define NAN_WORD1 d_QNAN0
#endif
#endif
#else
#undef INFNAN_CHECK
#endif
#ifdef RND_PRODQUOT
#define rounded_product(a,b) a = rnd_prod(a, b)
#define rounded_quotient(a,b) a = rnd_quot(a, b)

View File

@ -137,7 +137,6 @@ THIS SOFTWARE.
#include <string.h>
#include "mprec.h"
#include "gdtoa.h"
#include "gd_qnan.h"
#include "../locale/setlocale.h"
/* #ifndef NO_FENV_H */
@ -172,6 +171,14 @@ static const double tinytens[] = { 1e-16, 1e-32,
#define Rounding Flt_Rounds
#endif
#ifdef IEEE_MC68k
#define _0 0
#define _1 1
#else
#define _0 1
#define _1 0
#endif
#ifdef Avoid_Underflow /*{*/
static double
sulp (U x,

View File

@ -35,7 +35,6 @@ THIS SOFTWARE.
#include <string.h>
#include "mprec.h"
#include "gdtoa.h"
#include "gd_qnan.h"
#include "locale.h"

View File

@ -35,13 +35,9 @@ THIS SOFTWARE.
#include <string.h>
#include "mprec.h"
#include "gdtoa.h"
#include "gd_qnan.h"
#if defined (_HAVE_LONG_DOUBLE) && !defined (_LDBL_EQ_DBL)
#undef _0
#undef _1
/* one or the other of IEEE_MC68k or IEEE_8087 should be #defined */
#ifdef IEEE_MC68k