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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c45503b.dep] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
-- C45503B.DEP
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making
9
--     this public release, the Government intends to confer upon all
10
--     recipients unlimited rights  equal to those held by the Government.
11
--     These rights include rights to use, duplicate, release or disclose the
12
--     released technical data and computer software in whole or in part, in
13
--     any manner and for any purpose whatsoever, and to have or permit others
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- OBJECTIVE:
26
--     CHECK THAT 'REM' AND 'MOD' YIELD CORRECT RESULTS WHEN THE
27
--     OPERANDS ARE OF PREDEFINED TYPE SHORT_INTEGER.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE TO THOSE IMPLEMENTATIONS WHICH SUPPORT
31
--     SHORT_INTEGER.
32
 
33
--     IF "SHORT_INTEGER" IS NOT SUPPORTED, THEN THE DECLARATION OF
34
--     "CHECK_SHORT" MUST BE REJECTED.
35
 
36
-- HISTORY:
37
--     RJW 09/01/86 CREATED ORIGINAL TEST.
38
--     DHH 01/13/88 ADDED APPLICABILITY CRITERIA AND STANDARD HEADER.
39
 
40
WITH REPORT; USE REPORT;
41
PROCEDURE C45503B IS
42
 
43
     CHECK_SHORT : SHORT_INTEGER;                   -- N/A => ERROR.
44
 
45
     FUNCTION IDENT (S : SHORT_INTEGER) RETURN SHORT_INTEGER IS
46
     BEGIN
47
          RETURN SHORT_INTEGER (IDENT_INT (INTEGER (S)));
48
     END IDENT;
49
 
50
BEGIN
51
     TEST ( "C45503B", "CHECK THAT 'REM' AND 'MOD' YIELD CORRECT " &
52
                       "RESULTS WHEN THE OPERANDS ARE OF PREDEFINED " &
53
                       "TYPE SHORT_INTEGER" );
54
 
55
     DECLARE
56
          I0  : SHORT_INTEGER := 0;
57
          I1  : SHORT_INTEGER := 1;
58
          I2  : SHORT_INTEGER := 2;
59
          I3  : SHORT_INTEGER := 3;
60
          I4  : SHORT_INTEGER := 4;
61
          I5  : SHORT_INTEGER := 5;
62
          I10 : SHORT_INTEGER := 10;
63
          I11 : SHORT_INTEGER := 11;
64
          I12 : SHORT_INTEGER := 12;
65
          I13 : SHORT_INTEGER := 13;
66
          I14 : SHORT_INTEGER := 14;
67
          N1  : SHORT_INTEGER := -1;
68
          N2  : SHORT_INTEGER := -2;
69
          N3  : SHORT_INTEGER := -3;
70
          N4  : SHORT_INTEGER := -4;
71
          N5  : SHORT_INTEGER := -5;
72
          N10 : SHORT_INTEGER := -10;
73
          N11 : SHORT_INTEGER := -11;
74
          N12 : SHORT_INTEGER := -12;
75
          N13 : SHORT_INTEGER := -13;
76
          N14 : SHORT_INTEGER := -14;
77
 
78
     BEGIN
79
          IF I10 REM I5 /= I0 THEN
80
               FAILED ( "INCORRECT RESULT FOR I10 REM I5" );
81
          END IF;
82
 
83
          IF IDENT (I11) REM IDENT (I5) /= I1 THEN
84
               FAILED ( "INCORRECT RESULT FOR IDENT (I11) REM " &
85
                        "IDENT (I5)" );
86
          END IF;
87
 
88
          IF I12 REM I5 /= I2 THEN
89
               FAILED ( "INCORRECT RESULT FOR I12 REM I5" );
90
          END IF;
91
 
92
          IF "REM" (LEFT => I12, RIGHT => I5) /= I2 THEN
93
               FAILED ( "INCORRECT RESULT FOR ""REM"" (LEFT => I12, " &
94
                        "RIGHT => I5)" );
95
          END IF;
96
 
97
          IF IDENT (I13) REM IDENT (I5) /= I3 THEN
98
               FAILED ( "INCORRECT RESULT FOR IDENT (I13) REM " &
99
                        "IDENT (I5)" );
100
          END IF;
101
 
102
          IF I14 REM I5 /= I4 THEN
103
               FAILED ( "INCORRECT RESULT FOR I14 REM I5" );
104
          END IF;
105
 
106
          IF IDENT (I10) REM IDENT (N5) /= I0 THEN
107
               FAILED ( "INCORRECT RESULT FOR IDENT (I10) REM " &
108
                        "IDENT (N5)" );
109
          END IF;
110
 
111
          IF "REM" (LEFT => IDENT (I10), RIGHT => IDENT (N5))
112
                   /= I0 THEN
113
               FAILED ( "INCORRECT RESULT FOR ""REM"" (LEFT => " &
114
                        "IDENT (I10), RIGHT => IDENT (N5))" );
115
          END IF;
116
 
117
          IF I11 REM N5 /= I1 THEN
118
               FAILED ( "INCORRECT RESULT FOR I11 REM N5" );
119
          END IF;
120
 
121
          IF IDENT (I12) REM IDENT (N5) /= I2 THEN
122
               FAILED ( "INCORRECT RESULT FOR IDENT (I12) REM " &
123
                        "IDENT (N5)" );
124
          END IF;
125
 
126
          IF I13 REM N5 /= I3 THEN
127
               FAILED ( "INCORRECT RESULT FOR I13 REM N5" );
128
          END IF;
129
 
130
          IF "REM" (LEFT => I13, RIGHT => N5) /= I3 THEN
131
               FAILED ( "INCORRECT RESULT FOR ""REM"" (LEFT => I13, " &
132
                        "RIGHT => N5)" );
133
          END IF;
134
 
135
          IF IDENT (I14) REM IDENT (N5) /= I4 THEN
136
               FAILED ( "INCORRECT RESULT FOR IDENT (I14) REM " &
137
                        "IDENT (N5)" );
138
          END IF;
139
 
140
          IF N10 REM I5 /= I0 THEN
141
               FAILED ( "INCORRECT RESULT FOR N10 REM I5" );
142
          END IF;
143
 
144
          IF IDENT (N11) REM IDENT (I5) /= N1 THEN
145
               FAILED ( "INCORRECT RESULT FOR IDENT (N11) REM " &
146
                        "IDENT (I5)" );
147
          END IF;
148
 
149
          IF "REM" (LEFT => IDENT (N11), RIGHT => IDENT (I5))
150
                   /= N1 THEN
151
               FAILED ( "INCORRECT RESULT FOR ""REM"" (LEFT => " &
152
                        "IDENT (N11), RIGHT => IDENT (I5))" );
153
          END IF;
154
 
155
          IF N12 REM I5 /= N2 THEN
156
               FAILED ( "INCORRECT RESULT FOR N12 REM I5" );
157
          END IF;
158
 
159
          IF IDENT (N13) REM IDENT (I5) /= N3 THEN
160
               FAILED ( "INCORRECT RESULT FOR IDENT (N13) REM " &
161
                        "IDENT (I5)" );
162
          END IF;
163
 
164
          IF N14 REM I5 /= N4 THEN
165
               FAILED ( "INCORRECT RESULT FOR N14 REM I5" );
166
          END IF;
167
 
168
          IF "REM" (LEFT => N14, RIGHT => I5) /= N4 THEN
169
               FAILED ( "INCORRECT RESULT FOR ""REM"" (LEFT => N14, " &
170
                        "RIGHT => I5)" );
171
          END IF;
172
 
173
          IF IDENT (N10) REM IDENT (N5) /= I0 THEN
174
               FAILED ( "INCORRECT RESULT FOR IDENT (N10) REM " &
175
                        "IDENT (N5)" );
176
          END IF;
177
 
178
          IF N11 REM N5 /= N1 THEN
179
               FAILED ( "INCORRECT RESULT FOR N11 REM N5" );
180
          END IF;
181
 
182
          IF IDENT (N12) REM IDENT (N5) /= N2 THEN
183
               FAILED ( "INCORRECT RESULT FOR IDENT (N12) REM " &
184
                        "IDENT (N5)" );
185
          END IF;
186
 
187
          IF "REM" (LEFT => IDENT (N12), RIGHT => IDENT (N5))
188
                   /= N2 THEN
189
               FAILED ( "INCORRECT RESULT FOR ""REM"" (LEFT => " &
190
                        "IDENT (N12), RIGHT => IDENT (N5))" );
191
          END IF;
192
 
193
          IF N13 REM N5 /= N3 THEN
194
               FAILED ( "INCORRECT RESULT FOR N13 REM N5" );
195
          END IF;
196
 
197
          IF IDENT (N14) REM IDENT (N5) /= N4 THEN
198
               FAILED ( "INCORRECT RESULT FOR IDENT (N14) REM " &
199
                        "IDENT (N5)" );
200
          END IF;
201
 
202
          IF I10 MOD I5 /= I0 THEN
203
               FAILED ( "INCORRECT RESULT FOR I10 MOD I5" );
204
          END IF;
205
 
206
          IF IDENT (I11) MOD IDENT (I5) /= I1 THEN
207
               FAILED ( "INCORRECT RESULT FOR IDENT (I11) MOD " &
208
                        "IDENT (I5)" );
209
          END IF;
210
 
211
          IF I12 MOD I5 /= I2 THEN
212
               FAILED ( "INCORRECT RESULT FOR I12 MOD I5" );
213
          END IF;
214
 
215
          IF "MOD" (LEFT => I12, RIGHT => I5) /= I2 THEN
216
               FAILED ( "INCORRECT RESULT FOR ""MOD"" (LEFT => I12, " &
217
                        "RIGHT => I5)" );
218
          END IF;
219
 
220
          IF IDENT (I13) MOD IDENT (I5) /= I3 THEN
221
               FAILED ( "INCORRECT RESULT FOR IDENT (I13) MOD " &
222
                        "IDENT (I5)" );
223
          END IF;
224
 
225
          IF I14 MOD I5 /= I4 THEN
226
               FAILED ( "INCORRECT RESULT FOR I14 MOD I5" );
227
          END IF;
228
 
229
          IF IDENT (I10) MOD IDENT (N5) /= I0 THEN
230
               FAILED ( "INCORRECT RESULT FOR IDENT (I10) MOD " &
231
                        "IDENT (N5)" );
232
          END IF;
233
 
234
          IF "MOD" (LEFT => IDENT (I10), RIGHT => IDENT (N5))
235
                   /= I0 THEN
236
               FAILED ( "INCORRECT RESULT FOR ""MOD"" (LEFT => " &
237
                        "IDENT (I10), RIGHT => IDENT (N5))" );
238
          END IF;
239
 
240
          IF I11 MOD N5 /= N4 THEN
241
               FAILED ( "INCORRECT RESULT FOR I11 MOD N5" );
242
          END IF;
243
 
244
          IF IDENT (I12) MOD IDENT (N5) /= N3 THEN
245
               FAILED ( "INCORRECT RESULT FOR IDENT (I12) MOD " &
246
                        "IDENT (N5)" );
247
          END IF;
248
 
249
          IF I13 MOD N5 /= N2 THEN
250
               FAILED ( "INCORRECT RESULT FOR I13 MOD N5" );
251
          END IF;
252
 
253
          IF "MOD" (LEFT => I13, RIGHT => N5) /= N2 THEN
254
               FAILED ( "INCORRECT RESULT FOR ""MOD"" (LEFT => I13, " &
255
                        "RIGHT => N5)" );
256
          END IF;
257
 
258
          IF IDENT (I14) MOD IDENT (N5) /=  N1 THEN
259
               FAILED ( "INCORRECT RESULT FOR IDENT (I14) MOD " &
260
                        "IDENT (N5)" );
261
          END IF;
262
 
263
          IF N10 MOD I5 /= I0 THEN
264
               FAILED ( "INCORRECT RESULT FOR N10 MOD I5" );
265
          END IF;
266
 
267
          IF IDENT (N11) MOD IDENT (I5) /= I4 THEN
268
               FAILED ( "INCORRECT RESULT FOR IDENT (N11) MOD " &
269
                        "IDENT (I5)" );
270
          END IF;
271
 
272
          IF "MOD" (LEFT => IDENT (N11), RIGHT => IDENT (I5))
273
                   /= I4 THEN
274
               FAILED ( "INCORRECT RESULT FOR ""MOD"" (LEFT => " &
275
                        "IDENT (N11), RIGHT => IDENT (I5))" );
276
          END IF;
277
 
278
          IF N12 MOD I5 /= I3 THEN
279
               FAILED ( "INCORRECT RESULT FOR N12 MOD I5" );
280
          END IF;
281
 
282
          IF IDENT (N13) MOD IDENT (I5) /= I2 THEN
283
               FAILED ( "INCORRECT RESULT FOR IDENT (N13) MOD " &
284
                        "IDENT (I5)" );
285
          END IF;
286
 
287
          IF N14 MOD I5 /= I1 THEN
288
               FAILED ( "INCORRECT RESULT FOR N14 MOD I5" );
289
          END IF;
290
 
291
          IF "MOD" (LEFT => N14, RIGHT => I5) /= I1 THEN
292
               FAILED ( "INCORRECT RESULT FOR ""MOD"" (LEFT => I14, " &
293
                        "RIGHT => I5)" );
294
          END IF;
295
 
296
          IF IDENT (N10) MOD IDENT (N5) /= I0 THEN
297
               FAILED ( "INCORRECT RESULT FOR IDENT (N10) MOD " &
298
                        "IDENT (N5)" );
299
          END IF;
300
 
301
          IF N11 MOD N5 /= N1 THEN
302
               FAILED ( "INCORRECT RESULT FOR N11 MOD N5" );
303
          END IF;
304
 
305
          IF IDENT (N12) MOD IDENT (N5) /= N2 THEN
306
               FAILED ( "INCORRECT RESULT FOR IDENT (N12) MOD " &
307
                        "IDENT (N5)" );
308
          END IF;
309
 
310
          IF "MOD" (LEFT => IDENT (N12), RIGHT => IDENT (N5))
311
                   /= N2 THEN
312
               FAILED ( "INCORRECT RESULT FOR ""MOD"" (LEFT => " &
313
                        "IDENT (N12), RIGHT => IDENT (N5))" );
314
          END IF;
315
 
316
          IF N13 MOD N5 /= N3 THEN
317
               FAILED ( "INCORRECT RESULT FOR N13 MOD N5" );
318
          END IF;
319
 
320
          IF IDENT (N14) MOD IDENT (N5) /= N4 THEN
321
               FAILED ( "INCORRECT RESULT FOR IDENT (N14) MOD " &
322
                        "IDENT (N5)" );
323
          END IF;
324
     END;
325
 
326
     RESULT;
327
END C45503B;

powered by: WebSVN 2.1.0

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