1// RUN: llvm-mc -triple i386-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
2
3// CHECK:      aesdec128kl xmm2, [esp + 8*esi + 268435456]
4// CHECK: encoding: [0xf3,0x0f,0x38,0xdd,0x94,0xf4,0x00,0x00,0x00,0x10]
5               aesdec128kl xmm2, [esp + 8*esi + 268435456]
6
7// CHECK:      aesdec128kl xmm2, [edi + 4*eax + 291]
8// CHECK: encoding: [0xf3,0x0f,0x38,0xdd,0x94,0x87,0x23,0x01,0x00,0x00]
9               aesdec128kl xmm2, [edi + 4*eax + 291]
10
11// CHECK:      aesdec128kl xmm2, [eax]
12// CHECK: encoding: [0xf3,0x0f,0x38,0xdd,0x10]
13               aesdec128kl xmm2, [eax]
14
15// CHECK:      aesdec128kl xmm2, [2*ebp - 1536]
16// CHECK: encoding: [0xf3,0x0f,0x38,0xdd,0x14,0x6d,0x00,0xfa,0xff,0xff]
17               aesdec128kl xmm2, [2*ebp - 1536]
18
19// CHECK:      aesdec128kl xmm2, [ecx + 6096]
20// CHECK: encoding: [0xf3,0x0f,0x38,0xdd,0x91,0xd0,0x17,0x00,0x00]
21               aesdec128kl xmm2, [ecx + 6096]
22
23// CHECK:      aesdec128kl xmm2, [edx - 6144]
24// CHECK: encoding: [0xf3,0x0f,0x38,0xdd,0x92,0x00,0xe8,0xff,0xff]
25               aesdec128kl xmm2, [edx - 6144]
26
27// CHECK:      aesdec256kl xmm2, [esp + 8*esi + 268435456]
28// CHECK: encoding: [0xf3,0x0f,0x38,0xdf,0x94,0xf4,0x00,0x00,0x00,0x10]
29               aesdec256kl xmm2, [esp + 8*esi + 268435456]
30
31// CHECK:      aesdec256kl xmm2, [edi + 4*eax + 291]
32// CHECK: encoding: [0xf3,0x0f,0x38,0xdf,0x94,0x87,0x23,0x01,0x00,0x00]
33               aesdec256kl xmm2, [edi + 4*eax + 291]
34
35// CHECK:      aesdec256kl xmm2, [eax]
36// CHECK: encoding: [0xf3,0x0f,0x38,0xdf,0x10]
37               aesdec256kl xmm2, [eax]
38
39// CHECK:      aesdec256kl xmm2, [2*ebp - 2048]
40// CHECK: encoding: [0xf3,0x0f,0x38,0xdf,0x14,0x6d,0x00,0xf8,0xff,0xff]
41               aesdec256kl xmm2, [2*ebp - 2048]
42
43// CHECK:      aesdec256kl xmm2, [ecx + 8128]
44// CHECK: encoding: [0xf3,0x0f,0x38,0xdf,0x91,0xc0,0x1f,0x00,0x00]
45               aesdec256kl xmm2, [ecx + 8128]
46
47// CHECK:      aesdec256kl xmm2, [edx - 8192]
48// CHECK: encoding: [0xf3,0x0f,0x38,0xdf,0x92,0x00,0xe0,0xff,0xff]
49               aesdec256kl xmm2, [edx - 8192]
50
51// CHECK:      aesenc128kl xmm2, [esp + 8*esi + 268435456]
52// CHECK: encoding: [0xf3,0x0f,0x38,0xdc,0x94,0xf4,0x00,0x00,0x00,0x10]
53               aesenc128kl xmm2, [esp + 8*esi + 268435456]
54
55// CHECK:      aesenc128kl xmm2, [edi + 4*eax + 291]
56// CHECK: encoding: [0xf3,0x0f,0x38,0xdc,0x94,0x87,0x23,0x01,0x00,0x00]
57               aesenc128kl xmm2, [edi + 4*eax + 291]
58
59// CHECK:      aesenc128kl xmm2, [eax]
60// CHECK: encoding: [0xf3,0x0f,0x38,0xdc,0x10]
61               aesenc128kl xmm2, [eax]
62
63// CHECK:      aesenc128kl xmm2, [2*ebp - 1536]
64// CHECK: encoding: [0xf3,0x0f,0x38,0xdc,0x14,0x6d,0x00,0xfa,0xff,0xff]
65               aesenc128kl xmm2, [2*ebp - 1536]
66
67// CHECK:      aesenc128kl xmm2, [ecx + 6096]
68// CHECK: encoding: [0xf3,0x0f,0x38,0xdc,0x91,0xd0,0x17,0x00,0x00]
69               aesenc128kl xmm2, [ecx + 6096]
70
71// CHECK:      aesenc128kl xmm2, [edx - 6144]
72// CHECK: encoding: [0xf3,0x0f,0x38,0xdc,0x92,0x00,0xe8,0xff,0xff]
73               aesenc128kl xmm2, [edx - 6144]
74
75// CHECK:      aesenc256kl xmm2, [esp + 8*esi + 268435456]
76// CHECK: encoding: [0xf3,0x0f,0x38,0xde,0x94,0xf4,0x00,0x00,0x00,0x10]
77               aesenc256kl xmm2, [esp + 8*esi + 268435456]
78
79// CHECK:      aesenc256kl xmm2, [edi + 4*eax + 291]
80// CHECK: encoding: [0xf3,0x0f,0x38,0xde,0x94,0x87,0x23,0x01,0x00,0x00]
81               aesenc256kl xmm2, [edi + 4*eax + 291]
82
83// CHECK:      aesenc256kl xmm2, [eax]
84// CHECK: encoding: [0xf3,0x0f,0x38,0xde,0x10]
85               aesenc256kl xmm2, [eax]
86
87// CHECK:      aesenc256kl xmm2, [2*ebp - 2048]
88// CHECK: encoding: [0xf3,0x0f,0x38,0xde,0x14,0x6d,0x00,0xf8,0xff,0xff]
89               aesenc256kl xmm2, [2*ebp - 2048]
90
91// CHECK:      aesenc256kl xmm2, [ecx + 8128]
92// CHECK: encoding: [0xf3,0x0f,0x38,0xde,0x91,0xc0,0x1f,0x00,0x00]
93               aesenc256kl xmm2, [ecx + 8128]
94
95// CHECK:      aesenc256kl xmm2, [edx - 8192]
96// CHECK: encoding: [0xf3,0x0f,0x38,0xde,0x92,0x00,0xe0,0xff,0xff]
97               aesenc256kl xmm2, [edx - 8192]
98
99// CHECK:      encodekey128 ecx, ecx
100// CHECK: encoding: [0xf3,0x0f,0x38,0xfa,0xc9]
101               encodekey128 ecx, ecx
102
103// CHECK:      encodekey256 ecx, ecx
104// CHECK: encoding: [0xf3,0x0f,0x38,0xfb,0xc9]
105               encodekey256 ecx, ecx
106
107// CHECK:      loadiwkey xmm2, xmm3
108// CHECK: encoding: [0xf3,0x0f,0x38,0xdc,0xd3]
109               loadiwkey xmm2, xmm3
110
111// CHECK:      aesdecwide128kl [esp + 8*esi + 268435456]
112// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x8c,0xf4,0x00,0x00,0x00,0x10]
113               aesdecwide128kl [esp + 8*esi + 268435456]
114
115// CHECK:      aesdecwide128kl [edi + 4*eax + 291]
116// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x8c,0x87,0x23,0x01,0x00,0x00]
117               aesdecwide128kl [edi + 4*eax + 291]
118
119// CHECK:      aesdecwide128kl [eax]
120// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x08]
121               aesdecwide128kl [eax]
122
123// CHECK:      aesdecwide128kl [2*ebp - 1536]
124// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x0c,0x6d,0x00,0xfa,0xff,0xff]
125               aesdecwide128kl [2*ebp - 1536]
126
127// CHECK:      aesdecwide128kl [ecx + 6096]
128// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x89,0xd0,0x17,0x00,0x00]
129               aesdecwide128kl [ecx + 6096]
130
131// CHECK:      aesdecwide128kl [edx - 6144]
132// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x8a,0x00,0xe8,0xff,0xff]
133               aesdecwide128kl [edx - 6144]
134
135// CHECK:      aesdecwide256kl [esp + 8*esi + 268435456]
136// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x9c,0xf4,0x00,0x00,0x00,0x10]
137               aesdecwide256kl [esp + 8*esi + 268435456]
138
139// CHECK:      aesdecwide256kl [edi + 4*eax + 291]
140// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x9c,0x87,0x23,0x01,0x00,0x00]
141               aesdecwide256kl [edi + 4*eax + 291]
142
143// CHECK:      aesdecwide256kl [eax]
144// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x18]
145               aesdecwide256kl [eax]
146
147// CHECK:      aesdecwide256kl [2*ebp - 2048]
148// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x1c,0x6d,0x00,0xf8,0xff,0xff]
149               aesdecwide256kl [2*ebp - 2048]
150
151// CHECK:      aesdecwide256kl [ecx + 8128]
152// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x99,0xc0,0x1f,0x00,0x00]
153               aesdecwide256kl [ecx + 8128]
154
155// CHECK:      aesdecwide256kl [edx - 8192]
156// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x9a,0x00,0xe0,0xff,0xff]
157               aesdecwide256kl [edx - 8192]
158
159// CHECK:      aesencwide128kl [esp + 8*esi + 268435456]
160// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x84,0xf4,0x00,0x00,0x00,0x10]
161               aesencwide128kl [esp + 8*esi + 268435456]
162
163// CHECK:      aesencwide128kl [edi + 4*eax + 291]
164// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x84,0x87,0x23,0x01,0x00,0x00]
165               aesencwide128kl [edi + 4*eax + 291]
166
167// CHECK:      aesencwide128kl [eax]
168// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x00]
169               aesencwide128kl [eax]
170
171// CHECK:      aesencwide128kl [2*ebp - 1536]
172// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x04,0x6d,0x00,0xfa,0xff,0xff]
173               aesencwide128kl [2*ebp - 1536]
174
175// CHECK:      aesencwide128kl [ecx + 6096]
176// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x81,0xd0,0x17,0x00,0x00]
177               aesencwide128kl [ecx + 6096]
178
179// CHECK:      aesencwide128kl [edx - 6144]
180// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x82,0x00,0xe8,0xff,0xff]
181               aesencwide128kl [edx - 6144]
182
183// CHECK:      aesencwide256kl [esp + 8*esi + 268435456]
184// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x94,0xf4,0x00,0x00,0x00,0x10]
185               aesencwide256kl [esp + 8*esi + 268435456]
186
187// CHECK:      aesencwide256kl [edi + 4*eax + 291]
188// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x94,0x87,0x23,0x01,0x00,0x00]
189               aesencwide256kl [edi + 4*eax + 291]
190
191// CHECK:      aesencwide256kl [eax]
192// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x10]
193               aesencwide256kl [eax]
194
195// CHECK:      aesencwide256kl [2*ebp - 2048]
196// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x14,0x6d,0x00,0xf8,0xff,0xff]
197               aesencwide256kl [2*ebp - 2048]
198
199// CHECK:      aesencwide256kl [ecx + 8128]
200// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x91,0xc0,0x1f,0x00,0x00]
201               aesencwide256kl [ecx + 8128]
202
203// CHECK:      aesencwide256kl [edx - 8192]
204// CHECK: encoding: [0xf3,0x0f,0x38,0xd8,0x92,0x00,0xe0,0xff,0xff]
205               aesencwide256kl [edx - 8192]
206