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/] [ada/] [acats/] [tests/] [c4/] [c45502c.dep] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C45502C.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 LONG_INTEGER.
28
 
29
-- APPLICABILITY CRITERIA:
30
--     THIS TEST IS APPLICABLE TO THOSE IMPLEMENTATIONS WHICH SUPPORT
31
--     LONG_INTEGER.
32
 
33
--     IF "LONG_INTEGER" IS NOT SUPPORTED, THEN THE DECLARATION OF
34
--     "CHECK_LONG" MUST BE REJECTED.
35
 
36
-- HISTORY:
37
--     RJW 09/01/86
38
--     DHH 01/13/88 ADDED APPLICABILITY CRITERIA AND STANDARD HEADER.
39
 
40
WITH REPORT; USE REPORT;
41
PROCEDURE C45502C IS
42
 
43
     CHECK_LONG : LONG_INTEGER;                      -- N/A => ERROR.
44
 
45
     FUNCTION IDENT (S : LONG_INTEGER) RETURN LONG_INTEGER IS
46
     BEGIN
47
          IF EQUAL (3, 3) THEN
48
               RETURN S;
49
          ELSE
50
               RETURN 0;
51
          END IF;
52
     END IDENT;
53
 
54
BEGIN
55
     TEST ( "C45502C", "CHECK THAT MULTIPLICATION AND DIVISION " &
56
                       "YIELD CORRECT RESULTS WHEN THE OPERANDS " &
57
                       "ARE OF PREDEFINED TYPE LONG_INTEGER" );
58
 
59
     DECLARE
60
          I0  : LONG_INTEGER := 0;
61
          I1  : LONG_INTEGER := 1;
62
          I2  : LONG_INTEGER := 2;
63
          I3  : LONG_INTEGER := 3;
64
          I5  : LONG_INTEGER := 5;
65
          I10 : LONG_INTEGER := 10;
66
          I11 : LONG_INTEGER := 11;
67
          I12 : LONG_INTEGER := 12;
68
          I13 : LONG_INTEGER := 13;
69
          I14 : LONG_INTEGER := 14;
70
          N1  : LONG_INTEGER := -1;
71
          N2  : LONG_INTEGER := -2;
72
          N5  : LONG_INTEGER := -5;
73
          N10 : LONG_INTEGER := -10;
74
          N11 : LONG_INTEGER := -11;
75
          N12 : LONG_INTEGER := -12;
76
          N13 : LONG_INTEGER := -13;
77
          N14 : LONG_INTEGER := -14;
78
          N50 : LONG_INTEGER := -50;
79
 
80
     BEGIN
81
          IF I0 * LONG_INTEGER'FIRST /= 0 THEN
82
               FAILED ( "INCORRECT RESULT FOR I0 * " &
83
                        "LONG_INTEGER'FIRST" );
84
          END IF;
85
 
86
          IF I0 * LONG_INTEGER'LAST /= 0 THEN
87
               FAILED ( "INCORRECT RESULT FOR I0 * " &
88
                        "LONG_INTEGER'LAST" );
89
          END IF;
90
 
91
          IF N1 * LONG_INTEGER'LAST + LONG_INTEGER'LAST /= 0 THEN
92
               FAILED ( "INCORRECT RESULT FOR N1 * " &
93
                        "LONG_INTEGER'LAST" );
94
          END IF;
95
 
96
          IF I3 * I1 /= I3 THEN
97
               FAILED ( "INCORRECT RESULT FOR I3 * I1" );
98
          END IF;
99
 
100
          IF IDENT (I3) * IDENT (I1) /= I3 THEN
101
               FAILED ( "INCORRECT RESULT FOR IDENT (I3) * " &
102
                        "IDENT (I1)" );
103
          END IF;
104
 
105
          IF I2 * N1 /= N2 THEN
106
               FAILED ( "INCORRECT RESULT FOR I2 * N1" );
107
          END IF;
108
 
109
          IF "*" (LEFT => I2, RIGHT => N1) /= N2 THEN
110
               FAILED ( "INCORRECT RESULT FOR ""*"" (LEFT => I2, " &
111
                        "RIGHT => N1)" );
112
          END IF;
113
 
114
          IF IDENT (I2) * IDENT (N1) /= N2 THEN
115
               FAILED ( "INCORRECT RESULT FOR IDENT (I2) * " &
116
                        "IDENT (N1)" );
117
          END IF;
118
 
119
          IF I5 * I2 * N5 /= N50 THEN
120
               FAILED ( "INCORRECT RESULT FOR I5 * I2 * N5" );
121
          END IF;
122
 
123
          IF IDENT (N1) * IDENT (N5) /= I5 THEN
124
               FAILED ( "INCORRECT RESULT FOR IDENT (N1) * " &
125
                        "IDENT (N5)" );
126
          END IF;
127
 
128
          IF "*" (LEFT => IDENT (N1), RIGHT => IDENT (N5)) /=
129
                 I5 THEN
130
               FAILED ( "INCORRECT RESULT FOR ""*"" (LEFT => " &
131
                        "IDENT (N1), RIGHT => IDENT (N5))" );
132
          END IF;
133
 
134
          IF IDENT (N1) * IDENT (I2) * IDENT (N5) /= I10
135
             THEN
136
               FAILED ( "INCORRECT RESULT FOR IDENT (N1) * " &
137
                        "IDENT (I2) * IDENT (N5)" );
138
          END IF;
139
 
140
          IF (-IDENT (I0)) * IDENT (I10) /= I0 THEN
141
               FAILED ( "INCORRECT RESULT FOR (-IDENT (I0)) * " &
142
                        "IDENT (I10)" );
143
          END IF;
144
 
145
          IF I0 * I10 /= (-I0) THEN
146
               FAILED ( "INCORRECT RESULT FOR I0 * I10" );
147
          END IF;
148
 
149
          IF "*" (LEFT => I0, RIGHT => I10) /= (-I0) THEN
150
               FAILED ( "INCORRECT RESULT FOR ""*"" (LEFT => I0, " &
151
                        "RIGHT => I10)" );
152
          END IF;
153
 
154
          IF IDENT (I10) / IDENT (I5) /= I2 THEN
155
               FAILED ( "INCORRECT RESULT FOR IDENT (I10) " &
156
                        "/ IDENT (I5)" );
157
          END IF;
158
 
159
          IF I11 / I5 /= I2 THEN
160
               FAILED ( "INCORRECT RESULT FOR I11 / I5" );
161
          END IF;
162
 
163
          IF IDENT (I12) / IDENT (I5) /= I2 THEN
164
               FAILED ( "INCORRECT RESULT FOR IDENT (I12) " &
165
                        "/ IDENT (I5)" );
166
          END IF;
167
 
168
          IF "/" (LEFT => IDENT (I12), RIGHT => IDENT (I5)) /=
169
                 I2 THEN
170
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => " &
171
                        "IDENT (I12), RIGHT => IDENT (I5))" );
172
          END IF;
173
 
174
          IF I13 / I5 /= I2 THEN
175
               FAILED ( "INCORRECT RESULT FOR I13 / I5" );
176
          END IF;
177
 
178
          IF IDENT (I14) / IDENT (I5) /= I2 THEN
179
               FAILED ( "INCORRECT RESULT FOR IDENT (I14) " &
180
                        "/ IDENT (I5)" );
181
          END IF;
182
 
183
          IF I10 / N5 /= N2 THEN
184
               FAILED ( "INCORRECT RESULT FOR I10 / N5" );
185
          END IF;
186
 
187
          IF "/" (LEFT => I10, RIGHT => N5) /= N2 THEN
188
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => I10, " &
189
                        "RIGHT => N5)" );
190
          END IF;
191
 
192
          IF IDENT (I11) / IDENT (N5) /= N2 THEN
193
               FAILED ( "INCORRECT RESULT FOR IDENT (I11) " &
194
                        "/ IDENT (N5)" );
195
          END IF;
196
 
197
          IF I12 / N5 /= N2 THEN
198
               FAILED ( "INCORRECT RESULT FOR I12 / N5" );
199
          END IF;
200
 
201
          IF IDENT (I13) / IDENT (N5) /= N2 THEN
202
               FAILED ( "INCORRECT RESULT FOR IDENT (I13) " &
203
                        "/ IDENT (N5)" );
204
          END IF;
205
 
206
          IF I14 / N5 /= N2 THEN
207
               FAILED ( "INCORRECT RESULT FOR I14 / N5" );
208
          END IF;
209
 
210
          IF IDENT (N10) / IDENT (I5) /= N2 THEN
211
               FAILED ( "INCORRECT RESULT FOR IDENT (N10) " &
212
                        "/ IDENT (I5)" );
213
          END IF;
214
 
215
          IF "/" (LEFT => IDENT (N10), RIGHT => IDENT (I5)) /=
216
                 N2 THEN
217
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => " &
218
                        "IDENT (N10), RIGHT => IDENT (I5))" );
219
          END IF;
220
 
221
          IF N11 / I5 /= N2 THEN
222
               FAILED ( "INCORRECT RESULT FOR N11 / I5" );
223
          END IF;
224
 
225
          IF IDENT (N12) / IDENT (I5) /= N2 THEN
226
               FAILED ( "INCORRECT RESULT FOR IDENT (N12) " &
227
                        "/ IDENT (I5)" );
228
          END IF;
229
 
230
          IF N13 / I5 /= N2 THEN
231
               FAILED ( "INCORRECT RESULT FOR N13 / I5" );
232
          END IF;
233
 
234
          IF "/" (LEFT => N13, RIGHT => I5) /= N2 THEN
235
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => N13, " &
236
                        "RIGHT => I5)" );
237
          END IF;
238
 
239
          IF IDENT (N14) / IDENT (I5) /= N2 THEN
240
               FAILED ( "INCORRECT RESULT FOR IDENT (N14) " &
241
                        "/ IDENT (I5)" );
242
          END IF;
243
 
244
          IF N10 / N5 /= I2 THEN
245
               FAILED ( "INCORRECT RESULT FOR N10 / N5" );
246
          END IF;
247
 
248
          IF IDENT (N11) / IDENT (N5) /= I2 THEN
249
               FAILED ( "INCORRECT RESULT FOR IDENT (N11) " &
250
                        "/ IDENT (N5)" );
251
          END IF;
252
 
253
          IF "/" (LEFT => IDENT (N11), RIGHT => IDENT (N5)) /=
254
                 I2 THEN
255
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => " &
256
                        "IDENT (N11), RIGHT => IDENT (N5))" );
257
          END IF;
258
 
259
          IF N12 / N5 /= I2 THEN
260
               FAILED ( "INCORRECT RESULT FOR N12 / N5" );
261
          END IF;
262
 
263
 
264
          IF IDENT (N13) / IDENT (N5) /= I2 THEN
265
               FAILED ( "INCORRECT RESULT FOR IDENT (N13) " &
266
                        "/ IDENT (N5)" );
267
          END IF;
268
 
269
          IF N14 / N5 /= I2 THEN
270
               FAILED ( "INCORRECT RESULT FOR N14 / N5" );
271
          END IF;
272
 
273
          IF "/" (LEFT => N14, RIGHT => N5) /= I2 THEN
274
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => N14, " &
275
                        "RIGHT => N5)" );
276
          END IF;
277
 
278
          IF I0 / I5 /= (-I0) THEN
279
               FAILED ( "INCORRECT RESULT FOR I0 / I5" );
280
          END IF;
281
 
282
          IF "/" (LEFT => I0, RIGHT => I5) /= (-I0) THEN
283
               FAILED ( "INCORRECT RESULT FOR ""/"" (LEFT => I0, " &
284
                        "RIGHT => I5)" );
285
          END IF;
286
 
287
          IF (-IDENT (I0)) / IDENT (I5) /= I0 THEN
288
               FAILED ( "INCORRECT RESULT FOR (-IDENT (I0)) / " &
289
                        "IDENT (I5)" );
290
          END IF;
291
 
292
     END;
293
 
294
     RESULT;
295
END C45502C;

powered by: WebSVN 2.1.0

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