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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [sim/] [testsuite/] [sim/] [frv/] [fr400/] [maveh.cgs] - Blame information for rev 373

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

Line No. Rev Author Line
1 330 jeremybenn
# frv testcase for maveh $FRi,$FRj,$FRj on fr400 machines
2
# mach: all
3
 
4
        .include "../testutils.inc"
5
 
6
        start
7
 
8
        .global maveh
9
maveh:
10
        ; Test Rounding toward positive infinity via RDAV
11
        or_spr_immed    0x20000000,msr0
12
        and_spr_immed   0xefffffff,msr0
13
 
14
        set_fr_iimmed   0x0000,0x0000,fr10
15
        set_fr_iimmed   0x0000,0x0000,fr11
16
        maveh           fr10,fr11,fr12
17
        test_fr_limmed  0x0000,0x0000,fr12
18
 
19
        set_fr_iimmed   0x0001,0x0000,fr10
20
        set_fr_iimmed   0x0002,0x0001,fr11
21
        maveh           fr10,fr11,fr12
22
        test_fr_limmed  0x0002,0x0001,fr12
23
 
24
        set_fr_iimmed   0x0000,0xffff,fr10
25
        set_fr_iimmed   0xffff,0xfffe,fr11
26
        maveh           fr10,fr11,fr12
27
        test_fr_limmed  0x0000,0xffff,fr12
28
 
29
        set_fr_iimmed   0xdead,0x0000,fr10
30
        set_fr_iimmed   0x0000,0xbeef,fr11
31
        maveh           fr10,fr11,fr12
32
        test_fr_limmed  0xef57,0xdf78,fr12
33
 
34
        set_fr_iimmed   0x0000,0xdead,fr10
35
        set_fr_iimmed   0xbeef,0x0000,fr11
36
        maveh           fr10,fr11,fr12
37
        test_fr_limmed  0xdf78,0xef57,fr12
38
 
39
        set_fr_iimmed   0x1234,0x5678,fr10
40
        set_fr_iimmed   0x1111,0x1111,fr11
41
        maveh           fr10,fr11,fr12
42
        test_fr_limmed  0x11a3,0x33c5,fr12
43
 
44
        set_fr_iimmed   0x1234,0x5678,fr10
45
        set_fr_iimmed   0xffff,0xffff,fr11
46
        maveh           fr10,fr11,fr12
47
        test_fr_limmed  0x091a,0x2b3c,fr12
48
 
49
        set_fr_iimmed   0x7ffe,0x7ffe,fr10
50
        set_fr_iimmed   0x0002,0x0001,fr11
51
        maveh           fr10,fr11,fr12
52
        test_fr_limmed  0x4000,0x4000,fr12
53
 
54
        set_fr_iimmed   0x8001,0x8001,fr10
55
        set_fr_iimmed   0xffff,0xfffe,fr11
56
        maveh           fr10,fr11,fr12
57
        test_fr_limmed  0xc000,0xc000,fr12
58
 
59
        set_fr_iimmed   0x8001,0x8001,fr10
60
        set_fr_iimmed   0xfffe,0xfffe,fr11
61
        maveh           fr10,fr11,fr12
62
        test_fr_limmed  0xc000,0xc000,fr12
63
 
64
        set_fr_iimmed   0x8000,0x8000,fr10
65
        set_fr_iimmed   0x7fff,0x7fff,fr11
66
        maveh.p         fr10,fr10,fr12
67
        maveh           fr11,fr11,fr13
68
        test_fr_limmed  0x8000,0x8000,fr12
69
        test_fr_limmed  0x7fff,0x7fff,fr13
70
 
71
        ; Test Rounding toward nearest via RD
72
        or_spr_immed    0x10000000,msr0
73
        and_spr_immed   0x3fffffff,msr0
74
 
75
        set_fr_iimmed   0x0000,0x0000,fr10
76
        set_fr_iimmed   0x0000,0x0000,fr11
77
        maveh           fr10,fr11,fr12
78
        test_fr_limmed  0x0000,0x0000,fr12
79
 
80
        set_fr_iimmed   0x0001,0x0000,fr10
81
        set_fr_iimmed   0x0002,0x0001,fr11
82
        maveh           fr10,fr11,fr12
83
        test_fr_limmed  0x0002,0x0001,fr12
84
 
85
        set_fr_iimmed   0x0000,0xffff,fr10
86
        set_fr_iimmed   0xffff,0xfffe,fr11
87
        maveh           fr10,fr11,fr12
88
        test_fr_limmed  0xffff,0xfffe,fr12
89
 
90
        set_fr_iimmed   0xdead,0x0000,fr10
91
        set_fr_iimmed   0x0000,0xbeef,fr11
92
        maveh           fr10,fr11,fr12
93
        test_fr_limmed  0xef56,0xdf77,fr12
94
 
95
        set_fr_iimmed   0x0000,0xdead,fr10
96
        set_fr_iimmed   0xbeef,0x0000,fr11
97
        maveh           fr10,fr11,fr12
98
        test_fr_limmed  0xdf77,0xef56,fr12
99
 
100
        set_fr_iimmed   0x1234,0x5678,fr10
101
        set_fr_iimmed   0x1111,0x1111,fr11
102
        maveh           fr10,fr11,fr12
103
        test_fr_limmed  0x11a3,0x33c5,fr12
104
 
105
        set_fr_iimmed   0x1234,0x5678,fr10
106
        set_fr_iimmed   0xffff,0xffff,fr11
107
        maveh           fr10,fr11,fr12
108
        test_fr_limmed  0x091a,0x2b3c,fr12
109
 
110
        set_fr_iimmed   0x7ffe,0x7ffe,fr10
111
        set_fr_iimmed   0x0002,0x0001,fr11
112
        maveh           fr10,fr11,fr12
113
        test_fr_limmed  0x4000,0x4000,fr12
114
 
115
        set_fr_iimmed   0x8001,0x8001,fr10
116
        set_fr_iimmed   0xffff,0xfffe,fr11
117
        maveh           fr10,fr11,fr12
118
        test_fr_limmed  0xc000,0xbfff,fr12
119
 
120
        set_fr_iimmed   0x8001,0x8001,fr10
121
        set_fr_iimmed   0xfffe,0xfffe,fr11
122
        maveh           fr10,fr11,fr12
123
        test_fr_limmed  0xbfff,0xbfff,fr12
124
 
125
        set_fr_iimmed   0x8000,0x8000,fr10
126
        set_fr_iimmed   0x7fff,0x7fff,fr11
127
        maveh.p         fr10,fr10,fr12
128
        maveh           fr11,fr11,fr13
129
        test_fr_limmed  0x8000,0x8000,fr12
130
        test_fr_limmed  0x7fff,0x7fff,fr13
131
 
132
        ; Test Rounding toward zero via RD
133
        or_spr_immed    0x50000000,msr0
134
        and_spr_immed   0x7fffffff,msr0
135
 
136
        set_fr_iimmed   0x0000,0x0000,fr10
137
        set_fr_iimmed   0x0000,0x0000,fr11
138
        maveh           fr10,fr11,fr12
139
        test_fr_limmed  0x0000,0x0000,fr12
140
 
141
        set_fr_iimmed   0x0001,0x0000,fr10
142
        set_fr_iimmed   0x0002,0x0001,fr11
143
        maveh           fr10,fr11,fr12
144
        test_fr_limmed  0x0001,0x0000,fr12
145
 
146
        set_fr_iimmed   0x0000,0xffff,fr10
147
        set_fr_iimmed   0xffff,0xfffe,fr11
148
        maveh           fr10,fr11,fr12
149
        test_fr_limmed  0x0000,0xffff,fr12
150
 
151
        set_fr_iimmed   0xdead,0x0000,fr10
152
        set_fr_iimmed   0x0000,0xbeef,fr11
153
        maveh           fr10,fr11,fr12
154
        test_fr_limmed  0xef57,0xdf78,fr12
155
 
156
        set_fr_iimmed   0x0000,0xdead,fr10
157
        set_fr_iimmed   0xbeef,0x0000,fr11
158
        maveh           fr10,fr11,fr12
159
        test_fr_limmed  0xdf78,0xef57,fr12
160
 
161
        set_fr_iimmed   0x1234,0x5678,fr10
162
        set_fr_iimmed   0x1111,0x1111,fr11
163
        maveh           fr10,fr11,fr12
164
        test_fr_limmed  0x11a2,0x33c4,fr12
165
 
166
        set_fr_iimmed   0x1234,0x5678,fr10
167
        set_fr_iimmed   0xffff,0xffff,fr11
168
        maveh           fr10,fr11,fr12
169
        test_fr_limmed  0x0919,0x2b3b,fr12
170
 
171
        set_fr_iimmed   0x7ffe,0x7ffe,fr10
172
        set_fr_iimmed   0x0002,0x0001,fr11
173
        maveh           fr10,fr11,fr12
174
        test_fr_limmed  0x4000,0x3fff,fr12
175
 
176
        set_fr_iimmed   0x8001,0x8001,fr10
177
        set_fr_iimmed   0xffff,0xfffe,fr11
178
        maveh           fr10,fr11,fr12
179
        test_fr_limmed  0xc000,0xc000,fr12
180
 
181
        set_fr_iimmed   0x8001,0x8001,fr10
182
        set_fr_iimmed   0xfffe,0xfffe,fr11
183
        maveh           fr10,fr11,fr12
184
        test_fr_limmed  0xc000,0xc000,fr12
185
 
186
        set_fr_iimmed   0x8000,0x8000,fr10
187
        set_fr_iimmed   0x7fff,0x7fff,fr11
188
        maveh.p         fr10,fr10,fr12
189
        maveh           fr11,fr11,fr13
190
        test_fr_limmed  0x8000,0x8000,fr12
191
        test_fr_limmed  0x7fff,0x7fff,fr13
192
 
193
        ; Test Rounding toward positive infinity via RD
194
        or_spr_immed    0x90000000,msr0
195
        and_spr_immed   0xbfffffff,msr0
196
 
197
        set_fr_iimmed   0x0000,0x0000,fr10
198
        set_fr_iimmed   0x0000,0x0000,fr11
199
        maveh           fr10,fr11,fr12
200
        test_fr_limmed  0x0000,0x0000,fr12
201
 
202
        set_fr_iimmed   0x0001,0x0000,fr10
203
        set_fr_iimmed   0x0002,0x0001,fr11
204
        maveh           fr10,fr11,fr12
205
        test_fr_limmed  0x0002,0x0001,fr12
206
 
207
        set_fr_iimmed   0x0000,0xffff,fr10
208
        set_fr_iimmed   0xffff,0xfffe,fr11
209
        maveh           fr10,fr11,fr12
210
        test_fr_limmed  0x0000,0xffff,fr12
211
 
212
        set_fr_iimmed   0xdead,0x0000,fr10
213
        set_fr_iimmed   0x0000,0xbeef,fr11
214
        maveh           fr10,fr11,fr12
215
        test_fr_limmed  0xef57,0xdf78,fr12
216
 
217
        set_fr_iimmed   0x0000,0xdead,fr10
218
        set_fr_iimmed   0xbeef,0x0000,fr11
219
        maveh           fr10,fr11,fr12
220
        test_fr_limmed  0xdf78,0xef57,fr12
221
 
222
        set_fr_iimmed   0x1234,0x5678,fr10
223
        set_fr_iimmed   0x1111,0x1111,fr11
224
        maveh           fr10,fr11,fr12
225
        test_fr_limmed  0x11a3,0x33c5,fr12
226
 
227
        set_fr_iimmed   0x1234,0x5678,fr10
228
        set_fr_iimmed   0xffff,0xffff,fr11
229
        maveh           fr10,fr11,fr12
230
        test_fr_limmed  0x091a,0x2b3c,fr12
231
 
232
        set_fr_iimmed   0x7ffe,0x7ffe,fr10
233
        set_fr_iimmed   0x0002,0x0001,fr11
234
        maveh           fr10,fr11,fr12
235
        test_fr_limmed  0x4000,0x4000,fr12
236
 
237
        set_fr_iimmed   0x8001,0x8001,fr10
238
        set_fr_iimmed   0xffff,0xfffe,fr11
239
        maveh           fr10,fr11,fr12
240
        test_fr_limmed  0xc000,0xc000,fr12
241
 
242
        set_fr_iimmed   0x8001,0x8001,fr10
243
        set_fr_iimmed   0xfffe,0xfffe,fr11
244
        maveh           fr10,fr11,fr12
245
        test_fr_limmed  0xc000,0xc000,fr12
246
 
247
        set_fr_iimmed   0x8000,0x8000,fr10
248
        set_fr_iimmed   0x7fff,0x7fff,fr11
249
        maveh.p         fr10,fr10,fr12
250
        maveh           fr11,fr11,fr13
251
        test_fr_limmed  0x8000,0x8000,fr12
252
        test_fr_limmed  0x7fff,0x7fff,fr13
253
 
254
        ; Test Rounding toward negative infinity via RD
255
        or_spr_immed    0xd0000000,msr0
256
 
257
        set_fr_iimmed   0x0000,0x0000,fr10
258
        set_fr_iimmed   0x0000,0x0000,fr11
259
        maveh           fr10,fr11,fr12
260
        test_fr_limmed  0x0000,0x0000,fr12
261
 
262
        set_fr_iimmed   0x0001,0x0000,fr10
263
        set_fr_iimmed   0x0002,0x0001,fr11
264
        maveh           fr10,fr11,fr12
265
        test_fr_limmed  0x0001,0x0000,fr12
266
 
267
        set_fr_iimmed   0x0000,0xffff,fr10
268
        set_fr_iimmed   0xffff,0xfffe,fr11
269
        maveh           fr10,fr11,fr12
270
        test_fr_limmed  0xffff,0xfffe,fr12
271
 
272
        set_fr_iimmed   0xdead,0x0000,fr10
273
        set_fr_iimmed   0x0000,0xbeef,fr11
274
        maveh           fr10,fr11,fr12
275
        test_fr_limmed  0xef56,0xdf77,fr12
276
 
277
        set_fr_iimmed   0x0000,0xdead,fr10
278
        set_fr_iimmed   0xbeef,0x0000,fr11
279
        maveh           fr10,fr11,fr12
280
        test_fr_limmed  0xdf77,0xef56,fr12
281
 
282
        set_fr_iimmed   0x1234,0x5678,fr10
283
        set_fr_iimmed   0x1111,0x1111,fr11
284
        maveh           fr10,fr11,fr12
285
        test_fr_limmed  0x11a2,0x33c4,fr12
286
 
287
        set_fr_iimmed   0x1234,0x5678,fr10
288
        set_fr_iimmed   0xffff,0xffff,fr11
289
        maveh           fr10,fr11,fr12
290
        test_fr_limmed  0x0919,0x2b3b,fr12
291
 
292
        set_spr_immed   0,msr0
293
        set_fr_iimmed   0x7ffe,0x7ffe,fr10
294
        set_fr_iimmed   0x0002,0x0001,fr11
295
        maveh           fr10,fr11,fr12
296
        test_fr_limmed  0x4000,0x3fff,fr12
297
 
298
        set_spr_immed   0,msr0
299
        set_fr_iimmed   0x8001,0x8001,fr10
300
        set_fr_iimmed   0xffff,0xfffe,fr11
301
        maveh           fr10,fr11,fr12
302
        test_fr_limmed  0xc000,0xbfff,fr12
303
 
304
        set_spr_immed   0,msr0
305
        set_fr_iimmed   0x8001,0x8001,fr10
306
        set_fr_iimmed   0xfffe,0xfffe,fr11
307
        maveh           fr10,fr11,fr12
308
        test_fr_limmed  0xbfff,0xbfff,fr12
309
 
310
        set_spr_immed   0,msr0
311
        set_spr_immed   0,msr1
312
        set_fr_iimmed   0x8000,0x8000,fr10
313
        set_fr_iimmed   0x7fff,0x7fff,fr11
314
        maveh.p         fr10,fr10,fr12
315
        maveh           fr11,fr11,fr13
316
        test_fr_limmed  0x8000,0x8000,fr12
317
        test_fr_limmed  0x7fff,0x7fff,fr13
318
 
319
        pass

powered by: WebSVN 2.1.0

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