1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s > %t 2> %t.err 2*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck < %t %s 3*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker_test: 6*9880d681SAndroid Build Coastguard Worker xor EAX, EAX 7*9880d681SAndroid Build Coastguard Worker ret 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker_main: 10*9880d681SAndroid Build Coastguard Worker// CHECK: movl $257, -4(%rsp) 11*9880d681SAndroid Build Coastguard Worker mov DWORD PTR [RSP - 4], 257 12*9880d681SAndroid Build Coastguard Worker// CHECK: movl $258, 4(%rsp) 13*9880d681SAndroid Build Coastguard Worker mov DWORD PTR [RSP + 4], 258 14*9880d681SAndroid Build Coastguard Worker// CHECK: movq $123, -16(%rsp) 15*9880d681SAndroid Build Coastguard Worker mov QWORD PTR [RSP - 16], 123 16*9880d681SAndroid Build Coastguard Worker// CHECK: movb $97, -17(%rsp) 17*9880d681SAndroid Build Coastguard Worker mov BYTE PTR [RSP - 17], 97 18*9880d681SAndroid Build Coastguard Worker// CHECK: movl -4(%rsp), %eax 19*9880d681SAndroid Build Coastguard Worker mov EAX, DWORD PTR [RSP - 4] 20*9880d681SAndroid Build Coastguard Worker// CHECK: movq (%rsp), %rax 21*9880d681SAndroid Build Coastguard Worker mov RAX, QWORD PTR [RSP] 22*9880d681SAndroid Build Coastguard Worker// CHECK: movl $-4, -4(%rsp) 23*9880d681SAndroid Build Coastguard Worker mov DWORD PTR [RSP - 4], -4 24*9880d681SAndroid Build Coastguard Worker// CHECK: movq 0, %rcx 25*9880d681SAndroid Build Coastguard Worker mov RCX, QWORD PTR [0] 26*9880d681SAndroid Build Coastguard Worker// CHECK: movl -24(%rsp,%rax,4), %eax 27*9880d681SAndroid Build Coastguard Worker mov EAX, DWORD PTR [RSP + 4*RAX - 24] 28*9880d681SAndroid Build Coastguard Worker// CHECK: movb %dil, (%rdx,%rcx) 29*9880d681SAndroid Build Coastguard Worker mov BYTE PTR [RDX + RCX], DIL 30*9880d681SAndroid Build Coastguard Worker// CHECK: movzwl 2(%rcx), %edi 31*9880d681SAndroid Build Coastguard Worker movzx EDI, WORD PTR [RCX + 2] 32*9880d681SAndroid Build Coastguard Worker// CHECK: callq _test 33*9880d681SAndroid Build Coastguard Worker call _test 34*9880d681SAndroid Build Coastguard Worker// CHECK: andw $12, %ax 35*9880d681SAndroid Build Coastguard Worker and ax, 12 36*9880d681SAndroid Build Coastguard Worker// CHECK: andw $-12, %ax 37*9880d681SAndroid Build Coastguard Worker and ax, -12 38*9880d681SAndroid Build Coastguard Worker// CHECK: andw $257, %ax 39*9880d681SAndroid Build Coastguard Worker and ax, 257 40*9880d681SAndroid Build Coastguard Worker// CHECK: andw $-257, %ax 41*9880d681SAndroid Build Coastguard Worker and ax, -257 42*9880d681SAndroid Build Coastguard Worker// CHECK: andl $12, %eax 43*9880d681SAndroid Build Coastguard Worker and eax, 12 44*9880d681SAndroid Build Coastguard Worker// CHECK: andl $-12, %eax 45*9880d681SAndroid Build Coastguard Worker and eax, -12 46*9880d681SAndroid Build Coastguard Worker// CHECK: andl $257, %eax 47*9880d681SAndroid Build Coastguard Worker and eax, 257 48*9880d681SAndroid Build Coastguard Worker// CHECK: andl $-257, %eax 49*9880d681SAndroid Build Coastguard Worker and eax, -257 50*9880d681SAndroid Build Coastguard Worker// CHECK: andq $12, %rax 51*9880d681SAndroid Build Coastguard Worker and rax, 12 52*9880d681SAndroid Build Coastguard Worker// CHECK: andq $-12, %rax 53*9880d681SAndroid Build Coastguard Worker and rax, -12 54*9880d681SAndroid Build Coastguard Worker// CHECK: andq $257, %rax 55*9880d681SAndroid Build Coastguard Worker and rax, 257 56*9880d681SAndroid Build Coastguard Worker// CHECK: andq $-257, %rax 57*9880d681SAndroid Build Coastguard Worker and rax, -257 58*9880d681SAndroid Build Coastguard Worker// CHECK: fld %st(0) 59*9880d681SAndroid Build Coastguard Worker fld ST(0) 60*9880d681SAndroid Build Coastguard Worker// CHECK: movl %fs:(%rdi), %eax 61*9880d681SAndroid Build Coastguard Worker mov EAX, DWORD PTR FS:[RDI] 62*9880d681SAndroid Build Coastguard Worker// CHECK: leal (,%rdi,4), %r8d 63*9880d681SAndroid Build Coastguard Worker lea R8D, DWORD PTR [4*RDI] 64*9880d681SAndroid Build Coastguard Worker// CHECK: movl _fnan(,%ecx,4), %ecx 65*9880d681SAndroid Build Coastguard Worker mov ECX, DWORD PTR [4*ECX + _fnan] 66*9880d681SAndroid Build Coastguard Worker// CHECK: movq %fs:320, %rax 67*9880d681SAndroid Build Coastguard Worker mov RAX, QWORD PTR FS:[320] 68*9880d681SAndroid Build Coastguard Worker// CHECK: movq %fs:320, %rax 69*9880d681SAndroid Build Coastguard Worker mov RAX, QWORD PTR FS:320 70*9880d681SAndroid Build Coastguard Worker// CHECK: movq %rax, %fs:320 71*9880d681SAndroid Build Coastguard Worker mov QWORD PTR FS:320, RAX 72*9880d681SAndroid Build Coastguard Worker// CHECK: movq %rax, %fs:20(%rbx) 73*9880d681SAndroid Build Coastguard Worker mov QWORD PTR FS:20[rbx], RAX 74*9880d681SAndroid Build Coastguard Worker// CHECK: vshufpd $1, %xmm2, %xmm1, %xmm0 75*9880d681SAndroid Build Coastguard Worker vshufpd XMM0, XMM1, XMM2, 1 76*9880d681SAndroid Build Coastguard Worker// CHECK: vpgatherdd %xmm8, (%r15,%xmm9,2), %xmm1 77*9880d681SAndroid Build Coastguard Worker vpgatherdd XMM10, XMMWORD PTR [R15 + 2*XMM9], XMM8 78*9880d681SAndroid Build Coastguard Worker// CHECK: movsd -8, %xmm5 79*9880d681SAndroid Build Coastguard Worker movsd XMM5, QWORD PTR [-8] 80*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax) 81*9880d681SAndroid Build Coastguard Worker mov [eax], ecx 82*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (,%ebx,4) 83*9880d681SAndroid Build Coastguard Worker mov [4*ebx], ecx 84*9880d681SAndroid Build Coastguard Worker // CHECK: movl %ecx, (,%ebx,4) 85*9880d681SAndroid Build Coastguard Worker mov [ebx*4], ecx 86*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 1024 87*9880d681SAndroid Build Coastguard Worker mov [1024], ecx 88*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 4132 89*9880d681SAndroid Build Coastguard Worker mov [0x1024], ecx 90*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32 91*9880d681SAndroid Build Coastguard Worker mov [16 + 16], ecx 92*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 0 93*9880d681SAndroid Build Coastguard Worker mov [16 - 16], ecx 94*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32 95*9880d681SAndroid Build Coastguard Worker mov [16][16], ecx 96*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 97*9880d681SAndroid Build Coastguard Worker mov [eax + 4*ebx], ecx 98*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 99*9880d681SAndroid Build Coastguard Worker mov [eax + ebx*4], ecx 100*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 101*9880d681SAndroid Build Coastguard Worker mov [4*ebx + eax], ecx 102*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 103*9880d681SAndroid Build Coastguard Worker mov [ebx*4 + eax], ecx 104*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 105*9880d681SAndroid Build Coastguard Worker mov [eax][4*ebx], ecx 106*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 107*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4], ecx 108*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 109*9880d681SAndroid Build Coastguard Worker mov [4*ebx][eax], ecx 110*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, (%eax,%ebx,4) 111*9880d681SAndroid Build Coastguard Worker mov [ebx*4][eax], ecx 112*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 12(%eax) 113*9880d681SAndroid Build Coastguard Worker mov [eax + 12], ecx 114*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 12(%eax) 115*9880d681SAndroid Build Coastguard Worker mov [12 + eax], ecx 116*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 117*9880d681SAndroid Build Coastguard Worker mov [eax + 16 + 16], ecx 118*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 119*9880d681SAndroid Build Coastguard Worker mov [16 + eax + 16], ecx 120*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 121*9880d681SAndroid Build Coastguard Worker mov [16 + 16 + eax], ecx 122*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 12(%eax) 123*9880d681SAndroid Build Coastguard Worker mov [eax][12], ecx 124*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 12(%eax) 125*9880d681SAndroid Build Coastguard Worker mov [12][eax], ecx 126*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 127*9880d681SAndroid Build Coastguard Worker mov [eax][16 + 16], ecx 128*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 129*9880d681SAndroid Build Coastguard Worker mov [eax + 16][16], ecx 130*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 131*9880d681SAndroid Build Coastguard Worker mov [eax][16][16], ecx 132*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 133*9880d681SAndroid Build Coastguard Worker mov [16][eax + 16], ecx 134*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 135*9880d681SAndroid Build Coastguard Worker mov [16 + eax][16], ecx 136*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 137*9880d681SAndroid Build Coastguard Worker mov [16][16 + eax], ecx 138*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 139*9880d681SAndroid Build Coastguard Worker mov [16 + 16][eax], ecx 140*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 141*9880d681SAndroid Build Coastguard Worker mov [eax][16][16], ecx 142*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 143*9880d681SAndroid Build Coastguard Worker mov [16][eax][16], ecx 144*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 32(%eax) 145*9880d681SAndroid Build Coastguard Worker mov [16][16][eax], ecx 146*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 147*9880d681SAndroid Build Coastguard Worker mov [4*ebx + 16], ecx 148*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 149*9880d681SAndroid Build Coastguard Worker mov [ebx*4 + 16], ecx 150*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 151*9880d681SAndroid Build Coastguard Worker mov [4*ebx][16], ecx 152*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 153*9880d681SAndroid Build Coastguard Worker mov [ebx*4][16], ecx 154*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 155*9880d681SAndroid Build Coastguard Worker mov [16 + 4*ebx], ecx 156*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 157*9880d681SAndroid Build Coastguard Worker mov [16 + ebx*4], ecx 158*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 159*9880d681SAndroid Build Coastguard Worker mov [16][4*ebx], ecx 160*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(,%ebx,4) 161*9880d681SAndroid Build Coastguard Worker mov [16][ebx*4], ecx 162*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 163*9880d681SAndroid Build Coastguard Worker mov [eax + 4*ebx + 16], ecx 164*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 165*9880d681SAndroid Build Coastguard Worker mov [eax + 16 + 4*ebx], ecx 166*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 167*9880d681SAndroid Build Coastguard Worker mov [4*ebx + eax + 16], ecx 168*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 169*9880d681SAndroid Build Coastguard Worker mov [4*ebx + 16 + eax], ecx 170*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 171*9880d681SAndroid Build Coastguard Worker mov [16 + eax + 4*ebx], ecx 172*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 173*9880d681SAndroid Build Coastguard Worker mov [16 + eax + 4*ebx], ecx 174*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 175*9880d681SAndroid Build Coastguard Worker mov [eax][4*ebx + 16], ecx 176*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 177*9880d681SAndroid Build Coastguard Worker mov [eax][16 + 4*ebx], ecx 178*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 179*9880d681SAndroid Build Coastguard Worker mov [4*ebx][eax + 16], ecx 180*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 181*9880d681SAndroid Build Coastguard Worker mov [4*ebx][16 + eax], ecx 182*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 183*9880d681SAndroid Build Coastguard Worker mov [16][eax + 4*ebx], ecx 184*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 185*9880d681SAndroid Build Coastguard Worker mov [16][eax + 4*ebx], ecx 186*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 187*9880d681SAndroid Build Coastguard Worker mov [eax + 4*ebx][16], ecx 188*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 189*9880d681SAndroid Build Coastguard Worker mov [eax + 16][4*ebx], ecx 190*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 191*9880d681SAndroid Build Coastguard Worker mov [4*ebx + eax][16], ecx 192*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 193*9880d681SAndroid Build Coastguard Worker mov [4*ebx + 16][eax], ecx 194*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 195*9880d681SAndroid Build Coastguard Worker mov [16 + eax][4*ebx], ecx 196*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 197*9880d681SAndroid Build Coastguard Worker mov [16 + eax][4*ebx], ecx 198*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 199*9880d681SAndroid Build Coastguard Worker mov [eax][4*ebx][16], ecx 200*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 201*9880d681SAndroid Build Coastguard Worker mov [eax][16][4*ebx], ecx 202*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 203*9880d681SAndroid Build Coastguard Worker mov [4*ebx][eax][16], ecx 204*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 205*9880d681SAndroid Build Coastguard Worker mov [4*ebx][16][eax], ecx 206*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 207*9880d681SAndroid Build Coastguard Worker mov [16][eax][4*ebx], ecx 208*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 209*9880d681SAndroid Build Coastguard Worker mov [16][eax][4*ebx], ecx 210*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 211*9880d681SAndroid Build Coastguard Worker mov [eax + ebx*4 + 16], ecx 212*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 213*9880d681SAndroid Build Coastguard Worker mov [eax + 16 + ebx*4], ecx 214*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 215*9880d681SAndroid Build Coastguard Worker mov [ebx*4 + eax + 16], ecx 216*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 217*9880d681SAndroid Build Coastguard Worker mov [ebx*4 + 16 + eax], ecx 218*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 219*9880d681SAndroid Build Coastguard Worker mov [16 + eax + ebx*4], ecx 220*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 221*9880d681SAndroid Build Coastguard Worker mov [16 + eax + ebx*4], ecx 222*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 223*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4 + 16], ecx 224*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 225*9880d681SAndroid Build Coastguard Worker mov [eax][16 + ebx*4], ecx 226*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 227*9880d681SAndroid Build Coastguard Worker mov [ebx*4][eax + 16], ecx 228*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 229*9880d681SAndroid Build Coastguard Worker mov [ebx*4][16 + eax], ecx 230*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 231*9880d681SAndroid Build Coastguard Worker mov [16][eax + ebx*4], ecx 232*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 233*9880d681SAndroid Build Coastguard Worker mov [16][eax + ebx*4], ecx 234*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 235*9880d681SAndroid Build Coastguard Worker mov [eax + ebx*4][16], ecx 236*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 237*9880d681SAndroid Build Coastguard Worker mov [eax + 16][ebx*4], ecx 238*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 239*9880d681SAndroid Build Coastguard Worker mov [ebx*4 + eax][16], ecx 240*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 241*9880d681SAndroid Build Coastguard Worker mov [ebx*4 + 16][eax], ecx 242*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 243*9880d681SAndroid Build Coastguard Worker mov [16 + eax][ebx*4], ecx 244*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 245*9880d681SAndroid Build Coastguard Worker mov [16 + eax][ebx*4], ecx 246*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 247*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4][16], ecx 248*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 249*9880d681SAndroid Build Coastguard Worker mov [eax][16][ebx*4], ecx 250*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 251*9880d681SAndroid Build Coastguard Worker mov [ebx*4][eax][16], ecx 252*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 253*9880d681SAndroid Build Coastguard Worker mov [ebx*4][16][eax], ecx 254*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 255*9880d681SAndroid Build Coastguard Worker mov [16][eax][ebx*4], ecx 256*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 16(%eax,%ebx,4) 257*9880d681SAndroid Build Coastguard Worker mov [16][eax][ebx*4], ecx 258*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 259*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4 - 16], ecx 260*9880d681SAndroid Build Coastguard Worker 261*9880d681SAndroid Build Coastguard Worker// CHECK: prefetchnta 12800(%esi) 262*9880d681SAndroid Build Coastguard Worker prefetchnta [esi + (200*64)] 263*9880d681SAndroid Build Coastguard Worker// CHECK: prefetchnta 32(%esi) 264*9880d681SAndroid Build Coastguard Worker prefetchnta [esi + (64/2)] 265*9880d681SAndroid Build Coastguard Worker// CHECK: prefetchnta 128(%esi) 266*9880d681SAndroid Build Coastguard Worker prefetchnta [esi + (64/2*4)] 267*9880d681SAndroid Build Coastguard Worker// CHECK: prefetchnta 8(%esi) 268*9880d681SAndroid Build Coastguard Worker prefetchnta [esi + (64/(2*4))] 269*9880d681SAndroid Build Coastguard Worker// CHECK: prefetchnta 48(%esi) 270*9880d681SAndroid Build Coastguard Worker prefetchnta [esi + (64/(2*4)+40)] 271*9880d681SAndroid Build Coastguard Worker 272*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 273*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4 - 2*8], ecx 274*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 275*9880d681SAndroid Build Coastguard Worker mov [eax][4*ebx - 2*8], ecx 276*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 277*9880d681SAndroid Build Coastguard Worker mov [eax + 4*ebx - 2*8], ecx 278*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 279*9880d681SAndroid Build Coastguard Worker mov [12 + eax + (4*ebx) - 2*14], ecx 280*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 281*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4 - 2*2*2*2], ecx 282*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 283*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4 - (2*8)], ecx 284*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 285*9880d681SAndroid Build Coastguard Worker mov [eax][ebx*4 - 2 * 8 + 4 - 4], ecx 286*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 287*9880d681SAndroid Build Coastguard Worker mov [eax + ebx*4 - 2 * 8 + 4 - 4], ecx 288*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 289*9880d681SAndroid Build Coastguard Worker mov [eax + ebx*4 - 2 * ((8 + 4) - 4)], ecx 290*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 291*9880d681SAndroid Build Coastguard Worker mov [-2 * ((8 + 4) - 4) + eax + ebx*4], ecx 292*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 293*9880d681SAndroid Build Coastguard Worker mov [((-2) * ((8 + 4) - 4)) + eax + ebx*4], ecx 294*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -16(%eax,%ebx,4) 295*9880d681SAndroid Build Coastguard Worker mov [eax + ((-2) * ((8 + 4) - 4)) + ebx*4], ecx 296*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, 96(%eax,%ebx,4) 297*9880d681SAndroid Build Coastguard Worker mov [eax + ((-2) * ((8 + 4) * -4)) + ebx*4], ecx 298*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -8(%eax,%ebx,4) 299*9880d681SAndroid Build Coastguard Worker mov [eax][-8][ebx*4], ecx 300*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -2(%eax,%ebx,4) 301*9880d681SAndroid Build Coastguard Worker mov [eax][16/-8][ebx*4], ecx 302*9880d681SAndroid Build Coastguard Worker// CHECK: movl %ecx, -2(%eax,%ebx,4) 303*9880d681SAndroid Build Coastguard Worker mov [eax][(16)/-8][ebx*4], ecx 304*9880d681SAndroid Build Coastguard Worker 305*9880d681SAndroid Build Coastguard Worker// CHECK: setb %al 306*9880d681SAndroid Build Coastguard Worker setc al 307*9880d681SAndroid Build Coastguard Worker// CHECK: sete %al 308*9880d681SAndroid Build Coastguard Worker setz al 309*9880d681SAndroid Build Coastguard Worker// CHECK: setbe %al 310*9880d681SAndroid Build Coastguard Worker setna al 311*9880d681SAndroid Build Coastguard Worker// CHECK: setae %al 312*9880d681SAndroid Build Coastguard Worker setnb al 313*9880d681SAndroid Build Coastguard Worker// CHECK: setae %al 314*9880d681SAndroid Build Coastguard Worker setnc al 315*9880d681SAndroid Build Coastguard Worker// CHECK: setle %al 316*9880d681SAndroid Build Coastguard Worker setng al 317*9880d681SAndroid Build Coastguard Worker// CHECK: setge %al 318*9880d681SAndroid Build Coastguard Worker setnl al 319*9880d681SAndroid Build Coastguard Worker// CHECK: setne %al 320*9880d681SAndroid Build Coastguard Worker setnz al 321*9880d681SAndroid Build Coastguard Worker// CHECK: setp %al 322*9880d681SAndroid Build Coastguard Worker setpe al 323*9880d681SAndroid Build Coastguard Worker// CHECK: setnp %al 324*9880d681SAndroid Build Coastguard Worker setpo al 325*9880d681SAndroid Build Coastguard Worker// CHECK: setb %al 326*9880d681SAndroid Build Coastguard Worker setnae al 327*9880d681SAndroid Build Coastguard Worker// CHECK: seta %al 328*9880d681SAndroid Build Coastguard Worker setnbe al 329*9880d681SAndroid Build Coastguard Worker// CHECK: setl %al 330*9880d681SAndroid Build Coastguard Worker setnge al 331*9880d681SAndroid Build Coastguard Worker// CHECK: setg %al 332*9880d681SAndroid Build Coastguard Worker setnle al 333*9880d681SAndroid Build Coastguard Worker// CHECK: jne _foo 334*9880d681SAndroid Build Coastguard Worker jnz _foo 335*9880d681SAndroid Build Coastguard Worker// CHECK: outb %al, $4 336*9880d681SAndroid Build Coastguard Worker out 4, al 337*9880d681SAndroid Build Coastguard Worker ret 338*9880d681SAndroid Build Coastguard Worker 339*9880d681SAndroid Build Coastguard Worker// CHECK: cmovbl %ebx, %eax 340*9880d681SAndroid Build Coastguard Worker cmovc eax, ebx 341*9880d681SAndroid Build Coastguard Worker// CHECK: cmovel %ebx, %eax 342*9880d681SAndroid Build Coastguard Worker cmovz eax, ebx 343*9880d681SAndroid Build Coastguard Worker// CHECK: cmovbel %ebx, %eax 344*9880d681SAndroid Build Coastguard Worker cmovna eax, ebx 345*9880d681SAndroid Build Coastguard Worker// CHECK: cmovael %ebx, %eax 346*9880d681SAndroid Build Coastguard Worker cmovnb eax, ebx 347*9880d681SAndroid Build Coastguard Worker// CHECK: cmovael %ebx, %eax 348*9880d681SAndroid Build Coastguard Worker cmovnc eax, ebx 349*9880d681SAndroid Build Coastguard Worker// CHECK: cmovlel %ebx, %eax 350*9880d681SAndroid Build Coastguard Worker cmovng eax, ebx 351*9880d681SAndroid Build Coastguard Worker// CHECK: cmovgel %ebx, %eax 352*9880d681SAndroid Build Coastguard Worker cmovnl eax, ebx 353*9880d681SAndroid Build Coastguard Worker// CHECK: cmovnel %ebx, %eax 354*9880d681SAndroid Build Coastguard Worker cmovnz eax, ebx 355*9880d681SAndroid Build Coastguard Worker// CHECK: cmovpl %ebx, %eax 356*9880d681SAndroid Build Coastguard Worker cmovpe eax, ebx 357*9880d681SAndroid Build Coastguard Worker// CHECK: cmovnpl %ebx, %eax 358*9880d681SAndroid Build Coastguard Worker cmovpo eax, ebx 359*9880d681SAndroid Build Coastguard Worker// CHECK: cmovbl %ebx, %eax 360*9880d681SAndroid Build Coastguard Worker cmovnae eax, ebx 361*9880d681SAndroid Build Coastguard Worker// CHECK: cmoval %ebx, %eax 362*9880d681SAndroid Build Coastguard Worker cmovnbe eax, ebx 363*9880d681SAndroid Build Coastguard Worker// CHECK: cmovll %ebx, %eax 364*9880d681SAndroid Build Coastguard Worker cmovnge eax, ebx 365*9880d681SAndroid Build Coastguard Worker// CHECK: cmovgl %ebx, %eax 366*9880d681SAndroid Build Coastguard Worker cmovnle eax, ebx 367*9880d681SAndroid Build Coastguard Worker 368*9880d681SAndroid Build Coastguard Worker// CHECK: shldw %cl, %bx, %dx 369*9880d681SAndroid Build Coastguard Worker// CHECK: shldw %cl, %bx, %dx 370*9880d681SAndroid Build Coastguard Worker// CHECK: shldw $1, %bx, %dx 371*9880d681SAndroid Build Coastguard Worker// CHECK: shldw %cl, %bx, (%rax) 372*9880d681SAndroid Build Coastguard Worker// CHECK: shldw %cl, %bx, (%rax) 373*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw %cl, %bx, %dx 374*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw %cl, %bx, %dx 375*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw $1, %bx, %dx 376*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw %cl, %bx, (%rax) 377*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw %cl, %bx, (%rax) 378*9880d681SAndroid Build Coastguard Worker 379*9880d681SAndroid Build Coastguard Workershld DX, BX 380*9880d681SAndroid Build Coastguard Workershld DX, BX, CL 381*9880d681SAndroid Build Coastguard Workershld DX, BX, 1 382*9880d681SAndroid Build Coastguard Workershld [RAX], BX 383*9880d681SAndroid Build Coastguard Workershld [RAX], BX, CL 384*9880d681SAndroid Build Coastguard Workershrd DX, BX 385*9880d681SAndroid Build Coastguard Workershrd DX, BX, CL 386*9880d681SAndroid Build Coastguard Workershrd DX, BX, 1 387*9880d681SAndroid Build Coastguard Workershrd [RAX], BX 388*9880d681SAndroid Build Coastguard Workershrd [RAX], BX, CL 389*9880d681SAndroid Build Coastguard Worker 390*9880d681SAndroid Build Coastguard Worker// CHECK: btl $1, (%eax) 391*9880d681SAndroid Build Coastguard Worker// CHECK: btsl $1, (%eax) 392*9880d681SAndroid Build Coastguard Worker// CHECK: btrl $1, (%eax) 393*9880d681SAndroid Build Coastguard Worker// CHECK: btcl $1, (%eax) 394*9880d681SAndroid Build Coastguard Worker bt DWORD PTR [EAX], 1 395*9880d681SAndroid Build Coastguard Worker bt DWORD PTR [EAX], 1 396*9880d681SAndroid Build Coastguard Worker bts DWORD PTR [EAX], 1 397*9880d681SAndroid Build Coastguard Worker btr DWORD PTR [EAX], 1 398*9880d681SAndroid Build Coastguard Worker btc DWORD PTR [EAX], 1 399*9880d681SAndroid Build Coastguard Worker 400*9880d681SAndroid Build Coastguard Worker//CHECK: divb %bl 401*9880d681SAndroid Build Coastguard Worker//CHECK: divw %bx 402*9880d681SAndroid Build Coastguard Worker//CHECK: divl %ecx 403*9880d681SAndroid Build Coastguard Worker//CHECK: divl 3735928559(%ebx,%ecx,8) 404*9880d681SAndroid Build Coastguard Worker//CHECK: divl 69 405*9880d681SAndroid Build Coastguard Worker//CHECK: divl 32493 406*9880d681SAndroid Build Coastguard Worker//CHECK: divl 3133065982 407*9880d681SAndroid Build Coastguard Worker//CHECK: divl 305419896 408*9880d681SAndroid Build Coastguard Worker//CHECK: idivb %bl 409*9880d681SAndroid Build Coastguard Worker//CHECK: idivw %bx 410*9880d681SAndroid Build Coastguard Worker//CHECK: idivl %ecx 411*9880d681SAndroid Build Coastguard Worker//CHECK: idivl 3735928559(%ebx,%ecx,8) 412*9880d681SAndroid Build Coastguard Worker//CHECK: idivl 69 413*9880d681SAndroid Build Coastguard Worker//CHECK: idivl 32493 414*9880d681SAndroid Build Coastguard Worker//CHECK: idivl 3133065982 415*9880d681SAndroid Build Coastguard Worker//CHECK: idivl 305419896 416*9880d681SAndroid Build Coastguard Worker div AL, BL 417*9880d681SAndroid Build Coastguard Worker div AX, BX 418*9880d681SAndroid Build Coastguard Worker div EAX, ECX 419*9880d681SAndroid Build Coastguard Worker div EAX, [ECX*8+EBX+0xdeadbeef] 420*9880d681SAndroid Build Coastguard Worker div EAX, [0x45] 421*9880d681SAndroid Build Coastguard Worker div EAX, [0x7eed] 422*9880d681SAndroid Build Coastguard Worker div EAX, [0xbabecafe] 423*9880d681SAndroid Build Coastguard Worker div EAX, [0x12345678] 424*9880d681SAndroid Build Coastguard Worker idiv AL, BL 425*9880d681SAndroid Build Coastguard Worker idiv AX, BX 426*9880d681SAndroid Build Coastguard Worker idiv EAX, ECX 427*9880d681SAndroid Build Coastguard Worker idiv EAX, [ECX*8+EBX+0xdeadbeef] 428*9880d681SAndroid Build Coastguard Worker idiv EAX, [0x45] 429*9880d681SAndroid Build Coastguard Worker idiv EAX, [0x7eed] 430*9880d681SAndroid Build Coastguard Worker idiv EAX, [0xbabecafe] 431*9880d681SAndroid Build Coastguard Worker idiv EAX, [0x12345678] 432*9880d681SAndroid Build Coastguard Worker 433*9880d681SAndroid Build Coastguard Worker 434*9880d681SAndroid Build Coastguard Worker// CHECK: inb %dx, %al 435*9880d681SAndroid Build Coastguard Worker// CHECK: inw %dx, %ax 436*9880d681SAndroid Build Coastguard Worker// CHECK: inl %dx, %eax 437*9880d681SAndroid Build Coastguard Worker// CHECK: outb %al, %dx 438*9880d681SAndroid Build Coastguard Worker// CHECK: outw %ax, %dx 439*9880d681SAndroid Build Coastguard Worker// CHECK: outl %eax, %dx 440*9880d681SAndroid Build Coastguard Worker inb DX 441*9880d681SAndroid Build Coastguard Worker inw DX 442*9880d681SAndroid Build Coastguard Worker inl DX 443*9880d681SAndroid Build Coastguard Worker outb DX 444*9880d681SAndroid Build Coastguard Worker outw DX 445*9880d681SAndroid Build Coastguard Worker outl DX 446*9880d681SAndroid Build Coastguard Worker 447*9880d681SAndroid Build Coastguard Worker// CHECK: xchgq %rcx, %rax 448*9880d681SAndroid Build Coastguard Worker// CHECK: xchgq %rcx, %rax 449*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl %ecx, %eax 450*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl %ecx, %eax 451*9880d681SAndroid Build Coastguard Worker// CHECK: xchgw %cx, %ax 452*9880d681SAndroid Build Coastguard Worker// CHECK: xchgw %cx, %ax 453*9880d681SAndroid Build Coastguard Workerxchg RAX, RCX 454*9880d681SAndroid Build Coastguard Workerxchg RCX, RAX 455*9880d681SAndroid Build Coastguard Workerxchg EAX, ECX 456*9880d681SAndroid Build Coastguard Workerxchg ECX, EAX 457*9880d681SAndroid Build Coastguard Workerxchg AX, CX 458*9880d681SAndroid Build Coastguard Workerxchg CX, AX 459*9880d681SAndroid Build Coastguard Worker 460*9880d681SAndroid Build Coastguard Worker// CHECK: xchgq %rax, (%ecx) 461*9880d681SAndroid Build Coastguard Worker// CHECK: xchgq %rax, (%ecx) 462*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl %eax, (%ecx) 463*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl %eax, (%ecx) 464*9880d681SAndroid Build Coastguard Worker// CHECK: xchgw %ax, (%ecx) 465*9880d681SAndroid Build Coastguard Worker// CHECK: xchgw %ax, (%ecx) 466*9880d681SAndroid Build Coastguard Workerxchg RAX, [ECX] 467*9880d681SAndroid Build Coastguard Workerxchg [ECX], RAX 468*9880d681SAndroid Build Coastguard Workerxchg EAX, [ECX] 469*9880d681SAndroid Build Coastguard Workerxchg [ECX], EAX 470*9880d681SAndroid Build Coastguard Workerxchg AX, [ECX] 471*9880d681SAndroid Build Coastguard Workerxchg [ECX], AX 472*9880d681SAndroid Build Coastguard Worker 473*9880d681SAndroid Build Coastguard Worker// CHECK: testq (%ecx), %rax 474*9880d681SAndroid Build Coastguard Worker// CHECK: testq (%ecx), %rax 475*9880d681SAndroid Build Coastguard Worker// CHECK: testl (%ecx), %eax 476*9880d681SAndroid Build Coastguard Worker// CHECK: testl (%ecx), %eax 477*9880d681SAndroid Build Coastguard Worker// CHECK: testw (%ecx), %ax 478*9880d681SAndroid Build Coastguard Worker// CHECK: testw (%ecx), %ax 479*9880d681SAndroid Build Coastguard Worker// CHECK: testb (%ecx), %al 480*9880d681SAndroid Build Coastguard Worker// CHECK: testb (%ecx), %al 481*9880d681SAndroid Build Coastguard Workertest RAX, [ECX] 482*9880d681SAndroid Build Coastguard Workertest [ECX], RAX 483*9880d681SAndroid Build Coastguard Workertest EAX, [ECX] 484*9880d681SAndroid Build Coastguard Workertest [ECX], EAX 485*9880d681SAndroid Build Coastguard Workertest AX, [ECX] 486*9880d681SAndroid Build Coastguard Workertest [ECX], AX 487*9880d681SAndroid Build Coastguard Workertest AL, [ECX] 488*9880d681SAndroid Build Coastguard Workertest [ECX], AL 489*9880d681SAndroid Build Coastguard Worker 490*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax 491*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax 492*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax 493*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax 494*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw (%eax) 495*9880d681SAndroid Build Coastguard Workerfnstsw 496*9880d681SAndroid Build Coastguard Workerfnstsw AX 497*9880d681SAndroid Build Coastguard Workerfnstsw EAX 498*9880d681SAndroid Build Coastguard Workerfnstsw AL 499*9880d681SAndroid Build Coastguard Workerfnstsw WORD PTR [EAX] 500*9880d681SAndroid Build Coastguard Worker 501*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1) 502*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1) 503*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1) 504*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1) 505*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1) 506*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1) 507*9880d681SAndroid Build Coastguard Workerfaddp ST(1), ST(0) 508*9880d681SAndroid Build Coastguard Workerfmulp ST(1), ST(0) 509*9880d681SAndroid Build Coastguard Workerfsubp ST(1), ST(0) 510*9880d681SAndroid Build Coastguard Workerfsubrp ST(1), ST(0) 511*9880d681SAndroid Build Coastguard Workerfdivp ST(1), ST(0) 512*9880d681SAndroid Build Coastguard Workerfdivrp ST(1), ST(0) 513*9880d681SAndroid Build Coastguard Worker 514*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1) 515*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1) 516*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1) 517*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1) 518*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1) 519*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1) 520*9880d681SAndroid Build Coastguard Workerfaddp ST(0), ST(1) 521*9880d681SAndroid Build Coastguard Workerfmulp ST(0), ST(1) 522*9880d681SAndroid Build Coastguard Workerfsubp ST(0), ST(1) 523*9880d681SAndroid Build Coastguard Workerfsubrp ST(0), ST(1) 524*9880d681SAndroid Build Coastguard Workerfdivp ST(0), ST(1) 525*9880d681SAndroid Build Coastguard Workerfdivrp ST(0), ST(1) 526*9880d681SAndroid Build Coastguard Worker 527*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1) 528*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1) 529*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1) 530*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1) 531*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1) 532*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1) 533*9880d681SAndroid Build Coastguard Workerfaddp ST(1) 534*9880d681SAndroid Build Coastguard Workerfmulp ST(1) 535*9880d681SAndroid Build Coastguard Workerfsubp ST(1) 536*9880d681SAndroid Build Coastguard Workerfsubrp ST(1) 537*9880d681SAndroid Build Coastguard Workerfdivp ST(1) 538*9880d681SAndroid Build Coastguard Workerfdivrp ST(1) 539*9880d681SAndroid Build Coastguard Worker 540*9880d681SAndroid Build Coastguard Worker 541*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1) 542*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1) 543*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1) 544*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1) 545*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1) 546*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1) 547*9880d681SAndroid Build Coastguard Workerfadd 548*9880d681SAndroid Build Coastguard Workerfmul 549*9880d681SAndroid Build Coastguard Workerfsub 550*9880d681SAndroid Build Coastguard Workerfsubr 551*9880d681SAndroid Build Coastguard Workerfdiv 552*9880d681SAndroid Build Coastguard Workerfdivr 553*9880d681SAndroid Build Coastguard Worker 554*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1) 555*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1) 556*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1) 557*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1) 558*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1) 559*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1) 560*9880d681SAndroid Build Coastguard Workerfaddp 561*9880d681SAndroid Build Coastguard Workerfmulp 562*9880d681SAndroid Build Coastguard Workerfsubp 563*9880d681SAndroid Build Coastguard Workerfsubrp 564*9880d681SAndroid Build Coastguard Workerfdivp 565*9880d681SAndroid Build Coastguard Workerfdivrp 566*9880d681SAndroid Build Coastguard Worker 567*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(1) 568*9880d681SAndroid Build Coastguard Worker// CHECK: fmul %st(1) 569*9880d681SAndroid Build Coastguard Worker// CHECK: fsub %st(1) 570*9880d681SAndroid Build Coastguard Worker// CHECK: fsubr %st(1) 571*9880d681SAndroid Build Coastguard Worker// CHECK: fdiv %st(1) 572*9880d681SAndroid Build Coastguard Worker// CHECK: fdivr %st(1) 573*9880d681SAndroid Build Coastguard Workerfadd ST(0), ST(1) 574*9880d681SAndroid Build Coastguard Workerfmul ST(0), ST(1) 575*9880d681SAndroid Build Coastguard Workerfsub ST(0), ST(1) 576*9880d681SAndroid Build Coastguard Workerfsubr ST(0), ST(1) 577*9880d681SAndroid Build Coastguard Workerfdiv ST(0), ST(1) 578*9880d681SAndroid Build Coastguard Workerfdivr ST(0), ST(1) 579*9880d681SAndroid Build Coastguard Worker 580*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(0), %st(1) 581*9880d681SAndroid Build Coastguard Worker// CHECK: fmul %st(0), %st(1) 582*9880d681SAndroid Build Coastguard Worker// CHECK: fsubr %st(0), %st(1) 583*9880d681SAndroid Build Coastguard Worker// CHECK: fsub %st(0), %st(1) 584*9880d681SAndroid Build Coastguard Worker// CHECK: fdivr %st(0), %st(1) 585*9880d681SAndroid Build Coastguard Worker// CHECK: fdiv %st(0), %st(1) 586*9880d681SAndroid Build Coastguard Workerfadd ST(1), ST(0) 587*9880d681SAndroid Build Coastguard Workerfmul ST(1), ST(0) 588*9880d681SAndroid Build Coastguard Workerfsub ST(1), ST(0) 589*9880d681SAndroid Build Coastguard Workerfsubr ST(1), ST(0) 590*9880d681SAndroid Build Coastguard Workerfdiv ST(1), ST(0) 591*9880d681SAndroid Build Coastguard Workerfdivr ST(1), ST(0) 592*9880d681SAndroid Build Coastguard Worker 593*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(1) 594*9880d681SAndroid Build Coastguard Worker// CHECK: fmul %st(1) 595*9880d681SAndroid Build Coastguard Worker// CHECK: fsub %st(1) 596*9880d681SAndroid Build Coastguard Worker// CHECK: fsubr %st(1) 597*9880d681SAndroid Build Coastguard Worker// CHECK: fdiv %st(1) 598*9880d681SAndroid Build Coastguard Worker// CHECK: fdivr %st(1) 599*9880d681SAndroid Build Coastguard Workerfadd ST(1) 600*9880d681SAndroid Build Coastguard Workerfmul ST(1) 601*9880d681SAndroid Build Coastguard Workerfsub ST(1) 602*9880d681SAndroid Build Coastguard Workerfsubr ST(1) 603*9880d681SAndroid Build Coastguard Workerfdiv ST(1) 604*9880d681SAndroid Build Coastguard Workerfdivr ST(1) 605*9880d681SAndroid Build Coastguard Worker 606*9880d681SAndroid Build Coastguard Worker 607*9880d681SAndroid Build Coastguard Worker// CHECK: fxsave64 (%rax) 608*9880d681SAndroid Build Coastguard Worker// CHECK: fxrstor64 (%rax) 609*9880d681SAndroid Build Coastguard Workerfxsave64 opaque ptr [rax] 610*9880d681SAndroid Build Coastguard Workerfxrstor64 opaque ptr [rax] 611*9880d681SAndroid Build Coastguard Worker 612*9880d681SAndroid Build Coastguard Worker.bss 613*9880d681SAndroid Build Coastguard Worker.globl _g0 614*9880d681SAndroid Build Coastguard Worker.text 615*9880d681SAndroid Build Coastguard Worker 616*9880d681SAndroid Build Coastguard Worker// CHECK: movq _g0, %rbx 617*9880d681SAndroid Build Coastguard Worker// CHECK: movq _g0+8, %rcx 618*9880d681SAndroid Build Coastguard Workermov rbx, qword ptr [_g0] 619*9880d681SAndroid Build Coastguard Workermov rcx, qword ptr [_g0 + 8] 620*9880d681SAndroid Build Coastguard Worker 621*9880d681SAndroid Build Coastguard Worker"?half@?0??bar@@YAXXZ@4NA": 622*9880d681SAndroid Build Coastguard Worker .quad 4602678819172646912 623*9880d681SAndroid Build Coastguard Worker 624*9880d681SAndroid Build Coastguard Workerfadd dword ptr "?half@?0??bar@@YAXXZ@4NA" 625*9880d681SAndroid Build Coastguard Workerfadd dword ptr "?half@?0??bar@@YAXXZ@4NA"@IMGREL 626*9880d681SAndroid Build Coastguard Worker// CHECK: fadds "?half@?0??bar@@YAXXZ@4NA" 627*9880d681SAndroid Build Coastguard Worker// CHECK: fadds "?half@?0??bar@@YAXXZ@4NA"@IMGREL 628*9880d681SAndroid Build Coastguard Worker 629*9880d681SAndroid Build Coastguard Workerinc qword ptr [rax] 630*9880d681SAndroid Build Coastguard Workerinc dword ptr [rax] 631*9880d681SAndroid Build Coastguard Workerinc word ptr [rax] 632*9880d681SAndroid Build Coastguard Workerinc byte ptr [rax] 633*9880d681SAndroid Build Coastguard Worker// CHECK: incq (%rax) 634*9880d681SAndroid Build Coastguard Worker// CHECK: incl (%rax) 635*9880d681SAndroid Build Coastguard Worker// CHECK: incw (%rax) 636*9880d681SAndroid Build Coastguard Worker// CHECK: incb (%rax) 637*9880d681SAndroid Build Coastguard Worker 638*9880d681SAndroid Build Coastguard Workerdec qword ptr [rax] 639*9880d681SAndroid Build Coastguard Workerdec dword ptr [rax] 640*9880d681SAndroid Build Coastguard Workerdec word ptr [rax] 641*9880d681SAndroid Build Coastguard Workerdec byte ptr [rax] 642*9880d681SAndroid Build Coastguard Worker// CHECK: decq (%rax) 643*9880d681SAndroid Build Coastguard Worker// CHECK: decl (%rax) 644*9880d681SAndroid Build Coastguard Worker// CHECK: decw (%rax) 645*9880d681SAndroid Build Coastguard Worker// CHECK: decb (%rax) 646*9880d681SAndroid Build Coastguard Worker 647*9880d681SAndroid Build Coastguard Workeradd qword ptr [rax], 1 648*9880d681SAndroid Build Coastguard Workeradd dword ptr [rax], 1 649*9880d681SAndroid Build Coastguard Workeradd word ptr [rax], 1 650*9880d681SAndroid Build Coastguard Workeradd byte ptr [rax], 1 651*9880d681SAndroid Build Coastguard Worker// CHECK: addq $1, (%rax) 652*9880d681SAndroid Build Coastguard Worker// CHECK: addl $1, (%rax) 653*9880d681SAndroid Build Coastguard Worker// CHECK: addw $1, (%rax) 654*9880d681SAndroid Build Coastguard Worker// CHECK: addb $1, (%rax) 655*9880d681SAndroid Build Coastguard Worker 656*9880d681SAndroid Build Coastguard Workerfstp tbyte ptr [rax] 657*9880d681SAndroid Build Coastguard Workerfstp xword ptr [rax] 658*9880d681SAndroid Build Coastguard Workerfstp qword ptr [rax] 659*9880d681SAndroid Build Coastguard Workerfstp dword ptr [rax] 660*9880d681SAndroid Build Coastguard Worker// CHECK: fstpt (%rax) 661*9880d681SAndroid Build Coastguard Worker// CHECK: fstpt (%rax) 662*9880d681SAndroid Build Coastguard Worker// CHECK: fstpl (%rax) 663*9880d681SAndroid Build Coastguard Worker// CHECK: fstps (%rax) 664*9880d681SAndroid Build Coastguard Worker 665*9880d681SAndroid Build Coastguard Workerfxsave [eax] 666*9880d681SAndroid Build Coastguard Workerfsave [eax] 667*9880d681SAndroid Build Coastguard Workerfxrstor [eax] 668*9880d681SAndroid Build Coastguard Workerfrstor [eax] 669*9880d681SAndroid Build Coastguard Worker// CHECK: fxsave (%eax) 670*9880d681SAndroid Build Coastguard Worker// CHECK: wait 671*9880d681SAndroid Build Coastguard Worker// CHECK: fnsave (%eax) 672*9880d681SAndroid Build Coastguard Worker// CHECK: fxrstor (%eax) 673*9880d681SAndroid Build Coastguard Worker// CHECK: frstor (%eax) 674*9880d681SAndroid Build Coastguard Worker 675*9880d681SAndroid Build Coastguard Worker// FIXME: Should we accept this? Masm accepts it, but gas does not. 676*9880d681SAndroid Build Coastguard Workerfxsave dword ptr [eax] 677*9880d681SAndroid Build Coastguard Workerfsave dword ptr [eax] 678*9880d681SAndroid Build Coastguard Workerfxrstor dword ptr [eax] 679*9880d681SAndroid Build Coastguard Workerfrstor dword ptr [eax] 680*9880d681SAndroid Build Coastguard Worker// CHECK: fxsave (%eax) 681*9880d681SAndroid Build Coastguard Worker// CHECK: wait 682*9880d681SAndroid Build Coastguard Worker// CHECK: fnsave (%eax) 683*9880d681SAndroid Build Coastguard Worker// CHECK: fxrstor (%eax) 684*9880d681SAndroid Build Coastguard Worker// CHECK: frstor (%eax) 685*9880d681SAndroid Build Coastguard Worker 686*9880d681SAndroid Build Coastguard Worker// CHECK: cmpnless %xmm1, %xmm0 687*9880d681SAndroid Build Coastguard Workercmpnless xmm0, xmm1 688*9880d681SAndroid Build Coastguard Worker 689*9880d681SAndroid Build Coastguard Workerinsb 690*9880d681SAndroid Build Coastguard Workerinsw 691*9880d681SAndroid Build Coastguard Workerinsd 692*9880d681SAndroid Build Coastguard Worker// CHECK: insb %dx, %es:(%rdi) 693*9880d681SAndroid Build Coastguard Worker// CHECK: insw %dx, %es:(%rdi) 694*9880d681SAndroid Build Coastguard Worker// CHECK: insl %dx, %es:(%rdi) 695*9880d681SAndroid Build Coastguard Worker 696*9880d681SAndroid Build Coastguard Workeroutsb 697*9880d681SAndroid Build Coastguard Workeroutsw 698*9880d681SAndroid Build Coastguard Workeroutsd 699*9880d681SAndroid Build Coastguard Worker// CHECK: outsb (%rsi), %dx 700*9880d681SAndroid Build Coastguard Worker// CHECK: outsw (%rsi), %dx 701*9880d681SAndroid Build Coastguard Worker// CHECK: outsl (%rsi), %dx 702*9880d681SAndroid Build Coastguard Worker 703*9880d681SAndroid Build Coastguard Workerimul bx, 123 704*9880d681SAndroid Build Coastguard Workerimul ebx, 123 705*9880d681SAndroid Build Coastguard Workerimul rbx, 123 706*9880d681SAndroid Build Coastguard Worker// CHECK: imulw $123, %bx 707*9880d681SAndroid Build Coastguard Worker// CHECK: imull $123, %ebx 708*9880d681SAndroid Build Coastguard Worker// CHECK: imulq $123, %rbx 709*9880d681SAndroid Build Coastguard Worker 710*9880d681SAndroid Build Coastguard Workerrepe cmpsb 711*9880d681SAndroid Build Coastguard Workerrepz cmpsb 712*9880d681SAndroid Build Coastguard Workerrepne cmpsb 713*9880d681SAndroid Build Coastguard Workerrepnz cmpsb 714*9880d681SAndroid Build Coastguard Worker// CHECK: rep 715*9880d681SAndroid Build Coastguard Worker// CHECK: cmpsb %es:(%rdi), (%rsi) 716*9880d681SAndroid Build Coastguard Worker// CHECK: rep 717*9880d681SAndroid Build Coastguard Worker// CHECK: cmpsb %es:(%rdi), (%rsi) 718*9880d681SAndroid Build Coastguard Worker// CHECK: repne 719*9880d681SAndroid Build Coastguard Worker// CHECK: cmpsb %es:(%rdi), (%rsi) 720*9880d681SAndroid Build Coastguard Worker// CHECK: repne 721*9880d681SAndroid Build Coastguard Worker// CHECK: cmpsb %es:(%rdi), (%rsi) 722*9880d681SAndroid Build Coastguard Worker 723*9880d681SAndroid Build Coastguard Workersal eax, 123 724*9880d681SAndroid Build Coastguard Worker// CHECK: shll $123, %eax 725*9880d681SAndroid Build Coastguard Worker 726*9880d681SAndroid Build Coastguard Workerpsignw mm0, MMWORD PTR t2 727*9880d681SAndroid Build Coastguard Worker// CHECK: psignw t2, %mm0 728*9880d681SAndroid Build Coastguard Worker 729*9880d681SAndroid Build Coastguard Workercomisd xmm0, QWORD PTR [eax] 730*9880d681SAndroid Build Coastguard Workercomiss xmm0, DWORD PTR [eax] 731*9880d681SAndroid Build Coastguard Workervcomisd xmm0, QWORD PTR [eax] 732*9880d681SAndroid Build Coastguard Workervcomiss xmm0, DWORD PTR [eax] 733*9880d681SAndroid Build Coastguard Worker 734*9880d681SAndroid Build Coastguard Worker// CHECK: comisd (%eax), %xmm0 735*9880d681SAndroid Build Coastguard Worker// CHECK: comiss (%eax), %xmm0 736*9880d681SAndroid Build Coastguard Worker// CHECK: vcomisd (%eax), %xmm0 737*9880d681SAndroid Build Coastguard Worker// CHECK: vcomiss (%eax), %xmm0 738*9880d681SAndroid Build Coastguard Worker 739*9880d681SAndroid Build Coastguard Workerfbld tbyte ptr [eax] 740*9880d681SAndroid Build Coastguard Workerfbstp tbyte ptr [eax] 741*9880d681SAndroid Build Coastguard Worker// CHECK: fbld (%eax) 742*9880d681SAndroid Build Coastguard Worker// CHECK: fbstp (%eax) 743*9880d681SAndroid Build Coastguard Worker 744*9880d681SAndroid Build Coastguard Workerfcomip st, st(2) 745*9880d681SAndroid Build Coastguard Workerfucomip st, st(2) 746*9880d681SAndroid Build Coastguard Worker// CHECK: fcompi %st(2) 747*9880d681SAndroid Build Coastguard Worker// CHECK: fucompi %st(2) 748*9880d681SAndroid Build Coastguard Worker 749*9880d681SAndroid Build Coastguard Workerloopz _foo 750*9880d681SAndroid Build Coastguard Workerloopnz _foo 751*9880d681SAndroid Build Coastguard Worker// CHECK: loope _foo 752*9880d681SAndroid Build Coastguard Worker// CHECK: loopne _foo 753*9880d681SAndroid Build Coastguard Worker 754*9880d681SAndroid Build Coastguard Workersidt fword ptr [eax] 755*9880d681SAndroid Build Coastguard Worker// CHECK: sidtq (%eax) 756*9880d681SAndroid Build Coastguard Worker 757*9880d681SAndroid Build Coastguard Workerins byte ptr [eax], dx 758*9880d681SAndroid Build Coastguard Worker// CHECK: insb %dx, %es:(%edi) 759*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location 760*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: ins byte ptr [eax], dx 761*9880d681SAndroid Build Coastguard Workerouts dx, word ptr [eax] 762*9880d681SAndroid Build Coastguard Worker// CHECK: outsw (%esi), %dx 763*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location 764*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: outs dx, word ptr [eax] 765*9880d681SAndroid Build Coastguard Workerlods dword ptr [eax] 766*9880d681SAndroid Build Coastguard Worker// CHECK: lodsl (%esi), %eax 767*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location 768*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: lods dword ptr [eax] 769*9880d681SAndroid Build Coastguard Workerstos qword ptr [eax] 770*9880d681SAndroid Build Coastguard Worker// CHECK: stosq %rax, %es:(%edi) 771*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location 772*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: stos qword ptr [eax] 773*9880d681SAndroid Build Coastguard Workerscas byte ptr [eax] 774*9880d681SAndroid Build Coastguard Worker// CHECK: scasb %es:(%edi), %al 775*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location 776*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: scas byte ptr [eax] 777*9880d681SAndroid Build Coastguard Workercmps word ptr [eax], word ptr [ebx] 778*9880d681SAndroid Build Coastguard Worker// CHECK: cmpsw %es:(%edi), (%esi) 779*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location 780*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: cmps word ptr [eax], word ptr [ebx] 781*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location 782*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: cmps word ptr [eax], word ptr [ebx] 783*9880d681SAndroid Build Coastguard Workermovs dword ptr [eax], dword ptr [ebx] 784*9880d681SAndroid Build Coastguard Worker// CHECK: movsl (%esi), %es:(%edi) 785*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location 786*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: movs dword ptr [eax], dword ptr [ebx] 787*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location 788*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NEXT: movs dword ptr [eax], dword ptr [ebx] 789*9880d681SAndroid Build Coastguard Worker 790*9880d681SAndroid Build Coastguard Workermovsd qword ptr [rax], xmm0 791*9880d681SAndroid Build Coastguard Worker// CHECK: movsd %xmm0, (%rax) 792*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR-NOT: movsd qword ptr [rax], xmm0 793*9880d681SAndroid Build Coastguard Worker 794*9880d681SAndroid Build Coastguard Workerxlat byte ptr [eax] 795*9880d681SAndroid Build Coastguard Worker// CHECK: xlatb 796*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: memory operand is only for determining the size, (R|E)BX will be used for the location 797