1 # frv testcase for umulcc $GRi,$GRj,$GRk
4 .include "testutils.inc"
10 set_gr_immed 3,gr7 ; multiply small numbers
12 set_icc 0x0f,0 ; Set mask opposite of expected
13 umulcc gr7,gr8,gr8,icc0
18 set_gr_immed 1,gr7 ; multiply by 1
20 set_icc 0x0e,0 ; Set mask opposite of expected
21 umulcc gr7,gr8,gr8,icc0
26 set_gr_immed 2,gr7 ; multiply by 1
28 set_icc 0x0f,0 ; Set mask opposite of expected
29 umulcc gr7,gr8,gr8,icc0
34 set_gr_immed 0,gr7 ; multiply by 0
36 set_icc 0x0b,0 ; Set mask opposite of expected
37 umulcc gr7,gr8,gr8,icc0
42 set_gr_immed 2,gr7 ; multiply by 0
44 set_icc 0x0a,0 ; Set mask opposite of expected
45 umulcc gr7,gr8,gr8,icc0
50 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
52 set_icc 0x0f,0 ; Set mask opposite of expected
53 umulcc gr7,gr8,gr8,icc0
56 test_gr_limmed 0x7fff,0xfffe,gr9
58 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
60 set_icc 0x0e,0 ; Set mask opposite of expected
61 umulcc gr7,gr8,gr8,icc0
64 test_gr_limmed 0x8000,0x0000,gr9
66 set_gr_limmed 0x8000,0x0000,gr7 ; 33 bit result
68 set_icc 0x0d,0 ; Set mask opposite of expected
69 umulcc gr7,gr8,gr8,icc0
72 test_gr_immed 0x00000000,gr9
74 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
75 set_gr_limmed 0x7fff,0xffff,gr8
76 set_icc 0x0d,0 ; Set mask opposite of expected
77 umulcc gr7,gr8,gr8,icc0
79 test_gr_limmed 0x3fff,0xffff,gr8
82 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
83 set_gr_limmed 0x8000,0x0000,gr8
84 set_icc 0x0d,0 ; Set mask opposite of expected
85 umulcc gr7,gr8,gr8,icc0
87 test_gr_limmed 0x4000,0x0000,gr8
90 set_gr_limmed 0xffff,0xffff,gr7 ; max positive result
91 set_gr_limmed 0xffff,0xffff,gr8
92 set_icc 0x05,0 ; Set mask opposite of expected
93 umulcc gr7,gr8,gr8,icc0
95 test_gr_limmed 0xffff,0xfffe,gr8