1 # frv testcase for mqcpxis $GRi,$GRj,$ACCk
4 .include "testutils.inc"
11 set_fr_iimmed 2,4,fr8 ; multiply small numbers
12 set_fr_iimmed 5,3,fr10
13 set_fr_iimmed 3,1,fr9 ; multiply by 0
14 set_fr_iimmed 0,2,fr11
16 test_accg_immed 0x00,accg0
17 test_acc_immed 26,acc0
18 test_accg_immed 0,accg1
21 set_fr_iimmed 2,1,fr8 ; multiply by 1
22 set_fr_iimmed 1,1,fr10
23 set_fr_iimmed 0x3fff,1,fr9 ; 15 bit result
24 set_fr_iimmed 0x0001,2,fr11
26 test_accg_immed 0,accg0
28 test_accg_immed 0,accg1
29 test_acc_limmed 0,0x7fff,acc1
31 set_fr_iimmed 0x4000,2,fr8 ; 16 bit result
32 set_fr_iimmed 0x2000,2,fr10
33 set_fr_iimmed 0x7fff,0x0000,fr9 ; max positive result
34 set_fr_iimmed 0x7fff,0x7fff,fr11
36 test_accg_immed 0,accg0
37 test_acc_limmed 0x0000,0xc000,acc0
38 test_accg_immed 0,accg1
39 test_acc_limmed 0x3fff,0x0001,acc1
42 set_fr_iimmed 2,0xfffd,fr8 ; multiply small numbers
43 set_fr_iimmed 1,0xfffd,fr10
44 set_fr_iimmed 0xfffe,2,fr9 ; multiply by 1
45 set_fr_iimmed 0xfffe,1,fr11
47 test_accg_immed 0xff,accg0
48 test_acc_immed -9,acc0
49 test_accg_immed 0xff,accg1
50 test_acc_immed -6,acc1
52 set_fr_iimmed 0xfffe,0,fr8 ; multiply by 0
53 set_fr_iimmed 0xfffe,1,fr10
54 set_fr_iimmed 0x2001,0xffff,fr9 ; 15 bit result
55 set_fr_iimmed 0xffff,0xfffe,fr11
57 test_accg_immed 0xff,accg0
58 test_acc_immed -2,acc0
59 test_accg_immed 0xff,accg1
60 test_acc_limmed 0xffff,0xbfff,acc1
62 set_fr_iimmed 0x4000,0xfffe,fr8 ; 16 bit result
63 set_fr_iimmed 0x0003,0xfffe,fr10
64 set_fr_iimmed 0x7fff,0x7fff,fr9 ; max negative result
65 set_fr_iimmed 0x8000,0x8000,fr11
67 test_accg_immed 0xff,accg0
68 test_acc_limmed 0xffff,0x7ffa,acc0
69 test_accg_immed 0xff,accg1
70 test_acc_limmed 0x8001,0x0000,acc1
73 set_fr_iimmed 0x8000,0x8000,fr8 ; max positive result
74 set_fr_iimmed 0x8000,0x8000,fr10
75 set_fr_iimmed 0xfffe,0xfffc,fr9 ; multiply small numbers
76 set_fr_iimmed 0xfffb,0xfffd,fr11
78 test_accg_immed 0x00,accg0
79 test_acc_limmed 0x8000,0x0000,acc0
80 test_accg_immed 0x00,accg1
81 test_acc_immed 26,acc1
83 set_fr_iimmed 0xffff,0xffff,fr8 ; multiply by -1
84 set_fr_iimmed 0xffff,0xfffe,fr10
85 set_fr_iimmed 0x7fff,0x0000,fr9 ; almost max positive result
86 set_fr_iimmed 0x8001,0x7fff,fr11
88 test_accg_immed 0,accg0
90 test_accg_immed 0,accg1
91 test_acc_immed 0x3fff0001,acc1
93 set_fr_iimmed 0x8000,0x0000,fr8 ; max positive result
94 set_fr_iimmed 0x8000,0x8000,fr10
95 set_fr_iimmed 0x8000,0x0000,fr9 ; max positive result
96 set_fr_iimmed 0x8000,0x8000,fr11
98 test_accg_immed 0,accg0
99 test_acc_immed 0x40000000,acc0
100 test_accg_immed 0,accg1
101 test_acc_immed 0x40000000,acc1