Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/lib/libc The ieeefp stuff has been atf-ified, with t...
details: https://anonhg.NetBSD.org/src/rev/9f6270ee1549
branches: trunk
changeset: 760269:9f6270ee1549
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jan 02 03:59:34 2011 +0000
description:
The ieeefp stuff has been atf-ified, with the exception of ieeefp/testfloat
(which was never hooked into the build anyway).
diffstat:
regress/lib/libc/Makefile | 6 +-
regress/lib/libc/ieeefp/Makefile | 7 -
regress/lib/libc/ieeefp/Makefile.inc | 8 -
regress/lib/libc/ieeefp/except/Makefile | 10 -
regress/lib/libc/ieeefp/except/except.c | 171 --------------------------
regress/lib/libc/ieeefp/infinity/Makefile | 10 -
regress/lib/libc/ieeefp/infinity/infinity.c | 31 ----
regress/lib/libc/ieeefp/nan/Makefile | 10 -
regress/lib/libc/ieeefp/nan/nan.c | 27 ----
regress/lib/libc/ieeefp/round/Makefile | 10 -
regress/lib/libc/ieeefp/round/round.c | 44 ------
regress/lib/libc/ieeefp/subnormal/Makefile | 13 -
regress/lib/libc/ieeefp/subnormal/subnormal.c | 71 ----------
13 files changed, 1 insertions(+), 417 deletions(-)
diffs (truncated from 480 to 300 lines):
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/Makefile
--- a/regress/lib/libc/Makefile Sun Jan 02 03:52:15 2011 +0000
+++ b/regress/lib/libc/Makefile Sun Jan 02 03:59:34 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.69 2011/01/01 23:59:19 pgoyette Exp $
+# $NetBSD: Makefile,v 1.70 2011/01/02 03:59:34 pgoyette Exp $
SUBDIR+= atexit citrus db divrem getaddrinfo int_fmtio locale md5sha \
nsdispatch regex rpc servent sys time
@@ -6,10 +6,6 @@
.include <bsd.own.mk>
.include <bsd.sys.mk>
-.if (${MACHINE_ARCH} != "vax" && ${MACHINE_ARCH} != "m68000")
-SUBDIR+= ieeefp
-.endif
-
.if exists(arch/${MACHINE_ARCH})
SUBDIR+= arch/${MACHINE_ARCH}
.endif
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/Makefile
--- a/regress/lib/libc/ieeefp/Makefile Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# $NetBSD: Makefile,v 1.14 2006/02/21 16:36:57 drochner Exp $
-
-# Don't hook up testfloat just yet. (ross, 2001.3.12)
-
-SUBDIR+= except infinity nan round subnormal
-
-.include <bsd.subdir.mk>
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/Makefile.inc
--- a/regress/lib/libc/ieeefp/Makefile.inc Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# $NetBSD: Makefile.inc,v 1.3 2002/01/18 22:18:36 ross Exp $
-#
-# do not install regression test programs
-proginstall::
-
-.if ${MACHINE_ARCH} == "alpha"
-COPTS+= -mieee
-.endif
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/except/Makefile
--- a/regress/lib/libc/ieeefp/except/Makefile Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# $NetBSD: Makefile,v 1.5 2002/09/18 05:41:38 lukem Exp $
-
-NOMAN= # defined
-
-PROG= except
-
-regress: ${PROG}
- ./${PROG}
-
-.include <bsd.prog.mk>
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/except/except.c
--- a/regress/lib/libc/ieeefp/except/except.c Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/* $NetBSD: except.c,v 1.11 2008/04/28 20:23:04 martin Exp $ */
-
-/*-
- * Copyright (c) 1995 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
- */
-
-#include <stdio.h>
-#include <signal.h>
-#include <assert.h>
-#include <ieeefp.h>
-#include <float.h>
-#include <setjmp.h>
-#include <stdlib.h>
-
-void sigfpe(int, siginfo_t *, void *);
-volatile sig_atomic_t signal_caught;
-volatile int sicode;
-
-#ifdef USE_FLOAT
-#define FPTYPE float
-#else
-#ifdef USE_LONGDOUBLE
-#define FPTYPE long double
-#else
-#define FPTYPE double
-#endif
-#endif
-static volatile const FPTYPE one = 1.0;
-static volatile const FPTYPE zero = 0.0;
-#ifdef USE_FLOAT
-static volatile const float huge = FLT_MAX;
-static volatile const float tiny = FLT_MIN;
-#else
-#ifdef USE_LONGDOUBLE
-static volatile const long double huge = LDBL_MAX;
-static volatile const long double tiny = LDBL_MIN;
-#else
-static volatile const double huge = DBL_MAX;
-static volatile const double tiny = DBL_MIN;
-#endif
-#endif
-static volatile FPTYPE x;
-
-/* trip divide by zero */
-static void
-dz()
-{
-
- x = one / zero;
-}
-
-/* trip invalid operation */
-static void
-inv()
-{
-
- x = zero / zero;
-}
-
-/* trip overflow */
-static void
-ofl()
-{
-
- x = huge * huge;
-}
-
-/* trip underflow */
-static void
-ufl()
-{
-
- x = tiny * tiny;
-}
-
-static struct {
- void (*op)(void);
- fp_except mask;
- int sicode;
-} ops[] = {
- { dz, FP_X_DZ, FPE_FLTDIV },
- { inv, FP_X_INV, FPE_FLTINV },
- { ofl, FP_X_OFL, FPE_FLTOVF },
- { ufl, FP_X_UFL, FPE_FLTUND }
-};
-
-static sigjmp_buf b;
-
-main()
-{
- struct sigaction sa;
- fp_except ex1, ex2;
- int i, r;
-
- /*
- * check to make sure that all exceptions are masked and
- * that the accumulated exception status is clear.
- */
- assert(fpgetmask() == 0);
- assert(fpgetsticky() == 0);
-
- /* set up signal handler */
- sa.sa_sigaction = sigfpe;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_SIGINFO;
- sigaction(SIGFPE, &sa, 0);
- signal_caught = 0;
-
- /*
- * exceptions masked, check whether "sticky" bits are set correctly
- */
- for (i = 0; i < sizeof(ops)/sizeof(ops[0]); i++) {
- (*ops[i].op)();
- ex1 = fpgetsticky();
- assert(ex1 & ops[i].mask);
- assert(signal_caught == 0);
- /* check correct fpsetsticky() behaviour */
- ex2 = fpsetsticky(0);
- assert(fpgetsticky() == 0);
- assert(ex1 == ex2);
- }
-
-/* force delayed exceptions to be delivered */
-#define BARRIER() fpsetmask(0); x = one * one
- /*
- * exception unmasked, check SIGFPE delivery and correct siginfo
- */
- for (i = 0; i < sizeof(ops)/sizeof(ops[0]); i++) {
- fpsetmask(ops[i].mask);
- r = sigsetjmp(b, 1);
- if (!r) {
- (*ops[i].op)();
- BARRIER();
- }
- assert(signal_caught == 1);
- assert(sicode == ops[i].sicode);
- signal_caught = 0;
- }
-
- exit(0);
-}
-
-void
-sigfpe(int s, siginfo_t *si, void *c)
-{
- signal_caught = 1;
- sicode = si->si_code;
- siglongjmp(b, 1);
-}
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/infinity/Makefile
--- a/regress/lib/libc/ieeefp/infinity/Makefile Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# $NetBSD: Makefile,v 1.5 2004/03/05 01:00:53 kleink Exp $
-
-NOMAN= # defined
-
-PROG= infinity
-
-regress: ${PROG}
- ./${PROG}
-
-.include <bsd.prog.mk>
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/infinity/infinity.c
--- a/regress/lib/libc/ieeefp/infinity/infinity.c Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/* $NetBSD: infinity.c,v 1.5 2006/02/20 17:14:33 drochner Exp $ */
-
-/*
- * This file is in the Public Domain.
- *
- * Ben Harris, 2001
- */
-
-/*
- * Check that HUGE_VAL{,FL} (alias __infinity{,fl}) really is infinite.
- * Alternatively, check that isinf() minimally works.
- */
-
-#include <assert.h>
-#include <math.h>
-
-int
-main(int argc, char **argv)
-{
-
- /* HUGE_VAL is meant to be an infinity. */
- assert(isinf(HUGE_VAL));
-
- /* HUGE_VALF is the float analog of HUGE_VAL. */
- assert(isinf(HUGE_VALF));
-
- /* HUGE_VALL is the long double analog of HUGE_VAL. */
- assert(isinf(HUGE_VALL));
-
- return 0;
-}
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/nan/Makefile
--- a/regress/lib/libc/ieeefp/nan/Makefile Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# $NetBSD: Makefile,v 1.5 2004/03/05 01:00:53 kleink Exp $
-
-NOMAN= # defined
-
-PROG= nan
-
-regress: ${PROG}
- ./${PROG}
-
-.include <bsd.prog.mk>
diff -r d3af87c9d6d6 -r 9f6270ee1549 regress/lib/libc/ieeefp/nan/nan.c
--- a/regress/lib/libc/ieeefp/nan/nan.c Sun Jan 02 03:52:15 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/* $NetBSD: nan.c,v 1.5 2005/10/20 18:02:52 drochner Exp $ */
Home |
Main Index |
Thread Index |
Old Index