summaryrefslogtreecommitdiff
path: root/sysdeps/m68k/huge_val.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-06-04 19:05:38 +0000
committerUlrich Drepper <drepper@redhat.com>1997-06-04 19:05:38 +0000
commit5649a1d60d4e752b4941663ea63391b5f1a8b7e4 (patch)
tree34db6ae3dd1d986185b7d92e7e1cdc8d70766d36 /sysdeps/m68k/huge_val.h
parent2a7b5469ddab5bfb79268d33420853abd2468fce (diff)
1997-06-04 20:57 Ulrich Drepper <drepper@cygnus.com> * manual/string.texi: Add comments to discourage use of index and rindex. (strtok, strsep): Apply function on copy of the strings in example. (l64a): Add example. * posix/unistd.h: Correct value for _POSIX_VERSION. * sunrpc/Makefile (defines): Remove definition. * sysdeps/ieee754/nan.h: Correct typo. 1997-06-04 10:50 Fila Kolodny <fila@ibi.com> * posix/unistd.h: Add definition of __fchdir corresponding to fchdir. * login/utmp_daemon.c: Correct location of utmpd.h. 1997-06-03 19:16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules: Rename $(common-objpfx)distinfo-$(subdir) to $(objpfx)distinfo. * rpm/Makefile (distinfo): Adapted. 1997-06-03 18:32 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * rpm/Makefile (install-slib): Collect shared libraries here instead of in install-lib, including libc. (instvars): Add slib. 1997-06-03 18:23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * login/Makefile (libutil-routines): Add updwtmp. 1997-06-03 16:16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * monetary.h: New file, needed for localedata/tst-fmon.c. 1997-06-02 20:31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c (cpow_test): Add epsilon for long double in test for 2^10. (identities): Add epsilon for float in second identity test. * sysdeps/m68k/huge_val.h: Change GCC's HUGE_VAL{,F,L} to use DI and SI mode integers instead of bytes. Fix value of HUGE_VALL. * sysdeps/m68k/nan.h: New file. * sysdeps/m68k/fpu/__math.h (isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered): Fix assembler syntax. * sysdeps/m68k/fpu/fraiseexcpt.c: Do it right so that gcc doesn't optimize out the operations. * sysdeps/libm-ieee754/s_nan.c: Use NaN macro instead of static constant. * sysdeps/libm-ieee754/s_nanf.c: Likewise. * sysdeps/libm-ieee754/s_nanl.c: Likewise. * math/carg.c [NO_LONG_DOUBLE]: Add alias for long double function. * sysdeps/libm-ieee754/s_erf.c: Likewise. * sysdeps/libm-ieee754/s_fdim.c: Likewise. * sysdeps/libm-ieee754/s_fmax.c: Likewise. * sysdeps/libm-ieee754/s_fmin.c: Likewise. * sysdeps/libm-ieee754/s_log2.c: Likewise. * sysdeps/libm-ieee754/s_nan.c: Likewise. * sysdeps/libm-ieee754/s_remquo.c: Likewise.
Diffstat (limited to 'sysdeps/m68k/huge_val.h')
-rw-r--r--sysdeps/m68k/huge_val.h51
1 files changed, 28 insertions, 23 deletions
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
index 8d45aaec2b..c71454e9a8 100644
--- a/sysdeps/m68k/huge_val.h
+++ b/sysdeps/m68k/huge_val.h
@@ -26,15 +26,19 @@
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-
-#define __huge_val_t union { unsigned char __c[8]; double __d; }
#ifdef __GNUC__
-#define HUGE_VAL (__extension__ \
- ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d)
-#else /* Not GCC. */
-static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+
+#define HUGE_VAL \
+ (__extension__ \
+ ((union { unsigned long long __l; double __d; }) \
+ { __l: 0x7ff0000000000000ULL }).__d)
+
+#else /* not GCC */
+
+static union { unsigned char __c[8]; double __d; } __huge_val =
+ { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
#define HUGE_VAL (__huge_val.__d)
+
#endif /* GCC. */
@@ -42,27 +46,28 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
#ifdef __USE_ISOC9X
-#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
+#ifdef __GNUC__
-#define __huge_valf_t union { unsigned char __c[4]; float __f; }
-#ifdef __GNUC__
-#define HUGE_VALF (__extension__ \
- ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f)
-#else /* Not GCC. */
-static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-#define HUGE_VALF (__huge_valf.__f)
-#endif /* GCC. */
+#define HUGE_VALF \
+ (__extension__ \
+ ((union { unsigned long __l; float __f; }) \
+ { __l: 0x7f800000UL }).__f)
+#define HUGE_VALL \
+ (__extension__ \
+ ((union { unsigned long __l[3]; long double __ld; }) \
+ { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
-#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+#else /* not GCC */
-#define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
-#ifdef __GNUC__
-#define HUGE_VALL (__extension__ \
- ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
-#else /* Not GCC. */
-static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
+static union { unsigned char __c[4]; float __f; } __huge_valf =
+ { { 0x7f, 0x80, 0, 0 } };
+#define HUGE_VALF (__huge_valf.__f)
+
+static union { unsigned char __c[12]; long double __ld; } __huge_vall =
+ { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
#define HUGE_VALL (__huge_vall.__ld)
+
#endif /* GCC. */
#endif /* __USE_ISOC9X. */