OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.c-torture/] [unsorted/] [gen_tst.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Compiler Test Generator Program.
2
   Copyright (C) 1989 FSF.  */
3
 
4
 
5
#define E0 ((type *)10000000)
6
#define reg0 r0
7
#define indreg0 (*p0)
8
#define imm0 22
9
#define limm0 ((type)(int)&glob0)
10
#define adr0 (*E0)
11
#define adrreg0 (p0[10000000])
12
#define adrx0 (E0[x0])
13
#define regx0 (p0[x0])
14
 
15
#define E1 ((type *)11111111)
16
#define reg1 r1
17
#define indreg1 (*p1)
18
#define imm1 33
19
#define limm1 ((type)(int)&glob1)
20
#define adr1 (*E1)
21
#define adrreg1 (p1[1111111/4])
22
#define adrx1 (E1[x1])
23
#define regx1 (p1[x1])
24
 
25
int glob0, glob1;
26
 
27
#define type double
28
 
29
char *a0[] = {"reg0", "indreg0", "imm0", "limm0",
30
                "adr0", "adrreg0", "adrx0", "regx0"};
31
char *a1[] = {"reg1", "indreg1", "imm1", "limm1",
32
                "adr1", "adrreg1", "adrx1", "regx1"};
33
 
34
main_compare ()
35
{
36
  int i0, i1;
37
 
38
  for (i0 = 0;  i0 < 8;  i0++)
39
    {
40
      for (i1 = 0;  i1 < 8;  i1++)
41
        {
42
          printf ("%s%s_cmp (r0, r1, x0, x1, p0, p1)\n", a0[i0], a1[i1]);
43
          printf ("type r0, r1;  type *p0, *p1;\n");
44
          printf ("{if (%s <= %s) return 1; else return 0;}\n\n",
45
                  a0[i0], a1[i1], a0[i0]);
46
        }
47
    }
48
}
49
 
50
main_assign ()
51
{
52
  int i0, i1;
53
 
54
  for (i0 = 0;  i0 < 8;  i0++)
55
    {
56
      if (i0 < 2 || i0 > 3)
57
      for (i1 = 0;  i1 < 8;  i1++)
58
        {
59
          printf ("%s%s_set (r0, r1, x0, x1, p0, p1)\n", a0[i0], a1[i1]);
60
          printf ("type r0, r1;  type *p0, *p1;\n");
61
          printf ("{%s = %s;  }\n\n",
62
                  a0[i0], a1[i1]);
63
        }
64
    }
65
}
66
 
67
main () {main_assign ();}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.