2006-06-23 01:59:52 +08:00
|
|
|
#ifdef __IEEE_BIG_ENDIAN
|
|
|
|
|
2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
* libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS
versions.
(ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS.
(ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4):
Likewise.
* libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS
versions.
(enan): Handle legacy MIPS payloads.
* libm/common/s_nan.c (nan): Use __builtin_nan if supported by
the compiler.
* libm/common/sf_nan.c (nanf): Likewise.
2014-03-22 05:27:29 +08:00
|
|
|
#if !defined(__mips)
|
2006-06-23 01:59:52 +08:00
|
|
|
#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
|
2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
* libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS
versions.
(ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS.
(ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4):
Likewise.
* libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS
versions.
(enan): Handle legacy MIPS payloads.
* libm/common/s_nan.c (nan): Use __builtin_nan if supported by
the compiler.
* libm/common/sf_nan.c (nanf): Likewise.
2014-03-22 05:27:29 +08:00
|
|
|
#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
|
2006-06-23 01:59:52 +08:00
|
|
|
|
|
|
|
#elif defined(__IEEE_LITTLE_ENDIAN)
|
|
|
|
|
2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
* libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS
versions.
(ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS.
(ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4):
Likewise.
* libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS
versions.
(enan): Handle legacy MIPS payloads.
* libm/common/s_nan.c (nan): Use __builtin_nan if supported by
the compiler.
* libm/common/sf_nan.c (nanf): Likewise.
2014-03-22 05:27:29 +08:00
|
|
|
#if !defined(__mips)
|
2006-06-23 01:59:52 +08:00
|
|
|
#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
|
2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
* libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS
versions.
(ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS.
(ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4):
Likewise.
* libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS
versions.
(enan): Handle legacy MIPS payloads.
* libm/common/s_nan.c (nan): Use __builtin_nan if supported by
the compiler.
* libm/common/sf_nan.c (nanf): Likewise.
2014-03-22 05:27:29 +08:00
|
|
|
#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
|
2006-06-23 01:59:52 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
#error IEEE endian not defined
|
|
|
|
#endif
|