1 # fr30 testcase for mulu $Rj,$Ri
4 .include "testutils.inc"
13 mvi_h_gr 3,r7 ; multiply small numbers
15 set_cc 0x0f ; Set mask opposite of expected
21 mvi_h_gr 1,r7 ; multiply by 1
23 set_cc 0x0e ; Set mask opposite of expected
29 mvi_h_gr 2,r7 ; multiply by 1
31 set_cc 0x0f ; Set mask opposite of expected
37 mvi_h_gr 0,r7 ; multiply by 0
39 set_cc 0x0b ; Set mask opposite of expected
45 mvi_h_gr 2,r7 ; multiply by 0
47 set_cc 0x0a ; Set mask opposite of expected
53 mvi_h_gr 0x3fffffff,r7 ; 31 bit result
55 set_cc 0x0f ; Set mask opposite of expected
59 test_h_dr 0x7ffffffe,mdl
61 mvi_h_gr 0x40000000,r7 ; 32 bit result
63 set_cc 0x0e ; Set mask opposite of expected
67 test_h_dr 0x80000000,mdl
69 mvi_h_gr 0x80000000,r7 ; 33 bit result
71 set_cc 0x09 ; Set mask opposite of expected
75 test_h_dr 0x00000000,mdl
77 mvi_h_gr 0x7fffffff,r7 ; max positive result
78 mvi_h_gr 0x7fffffff,r8
79 set_cc 0x0d ; Set mask opposite of expected
82 test_h_dr 0x3fffffff,mdh
83 test_h_dr 0x00000001,mdl
85 mvi_h_gr 0x80000000,r7 ; max positive result
86 mvi_h_gr 0x80000000,r8
87 set_cc 0x09 ; Set mask opposite of expected
90 test_h_dr 0x40000000,mdh
91 test_h_dr 0x00000000,mdl
93 mvi_h_gr 0xffffffff,r7 ; max positive result
94 mvi_h_gr 0xffffffff,r8
95 set_cc 0x05 ; Set mask opposite of expected
98 test_h_dr 0xfffffffe,mdh
99 test_h_dr 0x00000001,mdl