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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [cmpdi-1.c] - Blame information for rev 298

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
#define F 140
2
#define T 13
3
 
4
feq (x, y)
5
     long long int x;
6
     long long int y;
7
{
8
  if (x == y)
9
    return T;
10
  else
11
    return F;
12
}
13
 
14
fne (x, y)
15
     long long int x;
16
     long long int y;
17
{
18
  if (x != y)
19
    return T;
20
  else
21
    return F;
22
}
23
 
24
flt (x, y)
25
     long long int x;
26
     long long int y;
27
{
28
  if (x < y)
29
    return T;
30
  else
31
    return F;
32
}
33
 
34
fge (x, y)
35
     long long int x;
36
     long long int y;
37
{
38
  if (x >= y)
39
    return T;
40
  else
41
    return F;
42
}
43
 
44
fgt (x, y)
45
     long long int x;
46
     long long int y;
47
{
48
  if (x > y)
49
    return T;
50
  else
51
    return F;
52
}
53
 
54
fle (x, y)
55
     long long int x;
56
     long long int y;
57
{
58
  if (x <= y)
59
    return T;
60
  else
61
    return F;
62
}
63
 
64
fltu (x, y)
65
     unsigned long long int x;
66
     unsigned long long int y;
67
{
68
  if (x < y)
69
    return T;
70
  else
71
    return F;
72
}
73
 
74
fgeu (x, y)
75
     unsigned long long int x;
76
     unsigned long long int y;
77
{
78
  if (x >= y)
79
    return T;
80
  else
81
    return F;
82
}
83
 
84
fgtu (x, y)
85
     unsigned long long int x;
86
     unsigned long long int y;
87
{
88
  if (x > y)
89
    return T;
90
  else
91
    return F;
92
}
93
 
94
fleu (x, y)
95
     unsigned long long int x;
96
     unsigned long long int y;
97
{
98
  if (x <= y)
99
    return T;
100
  else
101
    return F;
102
}
103
 
104
long long args[] =
105
{
106
  0LL,
107
  1LL,
108
  -1LL,
109
  0x7fffffffffffffffLL,
110
  0x8000000000000000LL,
111
  0x8000000000000001LL,
112
  0x1A3F237394D36C58LL,
113
  0x93850E92CAAC1B04LL
114
};
115
 
116
int correct_results[] =
117
{
118
  T, F, F, T, F, T, F, T, F, T,
119
  F, T, T, F, F, T, T, F, F, T,
120
  F, T, F, T, T, F, T, F, F, T,
121
  F, T, T, F, F, T, T, F, F, T,
122
  F, T, F, T, T, F, T, F, F, T,
123
  F, T, F, T, T, F, T, F, F, T,
124
  F, T, T, F, F, T, T, F, F, T,
125
  F, T, F, T, T, F, T, F, F, T,
126
  F, T, F, T, T, F, F, T, T, F,
127
  T, F, F, T, F, T, F, T, F, T,
128
  F, T, F, T, T, F, T, F, F, T,
129
  F, T, T, F, F, T, T, F, F, T,
130
  F, T, F, T, T, F, T, F, F, T,
131
  F, T, F, T, T, F, T, F, F, T,
132
  F, T, T, F, F, T, T, F, F, T,
133
  F, T, F, T, T, F, T, F, F, T,
134
  F, T, T, F, F, T, F, T, T, F,
135
  F, T, T, F, F, T, F, T, T, F,
136
  T, F, F, T, F, T, F, T, F, T,
137
  F, T, T, F, F, T, F, T, T, F,
138
  F, T, F, T, T, F, F, T, T, F,
139
  F, T, F, T, T, F, F, T, T, F,
140
  F, T, T, F, F, T, F, T, T, F,
141
  F, T, F, T, T, F, F, T, T, F,
142
  F, T, F, T, T, F, F, T, T, F,
143
  F, T, F, T, T, F, F, T, T, F,
144
  F, T, F, T, T, F, T, F, F, T,
145
  T, F, F, T, F, T, F, T, F, T,
146
  F, T, F, T, T, F, T, F, F, T,
147
  F, T, F, T, T, F, T, F, F, T,
148
  F, T, F, T, T, F, F, T, T, F,
149
  F, T, F, T, T, F, T, F, F, T,
150
  F, T, T, F, F, T, F, T, T, F,
151
  F, T, T, F, F, T, F, T, T, F,
152
  F, T, T, F, F, T, T, F, F, T,
153
  F, T, T, F, F, T, F, T, T, F,
154
  T, F, F, T, F, T, F, T, F, T,
155
  F, T, T, F, F, T, T, F, F, T,
156
  F, T, T, F, F, T, F, T, T, F,
157
  F, T, T, F, F, T, T, F, F, T,
158
  F, T, T, F, F, T, F, T, T, F,
159
  F, T, T, F, F, T, F, T, T, F,
160
  F, T, T, F, F, T, T, F, F, T,
161
  F, T, T, F, F, T, F, T, T, F,
162
  F, T, F, T, T, F, F, T, T, F,
163
  T, F, F, T, F, T, F, T, F, T,
164
  F, T, T, F, F, T, F, T, T, F,
165
  F, T, T, F, F, T, T, F, F, T,
166
  F, T, F, T, T, F, F, T, T, F,
167
  F, T, F, T, T, F, F, T, T, F,
168
  F, T, F, T, T, F, T, F, F, T,
169
  F, T, T, F, F, T, T, F, F, T,
170
  F, T, F, T, T, F, T, F, F, T,
171
  F, T, F, T, T, F, T, F, F, T,
172
  T, F, F, T, F, T, F, T, F, T,
173
  F, T, F, T, T, F, T, F, F, T,
174
  F, T, T, F, F, T, F, T, T, F,
175
  F, T, T, F, F, T, F, T, T, F,
176
  F, T, T, F, F, T, T, F, F, T,
177
  F, T, T, F, F, T, F, T, T, F,
178
  F, T, F, T, T, F, F, T, T, F,
179
  F, T, F, T, T, F, F, T, T, F,
180
  F, T, T, F, F, T, F, T, T, F,
181
  T, F, F, T, F, T, F, T, F, T
182
};
183
 
184
main ()
185
{
186
  int i, j, *res = correct_results;
187
 
188
  for (i = 0; i < 8; i++)
189
    {
190
      long long arg0 = args[i];
191
      for (j = 0; j < 8; j++)
192
        {
193
          long long arg1 = args[j];
194
 
195
          if (feq (arg0, arg1) != *res++)
196
            abort ();
197
          if (fne (arg0, arg1) != *res++)
198
            abort ();
199
          if (flt (arg0, arg1) != *res++)
200
            abort ();
201
          if (fge (arg0, arg1) != *res++)
202
            abort ();
203
          if (fgt (arg0, arg1) != *res++)
204
            abort ();
205
          if (fle (arg0, arg1) != *res++)
206
            abort ();
207
          if (fltu (arg0, arg1) != *res++)
208
            abort ();
209
          if (fgeu (arg0, arg1) != *res++)
210
            abort ();
211
          if (fgtu (arg0, arg1) != *res++)
212
            abort ();
213
          if (fleu (arg0, arg1) != *res++)
214
            abort ();
215
        }
216
    }
217
  exit (0);
218
}

powered by: WebSVN 2.1.0

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