Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / pmax / test / fp7.c
blob48973d854039a72cf05fddf5ec1dcf6dab7bfc0f
1 #include <stdio.h>
2 #include <ctype.h>
3 #include <math.h>
5 int lineno;
7 union {
8 unsigned w[2];
9 double d;
10 } uda, udb, udc;
13 * Read test vectors from file and test the fp emulation by
14 * comparing it with the hardware.
16 main(argc, argv)
17 int argc;
18 char **argv;
20 register char *cp;
21 register int c;
22 char buf[10];
23 unsigned arg[4];
25 for (lineno = 1; ; lineno++) {
26 c = scanf("%x %x", &arg[1], &arg[0]);
27 if (c < 0)
28 break;
29 if (c != 2) {
30 fprintf(stderr, "line %d: expected 2 args\n",
31 lineno);
32 goto skip;
35 uda.w[0] = arg[0];
36 uda.w[1] = arg[1];
38 printf("line %d: (%x,%x) = %f\n",
39 lineno, uda.w[1], uda.w[0], uda.d);
40 skip:
41 while ((c = getchar()) != EOF && c != '\n')
46 trapsignal(p, sig, code)
47 int p, sig, code;
49 printf("line %d: signal(%d, %x)\n", lineno, sig, code);