1// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
2
3// CHECK: prefetch 485498096
4// CHECK: encoding: [0x0f,0x0d,0x04,0x25,0xf0,0x1c,0xf0,0x1c]
5prefetch 485498096
6
7// CHECK: prefetch 64(%rdx)
8// CHECK: encoding: [0x0f,0x0d,0x42,0x40]
9prefetch 64(%rdx)
10
11// CHECK: prefetch 64(%rdx,%rax,4)
12// CHECK: encoding: [0x0f,0x0d,0x44,0x82,0x40]
13prefetch 64(%rdx,%rax,4)
14
15// CHECK: prefetch -64(%rdx,%rax,4)
16// CHECK: encoding: [0x0f,0x0d,0x44,0x82,0xc0]
17prefetch -64(%rdx,%rax,4)
18
19// CHECK: prefetch 64(%rdx,%rax)
20// CHECK: encoding: [0x0f,0x0d,0x44,0x02,0x40]
21prefetch 64(%rdx,%rax)
22
23// CHECK: prefetchnta 485498096
24// CHECK: encoding: [0x0f,0x18,0x04,0x25,0xf0,0x1c,0xf0,0x1c]
25prefetchnta 485498096
26
27// CHECK: prefetchnta 64(%rdx)
28// CHECK: encoding: [0x0f,0x18,0x42,0x40]
29prefetchnta 64(%rdx)
30
31// CHECK: prefetchnta 64(%rdx,%rax,4)
32// CHECK: encoding: [0x0f,0x18,0x44,0x82,0x40]
33prefetchnta 64(%rdx,%rax,4)
34
35// CHECK: prefetchnta -64(%rdx,%rax,4)
36// CHECK: encoding: [0x0f,0x18,0x44,0x82,0xc0]
37prefetchnta -64(%rdx,%rax,4)
38
39// CHECK: prefetchnta 64(%rdx,%rax)
40// CHECK: encoding: [0x0f,0x18,0x44,0x02,0x40]
41prefetchnta 64(%rdx,%rax)
42
43// CHECK: prefetchnta (%rdx)
44// CHECK: encoding: [0x0f,0x18,0x02]
45prefetchnta (%rdx)
46
47// CHECK: prefetch (%rdx)
48// CHECK: encoding: [0x0f,0x0d,0x02]
49prefetch (%rdx)
50
51// CHECK: prefetcht0 485498096
52// CHECK: encoding: [0x0f,0x18,0x0c,0x25,0xf0,0x1c,0xf0,0x1c]
53prefetcht0 485498096
54
55// CHECK: prefetcht0 64(%rdx)
56// CHECK: encoding: [0x0f,0x18,0x4a,0x40]
57prefetcht0 64(%rdx)
58
59// CHECK: prefetcht0 64(%rdx,%rax,4)
60// CHECK: encoding: [0x0f,0x18,0x4c,0x82,0x40]
61prefetcht0 64(%rdx,%rax,4)
62
63// CHECK: prefetcht0 -64(%rdx,%rax,4)
64// CHECK: encoding: [0x0f,0x18,0x4c,0x82,0xc0]
65prefetcht0 -64(%rdx,%rax,4)
66
67// CHECK: prefetcht0 64(%rdx,%rax)
68// CHECK: encoding: [0x0f,0x18,0x4c,0x02,0x40]
69prefetcht0 64(%rdx,%rax)
70
71// CHECK: prefetcht0 (%rdx)
72// CHECK: encoding: [0x0f,0x18,0x0a]
73prefetcht0 (%rdx)
74
75// CHECK: prefetcht1 485498096
76// CHECK: encoding: [0x0f,0x18,0x14,0x25,0xf0,0x1c,0xf0,0x1c]
77prefetcht1 485498096
78
79// CHECK: prefetcht1 64(%rdx)
80// CHECK: encoding: [0x0f,0x18,0x52,0x40]
81prefetcht1 64(%rdx)
82
83// CHECK: prefetcht1 64(%rdx,%rax,4)
84// CHECK: encoding: [0x0f,0x18,0x54,0x82,0x40]
85prefetcht1 64(%rdx,%rax,4)
86
87// CHECK: prefetcht1 -64(%rdx,%rax,4)
88// CHECK: encoding: [0x0f,0x18,0x54,0x82,0xc0]
89prefetcht1 -64(%rdx,%rax,4)
90
91// CHECK: prefetcht1 64(%rdx,%rax)
92// CHECK: encoding: [0x0f,0x18,0x54,0x02,0x40]
93prefetcht1 64(%rdx,%rax)
94
95// CHECK: prefetcht1 (%rdx)
96// CHECK: encoding: [0x0f,0x18,0x12]
97prefetcht1 (%rdx)
98
99// CHECK: prefetcht2 485498096
100// CHECK: encoding: [0x0f,0x18,0x1c,0x25,0xf0,0x1c,0xf0,0x1c]
101prefetcht2 485498096
102
103// CHECK: prefetcht2 64(%rdx)
104// CHECK: encoding: [0x0f,0x18,0x5a,0x40]
105prefetcht2 64(%rdx)
106
107// CHECK: prefetcht2 64(%rdx,%rax,4)
108// CHECK: encoding: [0x0f,0x18,0x5c,0x82,0x40]
109prefetcht2 64(%rdx,%rax,4)
110
111// CHECK: prefetcht2 -64(%rdx,%rax,4)
112// CHECK: encoding: [0x0f,0x18,0x5c,0x82,0xc0]
113prefetcht2 -64(%rdx,%rax,4)
114
115// CHECK: prefetcht2 64(%rdx,%rax)
116// CHECK: encoding: [0x0f,0x18,0x5c,0x02,0x40]
117prefetcht2 64(%rdx,%rax)
118
119// CHECK: prefetcht2 (%rdx)
120// CHECK: encoding: [0x0f,0x18,0x1a]
121prefetcht2 (%rdx)
122
123// CHECK: prefetchw 485498096
124// CHECK: encoding: [0x0f,0x0d,0x0c,0x25,0xf0,0x1c,0xf0,0x1c]
125prefetchw 485498096
126
127// CHECK: prefetchw 64(%rdx)
128// CHECK: encoding: [0x0f,0x0d,0x4a,0x40]
129prefetchw 64(%rdx)
130
131// CHECK: prefetchw 64(%rdx,%rax,4)
132// CHECK: encoding: [0x0f,0x0d,0x4c,0x82,0x40]
133prefetchw 64(%rdx,%rax,4)
134
135// CHECK: prefetchw -64(%rdx,%rax,4)
136// CHECK: encoding: [0x0f,0x0d,0x4c,0x82,0xc0]
137prefetchw -64(%rdx,%rax,4)
138
139// CHECK: prefetchw 64(%rdx,%rax)
140// CHECK: encoding: [0x0f,0x0d,0x4c,0x02,0x40]
141prefetchw 64(%rdx,%rax)
142
143// CHECK: prefetchw (%rdx)
144// CHECK: encoding: [0x0f,0x0d,0x0a]
145prefetchw (%rdx)
146
147// CHECK: prefetchwt1 485498096
148// CHECK: encoding:  [0x0f,0x0d,0x14,0x25,0xf0,0x1c,0xf0,0x1c]
149prefetchwt1 485498096
150
151// CHECK: prefetchwt1 64(%rdx)
152// CHECK: encoding: [0x0f,0x0d,0x52,0x40]
153prefetchwt1 64(%rdx)
154
155// CHECK: prefetchwt1 64(%rdx,%rax,4)
156// CHECK: encoding: [0x0f,0x0d,0x54,0x82,0x40]
157prefetchwt1 64(%rdx,%rax,4)
158
159// CHECK: prefetchwt1 -64(%rdx,%rax,4)
160// CHECK: encoding: [0x0f,0x0d,0x54,0x82,0xc0]
161prefetchwt1 -64(%rdx,%rax,4)
162
163// CHECK: prefetchwt1 64(%rdx,%rax)
164// CHECK: encoding: [0x0f,0x0d,0x54,0x02,0x40]
165prefetchwt1 64(%rdx,%rax)
166
167// CHECK: prefetchwt1 (%rdx)
168// CHECK: encoding: [0x0f,0x0d,0x12]
169prefetchwt1 (%rdx)
170
171