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/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [frv/] [cmmulhs.cgs] - Blame information for rev 157

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# frv testcase for cmmulhs $GRi,$GRj,$ACCk,$CCi,$cond
2
# mach: all
3
 
4
        .include "testutils.inc"
5
 
6
        start
7
 
8
        .global cmmulhs
9
cmmulhs:
10
        set_spr_immed   0x1b1b,cccr
11
 
12
        ; Positive operands
13
        set_fr_iimmed   2,3,fr7         ; multiply small numbers
14
        set_fr_iimmed   3,2,fr8
15
        cmmulhs         fr7,fr8,acc0,cc0,1
16
        test_accg_immed         0,accg0
17
        test_acc_immed  6,acc0
18
        test_accg_immed         0,accg1
19
        test_acc_immed  6,acc1
20
 
21
        set_fr_iimmed   0,1,fr7         ; multiply by 0
22
        set_fr_iimmed   2,0,fr8
23
        cmmulhs         fr7,fr8,acc0,cc0,1
24
        test_accg_immed         0,accg0
25
        test_acc_immed  0,acc0
26
        test_accg_immed         0,accg1
27
        test_acc_immed  0,acc1
28
 
29
        set_fr_iimmed   2,1,fr7         ; multiply by 1
30
        set_fr_iimmed   1,2,fr8
31
        cmmulhs         fr7,fr8,acc0,cc0,1
32
        test_accg_immed         0,accg0
33
        test_acc_immed  2,acc0
34
        test_accg_immed         0,accg1
35
        test_acc_immed  2,acc1
36
 
37
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
38
        set_fr_iimmed   2,0x3fff,fr8
39
        cmmulhs         fr7,fr8,acc0,cc0,1
40
        test_accg_immed         0,accg0
41
        test_acc_limmed 0,0x7ffe,acc0
42
        test_accg_immed         0,accg1
43
        test_acc_limmed 0,0x7ffe,acc1
44
 
45
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
46
        set_fr_iimmed   2,0x4000,fr8
47
        cmmulhs         fr7,fr8,acc0,cc0,1
48
        test_accg_immed         0,accg0
49
        test_acc_limmed 0x0000,0x8000,acc0
50
        test_accg_immed         0,accg1
51
        test_acc_limmed 0x0000,0x8000,acc1
52
 
53
        set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
54
        set_fr_iimmed   0x7fff,0x7fff,fr8
55
        cmmulhs         fr7,fr8,acc0,cc0,1
56
        test_accg_immed         0,accg0
57
        test_acc_limmed 0x3fff,0x0001,acc0
58
        test_accg_immed         0,accg1
59
        test_acc_limmed 0x3fff,0x0001,acc1
60
 
61
        ; Mixed operands
62
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
63
        set_fr_iimmed   0xfffd,2,fr8
64
        cmmulhs         fr7,fr8,acc0,cc0,1
65
        test_accg_immed         0xff,accg0
66
        test_acc_immed  -6,acc0
67
        test_accg_immed         0xff,accg1
68
        test_acc_immed  -6,acc1
69
 
70
        set_fr_iimmed   0xfffe,1,fr7            ; multiply by 1
71
        set_fr_iimmed   1,0xfffe,fr8
72
        cmmulhs         fr7,fr8,acc0,cc0,1
73
        test_accg_immed         0xff,accg0
74
        test_acc_immed  -2,acc0
75
        test_accg_immed         0xff,accg1
76
        test_acc_immed  -2,acc1
77
 
78
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
79
        set_fr_iimmed   0,0xfffe,fr8
80
        cmmulhs         fr7,fr8,acc0,cc4,1
81
        test_accg_immed         0,accg0
82
        test_acc_immed  0,acc0
83
        test_accg_immed         0,accg1
84
        test_acc_immed  0,acc1
85
 
86
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
87
        set_fr_iimmed   0xfffe,0x2001,fr8
88
        cmmulhs         fr7,fr8,acc0,cc4,1
89
        test_accg_immed         0xff,accg0
90
        test_acc_limmed 0xffff,0xbffe,acc0
91
        test_accg_immed         0xff,accg1
92
        test_acc_limmed 0xffff,0xbffe,acc1
93
 
94
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
95
        set_fr_iimmed   0xfffe,0x4000,fr8
96
        cmmulhs         fr7,fr8,acc0,cc4,1
97
        test_accg_immed         0xff,accg0
98
        test_acc_limmed 0xffff,0x8000,acc0
99
        test_accg_immed         0xff,accg1
100
        test_acc_limmed 0xffff,0x8000,acc1
101
 
102
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
103
        set_fr_iimmed   0x8000,0x7fff,fr8
104
        cmmulhs         fr7,fr8,acc0,cc4,1
105
        test_accg_immed         0xff,accg0
106
        test_acc_limmed 0xc000,0x8000,acc0
107
        test_accg_immed         0xff,accg1
108
        test_acc_limmed 0xc000,0x8000,acc1
109
 
110
        ; Negative operands
111
        set_fr_iimmed   0xfffe,0xfffd,fr7               ; multiply small numbers
112
        set_fr_iimmed   0xfffd,0xfffe,fr8
113
        cmmulhs         fr7,fr8,acc0,cc4,1
114
        test_accg_immed         0,accg0
115
        test_acc_immed  6,acc0
116
        test_accg_immed         0,accg1
117
        test_acc_immed  6,acc1
118
 
119
        set_fr_iimmed   0xffff,0xfffe,fr7               ; multiply by -1
120
        set_fr_iimmed   0xfffe,0xffff,fr8
121
        cmmulhs         fr7,fr8,acc0,cc4,1
122
        test_accg_immed         0,accg0
123
        test_acc_immed  2,acc0
124
        test_accg_immed         0,accg1
125
        test_acc_immed  2,acc1
126
 
127
        set_fr_iimmed   0x8001,0x8001,fr7       ; almost max positive result
128
        set_fr_iimmed   0x8001,0x8001,fr8
129
        cmmulhs         fr7,fr8,acc0,cc4,1
130
        test_accg_immed         0,accg0
131
        test_acc_immed  0x3fff0001,acc0
132
        test_accg_immed         0,accg1
133
        test_acc_immed  0x3fff0001,acc1
134
 
135
        set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
136
        set_fr_iimmed   0x8000,0x8000,fr8
137
        cmmulhs         fr7,fr8,acc0,cc4,1
138
        test_accg_immed         0,accg0
139
        test_acc_immed  0x40000000,acc0
140
        test_accg_immed         0,accg1
141
        test_acc_immed  0x40000000,acc1
142
 
143
        ; Positive operands
144
        set_fr_iimmed   2,3,fr7         ; multiply small numbers
145
        set_fr_iimmed   3,2,fr8
146
        cmmulhs         fr7,fr8,acc0,cc1,0
147
        test_accg_immed         0,accg0
148
        test_acc_immed  6,acc0
149
        test_accg_immed         0,accg1
150
        test_acc_immed  6,acc1
151
 
152
        set_fr_iimmed   0,1,fr7         ; multiply by 0
153
        set_fr_iimmed   2,0,fr8
154
        cmmulhs         fr7,fr8,acc0,cc1,0
155
        test_accg_immed         0,accg0
156
        test_acc_immed  0,acc0
157
        test_accg_immed         0,accg1
158
        test_acc_immed  0,acc1
159
 
160
        set_fr_iimmed   2,1,fr7         ; multiply by 1
161
        set_fr_iimmed   1,2,fr8
162
        cmmulhs         fr7,fr8,acc0,cc1,0
163
        test_accg_immed         0,accg0
164
        test_acc_immed  2,acc0
165
        test_accg_immed         0,accg1
166
        test_acc_immed  2,acc1
167
 
168
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
169
        set_fr_iimmed   2,0x3fff,fr8
170
        cmmulhs         fr7,fr8,acc0,cc1,0
171
        test_accg_immed         0,accg0
172
        test_acc_limmed 0,0x7ffe,acc0
173
        test_accg_immed         0,accg1
174
        test_acc_limmed 0,0x7ffe,acc1
175
 
176
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
177
        set_fr_iimmed   2,0x4000,fr8
178
        cmmulhs         fr7,fr8,acc0,cc1,0
179
        test_accg_immed         0,accg0
180
        test_acc_limmed 0x0000,0x8000,acc0
181
        test_accg_immed         0,accg1
182
        test_acc_limmed 0x0000,0x8000,acc1
183
 
184
        set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
185
        set_fr_iimmed   0x7fff,0x7fff,fr8
186
        cmmulhs         fr7,fr8,acc0,cc1,0
187
        test_accg_immed         0,accg0
188
        test_acc_limmed 0x3fff,0x0001,acc0
189
        test_accg_immed         0,accg1
190
        test_acc_limmed 0x3fff,0x0001,acc1
191
 
192
        ; Mixed operands
193
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
194
        set_fr_iimmed   0xfffd,2,fr8
195
        cmmulhs         fr7,fr8,acc0,cc1,0
196
        test_accg_immed         0xff,accg0
197
        test_acc_immed  -6,acc0
198
        test_accg_immed         0xff,accg1
199
        test_acc_immed  -6,acc1
200
 
201
        set_fr_iimmed   0xfffe,1,fr7            ; multiply by 1
202
        set_fr_iimmed   1,0xfffe,fr8
203
        cmmulhs         fr7,fr8,acc0,cc1,0
204
        test_accg_immed         0xff,accg0
205
        test_acc_immed  -2,acc0
206
        test_accg_immed         0xff,accg1
207
        test_acc_immed  -2,acc1
208
 
209
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
210
        set_fr_iimmed   0,0xfffe,fr8
211
        cmmulhs         fr7,fr8,acc0,cc5,0
212
        test_accg_immed         0,accg0
213
        test_acc_immed  0,acc0
214
        test_accg_immed         0,accg1
215
        test_acc_immed  0,acc1
216
 
217
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
218
        set_fr_iimmed   0xfffe,0x2001,fr8
219
        cmmulhs         fr7,fr8,acc0,cc5,0
220
        test_accg_immed         0xff,accg0
221
        test_acc_limmed 0xffff,0xbffe,acc0
222
        test_accg_immed         0xff,accg1
223
        test_acc_limmed 0xffff,0xbffe,acc1
224
 
225
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
226
        set_fr_iimmed   0xfffe,0x4000,fr8
227
        cmmulhs         fr7,fr8,acc0,cc5,0
228
        test_accg_immed         0xff,accg0
229
        test_acc_limmed 0xffff,0x8000,acc0
230
        test_accg_immed         0xff,accg1
231
        test_acc_limmed 0xffff,0x8000,acc1
232
 
233
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
234
        set_fr_iimmed   0x8000,0x7fff,fr8
235
        cmmulhs         fr7,fr8,acc0,cc5,0
236
        test_accg_immed         0xff,accg0
237
        test_acc_limmed 0xc000,0x8000,acc0
238
        test_accg_immed         0xff,accg1
239
        test_acc_limmed 0xc000,0x8000,acc1
240
 
241
        ; Negative operands
242
        set_fr_iimmed   0xfffe,0xfffd,fr7               ; multiply small numbers
243
        set_fr_iimmed   0xfffd,0xfffe,fr8
244
        cmmulhs         fr7,fr8,acc0,cc5,0
245
        test_accg_immed         0,accg0
246
        test_acc_immed  6,acc0
247
        test_accg_immed         0,accg1
248
        test_acc_immed  6,acc1
249
 
250
        set_fr_iimmed   0xffff,0xfffe,fr7               ; multiply by -1
251
        set_fr_iimmed   0xfffe,0xffff,fr8
252
        cmmulhs         fr7,fr8,acc0,cc5,0
253
        test_accg_immed         0,accg0
254
        test_acc_immed  2,acc0
255
        test_accg_immed         0,accg1
256
        test_acc_immed  2,acc1
257
 
258
        set_fr_iimmed   0x8001,0x8001,fr7       ; almost max positive result
259
        set_fr_iimmed   0x8001,0x8001,fr8
260
        cmmulhs         fr7,fr8,acc0,cc5,0
261
        test_accg_immed         0,accg0
262
        test_acc_immed  0x3fff0001,acc0
263
        test_accg_immed         0,accg1
264
        test_acc_immed  0x3fff0001,acc1
265
 
266
        set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
267
        set_fr_iimmed   0x8000,0x8000,fr8
268
        cmmulhs         fr7,fr8,acc0,cc5,0
269
        test_accg_immed         0,accg0
270
        test_acc_immed  0x40000000,acc0
271
        test_accg_immed         0,accg1
272
        test_acc_immed  0x40000000,acc1
273
 
274
        ; Positive operands
275
        set_accg_immed  0x00000011,accg0
276
        set_acc_immed   0x11111111,acc0
277
        set_accg_immed  0x00000022,accg1
278
        set_acc_immed   0x22222222,acc1
279
        set_fr_iimmed   2,3,fr7         ; multiply small numbers
280
        set_fr_iimmed   3,2,fr8
281
        cmmulhs         fr7,fr8,acc0,cc0,0
282
        test_accg_immed         0x00000011,accg0
283
        test_acc_immed  0x11111111,acc0
284
        test_accg_immed         0x00000022,accg1
285
        test_acc_immed  0x22222222,acc1
286
 
287
        set_fr_iimmed   0,1,fr7         ; multiply by 0
288
        set_fr_iimmed   2,0,fr8
289
        cmmulhs         fr7,fr8,acc0,cc0,0
290
        test_accg_immed         0x00000011,accg0
291
        test_acc_immed  0x11111111,acc0
292
        test_accg_immed         0x00000022,accg1
293
        test_acc_immed  0x22222222,acc1
294
 
295
        set_fr_iimmed   2,1,fr7         ; multiply by 1
296
        set_fr_iimmed   1,2,fr8
297
        cmmulhs         fr7,fr8,acc0,cc0,0
298
        test_accg_immed         0x00000011,accg0
299
        test_acc_immed  0x11111111,acc0
300
        test_accg_immed         0x00000022,accg1
301
        test_acc_immed  0x22222222,acc1
302
 
303
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
304
        set_fr_iimmed   2,0x3fff,fr8
305
        cmmulhs         fr7,fr8,acc0,cc0,0
306
        test_accg_immed         0x00000011,accg0
307
        test_acc_immed  0x11111111,acc0
308
        test_accg_immed         0x00000022,accg1
309
        test_acc_immed  0x22222222,acc1
310
 
311
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
312
        set_fr_iimmed   2,0x4000,fr8
313
        cmmulhs         fr7,fr8,acc0,cc0,0
314
        test_accg_immed         0x00000011,accg0
315
        test_acc_immed  0x11111111,acc0
316
        test_accg_immed         0x00000022,accg1
317
        test_acc_immed  0x22222222,acc1
318
 
319
        set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
320
        set_fr_iimmed   0x7fff,0x7fff,fr8
321
        cmmulhs         fr7,fr8,acc0,cc0,0
322
        test_accg_immed         0x00000011,accg0
323
        test_acc_immed  0x11111111,acc0
324
        test_accg_immed         0x00000022,accg1
325
        test_acc_immed  0x22222222,acc1
326
 
327
        ; Mixed operands
328
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
329
        set_fr_iimmed   0xfffd,2,fr8
330
        cmmulhs         fr7,fr8,acc0,cc0,0
331
        test_accg_immed         0x00000011,accg0
332
        test_acc_immed  0x11111111,acc0
333
        test_accg_immed         0x00000022,accg1
334
        test_acc_immed  0x22222222,acc1
335
 
336
        set_fr_iimmed   0xfffe,1,fr7            ; multiply by 1
337
        set_fr_iimmed   1,0xfffe,fr8
338
        cmmulhs         fr7,fr8,acc0,cc0,0
339
        test_accg_immed         0x00000011,accg0
340
        test_acc_immed  0x11111111,acc0
341
        test_accg_immed         0x00000022,accg1
342
        test_acc_immed  0x22222222,acc1
343
 
344
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
345
        set_fr_iimmed   0,0xfffe,fr8
346
        cmmulhs         fr7,fr8,acc0,cc4,0
347
        test_accg_immed         0x00000011,accg0
348
        test_acc_immed  0x11111111,acc0
349
        test_accg_immed         0x00000022,accg1
350
        test_acc_immed  0x22222222,acc1
351
 
352
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
353
        set_fr_iimmed   0xfffe,0x2001,fr8
354
        cmmulhs         fr7,fr8,acc0,cc4,0
355
        test_accg_immed         0x00000011,accg0
356
        test_acc_immed  0x11111111,acc0
357
        test_accg_immed         0x00000022,accg1
358
        test_acc_immed  0x22222222,acc1
359
 
360
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
361
        set_fr_iimmed   0xfffe,0x4000,fr8
362
        cmmulhs         fr7,fr8,acc0,cc4,0
363
        test_accg_immed         0x00000011,accg0
364
        test_acc_immed  0x11111111,acc0
365
        test_accg_immed         0x00000022,accg1
366
        test_acc_immed  0x22222222,acc1
367
 
368
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
369
        set_fr_iimmed   0x8000,0x7fff,fr8
370
        cmmulhs         fr7,fr8,acc0,cc4,0
371
        test_accg_immed         0x00000011,accg0
372
        test_acc_immed  0x11111111,acc0
373
        test_accg_immed         0x00000022,accg1
374
        test_acc_immed  0x22222222,acc1
375
 
376
        ; Negative operands
377
        set_fr_iimmed   0xfffe,0xfffd,fr7               ; multiply small numbers
378
        set_fr_iimmed   0xfffd,0xfffe,fr8
379
        cmmulhs         fr7,fr8,acc0,cc4,0
380
        test_accg_immed         0x00000011,accg0
381
        test_acc_immed  0x11111111,acc0
382
        test_accg_immed         0x00000022,accg1
383
        test_acc_immed  0x22222222,acc1
384
 
385
        set_fr_iimmed   0xffff,0xfffe,fr7               ; multiply by -1
386
        set_fr_iimmed   0xfffe,0xffff,fr8
387
        cmmulhs         fr7,fr8,acc0,cc4,0
388
        test_accg_immed         0x00000011,accg0
389
        test_acc_immed  0x11111111,acc0
390
        test_accg_immed         0x00000022,accg1
391
        test_acc_immed  0x22222222,acc1
392
 
393
        set_fr_iimmed   0x8001,0x8001,fr7       ; almost max positive result
394
        set_fr_iimmed   0x8001,0x8001,fr8
395
        cmmulhs         fr7,fr8,acc0,cc4,0
396
        test_accg_immed         0x00000011,accg0
397
        test_acc_immed  0x11111111,acc0
398
        test_accg_immed         0x00000022,accg1
399
        test_acc_immed  0x22222222,acc1
400
 
401
        set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
402
        set_fr_iimmed   0x8000,0x8000,fr8
403
        cmmulhs         fr7,fr8,acc0,cc4,0
404
        test_accg_immed         0x00000011,accg0
405
        test_acc_immed  0x11111111,acc0
406
        test_accg_immed         0x00000022,accg1
407
        test_acc_immed  0x22222222,acc1
408
 
409
        ; Positive operands
410
        set_accg_immed  0x00000011,accg0
411
        set_acc_immed   0x11111111,acc0
412
        set_accg_immed  0x00000022,accg1
413
        set_acc_immed   0x22222222,acc1
414
        set_fr_iimmed   2,3,fr7         ; multiply small numbers
415
        set_fr_iimmed   3,2,fr8
416
        cmmulhs         fr7,fr8,acc0,cc1,1
417
        test_accg_immed         0x00000011,accg0
418
        test_acc_immed  0x11111111,acc0
419
        test_accg_immed         0x00000022,accg1
420
        test_acc_immed  0x22222222,acc1
421
 
422
        set_fr_iimmed   0,1,fr7         ; multiply by 0
423
        set_fr_iimmed   2,0,fr8
424
        cmmulhs         fr7,fr8,acc0,cc1,1
425
        test_accg_immed         0x00000011,accg0
426
        test_acc_immed  0x11111111,acc0
427
        test_accg_immed         0x00000022,accg1
428
        test_acc_immed  0x22222222,acc1
429
 
430
        set_fr_iimmed   2,1,fr7         ; multiply by 1
431
        set_fr_iimmed   1,2,fr8
432
        cmmulhs         fr7,fr8,acc0,cc1,1
433
        test_accg_immed         0x00000011,accg0
434
        test_acc_immed  0x11111111,acc0
435
        test_accg_immed         0x00000022,accg1
436
        test_acc_immed  0x22222222,acc1
437
 
438
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
439
        set_fr_iimmed   2,0x3fff,fr8
440
        cmmulhs         fr7,fr8,acc0,cc1,1
441
        test_accg_immed         0x00000011,accg0
442
        test_acc_immed  0x11111111,acc0
443
        test_accg_immed         0x00000022,accg1
444
        test_acc_immed  0x22222222,acc1
445
 
446
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
447
        set_fr_iimmed   2,0x4000,fr8
448
        cmmulhs         fr7,fr8,acc0,cc1,1
449
        test_accg_immed         0x00000011,accg0
450
        test_acc_immed  0x11111111,acc0
451
        test_accg_immed         0x00000022,accg1
452
        test_acc_immed  0x22222222,acc1
453
 
454
        set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
455
        set_fr_iimmed   0x7fff,0x7fff,fr8
456
        cmmulhs         fr7,fr8,acc0,cc1,1
457
        test_accg_immed         0x00000011,accg0
458
        test_acc_immed  0x11111111,acc0
459
        test_accg_immed         0x00000022,accg1
460
        test_acc_immed  0x22222222,acc1
461
 
462
        ; Mixed operands
463
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
464
        set_fr_iimmed   0xfffd,2,fr8
465
        cmmulhs         fr7,fr8,acc0,cc1,1
466
        test_accg_immed         0x00000011,accg0
467
        test_acc_immed  0x11111111,acc0
468
        test_accg_immed         0x00000022,accg1
469
        test_acc_immed  0x22222222,acc1
470
 
471
        set_fr_iimmed   0xfffe,1,fr7            ; multiply by 1
472
        set_fr_iimmed   1,0xfffe,fr8
473
        cmmulhs         fr7,fr8,acc0,cc1,1
474
        test_accg_immed         0x00000011,accg0
475
        test_acc_immed  0x11111111,acc0
476
        test_accg_immed         0x00000022,accg1
477
        test_acc_immed  0x22222222,acc1
478
 
479
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
480
        set_fr_iimmed   0,0xfffe,fr8
481
        cmmulhs         fr7,fr8,acc0,cc5,1
482
        test_accg_immed         0x00000011,accg0
483
        test_acc_immed  0x11111111,acc0
484
        test_accg_immed         0x00000022,accg1
485
        test_acc_immed  0x22222222,acc1
486
 
487
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
488
        set_fr_iimmed   0xfffe,0x2001,fr8
489
        cmmulhs         fr7,fr8,acc0,cc5,1
490
        test_accg_immed         0x00000011,accg0
491
        test_acc_immed  0x11111111,acc0
492
        test_accg_immed         0x00000022,accg1
493
        test_acc_immed  0x22222222,acc1
494
 
495
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
496
        set_fr_iimmed   0xfffe,0x4000,fr8
497
        cmmulhs         fr7,fr8,acc0,cc5,1
498
        test_accg_immed         0x00000011,accg0
499
        test_acc_immed  0x11111111,acc0
500
        test_accg_immed         0x00000022,accg1
501
        test_acc_immed  0x22222222,acc1
502
 
503
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
504
        set_fr_iimmed   0x8000,0x7fff,fr8
505
        cmmulhs         fr7,fr8,acc0,cc5,1
506
        test_accg_immed         0x00000011,accg0
507
        test_acc_immed  0x11111111,acc0
508
        test_accg_immed         0x00000022,accg1
509
        test_acc_immed  0x22222222,acc1
510
 
511
        ; Negative operands
512
        set_fr_iimmed   0xfffe,0xfffd,fr7               ; multiply small numbers
513
        set_fr_iimmed   0xfffd,0xfffe,fr8
514
        cmmulhs         fr7,fr8,acc0,cc5,1
515
        test_accg_immed         0x00000011,accg0
516
        test_acc_immed  0x11111111,acc0
517
        test_accg_immed         0x00000022,accg1
518
        test_acc_immed  0x22222222,acc1
519
 
520
        set_fr_iimmed   0xffff,0xfffe,fr7               ; multiply by -1
521
        set_fr_iimmed   0xfffe,0xffff,fr8
522
        cmmulhs         fr7,fr8,acc0,cc5,1
523
        test_accg_immed         0x00000011,accg0
524
        test_acc_immed  0x11111111,acc0
525
        test_accg_immed         0x00000022,accg1
526
        test_acc_immed  0x22222222,acc1
527
 
528
        set_fr_iimmed   0x8001,0x8001,fr7       ; almost max positive result
529
        set_fr_iimmed   0x8001,0x8001,fr8
530
        cmmulhs         fr7,fr8,acc0,cc5,1
531
        test_accg_immed         0x00000011,accg0
532
        test_acc_immed  0x11111111,acc0
533
        test_accg_immed         0x00000022,accg1
534
        test_acc_immed  0x22222222,acc1
535
 
536
        set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
537
        set_fr_iimmed   0x8000,0x8000,fr8
538
        cmmulhs         fr7,fr8,acc0,cc5,1
539
        test_accg_immed         0x00000011,accg0
540
        test_acc_immed  0x11111111,acc0
541
        test_accg_immed         0x00000022,accg1
542
        test_acc_immed  0x22222222,acc1
543
 
544
        ; Positive operands
545
        set_accg_immed  0x00000011,accg0
546
        set_acc_immed   0x11111111,acc0
547
        set_accg_immed  0x00000022,accg1
548
        set_acc_immed   0x22222222,acc1
549
        set_fr_iimmed   2,3,fr7         ; multiply small numbers
550
        set_fr_iimmed   3,2,fr8
551
        cmmulhs         fr7,fr8,acc0,cc2,1
552
        test_accg_immed         0x00000011,accg0
553
        test_acc_immed  0x11111111,acc0
554
        test_accg_immed         0x00000022,accg1
555
        test_acc_immed  0x22222222,acc1
556
 
557
        set_fr_iimmed   0,1,fr7         ; multiply by 0
558
        set_fr_iimmed   2,0,fr8
559
        cmmulhs         fr7,fr8,acc0,cc2,0
560
        test_accg_immed         0x00000011,accg0
561
        test_acc_immed  0x11111111,acc0
562
        test_accg_immed         0x00000022,accg1
563
        test_acc_immed  0x22222222,acc1
564
 
565
        set_fr_iimmed   2,1,fr7         ; multiply by 1
566
        set_fr_iimmed   1,2,fr8
567
        cmmulhs         fr7,fr8,acc0,cc2,1
568
        test_accg_immed         0x00000011,accg0
569
        test_acc_immed  0x11111111,acc0
570
        test_accg_immed         0x00000022,accg1
571
        test_acc_immed  0x22222222,acc1
572
 
573
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
574
        set_fr_iimmed   2,0x3fff,fr8
575
        cmmulhs         fr7,fr8,acc0,cc2,0
576
        test_accg_immed         0x00000011,accg0
577
        test_acc_immed  0x11111111,acc0
578
        test_accg_immed         0x00000022,accg1
579
        test_acc_immed  0x22222222,acc1
580
 
581
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
582
        set_fr_iimmed   2,0x4000,fr8
583
        cmmulhs         fr7,fr8,acc0,cc2,1
584
        test_accg_immed         0x00000011,accg0
585
        test_acc_immed  0x11111111,acc0
586
        test_accg_immed         0x00000022,accg1
587
        test_acc_immed  0x22222222,acc1
588
 
589
        set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
590
        set_fr_iimmed   0x7fff,0x7fff,fr8
591
        cmmulhs         fr7,fr8,acc0,cc2,0
592
        test_accg_immed         0x00000011,accg0
593
        test_acc_immed  0x11111111,acc0
594
        test_accg_immed         0x00000022,accg1
595
        test_acc_immed  0x22222222,acc1
596
 
597
        ; Mixed operands
598
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
599
        set_fr_iimmed   0xfffd,2,fr8
600
        cmmulhs         fr7,fr8,acc0,cc2,1
601
        test_accg_immed         0x00000011,accg0
602
        test_acc_immed  0x11111111,acc0
603
        test_accg_immed         0x00000022,accg1
604
        test_acc_immed  0x22222222,acc1
605
 
606
        set_fr_iimmed   0xfffe,1,fr7            ; multiply by 1
607
        set_fr_iimmed   1,0xfffe,fr8
608
        cmmulhs         fr7,fr8,acc0,cc2,0
609
        test_accg_immed         0x00000011,accg0
610
        test_acc_immed  0x11111111,acc0
611
        test_accg_immed         0x00000022,accg1
612
        test_acc_immed  0x22222222,acc1
613
 
614
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
615
        set_fr_iimmed   0,0xfffe,fr8
616
        cmmulhs         fr7,fr8,acc0,cc6,1
617
        test_accg_immed         0x00000011,accg0
618
        test_acc_immed  0x11111111,acc0
619
        test_accg_immed         0x00000022,accg1
620
        test_acc_immed  0x22222222,acc1
621
 
622
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
623
        set_fr_iimmed   0xfffe,0x2001,fr8
624
        cmmulhs         fr7,fr8,acc0,cc6,0
625
        test_accg_immed         0x00000011,accg0
626
        test_acc_immed  0x11111111,acc0
627
        test_accg_immed         0x00000022,accg1
628
        test_acc_immed  0x22222222,acc1
629
 
630
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
631
        set_fr_iimmed   0xfffe,0x4000,fr8
632
        cmmulhs         fr7,fr8,acc0,cc6,1
633
        test_accg_immed         0x00000011,accg0
634
        test_acc_immed  0x11111111,acc0
635
        test_accg_immed         0x00000022,accg1
636
        test_acc_immed  0x22222222,acc1
637
 
638
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
639
        set_fr_iimmed   0x8000,0x7fff,fr8
640
        cmmulhs         fr7,fr8,acc0,cc6,0
641
        test_accg_immed         0x00000011,accg0
642
        test_acc_immed  0x11111111,acc0
643
        test_accg_immed         0x00000022,accg1
644
        test_acc_immed  0x22222222,acc1
645
 
646
        ; Negative operands
647
        set_fr_iimmed   0xfffe,0xfffd,fr7               ; multiply small numbers
648
        set_fr_iimmed   0xfffd,0xfffe,fr8
649
        cmmulhs         fr7,fr8,acc0,cc6,1
650
        test_accg_immed         0x00000011,accg0
651
        test_acc_immed  0x11111111,acc0
652
        test_accg_immed         0x00000022,accg1
653
        test_acc_immed  0x22222222,acc1
654
 
655
        set_fr_iimmed   0xffff,0xfffe,fr7               ; multiply by -1
656
        set_fr_iimmed   0xfffe,0xffff,fr8
657
        cmmulhs         fr7,fr8,acc0,cc6,0
658
        test_accg_immed         0x00000011,accg0
659
        test_acc_immed  0x11111111,acc0
660
        test_accg_immed         0x00000022,accg1
661
        test_acc_immed  0x22222222,acc1
662
 
663
        set_fr_iimmed   0x8001,0x8001,fr7       ; almost max positive result
664
        set_fr_iimmed   0x8001,0x8001,fr8
665
        cmmulhs         fr7,fr8,acc0,cc6,0
666
        test_accg_immed         0x00000011,accg0
667
        test_acc_immed  0x11111111,acc0
668
        test_accg_immed         0x00000022,accg1
669
        test_acc_immed  0x22222222,acc1
670
 
671
        set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
672
        set_fr_iimmed   0x8000,0x8000,fr8
673
        cmmulhs         fr7,fr8,acc0,cc6,0
674
        test_accg_immed         0x00000011,accg0
675
        test_acc_immed  0x11111111,acc0
676
        test_accg_immed         0x00000022,accg1
677
        test_acc_immed  0x22222222,acc1
678
 
679
        ; Positive operands
680
        set_accg_immed  0x00000011,accg0
681
        set_acc_immed   0x11111111,acc0
682
        set_accg_immed  0x00000022,accg1
683
        set_acc_immed   0x22222222,acc1
684
        set_fr_iimmed   2,3,fr7         ; multiply small numbers
685
        set_fr_iimmed   3,2,fr8
686
        cmmulhs         fr7,fr8,acc0,cc3,1
687
        test_accg_immed         0x00000011,accg0
688
        test_acc_immed  0x11111111,acc0
689
        test_accg_immed         0x00000022,accg1
690
        test_acc_immed  0x22222222,acc1
691
 
692
        set_fr_iimmed   0,1,fr7         ; multiply by 0
693
        set_fr_iimmed   2,0,fr8
694
        cmmulhs         fr7,fr8,acc0,cc3,0
695
        test_accg_immed         0x00000011,accg0
696
        test_acc_immed  0x11111111,acc0
697
        test_accg_immed         0x00000022,accg1
698
        test_acc_immed  0x22222222,acc1
699
 
700
        set_fr_iimmed   2,1,fr7         ; multiply by 1
701
        set_fr_iimmed   1,2,fr8
702
        cmmulhs         fr7,fr8,acc0,cc3,1
703
        test_accg_immed         0x00000011,accg0
704
        test_acc_immed  0x11111111,acc0
705
        test_accg_immed         0x00000022,accg1
706
        test_acc_immed  0x22222222,acc1
707
 
708
        set_fr_iimmed   0x3fff,2,fr7    ; 15 bit result
709
        set_fr_iimmed   2,0x3fff,fr8
710
        cmmulhs         fr7,fr8,acc0,cc3,0
711
        test_accg_immed         0x00000011,accg0
712
        test_acc_immed  0x11111111,acc0
713
        test_accg_immed         0x00000022,accg1
714
        test_acc_immed  0x22222222,acc1
715
 
716
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
717
        set_fr_iimmed   2,0x4000,fr8
718
        cmmulhs         fr7,fr8,acc0,cc3,1
719
        test_accg_immed         0x00000011,accg0
720
        test_acc_immed  0x11111111,acc0
721
        test_accg_immed         0x00000022,accg1
722
        test_acc_immed  0x22222222,acc1
723
 
724
        set_fr_iimmed   0x7fff,0x7fff,fr7       ; max positive result
725
        set_fr_iimmed   0x7fff,0x7fff,fr8
726
        cmmulhs         fr7,fr8,acc0,cc3,0
727
        test_accg_immed         0x00000011,accg0
728
        test_acc_immed  0x11111111,acc0
729
        test_accg_immed         0x00000022,accg1
730
        test_acc_immed  0x22222222,acc1
731
 
732
        ; Mixed operands
733
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
734
        set_fr_iimmed   0xfffd,2,fr8
735
        cmmulhs         fr7,fr8,acc0,cc3,1
736
        test_accg_immed         0x00000011,accg0
737
        test_acc_immed  0x11111111,acc0
738
        test_accg_immed         0x00000022,accg1
739
        test_acc_immed  0x22222222,acc1
740
 
741
        set_fr_iimmed   0xfffe,1,fr7            ; multiply by 1
742
        set_fr_iimmed   1,0xfffe,fr8
743
        cmmulhs         fr7,fr8,acc0,cc3,0
744
        test_accg_immed         0x00000011,accg0
745
        test_acc_immed  0x11111111,acc0
746
        test_accg_immed         0x00000022,accg1
747
        test_acc_immed  0x22222222,acc1
748
 
749
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
750
        set_fr_iimmed   0,0xfffe,fr8
751
        cmmulhs         fr7,fr8,acc0,cc7,1
752
        test_accg_immed         0x00000011,accg0
753
        test_acc_immed  0x11111111,acc0
754
        test_accg_immed         0x00000022,accg1
755
        test_acc_immed  0x22222222,acc1
756
 
757
        set_fr_iimmed   0x2001,0xfffe,fr7       ; 15 bit result
758
        set_fr_iimmed   0xfffe,0x2001,fr8
759
        cmmulhs         fr7,fr8,acc0,cc7,0
760
        test_accg_immed         0x00000011,accg0
761
        test_acc_immed  0x11111111,acc0
762
        test_accg_immed         0x00000022,accg1
763
        test_acc_immed  0x22222222,acc1
764
 
765
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
766
        set_fr_iimmed   0xfffe,0x4000,fr8
767
        cmmulhs         fr7,fr8,acc0,cc7,1
768
        test_accg_immed         0x00000011,accg0
769
        test_acc_immed  0x11111111,acc0
770
        test_accg_immed         0x00000022,accg1
771
        test_acc_immed  0x22222222,acc1
772
 
773
        set_fr_iimmed   0x7fff,0x8000,fr7       ; max negative result
774
        set_fr_iimmed   0x8000,0x7fff,fr8
775
        cmmulhs         fr7,fr8,acc0,cc7,0
776
        test_accg_immed         0x00000011,accg0
777
        test_acc_immed  0x11111111,acc0
778
        test_accg_immed         0x00000022,accg1
779
        test_acc_immed  0x22222222,acc1
780
 
781
        ; Negative operands
782
        set_fr_iimmed   0xfffe,0xfffd,fr7               ; multiply small numbers
783
        set_fr_iimmed   0xfffd,0xfffe,fr8
784
        cmmulhs         fr7,fr8,acc0,cc7,1
785
        test_accg_immed         0x00000011,accg0
786
        test_acc_immed  0x11111111,acc0
787
        test_accg_immed         0x00000022,accg1
788
        test_acc_immed  0x22222222,acc1
789
 
790
        set_fr_iimmed   0xffff,0xfffe,fr7               ; multiply by -1
791
        set_fr_iimmed   0xfffe,0xffff,fr8
792
        cmmulhs         fr7,fr8,acc0,cc7,0
793
        test_accg_immed         0x00000011,accg0
794
        test_acc_immed  0x11111111,acc0
795
        test_accg_immed         0x00000022,accg1
796
        test_acc_immed  0x22222222,acc1
797
 
798
        set_fr_iimmed   0x8001,0x8001,fr7       ; almost max positive result
799
        set_fr_iimmed   0x8001,0x8001,fr8
800
        cmmulhs         fr7,fr8,acc0,cc7,0
801
        test_accg_immed         0x00000011,accg0
802
        test_acc_immed  0x11111111,acc0
803
        test_accg_immed         0x00000022,accg1
804
        test_acc_immed  0x22222222,acc1
805
 
806
        set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
807
        set_fr_iimmed   0x8000,0x8000,fr8
808
        cmmulhs         fr7,fr8,acc0,cc7,0
809
        test_accg_immed         0x00000011,accg0
810
        test_acc_immed  0x11111111,acc0
811
        test_accg_immed         0x00000022,accg1
812
        test_acc_immed  0x22222222,acc1
813
 
814
        pass

powered by: WebSVN 2.1.0

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