Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/arm/gen On FPA, switch back `long double' to d...
details: https://anonhg.NetBSD.org/src/rev/2ee12759f9b7
branches: trunk
changeset: 554268:2ee12759f9b7
user: kleink <kleink%NetBSD.org@localhost>
date: Sun Oct 26 16:00:17 2003 +0000
description:
On FPA, switch back `long double' to double-precision. According to
Richard Earnshaw, extended-precision was never supported by the compiler.
diffstat:
lib/libc/arch/arm/gen/Makefile.inc | 6 +-
lib/libc/arch/arm/gen/infinity.c | 4 +-
lib/libc/arch/arm/gen/infinityl.c | 10 ++--
lib/libc/arch/arm/gen/isinfl.c | 81 --------------------------------------
lib/libc/arch/arm/gen/isnanl.c | 80 -------------------------------------
5 files changed, 11 insertions(+), 170 deletions(-)
diffs (231 lines):
diff -r dcb1fd5317e2 -r 2ee12759f9b7 lib/libc/arch/arm/gen/Makefile.inc
--- a/lib/libc/arch/arm/gen/Makefile.inc Sun Oct 26 15:57:54 2003 +0000
+++ b/lib/libc/arch/arm/gen/Makefile.inc Sun Oct 26 16:00:17 2003 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile.inc,v 1.8 2003/10/25 22:31:20 kleink Exp $
+# $NetBSD: Makefile.inc,v 1.9 2003/10/26 16:00:17 kleink Exp $
SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \
fabs.c flt_rounds.c \
- infinity.c infinityl.c \
- isinfl.c isnanl.c
+ infinity.c infinityl.c
# Common ieee754 constants and functions
SRCS+= infinityf_ieee754.c nanf_ieee754.c
+SRCS+= isinfl_dbl_ieee754.c isnanl_dbl_ieee754.c
SRCS+= frexp_ieee754.c isinf_ieee754.c isnan_ieee754.c
SRCS+= ldexp_ieee754.c modf_ieee754.c
diff -r dcb1fd5317e2 -r 2ee12759f9b7 lib/libc/arch/arm/gen/infinity.c
--- a/lib/libc/arch/arm/gen/infinity.c Sun Oct 26 15:57:54 2003 +0000
+++ b/lib/libc/arch/arm/gen/infinity.c Sun Oct 26 16:00:17 2003 +0000
@@ -1,7 +1,9 @@
-/* $NetBSD: infinity.c,v 1.4 2003/10/25 16:17:44 kleink Exp $ */
+/* $NetBSD: infinity.c,v 1.5 2003/10/26 16:00:17 kleink Exp $ */
/*
* IEEE-compatible infinity.c -- public domain.
+ * For VFP (plain double-precision) and
+ * for FPA (which is a different layout thereof).
*/
#include <math.h>
diff -r dcb1fd5317e2 -r 2ee12759f9b7 lib/libc/arch/arm/gen/infinityl.c
--- a/lib/libc/arch/arm/gen/infinityl.c Sun Oct 26 15:57:54 2003 +0000
+++ b/lib/libc/arch/arm/gen/infinityl.c Sun Oct 26 16:00:17 2003 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: infinityl.c,v 1.1 2003/10/25 22:31:20 kleink Exp $ */
+/* $NetBSD: infinityl.c,v 1.2 2003/10/26 16:00:17 kleink Exp $ */
/*
* IEEE-compatible infinityl.c -- public domain.
* For VFP (where long double == double) and
- * for FPA (where an 80-bit format with padding is used).
+ * for FPA (which ia a different layout thereof).
*/
#include <math.h>
@@ -12,10 +12,10 @@
const union __long_double_u __infinityl =
#ifdef __VFP_FP__
#if BYTE_ORDER == BIG_ENDIAN
- { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
+ { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
#else
- { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
+ { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
#endif /* BYTE_ORDER == BIG_ENDIAN */
#else
- { { 0xff, 0x7f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
+ { { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } };
#endif /* __VFP_FP__ */
diff -r dcb1fd5317e2 -r 2ee12759f9b7 lib/libc/arch/arm/gen/isinfl.c
--- a/lib/libc/arch/arm/gen/isinfl.c Sun Oct 26 15:57:54 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/* $NetBSD: isinfl.c,v 1.4 2003/10/25 21:54:30 kleink Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: Header: isinf.c,v 1.1 91/07/08 19:03:34 torek Exp
- */
-
-#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: isinfl.c,v 1.4 2003/10/25 21:54:30 kleink Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <machine/ieee.h>
-#include <math.h>
-
-#if 0 /* XXX Currently limited to internal use. */
-#ifdef __weak_alias
-__weak_alias(isinfl,_isinfl)
-#endif
-#endif
-
-int
-isinfl(long double ld)
-{
-#ifdef __VFP_FP__
- union {
- long double ld;
- struct ieee_double dbl;
- } u;
-
- u.ld = ld;
- return (u.dbl.dbl_exp == DBL_EXP_INFNAN &&
- (u.dbl.dbl_frach == 0 && u.dbl.dbl_fracl == 0));
-#else
- union {
- long double ld;
- struct ieee_ext ldbl;
- } u;
-
- u.ld = ld;
- return (u.ldbl.ext_exp == EXT_EXP_INFNAN &&
- (u.uldbl.ext_j == 0 &&
- u.ldbl.ext_frach == 0 && u.ldbl.ext_frachl == 0));
-#endif /* __VFP_FP__ */
-}
diff -r dcb1fd5317e2 -r 2ee12759f9b7 lib/libc/arch/arm/gen/isnanl.c
--- a/lib/libc/arch/arm/gen/isnanl.c Sun Oct 26 15:57:54 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/* $NetBSD: isnanl.c,v 1.3 2003/10/25 18:37:43 kleink Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: Header: isinf.c,v 1.1 91/07/08 19:03:34 torek Exp
- */
-
-#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
-#else
-__RCSID("$NetBSD: isnanl.c,v 1.3 2003/10/25 18:37:43 kleink Exp $");
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <machine/ieee.h>
-#include <math.h>
-
-#if 0 /* XXX Currently limited to internal use. */
-#ifdef __weak_alias
-__weak_alias(isnanl,_isnanl)
-#endif
-#endif
-
-int
-isnanl(long double ld)
-{
-#ifdef __VFP_FP__
- union {
- long double ld;
- struct ieee_double dbl;
- } u;
-
- u.ld = ld;
- return (u.dbl.dbl_exp == DBL_EXP_INFNAN &&
- (u.dbl.dbl_frach != 0 || u.dbl.dbl_fracl != 0));
-#else
- union {
- long double ld;
- struct ieee_ext ldbl;
- } u;
-
- u.ld = ld;
- return (u.ldbl.ext_exp == EXT_EXP_INFNAN &&
- (u.dbl.dbl_frach != 0 || u.dbl.dbl_fracl != 0));
-#endif /* __VFP_FP__ */
-}
Home |
Main Index |
Thread Index |
Old Index