intel-syntax.s revision 3f1f9c37986953250cbda7a7bfb7123571449be7
1// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s | FileCheck %s 2 3_test: 4 xor EAX, EAX 5 ret 6 7_main: 8// CHECK: movl $257, -4(%rsp) 9 mov DWORD PTR [RSP - 4], 257 10// CHECK: movl $258, 4(%rsp) 11 mov DWORD PTR [RSP + 4], 258 12// CHECK: movq $123, -16(%rsp) 13 mov QWORD PTR [RSP - 16], 123 14// CHECK: movb $97, -17(%rsp) 15 mov BYTE PTR [RSP - 17], 97 16// CHECK: movl -4(%rsp), %eax 17 mov EAX, DWORD PTR [RSP - 4] 18// CHECK: movq (%rsp), %rax 19 mov RAX, QWORD PTR [RSP] 20// CHECK: movl $-4, -4(%rsp) 21 mov DWORD PTR [RSP - 4], -4 22// CHECK: movq 0, %rcx 23 mov RCX, QWORD PTR [0] 24// CHECK: movl -24(%rsp,%rax,4), %eax 25 mov EAX, DWORD PTR [RSP + 4*RAX - 24] 26// CHECK: movb %dil, (%rdx,%rcx) 27 mov BYTE PTR [RDX + RCX], DIL 28// CHECK: movzwl 2(%rcx), %edi 29 movzx EDI, WORD PTR [RCX + 2] 30// CHECK: callq _test 31 call _test 32// CHECK: andw $12, %ax 33 and ax, 12 34// CHECK: andw $-12, %ax 35 and ax, -12 36// CHECK: andw $257, %ax 37 and ax, 257 38// CHECK: andw $-257, %ax 39 and ax, -257 40// CHECK: andl $12, %eax 41 and eax, 12 42// CHECK: andl $-12, %eax 43 and eax, -12 44// CHECK: andl $257, %eax 45 and eax, 257 46// CHECK: andl $-257, %eax 47 and eax, -257 48// CHECK: andq $12, %rax 49 and rax, 12 50// CHECK: andq $-12, %rax 51 and rax, -12 52// CHECK: andq $257, %rax 53 and rax, 257 54// CHECK: andq $-257, %rax 55 and rax, -257 56// CHECK: fld %st(0) 57 fld ST(0) 58// CHECK: movl %fs:(%rdi), %eax 59 mov EAX, DWORD PTR FS:[RDI] 60// CHECK: leal (,%rdi,4), %r8d 61 lea R8D, DWORD PTR [4*RDI] 62// CHECK: movl _fnan(,%ecx,4), %ecx 63 mov ECX, DWORD PTR [4*ECX + _fnan] 64// CHECK: movq %fs:320, %rax 65 mov RAX, QWORD PTR FS:[320] 66// CHECK: vpgatherdd %xmm8, (%r15,%xmm9,2), %xmm1 67 vpgatherdd XMM10, DWORD PTR [R15 + 2*XMM9], XMM8 68// CHECK: movsd -8, %xmm5 69 movsd XMM5, QWORD PTR [-8] 70// CHECK: movl %ecx, (%eax) 71 mov [eax], ecx 72// CHECK: movl %ecx, (,%ebx,4) 73 mov [4*ebx], ecx 74 // CHECK: movl %ecx, (,%ebx,4) 75 mov [ebx*4], ecx 76// CHECK: movl %ecx, 1024 77 mov [1024], ecx 78// CHECK: movl %ecx, 4132 79 mov [0x1024], ecx 80// CHECK: movl %ecx, 32 81 mov [16 + 16], ecx 82// CHECK: movl %ecx, 0 83 mov [16 - 16], ecx 84// CHECK: movl %ecx, 32 85 mov [16][16], ecx 86// CHECK: movl %ecx, (%eax,%ebx,4) 87 mov [eax + 4*ebx], ecx 88// CHECK: movl %ecx, (%eax,%ebx,4) 89 mov [eax + ebx*4], ecx 90// CHECK: movl %ecx, (%eax,%ebx,4) 91 mov [4*ebx + eax], ecx 92// CHECK: movl %ecx, (%eax,%ebx,4) 93 mov [ebx*4 + eax], ecx 94// CHECK: movl %ecx, (%eax,%ebx,4) 95 mov [eax][4*ebx], ecx 96// CHECK: movl %ecx, (%eax,%ebx,4) 97 mov [eax][ebx*4], ecx 98// CHECK: movl %ecx, (%eax,%ebx,4) 99 mov [4*ebx][eax], ecx 100// CHECK: movl %ecx, (%eax,%ebx,4) 101 mov [ebx*4][eax], ecx 102// CHECK: movl %ecx, 12(%eax) 103 mov [eax + 12], ecx 104// CHECK: movl %ecx, 12(%eax) 105 mov [12 + eax], ecx 106// CHECK: movl %ecx, 32(%eax) 107 mov [eax + 16 + 16], ecx 108// CHECK: movl %ecx, 32(%eax) 109 mov [16 + eax + 16], ecx 110// CHECK: movl %ecx, 32(%eax) 111 mov [16 + 16 + eax], ecx 112// CHECK: movl %ecx, 12(%eax) 113 mov [eax][12], ecx 114// CHECK: movl %ecx, 12(%eax) 115 mov [12][eax], ecx 116// CHECK: movl %ecx, 32(%eax) 117 mov [eax][16 + 16], ecx 118// CHECK: movl %ecx, 32(%eax) 119 mov [eax + 16][16], ecx 120// CHECK: movl %ecx, 32(%eax) 121 mov [eax][16][16], ecx 122// CHECK: movl %ecx, 32(%eax) 123 mov [16][eax + 16], ecx 124// CHECK: movl %ecx, 32(%eax) 125 mov [16 + eax][16], ecx 126// CHECK: movl %ecx, 32(%eax) 127 mov [16][16 + eax], ecx 128// CHECK: movl %ecx, 32(%eax) 129 mov [16 + 16][eax], ecx 130// CHECK: movl %ecx, 32(%eax) 131 mov [eax][16][16], ecx 132// CHECK: movl %ecx, 32(%eax) 133 mov [16][eax][16], ecx 134// CHECK: movl %ecx, 32(%eax) 135 mov [16][16][eax], ecx 136// CHECK: movl %ecx, 16(,%ebx,4) 137 mov [4*ebx + 16], ecx 138// CHECK: movl %ecx, 16(,%ebx,4) 139 mov [ebx*4 + 16], ecx 140// CHECK: movl %ecx, 16(,%ebx,4) 141 mov [4*ebx][16], ecx 142// CHECK: movl %ecx, 16(,%ebx,4) 143 mov [ebx*4][16], ecx 144// CHECK: movl %ecx, 16(,%ebx,4) 145 mov [16 + 4*ebx], ecx 146// CHECK: movl %ecx, 16(,%ebx,4) 147 mov [16 + ebx*4], ecx 148// CHECK: movl %ecx, 16(,%ebx,4) 149 mov [16][4*ebx], ecx 150// CHECK: movl %ecx, 16(,%ebx,4) 151 mov [16][ebx*4], ecx 152// CHECK: movl %ecx, 16(%eax,%ebx,4) 153 mov [eax + 4*ebx + 16], ecx 154// CHECK: movl %ecx, 16(%eax,%ebx,4) 155 mov [eax + 16 + 4*ebx], ecx 156// CHECK: movl %ecx, 16(%eax,%ebx,4) 157 mov [4*ebx + eax + 16], ecx 158// CHECK: movl %ecx, 16(%eax,%ebx,4) 159 mov [4*ebx + 16 + eax], ecx 160// CHECK: movl %ecx, 16(%eax,%ebx,4) 161 mov [16 + eax + 4*ebx], ecx 162// CHECK: movl %ecx, 16(%eax,%ebx,4) 163 mov [16 + eax + 4*ebx], ecx 164// CHECK: movl %ecx, 16(%eax,%ebx,4) 165 mov [eax][4*ebx + 16], ecx 166// CHECK: movl %ecx, 16(%eax,%ebx,4) 167 mov [eax][16 + 4*ebx], ecx 168// CHECK: movl %ecx, 16(%eax,%ebx,4) 169 mov [4*ebx][eax + 16], ecx 170// CHECK: movl %ecx, 16(%eax,%ebx,4) 171 mov [4*ebx][16 + eax], ecx 172// CHECK: movl %ecx, 16(%eax,%ebx,4) 173 mov [16][eax + 4*ebx], ecx 174// CHECK: movl %ecx, 16(%eax,%ebx,4) 175 mov [16][eax + 4*ebx], ecx 176// CHECK: movl %ecx, 16(%eax,%ebx,4) 177 mov [eax + 4*ebx][16], ecx 178// CHECK: movl %ecx, 16(%eax,%ebx,4) 179 mov [eax + 16][4*ebx], ecx 180// CHECK: movl %ecx, 16(%eax,%ebx,4) 181 mov [4*ebx + eax][16], ecx 182// CHECK: movl %ecx, 16(%eax,%ebx,4) 183 mov [4*ebx + 16][eax], ecx 184// CHECK: movl %ecx, 16(%eax,%ebx,4) 185 mov [16 + eax][4*ebx], ecx 186// CHECK: movl %ecx, 16(%eax,%ebx,4) 187 mov [16 + eax][4*ebx], ecx 188// CHECK: movl %ecx, 16(%eax,%ebx,4) 189 mov [eax][4*ebx][16], ecx 190// CHECK: movl %ecx, 16(%eax,%ebx,4) 191 mov [eax][16][4*ebx], ecx 192// CHECK: movl %ecx, 16(%eax,%ebx,4) 193 mov [4*ebx][eax][16], ecx 194// CHECK: movl %ecx, 16(%eax,%ebx,4) 195 mov [4*ebx][16][eax], ecx 196// CHECK: movl %ecx, 16(%eax,%ebx,4) 197 mov [16][eax][4*ebx], ecx 198// CHECK: movl %ecx, 16(%eax,%ebx,4) 199 mov [16][eax][4*ebx], ecx 200// CHECK: movl %ecx, 16(%eax,%ebx,4) 201 mov [eax + ebx*4 + 16], ecx 202// CHECK: movl %ecx, 16(%eax,%ebx,4) 203 mov [eax + 16 + ebx*4], ecx 204// CHECK: movl %ecx, 16(%eax,%ebx,4) 205 mov [ebx*4 + eax + 16], ecx 206// CHECK: movl %ecx, 16(%eax,%ebx,4) 207 mov [ebx*4 + 16 + eax], ecx 208// CHECK: movl %ecx, 16(%eax,%ebx,4) 209 mov [16 + eax + ebx*4], ecx 210// CHECK: movl %ecx, 16(%eax,%ebx,4) 211 mov [16 + eax + ebx*4], ecx 212// CHECK: movl %ecx, 16(%eax,%ebx,4) 213 mov [eax][ebx*4 + 16], ecx 214// CHECK: movl %ecx, 16(%eax,%ebx,4) 215 mov [eax][16 + ebx*4], ecx 216// CHECK: movl %ecx, 16(%eax,%ebx,4) 217 mov [ebx*4][eax + 16], ecx 218// CHECK: movl %ecx, 16(%eax,%ebx,4) 219 mov [ebx*4][16 + eax], ecx 220// CHECK: movl %ecx, 16(%eax,%ebx,4) 221 mov [16][eax + ebx*4], ecx 222// CHECK: movl %ecx, 16(%eax,%ebx,4) 223 mov [16][eax + ebx*4], ecx 224// CHECK: movl %ecx, 16(%eax,%ebx,4) 225 mov [eax + ebx*4][16], ecx 226// CHECK: movl %ecx, 16(%eax,%ebx,4) 227 mov [eax + 16][ebx*4], ecx 228// CHECK: movl %ecx, 16(%eax,%ebx,4) 229 mov [ebx*4 + eax][16], ecx 230// CHECK: movl %ecx, 16(%eax,%ebx,4) 231 mov [ebx*4 + 16][eax], ecx 232// CHECK: movl %ecx, 16(%eax,%ebx,4) 233 mov [16 + eax][ebx*4], ecx 234// CHECK: movl %ecx, 16(%eax,%ebx,4) 235 mov [16 + eax][ebx*4], ecx 236// CHECK: movl %ecx, 16(%eax,%ebx,4) 237 mov [eax][ebx*4][16], ecx 238// CHECK: movl %ecx, 16(%eax,%ebx,4) 239 mov [eax][16][ebx*4], ecx 240// CHECK: movl %ecx, 16(%eax,%ebx,4) 241 mov [ebx*4][eax][16], ecx 242// CHECK: movl %ecx, 16(%eax,%ebx,4) 243 mov [ebx*4][16][eax], ecx 244// CHECK: movl %ecx, 16(%eax,%ebx,4) 245 mov [16][eax][ebx*4], ecx 246// CHECK: movl %ecx, 16(%eax,%ebx,4) 247 mov [16][eax][ebx*4], ecx 248// CHECK: movl %ecx, -16(%eax,%ebx,4) 249 mov [eax][ebx*4 - 16], ecx 250 251// CHECK: prefetchnta 12800(%esi) 252 prefetchnta [esi + (200*64)] 253// CHECK: prefetchnta 32(%esi) 254 prefetchnta [esi + (64/2)] 255// CHECK: prefetchnta 128(%esi) 256 prefetchnta [esi + (64/2*4)] 257// CHECK: prefetchnta 8(%esi) 258 prefetchnta [esi + (64/(2*4))] 259// CHECK: prefetchnta 48(%esi) 260 prefetchnta [esi + (64/(2*4)+40)] 261 262// CHECK: movl %ecx, -16(%eax,%ebx,4) 263 mov [eax][ebx*4 - 2*8], ecx 264// CHECK: movl %ecx, -16(%eax,%ebx,4) 265 mov [eax][4*ebx - 2*8], ecx 266// CHECK: movl %ecx, -16(%eax,%ebx,4) 267 mov [eax + 4*ebx - 2*8], ecx 268// CHECK: movl %ecx, -16(%eax,%ebx,4) 269 mov [12 + eax + (4*ebx) - 2*14], ecx 270// CHECK: movl %ecx, -16(%eax,%ebx,4) 271 mov [eax][ebx*4 - 2*2*2*2], ecx 272// CHECK: movl %ecx, -16(%eax,%ebx,4) 273 mov [eax][ebx*4 - (2*8)], ecx 274// CHECK: movl %ecx, -16(%eax,%ebx,4) 275 mov [eax][ebx*4 - 2 * 8 + 4 - 4], ecx 276// CHECK: movl %ecx, -16(%eax,%ebx,4) 277 mov [eax + ebx*4 - 2 * 8 + 4 - 4], ecx 278// CHECK: movl %ecx, -16(%eax,%ebx,4) 279 mov [eax + ebx*4 - 2 * ((8 + 4) - 4)], ecx 280// CHECK: movl %ecx, -16(%eax,%ebx,4) 281 mov [-2 * ((8 + 4) - 4) + eax + ebx*4], ecx 282// CHECK: movl %ecx, -16(%eax,%ebx,4) 283 mov [((-2) * ((8 + 4) - 4)) + eax + ebx*4], ecx 284// CHECK: movl %ecx, -16(%eax,%ebx,4) 285 mov [eax + ((-2) * ((8 + 4) - 4)) + ebx*4], ecx 286// CHECK: movl %ecx, 96(%eax,%ebx,4) 287 mov [eax + ((-2) * ((8 + 4) * -4)) + ebx*4], ecx 288// CHECK: movl %ecx, -8(%eax,%ebx,4) 289 mov [eax][-8][ebx*4], ecx 290// CHECK: movl %ecx, -2(%eax,%ebx,4) 291 mov [eax][16/-8][ebx*4], ecx 292// CHECK: movl %ecx, -2(%eax,%ebx,4) 293 mov [eax][(16)/-8][ebx*4], ecx 294 295// CHECK: setb %al 296 setc al 297// CHECK: sete %al 298 setz al 299// CHECK: setbe %al 300 setna al 301// CHECK: setae %al 302 setnb al 303// CHECK: setae %al 304 setnc al 305// CHECK: setle %al 306 setng al 307// CHECK: setge %al 308 setnl al 309// CHECK: setne %al 310 setnz al 311// CHECK: setp %al 312 setpe al 313// CHECK: setnp %al 314 setpo al 315// CHECK: setb %al 316 setnae al 317// CHECK: seta %al 318 setnbe al 319// CHECK: setl %al 320 setnge al 321// CHECK: setg %al 322 setnle al 323 324 ret 325