1 # frv testcase for mmulhu $GRi,$GRj,$GRk
4 .include "testutils.inc"
10 set_fr_iimmed 3,2,fr7 ; multiply small numbers
13 test_accg_immed 0,accg0
15 test_accg_immed 0,accg1
18 set_fr_iimmed 1,2,fr7 ; multiply by 1
21 test_accg_immed 0,accg0
23 test_accg_immed 0,accg1
26 set_fr_iimmed 0,2,fr7 ; multiply by 0
29 test_accg_immed 0,accg0
31 test_accg_immed 0,accg1
34 set_fr_iimmed 0x3fff,2,fr7 ; 15 bit result
35 set_fr_iimmed 2,0x3fff,fr8
37 test_accg_immed 0,accg0
38 test_acc_limmed 0x0000,0x7ffe,acc0
39 test_accg_immed 0,accg1
40 test_acc_limmed 0x0000,0x7ffe,acc1
42 set_fr_iimmed 0x4000,2,fr7 ; 16 bit result
43 set_fr_iimmed 2,0x4000,fr8
45 test_accg_immed 0,accg0
46 test_acc_limmed 0x0000,0x8000,acc0
47 test_accg_immed 0,accg1
48 test_acc_limmed 0x0000,0x8000,acc1
50 set_fr_iimmed 0x8000,2,fr7 ; 17 bit result
51 set_fr_iimmed 2,0x8000,fr8
53 test_accg_immed 0,accg0
54 test_acc_immed 0x00010000,acc0
55 test_accg_immed 0,accg1
56 test_acc_immed 0x00010000,acc1
58 set_fr_iimmed 0x7fff,0x7fff,fr7 ; max positive result
59 set_fr_iimmed 0x7fff,0x7fff,fr8
61 test_accg_immed 0,accg0
62 test_acc_immed 0x3fff0001,acc0
63 test_accg_immed 0,accg1
64 test_acc_immed 0x3fff0001,acc1
66 set_fr_iimmed 0x8000,0x8000,fr7 ; max positive result
67 set_fr_iimmed 0x8000,0x8000,fr8
69 test_accg_immed 0,accg0
70 test_acc_limmed 0x4000,0x0000,acc0
71 test_accg_immed 0,accg1
72 test_acc_limmed 0x4000,0x0000,acc1
74 set_fr_iimmed 0xffff,0xffff,fr7 ; max positive result
75 set_fr_iimmed 0xffff,0xffff,fr8
77 test_accg_immed 0,accg0
78 test_acc_limmed 0xfffe,0x0001,acc0
79 test_accg_immed 0,accg1
80 test_acc_limmed 0xfffe,0x0001,acc1