summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c')
-rw-r--r--src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c b/src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c
new file mode 100644
index 0000000000..ef02d61d70
--- /dev/null
+++ b/src/regress/lib/libc/arch/alpha/divremtest/mktestcases.c
@@ -0,0 +1,67 @@
1/* $NetBSD: mktestcases.c,v 1.1 1995/04/24 05:53:37 cgd Exp $ */
2
3/*
4 * Copyright (c) 1995 Christopher G. Demetriou
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Christopher G. Demetriou
18 * for the NetBSD Project.
19 * 4. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <stdio.h>
35
36int
37main()
38{
39 int i, j;
40 unsigned long n1, n2;
41
42 srandom(time(NULL));
43
44 for (i = 1; /* i < 10240 */ 1; i++) {
45 n1 = (unsigned)
46 (random() & ((random() & random()) | 0x80000000));
47 n1 <<= 32;
48 n1 |= (unsigned)(random() & random() & random());
49
50 n2 = (unsigned)
51 (random() & ((random() & random()) | 0x80000000));
52 n2 <<= 32;
53 n2 |= (unsigned)(random() & random() & random());
54
55 for (j = 0; j < 64; j++) {
56 char *tab[] = { ".i", ".l", "-i", "-l" };
57
58 printf("%s%s%s 0x%lx 0x%lx 0 0\n",
59 tab[(j >> 4) & 0x3],
60 tab[(j >> 2) & 0x3],
61 tab[(j >> 0) & 0x3],
62 n1, n2);
63 }
64 }
65
66 exit(0);
67}