1 # mips r6 tests (non FPU)
2 # mach: mips32r6 mips64r6
4 # ld: -N -Ttext=0x80010000
7 .include "testutils.inc"
8 .include "utils-r6.inc"
13 dval1
: .word 0xabcd1234
14 dval2
: .word 0x1234eeff
16 dval3
: .word 0x55555555
18 dval4
: .word 0xaaaaaaaa
26 writemsg
"[1] Test MUL"
28 r6ck_2r
mul, -7, -9, 63
29 r6ck_2r
mul, 61, -11, -671
30 r6ck_2r
mul, 1001, 1234, 1235234
31 r6ck_2r
mul, 123456789, 999999, 0x7eb1e22b
32 r6ck_2r
mul, 0xaaaabbbb, 0xccccdddd, 0x56787f6f
34 writemsg
"[2] Test MUH"
35 r6ck_2r muh
, 61, -11, 0xffffffff
36 r6ck_2r muh
, 1001, 1234, 0
37 r6ck_2r muh
, 123456789, 999999, 0x7048
38 r6ck_2r muh
, 0xaaaabbbb, 0xccccdddd, 0x111107f7
40 writemsg
"[3] Test MULU"
41 r6ck_2r mulu
, 7, 9, 63
42 r6ck_2r mulu
, -7, -9, 63
43 r6ck_2r mulu
, 61, -11, -671
44 r6ck_2r mulu
, 1001, 1234, 1235234
45 r6ck_2r mulu
, 123456789, 999999, 0x7eb1e22b
46 r6ck_2r mulu
, 0xaaaabbbb, 0xccccdddd, 0x56787f6f
48 writemsg
"[4] Test MUHU"
49 r6ck_2r muhu
, 1001, 1234, 0
50 r6ck_2r muhu
, 123456789, 999999, 0x7048
51 r6ck_2r muhu
, 0xaaaabbbb, 0xccccdddd, 0x8888a18f
52 r6ck_2r muhu
, 0xaaaabbbb, 0xccccdddd, 0x8888a18f
54 writemsg
"[5] Test DIV"
55 r6ck_2r
div, 10001, 10, 1000
56 r6ck_2r
div, -123456, 560, -220
57 r6ck_2r
div, 9, 100, 0
59 writemsg
"[6] Test MOD"
60 r6ck_2r mod
, 10001, 10, 1
61 r6ck_2r mod
, -123456, 560, 0xffffff00
62 r6ck_2r mod
, 9, 100, 9
64 writemsg
"[7] Test DIVU"
65 r6ck_2r divu
, 10001, 10, 1000
66 r6ck_2r divu
, -123456, 560, 0x750674
67 r6ck_2r divu
, 9, 100, 0
68 r6ck_2r divu
, 0xaaaabbbb, 3, 0x38e393e9
70 writemsg
"[8] Test MODU"
71 r6ck_2r modu
, 10001, 10, 1
72 r6ck_2r modu
, -123456, 560, 0
73 r6ck_2r modu
, 9, 100, 9
74 r6ck_2r modu
, 0xaaaabbbb, 5, 4
76 writemsg
"[9] Test LSA"
77 r6ck_2r1i lsa
, 1, 2, 2, 6
78 r6ck_2r1i lsa
, 0x8000, 0xa000, 1, 0x1a000
79 r6ck_2r1i lsa
, 0x82, 0x2000068, 4, 0x2000888
81 writemsg
"[10] Test AUI"
82 r6ck_1r1i aui
, 0x0000c0de, 0xdead, 0xdeadc0de
83 r6ck_1r1i aui
, 0x00005678, 0x1234, 0x12345678
84 r6ck_1r1i aui
, 0x0000eeff, 0xabab, 0xababeeff
86 writemsg
"[11] Test SELEQZ"
87 r6ck_2r seleqz
, 0x1234, 0, 0x1234
88 r6ck_2r seleqz
, 0x1234, 4, 0
89 r6ck_2r seleqz
, 0x80010001, 0, 0x80010001
91 writemsg
"[12] Test SELNEZ"
92 r6ck_2r selnez
, 0x1234, 0, 0
93 r6ck_2r selnez
, 0x1234, 1, 0x1234
94 r6ck_2r selnez
, 0x80010001, 0xffffffff, 0x80010001
96 writemsg
"[13] Test ALIGN"
97 r6ck_2r1i align
, 0xaabbccdd, 0xeeff0011, 1, 0xff0011aa
98 r6ck_2r1i align
, 0xaabbccdd, 0xeeff0011, 3, 0x11aabbcc
100 writemsg
"[14] Test BITSWAP"
101 r6ck_1r bitswap
, 0xaabbccdd, 0x55dd33bb
102 r6ck_1r bitswap
, 0x11884422, 0x88112244
104 writemsg
"[15] Test CLZ"
105 r6ck_1r clz
, 0x00012340, 15
106 r6ck_1r clz
, 0x80012340, 0
107 r6ck_1r clz
, 0x40012340, 1
109 writemsg
"[16] Test CLO"
110 r6ck_1r clo
, 0x00123050, 0
111 r6ck_1r clo
, 0xff123050, 8
112 r6ck_1r clo
, 0x8f123050, 1
114 writemsg
"[17] Test ADDIUPC"
121 writemsg
"[18] Test AUIPC"
129 writemsg
"[19] Test ALUIPC"
139 writemsg
"[20] Test LWPC"
147 writemsg
"[21] Test LL"
153 writemsg
"[22] Test SC"