xref: /llvm-project/llvm/test/MC/X86/apx/shl-att.s (revision 5c68c6d70fc204b0efdb2af95dfb328d616129e3)
1# RUN: llvm-mc -triple x86_64 -show-encoding %s | FileCheck %s
2# RUN: not llvm-mc -triple i386 -show-encoding %s 2>&1 | FileCheck %s --check-prefix=ERROR
3
4# ERROR-COUNT-94: error:
5# ERROR-NOT: error:
6# CHECK: {evex}	shlb	$123, %bl
7# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc0,0xe3,0x7b]
8         {evex}	shlb	$123, %bl
9# CHECK: {nf}	shlb	$123, %bl
10# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xc0,0xe3,0x7b]
11         {nf}	shlb	$123, %bl
12# CHECK: shlb	$123, %bl, %bl
13# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xc0,0xe3,0x7b]
14         shlb	$123, %bl, %bl
15# CHECK: {nf}	shlb	$123, %bl, %bl
16# CHECK: encoding: [0x62,0xf4,0x64,0x1c,0xc0,0xe3,0x7b]
17         {nf}	shlb	$123, %bl, %bl
18# CHECK: {evex}	shlw	$123, %dx
19# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xc1,0xe2,0x7b]
20         {evex}	shlw	$123, %dx
21# CHECK: {nf}	shlw	$123, %dx
22# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xc1,0xe2,0x7b]
23         {nf}	shlw	$123, %dx
24# CHECK: shlw	$123, %dx, %dx
25# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xc1,0xe2,0x7b]
26         shlw	$123, %dx, %dx
27# CHECK: {nf}	shlw	$123, %dx, %dx
28# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xc1,0xe2,0x7b]
29         {nf}	shlw	$123, %dx, %dx
30# CHECK: {evex}	shll	$123, %ecx
31# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xc1,0xe1,0x7b]
32         {evex}	shll	$123, %ecx
33# CHECK: {nf}	shll	$123, %ecx
34# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xc1,0xe1,0x7b]
35         {nf}	shll	$123, %ecx
36# CHECK: shll	$123, %ecx, %ecx
37# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xc1,0xe1,0x7b]
38         shll	$123, %ecx, %ecx
39# CHECK: {nf}	shll	$123, %ecx, %ecx
40# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xc1,0xe1,0x7b]
41         {nf}	shll	$123, %ecx, %ecx
42# CHECK: {evex}	shlq	$123, %r9
43# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0xe1,0x7b]
44         {evex}	shlq	$123, %r9
45# CHECK: {nf}	shlq	$123, %r9
46# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xc1,0xe1,0x7b]
47         {nf}	shlq	$123, %r9
48# CHECK: shlq	$123, %r9, %r9
49# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0xe1,0x7b]
50         shlq	$123, %r9, %r9
51# CHECK: {nf}	shlq	$123, %r9, %r9
52# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xc1,0xe1,0x7b]
53         {nf}	shlq	$123, %r9, %r9
54# CHECK: {evex}	shlb	$123, 291(%r8,%rax,4)
55# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
56         {evex}	shlb	$123, 291(%r8,%rax,4)
57# CHECK: {nf}	shlb	$123, 291(%r8,%rax,4)
58# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
59         {nf}	shlb	$123, 291(%r8,%rax,4)
60# CHECK: shlb	$123, 291(%r8,%rax,4), %bl
61# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
62         shlb	$123, 291(%r8,%rax,4), %bl
63# CHECK: {nf}	shlb	$123, 291(%r8,%rax,4), %bl
64# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xc0,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
65         {nf}	shlb	$123, 291(%r8,%rax,4), %bl
66# CHECK: {evex}	shlw	$123, 291(%r8,%rax,4)
67# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
68         {evex}	shlw	$123, 291(%r8,%rax,4)
69# CHECK: {nf}	shlw	$123, 291(%r8,%rax,4)
70# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
71         {nf}	shlw	$123, 291(%r8,%rax,4)
72# CHECK: shlw	$123, 291(%r8,%rax,4), %dx
73# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
74         shlw	$123, 291(%r8,%rax,4), %dx
75# CHECK: {nf}	shlw	$123, 291(%r8,%rax,4), %dx
76# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
77         {nf}	shlw	$123, 291(%r8,%rax,4), %dx
78# CHECK: {evex}	shll	$123, 291(%r8,%rax,4)
79# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
80         {evex}	shll	$123, 291(%r8,%rax,4)
81# CHECK: {nf}	shll	$123, 291(%r8,%rax,4)
82# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
83         {nf}	shll	$123, 291(%r8,%rax,4)
84# CHECK: shll	$123, 291(%r8,%rax,4), %ecx
85# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
86         shll	$123, 291(%r8,%rax,4), %ecx
87# CHECK: {nf}	shll	$123, 291(%r8,%rax,4), %ecx
88# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
89         {nf}	shll	$123, 291(%r8,%rax,4), %ecx
90# CHECK: {evex}	shlq	$123, 291(%r8,%rax,4)
91# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
92         {evex}	shlq	$123, 291(%r8,%rax,4)
93# CHECK: {nf}	shlq	$123, 291(%r8,%rax,4)
94# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
95         {nf}	shlq	$123, 291(%r8,%rax,4)
96# CHECK: shlq	$123, 291(%r8,%rax,4), %r9
97# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
98         shlq	$123, 291(%r8,%rax,4), %r9
99# CHECK: {nf}	shlq	$123, 291(%r8,%rax,4), %r9
100# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xc1,0xa4,0x80,0x23,0x01,0x00,0x00,0x7b]
101         {nf}	shlq	$123, 291(%r8,%rax,4), %r9
102# CHECK: {evex}	shlb	%bl
103# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd0,0xe3]
104         {evex}	shlb	%bl
105# CHECK: {nf}	shlb	%bl
106# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd0,0xe3]
107         {nf}	shlb	%bl
108# CHECK: {evex}	shlb	%cl, %bl
109# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd2,0xe3]
110         {evex}	shlb	%cl, %bl
111# CHECK: {nf}	shlb	%cl, %bl
112# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd2,0xe3]
113         {nf}	shlb	%cl, %bl
114# CHECK: shlb	%cl, %bl, %bl
115# CHECK: encoding: [0x62,0xf4,0x64,0x18,0xd2,0xe3]
116         shlb	%cl, %bl, %bl
117# CHECK: {nf}	shlb	%cl, %bl, %bl
118# CHECK: encoding: [0x62,0xf4,0x64,0x1c,0xd2,0xe3]
119         {nf}	shlb	%cl, %bl, %bl
120# CHECK: {evex}	shlw	%cl, %dx
121# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd3,0xe2]
122         {evex}	shlw	%cl, %dx
123# CHECK: {nf}	shlw	%cl, %dx
124# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xd3,0xe2]
125         {nf}	shlw	%cl, %dx
126# CHECK: shlw	%cl, %dx, %dx
127# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd3,0xe2]
128         shlw	%cl, %dx, %dx
129# CHECK: {nf}	shlw	%cl, %dx, %dx
130# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xd3,0xe2]
131         {nf}	shlw	%cl, %dx, %dx
132# CHECK: {evex}	shll	%cl, %ecx
133# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd3,0xe1]
134         {evex}	shll	%cl, %ecx
135# CHECK: {nf}	shll	%cl, %ecx
136# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd3,0xe1]
137         {nf}	shll	%cl, %ecx
138# CHECK: shll	%cl, %ecx, %ecx
139# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd3,0xe1]
140         shll	%cl, %ecx, %ecx
141# CHECK: {nf}	shll	%cl, %ecx, %ecx
142# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xd3,0xe1]
143         {nf}	shll	%cl, %ecx, %ecx
144# CHECK: {evex}	shlq	%cl, %r9
145# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0xe1]
146         {evex}	shlq	%cl, %r9
147# CHECK: {nf}	shlq	%cl, %r9
148# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd3,0xe1]
149         {nf}	shlq	%cl, %r9
150# CHECK: shlq	%cl, %r9, %r9
151# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0xe1]
152         shlq	%cl, %r9, %r9
153# CHECK: {nf}	shlq	%cl, %r9, %r9
154# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd3,0xe1]
155         {nf}	shlq	%cl, %r9, %r9
156# CHECK: {evex}	shlb	%cl, 291(%r8,%rax,4)
157# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]
158         {evex}	shlb	%cl, 291(%r8,%rax,4)
159# CHECK: {nf}	shlb	%cl, 291(%r8,%rax,4)
160# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]
161         {nf}	shlb	%cl, 291(%r8,%rax,4)
162# CHECK: shlb	%cl, 291(%r8,%rax,4), %bl
163# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]
164         shlb	%cl, 291(%r8,%rax,4), %bl
165# CHECK: {nf}	shlb	%cl, 291(%r8,%rax,4), %bl
166# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xd2,0xa4,0x80,0x23,0x01,0x00,0x00]
167         {nf}	shlb	%cl, 291(%r8,%rax,4), %bl
168# CHECK: {evex}	shlw	%cl, 291(%r8,%rax,4)
169# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
170         {evex}	shlw	%cl, 291(%r8,%rax,4)
171# CHECK: {nf}	shlw	%cl, 291(%r8,%rax,4)
172# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
173         {nf}	shlw	%cl, 291(%r8,%rax,4)
174# CHECK: shlw	%cl, 291(%r8,%rax,4), %dx
175# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
176         shlw	%cl, 291(%r8,%rax,4), %dx
177# CHECK: {nf}	shlw	%cl, 291(%r8,%rax,4), %dx
178# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
179         {nf}	shlw	%cl, 291(%r8,%rax,4), %dx
180# CHECK: {evex}	shll	%cl, 291(%r8,%rax,4)
181# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
182         {evex}	shll	%cl, 291(%r8,%rax,4)
183# CHECK: {nf}	shll	%cl, 291(%r8,%rax,4)
184# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
185         {nf}	shll	%cl, 291(%r8,%rax,4)
186# CHECK: shll	%cl, 291(%r8,%rax,4), %ecx
187# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
188         shll	%cl, 291(%r8,%rax,4), %ecx
189# CHECK: {nf}	shll	%cl, 291(%r8,%rax,4), %ecx
190# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
191         {nf}	shll	%cl, 291(%r8,%rax,4), %ecx
192# CHECK: {evex}	shlq	%cl, 291(%r8,%rax,4)
193# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
194         {evex}	shlq	%cl, 291(%r8,%rax,4)
195# CHECK: {nf}	shlq	%cl, 291(%r8,%rax,4)
196# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
197         {nf}	shlq	%cl, 291(%r8,%rax,4)
198# CHECK: shlq	%cl, 291(%r8,%rax,4), %r9
199# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
200         shlq	%cl, 291(%r8,%rax,4), %r9
201# CHECK: {nf}	shlq	%cl, 291(%r8,%rax,4), %r9
202# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd3,0xa4,0x80,0x23,0x01,0x00,0x00]
203         {nf}	shlq	%cl, 291(%r8,%rax,4), %r9
204# CHECK: {evex}	shlw	%dx
205# CHECK: encoding: [0x62,0xf4,0x7d,0x08,0xd1,0xe2]
206         {evex}	shlw	%dx
207# CHECK: {nf}	shlw	%dx
208# CHECK: encoding: [0x62,0xf4,0x7d,0x0c,0xd1,0xe2]
209         {nf}	shlw	%dx
210# CHECK: shlw	%dx, %dx
211# CHECK: encoding: [0x62,0xf4,0x6d,0x18,0xd1,0xe2]
212         shlw	%dx, %dx
213# CHECK: {nf}	shlw	%dx, %dx
214# CHECK: encoding: [0x62,0xf4,0x6d,0x1c,0xd1,0xe2]
215         {nf}	shlw	%dx, %dx
216# CHECK: {evex}	shll	%ecx
217# CHECK: encoding: [0x62,0xf4,0x7c,0x08,0xd1,0xe1]
218         {evex}	shll	%ecx
219# CHECK: {nf}	shll	%ecx
220# CHECK: encoding: [0x62,0xf4,0x7c,0x0c,0xd1,0xe1]
221         {nf}	shll	%ecx
222# CHECK: shll	%ecx, %ecx
223# CHECK: encoding: [0x62,0xf4,0x74,0x18,0xd1,0xe1]
224         shll	%ecx, %ecx
225# CHECK: {nf}	shll	%ecx, %ecx
226# CHECK: encoding: [0x62,0xf4,0x74,0x1c,0xd1,0xe1]
227         {nf}	shll	%ecx, %ecx
228# CHECK: {evex}	shlq	%r9
229# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0xe1]
230         {evex}	shlq	%r9
231# CHECK: {nf}	shlq	%r9
232# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd1,0xe1]
233         {nf}	shlq	%r9
234# CHECK: shlq	%r9, %r9
235# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0xe1]
236         shlq	%r9, %r9
237# CHECK: {nf}	shlq	%r9, %r9
238# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd1,0xe1]
239         {nf}	shlq	%r9, %r9
240# CHECK: {evex}	shlb	291(%r8,%rax,4)
241# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]
242         {evex}	shlb	291(%r8,%rax,4)
243# CHECK: {nf}	shlb	291(%r8,%rax,4)
244# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]
245         {nf}	shlb	291(%r8,%rax,4)
246# CHECK: shlb	291(%r8,%rax,4), %bl
247# CHECK: encoding: [0x62,0xd4,0x64,0x18,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]
248         shlb	291(%r8,%rax,4), %bl
249# CHECK: {nf}	shlb	291(%r8,%rax,4), %bl
250# CHECK: encoding: [0x62,0xd4,0x64,0x1c,0xd0,0xa4,0x80,0x23,0x01,0x00,0x00]
251         {nf}	shlb	291(%r8,%rax,4), %bl
252# CHECK: {evex}	shlw	291(%r8,%rax,4)
253# CHECK: encoding: [0x62,0xd4,0x7d,0x08,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
254         {evex}	shlw	291(%r8,%rax,4)
255# CHECK: {nf}	shlw	291(%r8,%rax,4)
256# CHECK: encoding: [0x62,0xd4,0x7d,0x0c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
257         {nf}	shlw	291(%r8,%rax,4)
258# CHECK: shlw	291(%r8,%rax,4), %dx
259# CHECK: encoding: [0x62,0xd4,0x6d,0x18,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
260         shlw	291(%r8,%rax,4), %dx
261# CHECK: {nf}	shlw	291(%r8,%rax,4), %dx
262# CHECK: encoding: [0x62,0xd4,0x6d,0x1c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
263         {nf}	shlw	291(%r8,%rax,4), %dx
264# CHECK: {evex}	shll	291(%r8,%rax,4)
265# CHECK: encoding: [0x62,0xd4,0x7c,0x08,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
266         {evex}	shll	291(%r8,%rax,4)
267# CHECK: {nf}	shll	291(%r8,%rax,4)
268# CHECK: encoding: [0x62,0xd4,0x7c,0x0c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
269         {nf}	shll	291(%r8,%rax,4)
270# CHECK: shll	291(%r8,%rax,4), %ecx
271# CHECK: encoding: [0x62,0xd4,0x74,0x18,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
272         shll	291(%r8,%rax,4), %ecx
273# CHECK: {nf}	shll	291(%r8,%rax,4), %ecx
274# CHECK: encoding: [0x62,0xd4,0x74,0x1c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
275         {nf}	shll	291(%r8,%rax,4), %ecx
276# CHECK: {evex}	shlq	291(%r8,%rax,4)
277# CHECK: encoding: [0x62,0xd4,0xfc,0x08,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
278         {evex}	shlq	291(%r8,%rax,4)
279# CHECK: {nf}	shlq	291(%r8,%rax,4)
280# CHECK: encoding: [0x62,0xd4,0xfc,0x0c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
281         {nf}	shlq	291(%r8,%rax,4)
282# CHECK: shlq	291(%r8,%rax,4), %r9
283# CHECK: encoding: [0x62,0xd4,0xb4,0x18,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
284         shlq	291(%r8,%rax,4), %r9
285# CHECK: {nf}	shlq	291(%r8,%rax,4), %r9
286# CHECK: encoding: [0x62,0xd4,0xb4,0x1c,0xd1,0xa4,0x80,0x23,0x01,0x00,0x00]
287         {nf}	shlq	291(%r8,%rax,4), %r9
288