OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c46021a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C46021A.ADA
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 FLOATING POINT CONVERSIONS ARE PERFORMED CORRECTLY
27
--     WHEN THE OPERAND TYPE IS AN INTEGER TYPE, FOR 5-DIGIT PRECISION.
28
 
29
-- HISTORY:
30
--     JET 02/12/88  CREATED ORIGINAL TEST.
31
 
32
WITH REPORT; USE REPORT;
33
 
34
PROCEDURE C46021A IS
35
 
36
     TYPE FLOAT5 IS DIGITS 5;
37
     TYPE INT IS RANGE -32768..32767;
38
 
39
     TYPE NFLOAT5 IS NEW FLOAT5;
40
 
41
     FUNCTION IDENT (A : FLOAT5) RETURN FLOAT5 IS
42
     BEGIN
43
          IF EQUAL(3,3) THEN
44
               RETURN A;
45
          ELSE
46
               RETURN 0.0;
47
          END IF;
48
     END IDENT;
49
 
50
     FUNCTION IDENT (A : NFLOAT5) RETURN NFLOAT5 IS
51
     BEGIN
52
          IF EQUAL(3,3) THEN
53
               RETURN A;
54
          ELSE
55
               RETURN 0.0;
56
          END IF;
57
     END IDENT;
58
 
59
BEGIN
60
     TEST ("C46021A", "CHECK THAT FLOATING POINT CONVERSIONS ARE " &
61
                      "PERFORMED CORRECTLY WHEN THE OPERAND TYPE " &
62
                      "IS AN INTEGER TYPE, FOR 5-DIGIT PRECISION");
63
 
64
     IF FLOAT5(IDENT_INT(-7)) /= -7.0 THEN
65
          FAILED ("INCORRECT VALUE (1)");
66
     END IF;
67
 
68
     IF FLOAT5(IDENT_INT(3)) /= 3.0 THEN
69
          FAILED ("INCORRECT VALUE (2)");
70
     END IF;
71
 
72
     IF FLOAT5(IDENT_INT(-999)) /= -999.0 THEN
73
          FAILED ("INCORRECT VALUE (3)");
74
     END IF;
75
 
76
     IF FLOAT5(IDENT_INT(101)) /= 101.0 THEN
77
          FAILED ("INCORRECT VALUE (4)");
78
     END IF;
79
 
80
     IF FLOAT5(IDENT_INT(-32767)) /= -32767.0 THEN
81
          FAILED ("INCORRECT VALUE (5)");
82
     END IF;
83
 
84
     IF FLOAT5(IDENT_INT(32767)) /= 32767.0 THEN
85
          FAILED ("INCORRECT VALUE (6)");
86
     END IF;
87
 
88
     IF FLOAT5(-7) /= IDENT(-7.0) THEN
89
          FAILED ("INCORRECT VALUE (7)");
90
     END IF;
91
 
92
     IF FLOAT5(3) /= IDENT(3.0) THEN
93
          FAILED ("INCORRECT VALUE (8)");
94
     END IF;
95
 
96
     IF FLOAT5(-999) /= IDENT(-999.0) THEN
97
          FAILED ("INCORRECT VALUE (9)");
98
     END IF;
99
 
100
     IF FLOAT5(101) /= IDENT(101.0) THEN
101
          FAILED ("INCORRECT VALUE (10)");
102
     END IF;
103
 
104
     IF FLOAT5(-32767) /= IDENT(-32767.0) THEN
105
          FAILED ("INCORRECT VALUE (11)");
106
     END IF;
107
 
108
     IF FLOAT5(32767) /= IDENT(32767.0) THEN
109
          FAILED ("INCORRECT VALUE (12)");
110
     END IF;
111
 
112
     IF FLOAT5(INT'(-7)) /= IDENT(-7.0) THEN
113
          FAILED ("INCORRECT VALUE (13)");
114
     END IF;
115
 
116
     IF FLOAT5(INT'(3)) /= IDENT(3.0) THEN
117
          FAILED ("INCORRECT VALUE (14)");
118
     END IF;
119
 
120
     IF FLOAT5(INT'(-999)) /= IDENT(-999.0) THEN
121
          FAILED ("INCORRECT VALUE (15)");
122
     END IF;
123
 
124
     IF FLOAT5(INT'(101)) /= IDENT(101.0) THEN
125
          FAILED ("INCORRECT VALUE (16)");
126
     END IF;
127
 
128
     IF FLOAT5(INT'(-32767)) /= IDENT(-32767.0) THEN
129
          FAILED ("INCORRECT VALUE (17)");
130
     END IF;
131
 
132
     IF FLOAT5(INT'(32767)) /= IDENT(32767.0) THEN
133
          FAILED ("INCORRECT VALUE (18)");
134
     END IF;
135
 
136
     IF NFLOAT5(IDENT_INT(-7)) /= -7.0 THEN
137
          FAILED ("INCORRECT VALUE (19)");
138
     END IF;
139
 
140
     IF NFLOAT5(IDENT_INT(3)) /= 3.0 THEN
141
          FAILED ("INCORRECT VALUE (20)");
142
     END IF;
143
 
144
     IF NFLOAT5(IDENT_INT(-999)) /= -999.0 THEN
145
          FAILED ("INCORRECT VALUE (21)");
146
     END IF;
147
 
148
     IF NFLOAT5(IDENT_INT(101)) /= 101.0 THEN
149
          FAILED ("INCORRECT VALUE (22)");
150
     END IF;
151
 
152
     IF NFLOAT5(IDENT_INT(-32767)) /= -32767.0 THEN
153
          FAILED ("INCORRECT VALUE (23)");
154
     END IF;
155
 
156
     IF NFLOAT5(IDENT_INT(32767)) /= 32767.0 THEN
157
          FAILED ("INCORRECT VALUE (24)");
158
     END IF;
159
 
160
     IF NFLOAT5(-7) /= IDENT(-7.0) THEN
161
          FAILED ("INCORRECT VALUE (25)");
162
     END IF;
163
 
164
     IF NFLOAT5(3) /= IDENT(3.0) THEN
165
          FAILED ("INCORRECT VALUE (26)");
166
     END IF;
167
 
168
     IF NFLOAT5(-999) /= IDENT(-999.0) THEN
169
          FAILED ("INCORRECT VALUE (27)");
170
     END IF;
171
 
172
     IF NFLOAT5(101) /= IDENT(101.0) THEN
173
          FAILED ("INCORRECT VALUE (28)");
174
     END IF;
175
 
176
     IF NFLOAT5(-32767) /= IDENT(-32767.0) THEN
177
          FAILED ("INCORRECT VALUE (29)");
178
     END IF;
179
 
180
     IF NFLOAT5(32767) /= IDENT(32767.0) THEN
181
          FAILED ("INCORRECT VALUE (30)");
182
     END IF;
183
 
184
     IF NFLOAT5(INT'(-7)) /= IDENT(-7.0) THEN
185
          FAILED ("INCORRECT VALUE (31)");
186
     END IF;
187
 
188
     IF NFLOAT5(INT'(3)) /= IDENT(3.0) THEN
189
          FAILED ("INCORRECT VALUE (32)");
190
     END IF;
191
 
192
     IF NFLOAT5(INT'(-999)) /= IDENT(-999.0) THEN
193
          FAILED ("INCORRECT VALUE (33)");
194
     END IF;
195
 
196
     IF NFLOAT5(INT'(101)) /= IDENT(101.0) THEN
197
          FAILED ("INCORRECT VALUE (34)");
198
     END IF;
199
 
200
     IF NFLOAT5(INT'(-32767)) /= IDENT(-32767.0) THEN
201
          FAILED ("INCORRECT VALUE (35)");
202
     END IF;
203
 
204
     IF NFLOAT5(INT'(32767)) /= IDENT(32767.0) THEN
205
          FAILED ("INCORRECT VALUE (36)");
206
     END IF;
207
 
208
     RESULT;
209
 
210
END C46021A;

powered by: WebSVN 2.1.0

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