• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
2
3// PR7195
4// CHECK: callw 42
5// CHECK: encoding: [0x66,0xe8,A,A]
6       callw 42
7
8// rdar://8127102
9// CHECK: movq	%gs:(%rdi), %rax
10// CHECK: encoding: [0x65,0x48,0x8b,0x07]
11movq	%gs:(%rdi), %rax
12
13// CHECK: crc32b 	%bl, %eax
14// CHECK:  encoding: [0xf2,0x0f,0x38,0xf0,0xc3]
15        crc32b	%bl, %eax
16
17// CHECK: crc32b 	4(%rbx), %eax
18// CHECK:  encoding: [0xf2,0x0f,0x38,0xf0,0x43,0x04]
19        crc32b	4(%rbx), %eax
20
21// CHECK: crc32w 	%bx, %eax
22// CHECK:  encoding: [0x66,0xf2,0x0f,0x38,0xf1,0xc3]
23        crc32w	%bx, %eax
24
25// CHECK: crc32w 	4(%rbx), %eax
26// CHECK:  encoding: [0x66,0xf2,0x0f,0x38,0xf1,0x43,0x04]
27        crc32w	4(%rbx), %eax
28
29// CHECK: crc32l 	%ebx, %eax
30// CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0xc3]
31        crc32l	%ebx, %eax
32
33// CHECK: crc32l 	4(%rbx), %eax
34// CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0x43,0x04]
35        crc32l	4(%rbx), %eax
36
37// CHECK: crc32l 	3735928559(%rbx,%rcx,8), %ecx
38// CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0x8c,0xcb,0xef,0xbe,0xad,0xde]
39        	crc32l   0xdeadbeef(%rbx,%rcx,8),%ecx
40
41// CHECK: crc32l 	69, %ecx
42// CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0x45,0x00,0x00,0x00]
43        	crc32l   0x45,%ecx
44
45// CHECK: crc32l 	32493, %ecx
46// CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0xed,0x7e,0x00,0x00]
47        	crc32l   0x7eed,%ecx
48
49// CHECK: crc32l 	3133065982, %ecx
50// CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0x0c,0x25,0xfe,0xca,0xbe,0xba]
51        	crc32l   0xbabecafe,%ecx
52
53// CHECK: crc32l 	%ecx, %ecx
54// CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0xc9]
55        	crc32l   %ecx,%ecx
56
57// CHECK: crc32b 	%r11b, %eax
58// CHECK:  encoding: [0xf2,0x41,0x0f,0x38,0xf0,0xc3]
59        crc32b	%r11b, %eax
60
61// CHECK: crc32b 	4(%rbx), %eax
62// CHECK:  encoding: [0xf2,0x0f,0x38,0xf0,0x43,0x04]
63        crc32b	4(%rbx), %eax
64
65// CHECK: crc32b 	%dil, %rax
66// CHECK:  encoding: [0xf2,0x48,0x0f,0x38,0xf0,0xc7]
67        crc32b	%dil,%rax
68
69// CHECK: crc32b 	%r11b, %rax
70// CHECK:  encoding: [0xf2,0x49,0x0f,0x38,0xf0,0xc3]
71        crc32b	%r11b,%rax
72
73// CHECK: crc32b 	4(%rbx), %rax
74// CHECK:  encoding: [0xf2,0x48,0x0f,0x38,0xf0,0x43,0x04]
75        crc32b	4(%rbx), %rax
76
77// CHECK: crc32q 	%rbx, %rax
78// CHECK:  encoding: [0xf2,0x48,0x0f,0x38,0xf1,0xc3]
79        crc32q	%rbx, %rax
80
81// CHECK: crc32q 	4(%rbx), %rax
82// CHECK:  encoding: [0xf2,0x48,0x0f,0x38,0xf1,0x43,0x04]
83        crc32q	4(%rbx), %rax
84
85// CHECK: movd %r8, %mm1
86// CHECK:  encoding: [0x49,0x0f,0x6e,0xc8]
87movd %r8, %mm1
88
89// CHECK: movd %r8d, %mm1
90// CHECK:  encoding: [0x41,0x0f,0x6e,0xc8]
91movd %r8d, %mm1
92
93// CHECK: movd %rdx, %mm1
94// CHECK:  encoding: [0x48,0x0f,0x6e,0xca]
95movd %rdx, %mm1
96
97// CHECK: movd %edx, %mm1
98// CHECK:  encoding: [0x0f,0x6e,0xca]
99movd %edx, %mm1
100
101// CHECK: movd %mm1, %r8
102// CHECK:  encoding: [0x49,0x0f,0x7e,0xc8]
103movd %mm1, %r8
104
105// CHECK: movd %mm1, %r8d
106// CHECK:  encoding: [0x41,0x0f,0x7e,0xc8]
107movd %mm1, %r8d
108
109// CHECK: movd %mm1, %rdx
110// CHECK:  encoding: [0x48,0x0f,0x7e,0xca]
111movd %mm1, %rdx
112
113// CHECK: movd %mm1, %edx
114// CHECK:  encoding: [0x0f,0x7e,0xca]
115movd %mm1, %edx
116
117// rdar://7840289
118// CHECK: pshufb	CPI1_0(%rip), %xmm1
119// CHECK:  encoding: [0x66,0x0f,0x38,0x00,0x0d,A,A,A,A]
120// CHECK:  fixup A - offset: 5, value: CPI1_0-4
121pshufb	CPI1_0(%rip), %xmm1
122
123// CHECK: movq  57005(,%riz), %rbx
124// CHECK: encoding: [0x48,0x8b,0x1c,0x25,0xad,0xde,0x00,0x00]
125          movq  57005(,%riz), %rbx
126
127// CHECK: movq  48879(,%riz), %rax
128// CHECK: encoding: [0x48,0x8b,0x04,0x25,0xef,0xbe,0x00,0x00]
129          movq  48879(,%riz), %rax
130
131// CHECK: movq  -4(,%riz,8), %rax
132// CHECK: encoding: [0x48,0x8b,0x04,0xe5,0xfc,0xff,0xff,0xff]
133          movq  -4(,%riz,8), %rax
134
135// CHECK: movq  (%rcx,%riz), %rax
136// CHECK: encoding: [0x48,0x8b,0x04,0x21]
137          movq  (%rcx,%riz), %rax
138
139// CHECK: movq  (%rcx,%riz,8), %rax
140// CHECK: encoding: [0x48,0x8b,0x04,0xe1]
141          movq  (%rcx,%riz,8), %rax
142
143// CHECK: fxsaveq (%rax)
144// CHECK: encoding: [0x48,0x0f,0xae,0x00]
145          fxsaveq (%rax)
146
147// CHECK: fxrstorq (%rax)
148// CHECK: encoding: [0x48,0x0f,0xae,0x08]
149          fxrstorq (%rax)
150
151// CHECK: leave
152// CHECK:  encoding: [0xc9]
153        	leave
154
155// CHECK: leave
156// CHECK:  encoding: [0xc9]
157        	leaveq
158
159// CHECK: flds	(%edi)
160// CHECK:  encoding: [0x67,0xd9,0x07]
161        	flds	(%edi)
162
163// CHECK: filds	(%edi)
164// CHECK:  encoding: [0x67,0xdf,0x07]
165        	filds	(%edi)
166
167// CHECK: flds	(%rdi)
168// CHECK:  encoding: [0xd9,0x07]
169        	flds	(%rdi)
170
171// CHECK: filds	(%rdi)
172// CHECK:  encoding: [0xdf,0x07]
173        	filds	(%rdi)
174