diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-29 16:59:17 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-29 16:59:17 +0000 |
commit | cca61561941a9c9b2cf068fc2e03370efb4a47b1 (patch) | |
tree | 6f5423ee2393152d8e7d286844f99a320693ec0a /sys/lib/libkern | |
parent | 1c2334f6fa47d90f6b21649a2db2fbb0508c7d1d (diff) |
Unifdef NO_IEEE in the libkern softfloat code, and put an appropriate rule
in files.alpha to compensate for NO_IEEE kernels.
This will allow the softfloat code to be used by other platforms than alpha.
Diffstat (limited to 'sys/lib/libkern')
-rw-r--r-- | sys/lib/libkern/milieu.h | 5 | ||||
-rw-r--r-- | sys/lib/libkern/softfloat-macros.h | 32 | ||||
-rw-r--r-- | sys/lib/libkern/softfloat-specialize.h | 6 | ||||
-rw-r--r-- | sys/lib/libkern/softfloat.c | 6 | ||||
-rw-r--r-- | sys/lib/libkern/softfloat.h | 6 |
5 files changed, 32 insertions, 23 deletions
diff --git a/sys/lib/libkern/milieu.h b/sys/lib/libkern/milieu.h index 53538bf6e0d..84936dad799 100644 --- a/sys/lib/libkern/milieu.h +++ b/sys/lib/libkern/milieu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: milieu.h,v 1.1 2002/04/28 20:55:14 pvalchev Exp $ */ +/* $OpenBSD: milieu.h,v 1.2 2007/12/29 16:59:16 miod Exp $ */ /* $NetBSD: milieu.h,v 1.1 2001/04/26 03:10:47 ross Exp $ */ /* This is a derivative work. */ @@ -67,8 +67,6 @@ this code that are retained. =============================================================================== */ -#ifndef NO_IEEE - #ifndef MILIEU_H #define MILIEU_H @@ -160,4 +158,3 @@ to be `static'. #define INLINE static inline #endif -#endif /* !NO_IEEE */ diff --git a/sys/lib/libkern/softfloat-macros.h b/sys/lib/libkern/softfloat-macros.h index b6dedb99f29..d7f6e55fd15 100644 --- a/sys/lib/libkern/softfloat-macros.h +++ b/sys/lib/libkern/softfloat-macros.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softfloat-macros.h,v 1.1 2002/04/28 20:55:14 pvalchev Exp $ */ +/* $OpenBSD: softfloat-macros.h,v 1.2 2007/12/29 16:59:16 miod Exp $ */ /* $NetBSD: softfloat-macros.h,v 1.1 2001/04/26 03:10:47 ross Exp $ */ /* @@ -35,8 +35,6 @@ this code that are retained. =============================================================================== */ -#ifndef NO_IEEE - /* ------------------------------------------------------------------------------- Shifts `a' right by the number of bits given in `count'. If any nonzero @@ -138,6 +136,8 @@ INLINE void } +#if defined(FLOATX80) || defined(FLOAT128) + /* ------------------------------------------------------------------------------- Shifts the 128-bit value formed by concatenating `a0' and `a1' right by the @@ -305,6 +305,10 @@ INLINE void } +#endif /* FLOATX80 || FLOAT128 */ + +#ifdef FLOAT128 + /* ------------------------------------------------------------------------------- Shifts the 192-bit value formed by concatenating `a0', `a1', and `a2' left @@ -342,6 +346,8 @@ INLINE void } +#endif /* FLOAT128 */ + /* ------------------------------------------------------------------------------- Adds the 128-bit value formed by concatenating `a0' and `a1' to the 128-bit @@ -362,6 +368,8 @@ INLINE void } +#if defined(FLOATX80) || defined(FLOAT128) + /* ------------------------------------------------------------------------------- Adds the 192-bit value formed by concatenating `a0', `a1', and `a2' to the @@ -401,6 +409,8 @@ INLINE void } +#endif /* FLOATX80 || FLOAT128 */ + /* ------------------------------------------------------------------------------- Subtracts the 128-bit value formed by concatenating `b0' and `b1' from the @@ -420,6 +430,8 @@ INLINE void } +#if defined(FLOATX80) || defined(FLOAT128) + /* ------------------------------------------------------------------------------- Subtracts the 192-bit value formed by concatenating `b0', `b1', and `b2' @@ -459,6 +471,8 @@ INLINE void } +#endif /* FLOATX80 || FLOAT128 */ + /* ------------------------------------------------------------------------------- Multiplies `a' by `b' to obtain a 128-bit product. The product is broken @@ -489,6 +503,8 @@ INLINE void mul64To128( bits64 a, bits64 b, bits64 *z0Ptr, bits64 *z1Ptr ) } +#ifdef FLOAT128 + /* ------------------------------------------------------------------------------- Multiplies the 128-bit value formed by concatenating `a0' and `a1' by @@ -556,6 +572,8 @@ INLINE void } +#endif /* FLOAT128 */ + /* ------------------------------------------------------------------------------- Returns an approximation to the 64-bit integer quotient obtained by dividing @@ -694,6 +712,8 @@ static int8 countLeadingZeros64( bits64 a ) } +#if defined(FLOATX80) || defined(FLOAT128) + /* ------------------------------------------------------------------------------- Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' @@ -736,6 +756,10 @@ INLINE flag lt128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) } +#endif /* FLOATX80 || FLOAT128 */ + +#if 0 + /* ------------------------------------------------------------------------------- Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' is @@ -750,4 +774,4 @@ INLINE flag ne128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) } -#endif /* !NO_IEEE */ +#endif diff --git a/sys/lib/libkern/softfloat-specialize.h b/sys/lib/libkern/softfloat-specialize.h index db9fb08b4ed..a9b6f223c19 100644 --- a/sys/lib/libkern/softfloat-specialize.h +++ b/sys/lib/libkern/softfloat-specialize.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softfloat-specialize.h,v 1.1 2002/04/28 20:55:14 pvalchev Exp $ */ +/* $OpenBSD: softfloat-specialize.h,v 1.2 2007/12/29 16:59:16 miod Exp $ */ /* $NetBSD: softfloat-specialize.h,v 1.1 2001/04/26 03:10:47 ross Exp $ */ /* This is a derivative work. */ @@ -79,8 +79,6 @@ Underflow tininess-detection mode, statically initialized to default value. ------------------------------------------------------------------------------- */ -#ifndef NO_IEEE - /* [ MP safe, does not change dynamically ] */ int float_detect_tininess = float_tininess_after_rounding; @@ -491,5 +489,3 @@ static float128 propagateFloat128NaN( float128 a, float128 b ) } #endif - -#endif /* !NO_IEEE */ diff --git a/sys/lib/libkern/softfloat.c b/sys/lib/libkern/softfloat.c index 853f9fb4972..848407619ce 100644 --- a/sys/lib/libkern/softfloat.c +++ b/sys/lib/libkern/softfloat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softfloat.c,v 1.1 2002/04/28 20:55:14 pvalchev Exp $ */ +/* $OpenBSD: softfloat.c,v 1.2 2007/12/29 16:59:16 miod Exp $ */ /* $NetBSD: softfloat.c,v 1.1 2001/04/26 03:10:47 ross Exp $ */ /* @@ -49,8 +49,6 @@ this code that are retained. =============================================================================== */ -#ifndef NO_IEEE - #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) __RCSID("$NetBSD: softfloat.c,v 1.1 2001/04/26 03:10:47 ross Exp $"); @@ -5502,5 +5500,3 @@ uint32 float32_to_uint32_round_to_zero( float32 a ) } #endif - -#endif /* !NO_IEEE */ diff --git a/sys/lib/libkern/softfloat.h b/sys/lib/libkern/softfloat.h index 032408f40c7..16504af2775 100644 --- a/sys/lib/libkern/softfloat.h +++ b/sys/lib/libkern/softfloat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: softfloat.h,v 1.1 2002/04/28 20:55:14 pvalchev Exp $ */ +/* $OpenBSD: softfloat.h,v 1.2 2007/12/29 16:59:16 miod Exp $ */ /* $NetBSD: softfloat.h,v 1.1 2001/04/26 03:10:48 ross Exp $ */ /* This is a derivative work. */ @@ -73,8 +73,6 @@ this code that are retained. =============================================================================== */ -#ifndef NO_IEEE - #include <sys/types.h> #if !defined(_KERNEL) && !defined(_STANDALONE) @@ -372,5 +370,3 @@ int float128_lt_quiet( float128, float128 ); int float128_is_signaling_nan( float128 ); #endif - -#endif /* !NO_IEEE */ |