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/] [c45502b.dep] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C45502B.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 MULTIPLICATION AND DIVISION YIELD CORRECT RESULTS WHEN
27
--     THE 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 C45502B 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 ( "C45502B", "CHECK THAT MULTIPLICATION AND DIVISION " &
52
                       "YIELD CORRECT RESULTS WHEN THE OPERANDS " &
53
                       "ARE OF PREDEFINED 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
          I5  : SHORT_INTEGER := 5;
61
          I10 : SHORT_INTEGER := 10;
62
          I11 : SHORT_INTEGER := 11;
63
          I12 : SHORT_INTEGER := 12;
64
          I13 : SHORT_INTEGER := 13;
65
          I14 : SHORT_INTEGER := 14;
66
          N1  : SHORT_INTEGER := -1;
67
          N2  : SHORT_INTEGER := -2;
68
          N5  : SHORT_INTEGER := -5;
69
          N10 : SHORT_INTEGER := -10;
70
          N11 : SHORT_INTEGER := -11;
71
          N12 : SHORT_INTEGER := -12;
72
          N13 : SHORT_INTEGER := -13;
73
          N14 : SHORT_INTEGER := -14;
74
          N50 : SHORT_INTEGER := -50;
75
 
76
     BEGIN
77
          IF I0 * SHORT_INTEGER'FIRST /= 0 THEN
78
               FAILED ( "INCORRECT RESULT FOR I0 * " &
79
                        "SHORT_INTEGER'FIRST" );
80
          END IF;
81
 
82
          IF I0 * SHORT_INTEGER'LAST /= 0 THEN
83
               FAILED ( "INCORRECT RESULT FOR I0 * " &
84
                        "SHORT_INTEGER'LAST" );
85
          END IF;
86
 
87
          IF N1 * SHORT_INTEGER'LAST + SHORT_INTEGER'LAST /= 0 THEN
88
               FAILED ( "INCORRECT RESULT FOR N1 * " &
89
                        "SHORT_INTEGER'LAST" );
90
          END IF;
91
 
92
          IF I3 * I1 /= I3 THEN
93
               FAILED ( "INCORRECT RESULT FOR I3 * I1" );
94
          END IF;
95
 
96
          IF IDENT (I3) * IDENT (I1) /= I3 THEN
97
               FAILED ( "INCORRECT RESULT FOR IDENT (I3) * " &
98
                        "IDENT (I1)" );
99
          END IF;
100
 
101
          IF I2 * N1 /= N2 THEN
102
               FAILED ( "INCORRECT RESULT FOR I2 * N1" );
103
          END IF;
104
 
105
          IF "*" (LEFT => I2, RIGHT => N1) /= N2 THEN
106
               FAILED ( "INCORRECT RESULT FOR ""*"" (LEFT => I2, " &
107
                        "RIGHT => N1)" );
108
          END IF;
109
 
110
          IF IDENT (I2) * IDENT (N1) /= N2 THEN
111
               FAILED ( "INCORRECT RESULT FOR IDENT (I2) * " &
112
                        "IDENT (N1)" );
113
          END IF;
114
 
115
          IF I5 * I2 * N5 /= N50 THEN
116
               FAILED ( "INCORRECT RESULT FOR I5 * I2 * N5" );
117
          END IF;
118
 
119
          IF IDENT (N1) * IDENT (N5) /= I5 THEN
120
               FAILED ( "INCORRECT RESULT FOR IDENT (N1) * " &
121
                        "IDENT (N5)" );
122
          END IF;
123
 
124
          IF "*" (LEFT => IDENT (N1), RIGHT => IDENT (N5)) /=
125
                 I5 THEN
126
               FAILED ( "INCORRECT RESULT FOR ""*"" (LEFT => " &
127
                        "IDENT (N1), RIGHT => IDENT (N5))" );
128
          END IF;
129
 
130
          IF IDENT (N1) * IDENT (I2) * IDENT (N5) /= I10
131
             THEN
132
               FAILED ( "INCORRECT RESULT FOR IDENT (N1) * " &
133
                        "IDENT (I2) * IDENT (N5)" );
134
          END IF;
135
 
136
          IF (-IDENT (I0)) * IDENT (I10) /= I0 THEN
137
               FAILED ( "INCORRECT RESULT FOR (-IDENT (I0)) * " &
138
                        "IDENT (I10)" );
139
          END IF;
140
 
141
          IF I0 * I10 /= (-I0) THEN
142
               FAILED ( "INCORRECT RESULT FOR I0 * I10" );
143
          END IF;
144
 
145
          IF "*" (LEFT => I0, RIGHT => I10) /= (-I0) THEN
146
               FAILED ( "INCORRECT RESULT FOR ""*"" (LEFT => I0, " &
147
                        "RIGHT => I10)" );
148
          END IF;
149
 
150
          IF IDENT (I10) / IDENT (I5) /= I2 THEN
151
               FAILED ( "INCORRECT RESULT FOR IDENT (I10) " &
152
                        "/ IDENT (I5)" );
153
          END IF;
154
 
155
          IF I11 / I5 /= I2 THEN
156
               FAILED ( "INCORRECT RESULT FOR I11 / I5" );
157
          END IF;
158
 
159
          IF IDENT (I12) / IDENT (I5) /= I2 THEN
160
               FAILED ( "INCORRECT RESULT FOR IDENT (I12) " &
161
                        "/ IDENT (I5)" );
162
          END IF;
163
 
164
          IF "/" (LEFT => IDENT (I12), RIGHT => IDENT (I5)) /=
165
                 I2 THEN
166
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => " &
167
                        "IDENT (I12), RIGHT => IDENT (I5))" );
168
          END IF;
169
 
170
          IF I13 / I5 /= I2 THEN
171
               FAILED ( "INCORRECT RESULT FOR I13 / I5" );
172
          END IF;
173
 
174
          IF IDENT (I14) / IDENT (I5) /= I2 THEN
175
               FAILED ( "INCORRECT RESULT FOR IDENT (I14) " &
176
                        "/ IDENT (I5)" );
177
          END IF;
178
 
179
          IF I10 / N5 /= N2 THEN
180
               FAILED ( "INCORRECT RESULT FOR I10 / N5" );
181
          END IF;
182
 
183
          IF "/" (LEFT => I10, RIGHT => N5) /= N2 THEN
184
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => I10, " &
185
                        "RIGHT => N5)" );
186
          END IF;
187
 
188
          IF IDENT (I11) / IDENT (N5) /= N2 THEN
189
               FAILED ( "INCORRECT RESULT FOR IDENT (I11) " &
190
                        "/ IDENT (N5)" );
191
          END IF;
192
 
193
          IF I12 / N5 /= N2 THEN
194
               FAILED ( "INCORRECT RESULT FOR I12 / N5" );
195
          END IF;
196
 
197
          IF IDENT (I13) / IDENT (N5) /= N2 THEN
198
               FAILED ( "INCORRECT RESULT FOR IDENT (I13) " &
199
                        "/ IDENT (N5)" );
200
          END IF;
201
 
202
          IF I14 / N5 /= N2 THEN
203
               FAILED ( "INCORRECT RESULT FOR I14 / N5" );
204
          END IF;
205
 
206
          IF IDENT (N10) / IDENT (I5) /= N2 THEN
207
               FAILED ( "INCORRECT RESULT FOR IDENT (N10) " &
208
                        "/ IDENT (I5)" );
209
          END IF;
210
 
211
          IF "/" (LEFT => IDENT (N10), RIGHT => IDENT (I5)) /=
212
                 N2 THEN
213
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => " &
214
                        "IDENT (N10), RIGHT => IDENT (I5))" );
215
          END IF;
216
 
217
          IF N11 / I5 /= N2 THEN
218
               FAILED ( "INCORRECT RESULT FOR N11 / I5" );
219
          END IF;
220
 
221
          IF IDENT (N12) / IDENT (I5) /= N2 THEN
222
               FAILED ( "INCORRECT RESULT FOR IDENT (N12) " &
223
                        "/ IDENT (I5)" );
224
          END IF;
225
 
226
          IF N13 / I5 /= N2 THEN
227
               FAILED ( "INCORRECT RESULT FOR N13 / I5" );
228
          END IF;
229
 
230
          IF "/" (LEFT => N13, RIGHT => I5) /= N2 THEN
231
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => N13, " &
232
                        "RIGHT => I5)" );
233
          END IF;
234
 
235
          IF IDENT (N14) / IDENT (I5) /= N2 THEN
236
               FAILED ( "INCORRECT RESULT FOR IDENT (N14) " &
237
                        "/ IDENT (I5)" );
238
          END IF;
239
 
240
          IF N10 / N5 /= I2 THEN
241
               FAILED ( "INCORRECT RESULT FOR N10 / N5" );
242
          END IF;
243
 
244
          IF IDENT (N11) / IDENT (N5) /= I2 THEN
245
               FAILED ( "INCORRECT RESULT FOR IDENT (N11) " &
246
                        "/ IDENT (N5)" );
247
          END IF;
248
 
249
          IF "/" (LEFT => IDENT (N11), RIGHT => IDENT (N5)) /=
250
                 I2 THEN
251
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => " &
252
                        "IDENT (N11), RIGHT => IDENT (N5))" );
253
          END IF;
254
 
255
          IF N12 / N5 /= I2 THEN
256
               FAILED ( "INCORRECT RESULT FOR N12 / N5" );
257
          END IF;
258
 
259
 
260
          IF IDENT (N13) / IDENT (N5) /= I2 THEN
261
               FAILED ( "INCORRECT RESULT FOR IDENT (N13) " &
262
                        "/ IDENT (N5)" );
263
          END IF;
264
 
265
          IF N14 / N5 /= I2 THEN
266
               FAILED ( "INCORRECT RESULT FOR N14 / N5" );
267
          END IF;
268
 
269
          IF "/" (LEFT => N14, RIGHT => N5) /= I2 THEN
270
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => N14, " &
271
                        "RIGHT => N5)" );
272
          END IF;
273
 
274
          IF I0 / I5 /= (-I0) THEN
275
               FAILED ( "INCORRECT RESULT FOR I0 / I5" );
276
          END IF;
277
 
278
          IF "/" (LEFT => I0, RIGHT => I5) /= (-I0) THEN
279
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => I0, " &
280
                        "RIGHT => I5)" );
281
          END IF;
282
 
283
          IF (-IDENT (I0)) / IDENT (I5) /= I0 THEN
284
               FAILED ( "INCORRECT RESULT FOR (-IDENT (I0)) / " &
285
                        "IDENT (I5)" );
286
          END IF;
287
 
288
     END;
289
 
290
     RESULT;
291
END C45502B;

powered by: WebSVN 2.1.0

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