1 # Intel(r) Wireless MMX(tm) technology testcase for WSUB
3 # as: -mcpu=xscale+iwmmxt
5 .include "testutils.inc"
11 # Enable access to CoProcessors 0 & 1 before
12 # we attempt these instructions.
15 mcr p15, 0, r1, cr15, cr1, 0
17 # Test Unsaturated Byte subtraction
19 mvi_h_gr r0, 0x12345678
20 mvi_h_gr r1, 0x9abcde00
21 mvi_h_gr r2, 0x11111111
22 mvi_h_gr r3, 0x11111111
36 test_h_gr r0, 0x12345678
37 test_h_gr r1, 0x9abcde00
38 test_h_gr r2, 0x11111111
39 test_h_gr r3, 0x11111111
40 test_h_gr r4, 0x01234567
41 test_h_gr r5, 0x89abcdef
43 # Test Unsigned saturated Byte subtraction
45 mvi_h_gr r0, 0x12345678
46 mvi_h_gr r1, 0x9abcde00
47 mvi_h_gr r2, 0x11111111
48 mvi_h_gr r3, 0x11111111
62 test_h_gr r0, 0x12345678
63 test_h_gr r1, 0x9abcde00
64 test_h_gr r2, 0x11111111
65 test_h_gr r3, 0x11111111
66 test_h_gr r4, 0x01234567
67 test_h_gr r5, 0x89abcd00
69 # Test Signed saturated Byte subtraction
71 mvi_h_gr r0, 0x12345678
72 mvi_h_gr r1, 0x9abcde00
73 mvi_h_gr r2, 0x11111111
74 mvi_h_gr r3, 0x11111111
88 test_h_gr r0, 0x12345678
89 test_h_gr r1, 0x9abcde00
90 test_h_gr r2, 0x11111111
91 test_h_gr r3, 0x11111111
92 test_h_gr r4, 0x01234567
93 test_h_gr r5, 0x89abcdef
95 # Test Unsaturated Halfword subtraction
97 mvi_h_gr r0, 0x12345678
98 mvi_h_gr r1, 0x9abcde00
99 mvi_h_gr r2, 0x11111111
100 mvi_h_gr r3, 0x11111111
114 test_h_gr r0, 0x12345678
115 test_h_gr r1, 0x9abcde00
116 test_h_gr r2, 0x11111111
117 test_h_gr r3, 0x11111111
118 test_h_gr r4, 0x01234567
119 test_h_gr r5, 0x89abccef
121 # Test Unsigned saturated Halfword subtraction
123 mvi_h_gr r0, 0x12345678
124 mvi_h_gr r1, 0x9abcde00
125 mvi_h_gr r2, 0x11111111
126 mvi_h_gr r3, 0x11111111
134 wsubhus wr2, wr0, wr1
140 test_h_gr r0, 0x12345678
141 test_h_gr r1, 0x9abcde00
142 test_h_gr r2, 0x11111111
143 test_h_gr r3, 0x11111111
144 test_h_gr r4, 0x01234567
145 test_h_gr r5, 0x89abccef
147 # Test Signed saturated Halfword subtraction
149 mvi_h_gr r0, 0x12345678
150 mvi_h_gr r1, 0x9abcde00
151 mvi_h_gr r2, 0x11111111
152 mvi_h_gr r3, 0x11111111
160 wsubhss wr2, wr0, wr1
166 test_h_gr r0, 0x12345678
167 test_h_gr r1, 0x9abcde00
168 test_h_gr r2, 0x11111111
169 test_h_gr r3, 0x11111111
170 test_h_gr r4, 0x01234567
171 test_h_gr r5, 0x89abccef
173 # Test Unsaturated Word subtraction
175 mvi_h_gr r0, 0x12345678
176 mvi_h_gr r1, 0x9abcde00
177 mvi_h_gr r2, 0x11111111
178 mvi_h_gr r3, 0x11111111
192 test_h_gr r0, 0x12345678
193 test_h_gr r1, 0x9abcde00
194 test_h_gr r2, 0x11111111
195 test_h_gr r3, 0x11111111
196 test_h_gr r4, 0x01234567
197 test_h_gr r5, 0x89abccef
199 # Test Unsigned saturated Word subtraction
201 mvi_h_gr r0, 0x12345678
202 mvi_h_gr r1, 0x9abcde00
203 mvi_h_gr r2, 0x11111111
204 mvi_h_gr r3, 0x11111111
212 wsubwus wr2, wr0, wr1
218 test_h_gr r0, 0x12345678
219 test_h_gr r1, 0x9abcde00
220 test_h_gr r2, 0x11111111
221 test_h_gr r3, 0x11111111
222 test_h_gr r4, 0x01234567
223 test_h_gr r5, 0x89abccef
225 # Test Signed saturated Word subtraction
227 mvi_h_gr r0, 0x12345678
228 mvi_h_gr r1, 0x9abcde00
229 mvi_h_gr r2, 0x11111111
230 mvi_h_gr r3, 0x11111111
238 wsubwss wr2, wr0, wr1
244 test_h_gr r0, 0x12345678
245 test_h_gr r1, 0x9abcde00
246 test_h_gr r2, 0x11111111
247 test_h_gr r3, 0x11111111
248 test_h_gr r4, 0x01234567
249 test_h_gr r5, 0x89abccef