diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-07-13 14:53:55 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-07-13 14:53:55 +0000 |
commit | 0147d73439fae6cc68545c98899dbd920e45b067 (patch) | |
tree | a55bf2fbe9257834ce8f4586422f57810c8e4c90 /regress/lib | |
parent | 0aebd68c444b0b85d8331fe71108a2ef6f838684 (diff) |
As mickey@ pointed out, this test does not belong in libm. Move to
correct place.
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libm/Makefile | 4 | ||||
-rw-r--r-- | regress/lib/libm/fpsig/Makefile | 5 | ||||
-rw-r--r-- | regress/lib/libm/fpsig/fpsig.c | 54 |
3 files changed, 2 insertions, 61 deletions
diff --git a/regress/lib/libm/Makefile b/regress/lib/libm/Makefile index 42d2c6afad5..c0ccaf967fd 100644 --- a/regress/lib/libm/Makefile +++ b/regress/lib/libm/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.5 2005/07/13 07:08:00 otto Exp $ +# $OpenBSD: Makefile,v 1.6 2005/07/13 14:53:54 otto Exp $ -SUBDIR+= rint floor toint trivial1 fpsig +SUBDIR+= rint floor toint trivial1 install: diff --git a/regress/lib/libm/fpsig/Makefile b/regress/lib/libm/fpsig/Makefile deleted file mode 100644 index 1e3962033dd..00000000000 --- a/regress/lib/libm/fpsig/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 2005/07/13 07:08:00 otto Exp $ - -PROG=fpsig - -.include <bsd.regress.mk> diff --git a/regress/lib/libm/fpsig/fpsig.c b/regress/lib/libm/fpsig/fpsig.c deleted file mode 100644 index 4b9fb6a0cf9..00000000000 --- a/regress/lib/libm/fpsig/fpsig.c +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: fpsig.c,v 1.1 2005/07/13 07:08:00 otto Exp $ */ - -/* - * Public domain. 2005, Otto Moerbeek - * - * Try to check if fp registers are properly saved and restored while - * calling a signal hander. This is not supposed to catch all that - * can go wrong, but trashed fp regsiters will typically get caught. - */ - -#include <err.h> -#include <signal.h> -#include <unistd.h> - -#define LIMIT 10.0 - -volatile sig_atomic_t count; - -double g1; -double g2; - -void -handler(int signo) -{ - double a, b, c = 0.0; - - if (signo) - alarm(1); - for (a = 0.0; a < LIMIT; a++) - for (b = 0.0; b < LIMIT; b++) - c += a * a + b * b; - - if (signo) { - g1 = c; - count++; - } else - g2 = c; -} - -int -main() -{ - signal(SIGALRM, handler); - /* initialize global vars */ - handler(0); - handler(1); - - while (count < 10) { - handler(0); - if (g1 != g2) - errx(1, "%f %f", g1, g2); - } - return (0); -} |