1 # Intel(r) Wireless MMX(tm) technology testcase for WSRA
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 Halfword Arithmetic Shift Right
19 mvi_h_gr r0, 0x12345678
20 mvi_h_gr r1, 0x9abcdef0
21 mvi_h_gr r2, 0x11111104
22 mvi_h_gr r3, 0x11111111
36 test_h_gr r0, 0x12345678
37 test_h_gr r1, 0x9abcdef0
38 test_h_gr r2, 0x11111104
39 test_h_gr r3, 0x11111111
40 test_h_gr r4, 0x01230567
41 test_h_gr r5, 0xf9abfdef
43 # Test Halfword Arithmetic Shift Right by CG register
45 mvi_h_gr r0, 0x12345678
46 mvi_h_gr r1, 0x9abcdef0
47 mvi_h_gr r2, 0x11111104
55 wsrahg wr1, wr0, wcgr1
61 test_h_gr r0, 0x12345678
62 test_h_gr r1, 0x9abcdef0
63 test_h_gr r2, 0x11111104
64 test_h_gr r3, 0x01230567
65 test_h_gr r4, 0xf9abfdef
67 # Test Word Arithmetic Shift Right
69 mvi_h_gr r0, 0x12345678
70 mvi_h_gr r1, 0x9abcdef0
71 mvi_h_gr r2, 0x11111104
72 mvi_h_gr r3, 0x11111111
86 test_h_gr r0, 0x12345678
87 test_h_gr r1, 0x9abcdef0
88 test_h_gr r2, 0x11111104
89 test_h_gr r3, 0x11111111
90 test_h_gr r4, 0x01234567
91 test_h_gr r5, 0xf9abcdef
93 # Test Word Arithmetic Shift Right by CG register
95 mvi_h_gr r0, 0x12345678
96 mvi_h_gr r1, 0x9abcdef0
97 mvi_h_gr r2, 0x11111104
105 wsrawg wr1, wr0, wcgr2
111 test_h_gr r0, 0x12345678
112 test_h_gr r1, 0x9abcdef0
113 test_h_gr r2, 0x11111104
114 test_h_gr r3, 0x01234567
115 test_h_gr r4, 0xf9abcdef
117 # Test Double Word Arithmetic Shift Right
119 mvi_h_gr r0, 0x12345678
120 mvi_h_gr r1, 0x9abcdefc
121 mvi_h_gr r2, 0x11111104
122 mvi_h_gr r3, 0x11111111
136 test_h_gr r0, 0x12345678
137 test_h_gr r1, 0x9abcdefc
138 test_h_gr r2, 0x11111104
139 test_h_gr r3, 0x11111111
140 test_h_gr r4, 0xc1234567
141 test_h_gr r5, 0xf9abcdef
143 # Test Double Word Arithmetic Shift Right by CG register
145 mvi_h_gr r0, 0x12345678
146 mvi_h_gr r1, 0x9abcdefc
147 mvi_h_gr r2, 0x11111104
155 wsradg wr1, wr0, wcgr3
161 test_h_gr r0, 0x12345678
162 test_h_gr r1, 0x9abcdefc
163 test_h_gr r2, 0x11111104
164 test_h_gr r3, 0xc1234567
165 test_h_gr r4, 0xf9abcdef