From eb8dd9dca1228af0cd132f515509051ecfabf6f6 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Mon, 14 Apr 2025 17:32:06 +0000 Subject: This commit was manufactured by cvs2git to create tag 'tb_20250414'. --- src/regress/lib/libc/arch/alpha/Makefile | 9 - .../lib/libc/arch/alpha/divremtest/Makefile | 30 ---- .../lib/libc/arch/alpha/divremtest/divremtest.c | 184 --------------------- .../lib/libc/arch/alpha/divremtest/mkcases.c | 64 ------- .../lib/libc/arch/alpha/divremtest/mktestcases.c | 68 -------- 5 files changed, 355 deletions(-) delete mode 100644 src/regress/lib/libc/arch/alpha/Makefile delete mode 100644 src/regress/lib/libc/arch/alpha/divremtest/Makefile delete mode 100644 src/regress/lib/libc/arch/alpha/divremtest/divremtest.c delete mode 100644 src/regress/lib/libc/arch/alpha/divremtest/mkcases.c delete mode 100644 src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c (limited to 'src/regress/lib/libc/arch/alpha') diff --git a/src/regress/lib/libc/arch/alpha/Makefile b/src/regress/lib/libc/arch/alpha/Makefile deleted file mode 100644 index 8c4dfb735c..0000000000 --- a/src/regress/lib/libc/arch/alpha/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# $OpenBSD: Makefile,v 1.3 2002/02/23 01:25:11 art Exp $ -# $NetBSD: Makefile,v 1.1 1995/04/24 05:53:31 cgd Exp $ - -# do nothing here; none of the tests here can be run automatically -SUBDIR= - -install: - -.include diff --git a/src/regress/lib/libc/arch/alpha/divremtest/Makefile b/src/regress/lib/libc/arch/alpha/divremtest/Makefile deleted file mode 100644 index 1da3ac8494..0000000000 --- a/src/regress/lib/libc/arch/alpha/divremtest/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2001/01/29 02:05:39 niklas Exp $ -# $NetBSD: Makefile,v 1.1 1995/04/24 05:53:34 cgd Exp $ - -PROG= divremtest -NOMAN= - -CLEANFILES+= mkcases cases.c mktestcases testcases - -divremtest.c: cases.c - -cases.c: mkcases - /bin/rm -f cases.c - mkcases > cases.c - -# a typical strategy to use this: -# compile a NetBSD divremtest binary, an OSF/1 divremtest binary, and an -# OSF/1 mktestcases binary. You then run mktestecases | divremtest -g -# on an OSF/1 machine, and pipe the output to an rsh to a NetBSD machine -# which then runs divremtest. You can test an infinite number of random -# values that way; I like to put a 'dd' in, so I can see how much I've done. - -testcases: mktestcases divremtest - /bin/rm -f testcases - mktestcases | divremtest -g > testcases - -regress: - @echo THIS TEST CANNOT BE RUN AUTOMATICALLY. - @false - -.include diff --git a/src/regress/lib/libc/arch/alpha/divremtest/divremtest.c b/src/regress/lib/libc/arch/alpha/divremtest/divremtest.c deleted file mode 100644 index 3d9e8a6de2..0000000000 --- a/src/regress/lib/libc/arch/alpha/divremtest/divremtest.c +++ /dev/null @@ -1,184 +0,0 @@ -/* $OpenBSD: divremtest.c,v 1.2 2001/01/29 02:05:39 niklas Exp $ */ -/* $NetBSD: divremtest.c,v 1.1 1995/04/24 05:53:35 cgd Exp $ */ - -/* - * Copyright (c) 1995 Christopher G. Demetriou - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 -#include -#include - -void testfile(); -void usage(); - -int generate; - -int -main(argc, argv) - int argc; - char **argv; -{ - int c; - - signal(SIGFPE, SIG_IGN); - - while ((c = getopt(argc, argv, "g")) != -1) - switch (c) { - case 'g': - generate = 1; - break; - - default: - usage(); - break; - } - - argc -= optind; - argv += optind; - - if (argc == 0) - testfile(); - else - for (; argc != 0; argc--, argv++) { - if (freopen(argv[0], "r", stdin) == NULL) { - fprintf(stderr, - "divremtest: couldn't open %s\n", - argv[0]); - exit(1); - } - - testfile(); - } - - exit(0); -} - -void -testfile() -{ - union operand { - unsigned long input; - int op_int; - unsigned int op_u_int; - long op_long; - unsigned long op_u_long; - } op1, op2, divres, modres, divwant, modwant; - char opspec[6]; - int encoded, i; - - while (scanf("%6c %lx %lx %lx %lx\n", opspec, &op1.input, - &op2.input, &divwant.input, &modwant.input) != EOF) { - - encoded = 0; - - for (i = 0; i < 6; i += 2) { - int posval; - - switch (opspec[i]) { - case '.': - posval = 0; - break; - case '-': - posval = 1; - break; - default: - fprintf(stderr, - "unknown signedness spec %c\n", - opspec[i]); - exit(1); - } - encoded |= posval << ((5 - i) * 4); - } - - for (i = 1; i < 6; i += 2) { - int posval; - - switch (opspec[i]) { - case 'i': - posval = 0; - break; - case 'l': - posval = 1; - break; - default: - fprintf(stderr, "unknown length spec %c\n", - opspec[i]); - exit(1); - } - encoded |= posval << ((5 - i) * 4); - } - - /* KILL ME!!! */ - switch (encoded) { - -#define TRY_IT(a, b, c) \ - divres.a = op1.b / op2.c; \ - modres.a = op1.b % op2.c; \ - if (generate) { \ - printf("%6s 0x%016lx 0x%016lx 0x%016lx 0x%016lx\n", \ - opspec, op1.input, op2.input, \ - divres.a, modres.a); \ - } else { \ - if ((divres.a != divwant.a) || \ - (modres.a != modwant.a)) { \ - fprintf(stderr, "%6s 0x%016lx 0x%016lx\n", \ - opspec, op1.input, op2.input); \ - fprintf(stderr, "FAILED:\n"); \ - fprintf(stderr, \ - "div:\twanted 0x%16lx, got 0x%16lx\n", \ - divwant.a, divres.a); \ - fprintf(stderr, \ - "mod:\twanted 0x%16lx, got 0x%16lx\n", \ - modwant.a, modres.a); \ - \ - exit(1); \ - } \ - } - -#include "cases.c" - -#undef TRY_IT - - default: - fprintf(stderr, - "INTERNAL ERROR: unknown encoding %x\n", encoded); - exit(1); - } - } -} - -void -usage() -{ - - fprintf(stderr, "usage: divremtest [-v] [testfile ...]\n"); - exit(1); -} diff --git a/src/regress/lib/libc/arch/alpha/divremtest/mkcases.c b/src/regress/lib/libc/arch/alpha/divremtest/mkcases.c deleted file mode 100644 index fcb4765b8c..0000000000 --- a/src/regress/lib/libc/arch/alpha/divremtest/mkcases.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $OpenBSD: mkcases.c,v 1.2 2001/01/29 02:05:39 niklas Exp $ */ -/* $NetBSD: mkcases.c,v 1.1 1995/04/24 05:53:36 cgd Exp $ */ - -/* - * Copyright (c) 1995 Christopher G. Demetriou - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -char *tab[4] = { "u_int", "int", "u_long", "long" }; - -int -main() -{ - int i; - - for (i = 0; i < 64; i++) { - printf( -" case 0x%d%d%d%d%d%d: /* %s <= %s op %s */\n", - (i >> 5) & 1, - (i >> 4) & 1, - (i >> 3) & 1, - (i >> 2) & 1, - (i >> 1) & 1, - (i >> 0) & 1, - tab[(i >> 4) & 0x3], - tab[(i >> 2) & 0x3], - tab[(i >> 0) & 0x3]); - printf( -" TRY_IT(op_%s, op_%s, op_%s);\n", - tab[(i >> 4) & 0x3], - tab[(i >> 2) & 0x3], - tab[(i >> 0) & 0x3]); - printf( -" break;\n\n"); - } - - exit(0); -} diff --git a/src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c b/src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c deleted file mode 100644 index 3b01653f32..0000000000 --- a/src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $OpenBSD: mktestcases.c,v 1.2 2001/01/29 02:05:40 niklas Exp $ */ -/* $NetBSD: mktestcases.c,v 1.1 1995/04/24 05:53:37 cgd Exp $ */ - -/* - * Copyright (c) 1995 Christopher G. Demetriou - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou - * for the NetBSD Project. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 - -int -main() -{ - int i, j; - unsigned long n1, n2; - - srandom(time(NULL)); - - for (i = 1; /* i < 10240 */ 1; i++) { - n1 = (unsigned) - (random() & ((random() & random()) | 0x80000000)); - n1 <<= 32; - n1 |= (unsigned)(random() & random() & random()); - - n2 = (unsigned) - (random() & ((random() & random()) | 0x80000000)); - n2 <<= 32; - n2 |= (unsigned)(random() & random() & random()); - - for (j = 0; j < 64; j++) { - char *tab[] = { ".i", ".l", "-i", "-l" }; - - printf("%s%s%s 0x%lx 0x%lx 0 0\n", - tab[(j >> 4) & 0x3], - tab[(j >> 2) & 0x3], - tab[(j >> 0) & 0x3], - n1, n2); - } - } - - exit(0); -} -- cgit v1.2.3-55-g6feb