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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [frv/] [cmcpxrs.cgs] - Blame information for rev 827

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

Line No. Rev Author Line
1 24 jeremybenn
# frv testcase for cmcpxrs $GRi,$GRj,$ACCk,$CCi,$cond
2
# mach: all
3
 
4
        .include "testutils.inc"
5
 
6
        start
7
 
8
        .global cmcpxrs
9
cmcpxrs:
10
        set_spr_immed   0x1b1b,cccr
11
 
12
        ; Positive operands
13
        set_fr_iimmed   2,4,fr7         ; multiply small numbers
14
        set_fr_iimmed   3,5,fr8
15
        cmcpxrs         fr7,fr8,acc0,cc0,1
16
        test_accg_immed         0xff,accg0
17
        test_acc_immed  -14,acc0
18
 
19
        set_fr_iimmed   3,1,fr7         ; multiply by 0
20
        set_fr_iimmed   2,0,fr8
21
        cmcpxrs         fr7,fr8,acc0,cc0,1
22
        test_accg_immed         0,accg0
23
        test_acc_immed  6,acc0
24
 
25
        set_fr_iimmed   2,1,fr7         ; multiply by 1
26
        set_fr_iimmed   1,1,fr8
27
        cmcpxrs         fr7,fr8,acc0,cc0,1
28
        test_accg_immed         0,accg0
29
        test_acc_immed  1,acc0
30
 
31
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
32
        set_fr_iimmed   2,0x0007,fr8
33
        cmcpxrs         fr7,fr8,acc0,cc0,1
34
        test_accg_immed         0,accg0
35
        test_acc_limmed 0,0x7ff0,acc0
36
 
37
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
38
        set_fr_iimmed   2,0x2000,fr8
39
        cmcpxrs         fr7,fr8,acc0,cc0,1
40
        test_accg_immed         0,accg0
41
        test_acc_limmed 0x0000,0x4000,acc0
42
 
43
        set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
44
        set_fr_iimmed   0x7fff,0x7fff,fr8
45
        cmcpxrs         fr7,fr8,acc0,cc0,1
46
        test_accg_immed         0,accg0
47
        test_acc_limmed 0x3fff,0x0001,acc0
48
 
49
        ; Mixed operands
50
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
51
        set_fr_iimmed   0xfffd,1,fr8
52
        cmcpxrs         fr7,fr8,acc0,cc0,1
53
        test_accg_immed         0xff,accg0
54
        test_acc_immed  -3,acc0
55
 
56
        set_fr_iimmed   0xfffe,2,fr7            ; multiply by 1
57
        set_fr_iimmed   1,0xfffe,fr8
58
        cmcpxrs         fr7,fr8,acc0,cc4,1
59
        test_accg_immed         0,accg0
60
        test_acc_immed  2,acc0
61
 
62
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
63
        set_fr_iimmed   1,0xfffe,fr8
64
        cmcpxrs         fr7,fr8,acc0,cc4,1
65
        test_accg_immed         0xff,accg0
66
        test_acc_immed  -2,acc0
67
 
68
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
69
        set_fr_iimmed   0xfffe,0xfff9,fr8
70
        cmcpxrs         fr7,fr8,acc0,cc4,1
71
        test_accg_immed         0xff,accg0
72
        test_acc_limmed 0xffff,0xbff0,acc0
73
 
74
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
75
        set_fr_iimmed   0xfffe,0x0003,fr8
76
        cmcpxrs         fr7,fr8,acc0,cc4,1
77
        test_accg_immed         0xff,accg0
78
        test_acc_limmed 0xffff,0x8006,acc0
79
 
80
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
81
        set_fr_iimmed   0x8000,0x8000,fr8
82
        cmcpxrs         fr7,fr8,acc0,cc4,1
83
        test_accg_immed         0xff,accg0
84
        test_acc_limmed 0x8000,0x8000,acc0
85
 
86
        set_fr_iimmed   0x8000,0x7fff,fr7       ; max positive result
87
        set_fr_iimmed   0x8000,0x8000,fr8
88
        cmcpxrs         fr7,fr8,acc0,cc4,1
89
        test_accg_immed         0,accg0
90
        test_acc_limmed 0x7fff,0x8000,acc0
91
 
92
        ; Negative operands
93
        set_fr_iimmed   0xfffe,0xfffc,fr7               ; multiply small numbers
94
        set_fr_iimmed   0xfffd,0xfffb,fr8
95
        cmcpxrs         fr7,fr8,acc0,cc4,1
96
        test_accg_immed         0xff,accg0
97
        test_acc_immed  -14,acc0
98
 
99
        set_fr_iimmed   0xffff,0xffff,fr7               ; multiply by -1
100
        set_fr_iimmed   0xfffe,0xffff,fr8
101
        cmcpxrs         fr7,fr8,acc0,cc4,1
102
        test_accg_immed         0,accg0
103
        test_acc_immed  1,acc0
104
 
105
        set_fr_iimmed   0x7fff,0x0000,fr7       ; almost max positive result
106
        set_fr_iimmed   0x7fff,0x8001,fr8
107
        cmcpxrs         fr7,fr8,acc0,cc0,1
108
        test_accg_immed         0,accg0
109
        test_acc_immed  0x3fff0001,acc0
110
 
111
        set_fr_iimmed   0x8000,0x0000,fr7       ; max positive result
112
        set_fr_iimmed   0x8000,0x8000,fr8
113
        cmcpxrs         fr7,fr8,acc0,cc4,1
114
        test_accg_immed         0,accg0
115
        test_acc_immed  0x40000000,acc0
116
 
117
        set_fr_iimmed   2,4,fr7         ; multiply small numbers
118
        set_fr_iimmed   3,5,fr8
119
        cmcpxrs         fr7,fr8,acc0,cc1,0
120
        test_accg_immed         0xff,accg0
121
        test_acc_immed  -14,acc0
122
 
123
        set_fr_iimmed   3,1,fr7         ; multiply by 0
124
        set_fr_iimmed   2,0,fr8
125
        cmcpxrs         fr7,fr8,acc0,cc1,0
126
        test_accg_immed         0,accg0
127
        test_acc_immed  6,acc0
128
 
129
        set_fr_iimmed   2,1,fr7         ; multiply by 1
130
        set_fr_iimmed   1,1,fr8
131
        cmcpxrs         fr7,fr8,acc0,cc1,0
132
        test_accg_immed         0,accg0
133
        test_acc_immed  1,acc0
134
 
135
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
136
        set_fr_iimmed   2,0x0007,fr8
137
        cmcpxrs         fr7,fr8,acc0,cc1,0
138
        test_accg_immed         0,accg0
139
        test_acc_limmed 0,0x7ff0,acc0
140
 
141
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
142
        set_fr_iimmed   2,0x2000,fr8
143
        cmcpxrs         fr7,fr8,acc0,cc1,0
144
        test_accg_immed         0,accg0
145
        test_acc_limmed 0x0000,0x4000,acc0
146
 
147
        set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
148
        set_fr_iimmed   0x7fff,0x7fff,fr8
149
        cmcpxrs         fr7,fr8,acc0,cc1,0
150
        test_accg_immed         0,accg0
151
        test_acc_limmed 0x3fff,0x0001,acc0
152
 
153
        ; Mixed operands
154
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
155
        set_fr_iimmed   0xfffd,1,fr8
156
        cmcpxrs         fr7,fr8,acc0,cc1,0
157
        test_accg_immed         0xff,accg0
158
        test_acc_immed  -3,acc0
159
 
160
        set_fr_iimmed   0xfffe,2,fr7            ; multiply by 1
161
        set_fr_iimmed   1,0xfffe,fr8
162
        cmcpxrs         fr7,fr8,acc0,cc5,0
163
        test_accg_immed         0,accg0
164
        test_acc_immed  2,acc0
165
 
166
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
167
        set_fr_iimmed   1,0xfffe,fr8
168
        cmcpxrs         fr7,fr8,acc0,cc5,0
169
        test_accg_immed         0xff,accg0
170
        test_acc_immed  -2,acc0
171
 
172
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
173
        set_fr_iimmed   0xfffe,0xfff9,fr8
174
        cmcpxrs         fr7,fr8,acc0,cc5,0
175
        test_accg_immed         0xff,accg0
176
        test_acc_limmed 0xffff,0xbff0,acc0
177
 
178
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
179
        set_fr_iimmed   0xfffe,0x0003,fr8
180
        cmcpxrs         fr7,fr8,acc0,cc5,0
181
        test_accg_immed         0xff,accg0
182
        test_acc_limmed 0xffff,0x8006,acc0
183
 
184
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
185
        set_fr_iimmed   0x8000,0x8000,fr8
186
        cmcpxrs         fr7,fr8,acc0,cc5,0
187
        test_accg_immed         0xff,accg0
188
        test_acc_limmed 0x8000,0x8000,acc0
189
 
190
        set_fr_iimmed   0x8000,0x7fff,fr7       ; max positive result
191
        set_fr_iimmed   0x8000,0x8000,fr8
192
        cmcpxrs         fr7,fr8,acc0,cc5,0
193
        test_accg_immed         0,accg0
194
        test_acc_limmed 0x7fff,0x8000,acc0
195
 
196
        ; Negative operands
197
        set_fr_iimmed   0xfffe,0xfffc,fr7               ; multiply small numbers
198
        set_fr_iimmed   0xfffd,0xfffb,fr8
199
        cmcpxrs         fr7,fr8,acc0,cc5,0
200
        test_accg_immed         0xff,accg0
201
        test_acc_immed  -14,acc0
202
 
203
        set_fr_iimmed   0xffff,0xffff,fr7               ; multiply by -1
204
        set_fr_iimmed   0xfffe,0xffff,fr8
205
        cmcpxrs         fr7,fr8,acc0,cc5,0
206
        test_accg_immed         0,accg0
207
        test_acc_immed  1,acc0
208
 
209
        set_fr_iimmed   0x7fff,0x0000,fr7       ; almost max positive result
210
        set_fr_iimmed   0x7fff,0x8001,fr8
211
        cmcpxrs         fr7,fr8,acc0,cc5,0
212
        test_accg_immed         0,accg0
213
        test_acc_immed  0x3fff0001,acc0
214
 
215
        set_fr_iimmed   0x8000,0x0000,fr7       ; max positive result
216
        set_fr_iimmed   0x8000,0x8000,fr8
217
        cmcpxrs         fr7,fr8,acc0,cc5,0
218
        test_accg_immed         0,accg0
219
        test_acc_immed  0x40000000,acc0
220
 
221
        ; Positive operands
222
        set_accg_immed  0x00000011,accg0
223
        set_acc_immed   0x11111111,acc0
224
        set_fr_iimmed   2,4,fr7         ; multiply small numbers
225
        set_fr_iimmed   3,5,fr8
226
        cmcpxrs         fr7,fr8,acc0,cc0,0
227
        test_accg_immed         0x00000011,accg0
228
        test_acc_immed  0x11111111,acc0
229
 
230
        set_fr_iimmed   3,1,fr7         ; multiply by 0
231
        set_fr_iimmed   2,0,fr8
232
        cmcpxrs         fr7,fr8,acc0,cc0,0
233
        test_accg_immed         0x00000011,accg0
234
        test_acc_immed  0x11111111,acc0
235
 
236
        set_fr_iimmed   2,1,fr7         ; multiply by 1
237
        set_fr_iimmed   1,1,fr8
238
        cmcpxrs         fr7,fr8,acc0,cc0,0
239
        test_accg_immed         0x00000011,accg0
240
        test_acc_immed  0x11111111,acc0
241
 
242
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
243
        set_fr_iimmed   2,0x0007,fr8
244
        cmcpxrs         fr7,fr8,acc0,cc0,0
245
        test_accg_immed         0x00000011,accg0
246
        test_acc_immed  0x11111111,acc0
247
 
248
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
249
        set_fr_iimmed   2,0x2000,fr8
250
        cmcpxrs         fr7,fr8,acc0,cc0,0
251
        test_accg_immed         0x00000011,accg0
252
        test_acc_immed  0x11111111,acc0
253
 
254
        set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
255
        set_fr_iimmed   0x7fff,0x7fff,fr8
256
        cmcpxrs         fr7,fr8,acc0,cc0,0
257
        test_accg_immed         0x00000011,accg0
258
        test_acc_immed  0x11111111,acc0
259
 
260
        ; Mixed operands
261
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
262
        set_fr_iimmed   0xfffd,1,fr8
263
        cmcpxrs         fr7,fr8,acc0,cc0,0
264
        test_accg_immed         0x00000011,accg0
265
        test_acc_immed  0x11111111,acc0
266
 
267
        set_fr_iimmed   0xfffe,2,fr7            ; multiply by 1
268
        set_fr_iimmed   1,0xfffe,fr8
269
        cmcpxrs         fr7,fr8,acc0,cc4,0
270
        test_accg_immed         0x00000011,accg0
271
        test_acc_immed  0x11111111,acc0
272
 
273
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
274
        set_fr_iimmed   1,0xfffe,fr8
275
        cmcpxrs         fr7,fr8,acc0,cc4,0
276
        test_accg_immed         0x00000011,accg0
277
        test_acc_immed  0x11111111,acc0
278
 
279
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
280
        set_fr_iimmed   0xfffe,0xfff9,fr8
281
        cmcpxrs         fr7,fr8,acc0,cc4,0
282
        test_accg_immed         0x00000011,accg0
283
        test_acc_immed  0x11111111,acc0
284
 
285
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
286
        set_fr_iimmed   0xfffe,0x0003,fr8
287
        cmcpxrs         fr7,fr8,acc0,cc4,0
288
        test_accg_immed         0x00000011,accg0
289
        test_acc_immed  0x11111111,acc0
290
 
291
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
292
        set_fr_iimmed   0x8000,0x8000,fr8
293
        cmcpxrs         fr7,fr8,acc0,cc4,0
294
        test_accg_immed         0x00000011,accg0
295
        test_acc_immed  0x11111111,acc0
296
 
297
        set_fr_iimmed   0x8000,0x7fff,fr7       ; max positive result
298
        set_fr_iimmed   0x8000,0x8000,fr8
299
        cmcpxrs         fr7,fr8,acc0,cc4,0
300
        test_accg_immed         0x00000011,accg0
301
        test_acc_immed  0x11111111,acc0
302
 
303
        ; Negative operands
304
        set_fr_iimmed   0xfffe,0xfffc,fr7               ; multiply small numbers
305
        set_fr_iimmed   0xfffd,0xfffb,fr8
306
        cmcpxrs         fr7,fr8,acc0,cc4,0
307
        test_accg_immed         0x00000011,accg0
308
        test_acc_immed  0x11111111,acc0
309
 
310
        set_fr_iimmed   0xffff,0xffff,fr7               ; multiply by -1
311
        set_fr_iimmed   0xfffe,0xffff,fr8
312
        cmcpxrs         fr7,fr8,acc0,cc4,0
313
        test_accg_immed         0x00000011,accg0
314
        test_acc_immed  0x11111111,acc0
315
 
316
        set_fr_iimmed   0x7fff,0x0000,fr7       ; almost max positive result
317
        set_fr_iimmed   0x7fff,0x8001,fr8
318
        cmcpxrs         fr7,fr8,acc0,cc4,0
319
        test_accg_immed         0x00000011,accg0
320
        test_acc_immed  0x11111111,acc0
321
 
322
        set_fr_iimmed   0x8000,0x0000,fr7       ; max positive result
323
        set_fr_iimmed   0x8000,0x8000,fr8
324
        cmcpxrs         fr7,fr8,acc0,cc4,0
325
        test_accg_immed         0x00000011,accg0
326
        test_acc_immed  0x11111111,acc0
327
 
328
        ; Positive operands
329
        set_accg_immed  0x00000011,accg0
330
        set_acc_immed   0x11111111,acc0
331
        set_fr_iimmed   2,4,fr7         ; multiply small numbers
332
        set_fr_iimmed   3,5,fr8
333
        cmcpxrs         fr7,fr8,acc0,cc1,1
334
        test_accg_immed         0x00000011,accg0
335
        test_acc_immed  0x11111111,acc0
336
 
337
        set_fr_iimmed   3,1,fr7         ; multiply by 0
338
        set_fr_iimmed   2,0,fr8
339
        cmcpxrs         fr7,fr8,acc0,cc1,1
340
        test_accg_immed         0x00000011,accg0
341
        test_acc_immed  0x11111111,acc0
342
 
343
        set_fr_iimmed   2,1,fr7         ; multiply by 1
344
        set_fr_iimmed   1,1,fr8
345
        cmcpxrs         fr7,fr8,acc0,cc1,1
346
        test_accg_immed         0x00000011,accg0
347
        test_acc_immed  0x11111111,acc0
348
 
349
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
350
        set_fr_iimmed   2,0x0007,fr8
351
        cmcpxrs         fr7,fr8,acc0,cc1,1
352
        test_accg_immed         0x00000011,accg0
353
        test_acc_immed  0x11111111,acc0
354
 
355
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
356
        set_fr_iimmed   2,0x2000,fr8
357
        cmcpxrs         fr7,fr8,acc0,cc1,1
358
        test_accg_immed         0x00000011,accg0
359
        test_acc_immed  0x11111111,acc0
360
 
361
        set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
362
        set_fr_iimmed   0x7fff,0x7fff,fr8
363
        cmcpxrs         fr7,fr8,acc0,cc1,1
364
        test_accg_immed         0x00000011,accg0
365
        test_acc_immed  0x11111111,acc0
366
 
367
        ; Mixed operands
368
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
369
        set_fr_iimmed   0xfffd,1,fr8
370
        cmcpxrs         fr7,fr8,acc0,cc1,1
371
        test_accg_immed         0x00000011,accg0
372
        test_acc_immed  0x11111111,acc0
373
 
374
        set_fr_iimmed   0xfffe,2,fr7            ; multiply by 1
375
        set_fr_iimmed   1,0xfffe,fr8
376
        cmcpxrs         fr7,fr8,acc0,cc5,1
377
        test_accg_immed         0x00000011,accg0
378
        test_acc_immed  0x11111111,acc0
379
 
380
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
381
        set_fr_iimmed   1,0xfffe,fr8
382
        cmcpxrs         fr7,fr8,acc0,cc5,1
383
        test_accg_immed         0x00000011,accg0
384
        test_acc_immed  0x11111111,acc0
385
 
386
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
387
        set_fr_iimmed   0xfffe,0xfff9,fr8
388
        cmcpxrs         fr7,fr8,acc0,cc5,1
389
        test_accg_immed         0x00000011,accg0
390
        test_acc_immed  0x11111111,acc0
391
 
392
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
393
        set_fr_iimmed   0xfffe,0x0003,fr8
394
        cmcpxrs         fr7,fr8,acc0,cc5,1
395
        test_accg_immed         0x00000011,accg0
396
        test_acc_immed  0x11111111,acc0
397
 
398
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
399
        set_fr_iimmed   0x8000,0x8000,fr8
400
        cmcpxrs         fr7,fr8,acc0,cc5,1
401
        test_accg_immed         0x00000011,accg0
402
        test_acc_immed  0x11111111,acc0
403
 
404
        set_fr_iimmed   0x8000,0x7fff,fr7       ; max positive result
405
        set_fr_iimmed   0x8000,0x8000,fr8
406
        cmcpxrs         fr7,fr8,acc0,cc5,1
407
        test_accg_immed         0x00000011,accg0
408
        test_acc_immed  0x11111111,acc0
409
 
410
        ; Negative operands
411
        set_fr_iimmed   0xfffe,0xfffc,fr7               ; multiply small numbers
412
        set_fr_iimmed   0xfffd,0xfffb,fr8
413
        cmcpxrs         fr7,fr8,acc0,cc5,1
414
        test_accg_immed         0x00000011,accg0
415
        test_acc_immed  0x11111111,acc0
416
 
417
        set_fr_iimmed   0xffff,0xffff,fr7               ; multiply by -1
418
        set_fr_iimmed   0xfffe,0xffff,fr8
419
        cmcpxrs         fr7,fr8,acc0,cc5,1
420
        test_accg_immed         0x00000011,accg0
421
        test_acc_immed  0x11111111,acc0
422
 
423
        set_fr_iimmed   0x7fff,0x0000,fr7       ; almost max positive result
424
        set_fr_iimmed   0x7fff,0x8001,fr8
425
        cmcpxrs         fr7,fr8,acc0,cc5,1
426
        test_accg_immed         0x00000011,accg0
427
        test_acc_immed  0x11111111,acc0
428
 
429
        set_fr_iimmed   0x8000,0x0000,fr7       ; max positive result
430
        set_fr_iimmed   0x8000,0x8000,fr8
431
        cmcpxrs         fr7,fr8,acc0,cc5,1
432
        test_accg_immed         0x00000011,accg0
433
        test_acc_immed  0x11111111,acc0
434
 
435
        ; Positive operands
436
        set_accg_immed  0x00000011,accg0
437
        set_acc_immed   0x11111111,acc0
438
        set_fr_iimmed   2,4,fr7         ; multiply small numbers
439
        set_fr_iimmed   3,5,fr8
440
        cmcpxrs         fr7,fr8,acc0,cc2,1
441
        test_accg_immed         0x00000011,accg0
442
        test_acc_immed  0x11111111,acc0
443
 
444
        set_fr_iimmed   3,1,fr7         ; multiply by 0
445
        set_fr_iimmed   2,0,fr8
446
        cmcpxrs         fr7,fr8,acc0,cc2,1
447
        test_accg_immed         0x00000011,accg0
448
        test_acc_immed  0x11111111,acc0
449
 
450
        set_fr_iimmed   2,1,fr7         ; multiply by 1
451
        set_fr_iimmed   1,1,fr8
452
        cmcpxrs         fr7,fr8,acc0,cc2,1
453
        test_accg_immed         0x00000011,accg0
454
        test_acc_immed  0x11111111,acc0
455
 
456
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
457
        set_fr_iimmed   2,0x0007,fr8
458
        cmcpxrs         fr7,fr8,acc0,cc2,1
459
        test_accg_immed         0x00000011,accg0
460
        test_acc_immed  0x11111111,acc0
461
 
462
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
463
        set_fr_iimmed   2,0x2000,fr8
464
        cmcpxrs         fr7,fr8,acc0,cc2,1
465
        test_accg_immed         0x00000011,accg0
466
        test_acc_immed  0x11111111,acc0
467
 
468
        set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
469
        set_fr_iimmed   0x7fff,0x7fff,fr8
470
        cmcpxrs         fr7,fr8,acc0,cc2,1
471
        test_accg_immed         0x00000011,accg0
472
        test_acc_immed  0x11111111,acc0
473
 
474
        ; Mixed operands
475
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
476
        set_fr_iimmed   0xfffd,1,fr8
477
        cmcpxrs         fr7,fr8,acc0,cc2,1
478
        test_accg_immed         0x00000011,accg0
479
        test_acc_immed  0x11111111,acc0
480
 
481
        set_fr_iimmed   0xfffe,2,fr7            ; multiply by 1
482
        set_fr_iimmed   1,0xfffe,fr8
483
        cmcpxrs         fr7,fr8,acc0,cc6,1
484
        test_accg_immed         0x00000011,accg0
485
        test_acc_immed  0x11111111,acc0
486
 
487
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
488
        set_fr_iimmed   1,0xfffe,fr8
489
        cmcpxrs         fr7,fr8,acc0,cc6,1
490
        test_accg_immed         0x00000011,accg0
491
        test_acc_immed  0x11111111,acc0
492
 
493
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
494
        set_fr_iimmed   0xfffe,0xfff9,fr8
495
        cmcpxrs         fr7,fr8,acc0,cc6,1
496
        test_accg_immed         0x00000011,accg0
497
        test_acc_immed  0x11111111,acc0
498
 
499
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
500
        set_fr_iimmed   0xfffe,0x0003,fr8
501
        cmcpxrs         fr7,fr8,acc0,cc6,1
502
        test_accg_immed         0x00000011,accg0
503
        test_acc_immed  0x11111111,acc0
504
 
505
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
506
        set_fr_iimmed   0x8000,0x8000,fr8
507
        cmcpxrs         fr7,fr8,acc0,cc6,1
508
        test_accg_immed         0x00000011,accg0
509
        test_acc_immed  0x11111111,acc0
510
 
511
        set_fr_iimmed   0x8000,0x7fff,fr7       ; max positive result
512
        set_fr_iimmed   0x8000,0x8000,fr8
513
        cmcpxrs         fr7,fr8,acc0,cc6,1
514
        test_accg_immed         0x00000011,accg0
515
        test_acc_immed  0x11111111,acc0
516
 
517
        ; Negative operands
518
        set_fr_iimmed   0xfffe,0xfffc,fr7               ; multiply small numbers
519
        set_fr_iimmed   0xfffd,0xfffb,fr8
520
        cmcpxrs         fr7,fr8,acc0,cc6,1
521
        test_accg_immed         0x00000011,accg0
522
        test_acc_immed  0x11111111,acc0
523
 
524
        set_fr_iimmed   0xffff,0xffff,fr7               ; multiply by -1
525
        set_fr_iimmed   0xfffe,0xffff,fr8
526
        cmcpxrs         fr7,fr8,acc0,cc6,1
527
        test_accg_immed         0x00000011,accg0
528
        test_acc_immed  0x11111111,acc0
529
 
530
        set_fr_iimmed   0x7fff,0x0000,fr7       ; almost max positive result
531
        set_fr_iimmed   0x7fff,0x8001,fr8
532
        cmcpxrs         fr7,fr8,acc0,cc6,1
533
        test_accg_immed         0x00000011,accg0
534
        test_acc_immed  0x11111111,acc0
535
 
536
        set_fr_iimmed   0x8000,0x0000,fr7       ; max positive result
537
        set_fr_iimmed   0x8000,0x8000,fr8
538
        cmcpxrs         fr7,fr8,acc0,cc6,1
539
        test_accg_immed         0x00000011,accg0
540
        test_acc_immed  0x11111111,acc0
541
;
542
        ; Positive operands
543
        set_accg_immed  0x00000011,accg0
544
        set_acc_immed   0x11111111,acc0
545
        set_fr_iimmed   2,4,fr7         ; multiply small numbers
546
        set_fr_iimmed   3,5,fr8
547
        cmcpxrs         fr7,fr8,acc0,cc3,1
548
        test_accg_immed         0x00000011,accg0
549
        test_acc_immed  0x11111111,acc0
550
 
551
        set_fr_iimmed   3,1,fr7         ; multiply by 0
552
        set_fr_iimmed   2,0,fr8
553
        cmcpxrs         fr7,fr8,acc0,cc3,1
554
        test_accg_immed         0x00000011,accg0
555
        test_acc_immed  0x11111111,acc0
556
 
557
        set_fr_iimmed   2,1,fr7         ; multiply by 1
558
        set_fr_iimmed   1,1,fr8
559
        cmcpxrs         fr7,fr8,acc0,cc3,1
560
        test_accg_immed         0x00000011,accg0
561
        test_acc_immed  0x11111111,acc0
562
 
563
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
564
        set_fr_iimmed   2,0x0007,fr8
565
        cmcpxrs         fr7,fr8,acc0,cc3,1
566
        test_accg_immed         0x00000011,accg0
567
        test_acc_immed  0x11111111,acc0
568
 
569
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
570
        set_fr_iimmed   2,0x2000,fr8
571
        cmcpxrs         fr7,fr8,acc0,cc3,1
572
        test_accg_immed         0x00000011,accg0
573
        test_acc_immed  0x11111111,acc0
574
 
575
        set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
576
        set_fr_iimmed   0x7fff,0x7fff,fr8
577
        cmcpxrs         fr7,fr8,acc0,cc3,1
578
        test_accg_immed         0x00000011,accg0
579
        test_acc_immed  0x11111111,acc0
580
 
581
        ; Mixed operands
582
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
583
        set_fr_iimmed   0xfffd,1,fr8
584
        cmcpxrs         fr7,fr8,acc0,cc3,1
585
        test_accg_immed         0x00000011,accg0
586
        test_acc_immed  0x11111111,acc0
587
 
588
        set_fr_iimmed   0xfffe,2,fr7            ; multiply by 1
589
        set_fr_iimmed   1,0xfffe,fr8
590
        cmcpxrs         fr7,fr8,acc0,cc7,1
591
        test_accg_immed         0x00000011,accg0
592
        test_acc_immed  0x11111111,acc0
593
 
594
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
595
        set_fr_iimmed   1,0xfffe,fr8
596
        cmcpxrs         fr7,fr8,acc0,cc7,1
597
        test_accg_immed         0x00000011,accg0
598
        test_acc_immed  0x11111111,acc0
599
 
600
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
601
        set_fr_iimmed   0xfffe,0xfff9,fr8
602
        cmcpxrs         fr7,fr8,acc0,cc7,1
603
        test_accg_immed         0x00000011,accg0
604
        test_acc_immed  0x11111111,acc0
605
 
606
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
607
        set_fr_iimmed   0xfffe,0x0003,fr8
608
        cmcpxrs         fr7,fr8,acc0,cc7,1
609
        test_accg_immed         0x00000011,accg0
610
        test_acc_immed  0x11111111,acc0
611
 
612
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
613
        set_fr_iimmed   0x8000,0x8000,fr8
614
        cmcpxrs         fr7,fr8,acc0,cc7,1
615
        test_accg_immed         0x00000011,accg0
616
        test_acc_immed  0x11111111,acc0
617
 
618
        set_fr_iimmed   0x8000,0x7fff,fr7       ; max positive result
619
        set_fr_iimmed   0x8000,0x8000,fr8
620
        cmcpxrs         fr7,fr8,acc0,cc7,1
621
        test_accg_immed         0x00000011,accg0
622
        test_acc_immed  0x11111111,acc0
623
 
624
        ; Negative operands
625
        set_fr_iimmed   0xfffe,0xfffc,fr7               ; multiply small numbers
626
        set_fr_iimmed   0xfffd,0xfffb,fr8
627
        cmcpxrs         fr7,fr8,acc0,cc7,1
628
        test_accg_immed         0x00000011,accg0
629
        test_acc_immed  0x11111111,acc0
630
 
631
        set_fr_iimmed   0xffff,0xffff,fr7               ; multiply by -1
632
        set_fr_iimmed   0xfffe,0xffff,fr8
633
        cmcpxrs         fr7,fr8,acc0,cc7,1
634
        test_accg_immed         0x00000011,accg0
635
        test_acc_immed  0x11111111,acc0
636
 
637
        set_fr_iimmed   0x7fff,0x0000,fr7       ; almost max positive result
638
        set_fr_iimmed   0x7fff,0x8001,fr8
639
        cmcpxrs         fr7,fr8,acc0,cc7,1
640
        test_accg_immed         0x00000011,accg0
641
        test_acc_immed  0x11111111,acc0
642
 
643
        set_fr_iimmed   0x8000,0x0000,fr7       ; max positive result
644
        set_fr_iimmed   0x8000,0x8000,fr8
645
        cmcpxrs         fr7,fr8,acc0,cc7,1
646
        test_accg_immed         0x00000011,accg0
647
        test_acc_immed  0x11111111,acc0
648
 
649
        pass

powered by: WebSVN 2.1.0

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