2016-01-21 12:37:06 +01:00
|
|
|
// RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel %s > %t 2> %t.err
|
|
|
|
// RUN: FileCheck < %t %s
|
|
|
|
// RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s
|
2012-01-13 19:45:31 +01:00
|
|
|
|
2012-01-17 19:30:45 +01:00
|
|
|
_test:
|
|
|
|
xor EAX, EAX
|
|
|
|
ret
|
|
|
|
|
2017-07-25 15:05:12 +02:00
|
|
|
.set number, 8
|
|
|
|
.global _foo
|
|
|
|
|
|
|
|
.text
|
|
|
|
.global main
|
|
|
|
main:
|
|
|
|
|
|
|
|
// CHECK: leaq _foo(%rbx,%rax,8), %rdx
|
|
|
|
lea RDX, [8 * RAX + RBX + _foo]
|
|
|
|
// CHECK: leaq _foo(%rbx,%rax,8), %rdx
|
|
|
|
lea RDX, [_foo + 8 * RAX + RBX]
|
|
|
|
// CHECK: leaq 8(%rcx,%rax,8), %rdx
|
|
|
|
lea RDX, [8 + RAX * 8 + RCX]
|
|
|
|
// CHECK: leaq 8(%rcx,%rax,8), %rdx
|
|
|
|
lea RDX, [number + 8 * RAX + RCX]
|
|
|
|
// CHECK: leaq _foo(,%rax,8), %rdx
|
|
|
|
lea RDX, [_foo + RAX * 8]
|
|
|
|
// CHECK: leaq _foo(%rbx,%rax,8), %rdx
|
|
|
|
lea RDX, [_foo + RAX * 8 + RBX]
|
2017-08-24 10:46:25 +02:00
|
|
|
// CHECK: leaq -8(%rax), %rdx
|
2017-07-25 15:05:12 +02:00
|
|
|
lea RDX, [RAX - number]
|
|
|
|
// CHECK: leaq -8(%rax), %rdx
|
|
|
|
lea RDX, [RAX - 8]
|
|
|
|
// CHECK: leaq _foo(%rax), %rdx
|
|
|
|
lea RDX, [RAX + _foo]
|
|
|
|
// CHECK: leaq 8(%rax), %rdx
|
|
|
|
lea RDX, [RAX + number]
|
|
|
|
// CHECK: leaq 8(%rax), %rdx
|
|
|
|
lea RDX, [RAX + 8]
|
2017-08-24 10:46:25 +02:00
|
|
|
// CHECK: leaq _foo(%rbx,%rax,8), %rdx
|
|
|
|
lea RDX, [RAX * number + RBX + _foo]
|
|
|
|
// CHECK: leaq _foo(%rbx,%rax,8), %rdx
|
|
|
|
lea RDX, [_foo + RAX * number + RBX]
|
|
|
|
// CHECK: leaq 8(%rcx,%rax,8), %rdx
|
|
|
|
lea RDX, [number + RAX * number + RCX]
|
|
|
|
// CHECK: leaq _foo(,%rax,8), %rdx
|
|
|
|
lea RDX, [_foo + RAX * number]
|
|
|
|
// CHECK: leaq _foo(%rbx,%rax,8), %rdx
|
|
|
|
lea RDX, [number * RAX + RBX + _foo]
|
|
|
|
// CHECK: leaq _foo(%rbx,%rax,8), %rdx
|
|
|
|
lea RDX, [_foo + number * RAX + RBX]
|
|
|
|
// CHECK: leaq 8(%rcx,%rax,8), %rdx
|
|
|
|
lea RDX, [8 + number * RAX + RCX]
|
2017-07-25 15:05:12 +02:00
|
|
|
// CHECK: leaq _foo(%rax), %rdx
|
|
|
|
lea RDX, [_foo + RAX]
|
|
|
|
// CHECK: leaq 8(%rax), %rdx
|
|
|
|
lea RDX, [number + RAX]
|
|
|
|
// CHECK: leaq 8(%rax), %rdx
|
|
|
|
lea RDX, [8 + RAX]
|
|
|
|
|
2017-08-09 17:34:55 +02:00
|
|
|
// CHECK: lcalll *(%rax)
|
|
|
|
call FWORD ptr [rax]
|
|
|
|
// CHECK: lcalll *(%rax)
|
|
|
|
lcall [rax]
|
|
|
|
// CHECK: ljmpl *(%rax)
|
|
|
|
jmp FWORD ptr [rax]
|
2018-04-30 08:21:24 +02:00
|
|
|
// CHECK: ljmpq *(%rax)
|
2017-08-09 17:34:55 +02:00
|
|
|
ljmp [rax]
|
[X86][AsmParser] Ignore "short" even harder in Intel syntax ASM.
In Intel syntax, it's not uncommon to see a "short" modifier on Jcc conditional
jumps, which indicates the offset should be a "short jump" (8-bit immediate
offset from EIP, -128 to +127). This patch expands to all recognized Jcc
condition codes, and removes the inline restriction.
Clang already ignores "jmp short" in inline assembly. However, only "jmp" and a
couple of Jcc are actually checked, and only inline (i.e., not when using the
integrated assembler for asm sources). A quick search through asm-containing
libraries at hand shows a pretty broad range of Jcc conditions spelled with
"short."
GAS ignores the "short" modifier, and instead uses an encoding based on the
given immediate. MS inline seems to do the same, and I suspect MASM does, too.
NASM will yield an error if presented with an out-of-range immediate value.
Example of GCC 9.1 and MSVC v19.20, "jmp short" with offsets that do and do not
fit within 8 bits: https://gcc.godbolt.org/z/aFZmjY
Differential Revision: https://reviews.llvm.org/D61990
llvm-svn: 360954
2019-05-17 01:27:07 +02:00
|
|
|
// CHECK: jmp _foo
|
|
|
|
jmp short _foo
|
|
|
|
// CHECK: jp _foo
|
|
|
|
jpe short _foo
|
2017-08-09 17:34:55 +02:00
|
|
|
|
2012-01-13 19:45:31 +01:00
|
|
|
// CHECK: movl $257, -4(%rsp)
|
|
|
|
mov DWORD PTR [RSP - 4], 257
|
2012-01-17 20:08:07 +01:00
|
|
|
// CHECK: movl $258, 4(%rsp)
|
|
|
|
mov DWORD PTR [RSP + 4], 258
|
2012-01-13 19:45:31 +01:00
|
|
|
// CHECK: movq $123, -16(%rsp)
|
|
|
|
mov QWORD PTR [RSP - 16], 123
|
|
|
|
// CHECK: movb $97, -17(%rsp)
|
|
|
|
mov BYTE PTR [RSP - 17], 97
|
|
|
|
// CHECK: movl -4(%rsp), %eax
|
|
|
|
mov EAX, DWORD PTR [RSP - 4]
|
2012-01-17 19:00:18 +01:00
|
|
|
// CHECK: movq (%rsp), %rax
|
|
|
|
mov RAX, QWORD PTR [RSP]
|
2017-01-25 08:09:42 +01:00
|
|
|
// CHECK: movabsq $4294967289, %rax
|
|
|
|
mov RAX, 4294967289
|
2012-01-17 19:00:18 +01:00
|
|
|
// CHECK: movl $-4, -4(%rsp)
|
|
|
|
mov DWORD PTR [RSP - 4], -4
|
|
|
|
// CHECK: movq 0, %rcx
|
|
|
|
mov RCX, QWORD PTR [0]
|
|
|
|
// CHECK: movl -24(%rsp,%rax,4), %eax
|
|
|
|
mov EAX, DWORD PTR [RSP + 4*RAX - 24]
|
2012-01-17 22:25:10 +01:00
|
|
|
// CHECK: movb %dil, (%rdx,%rcx)
|
|
|
|
mov BYTE PTR [RDX + RCX], DIL
|
2012-01-17 22:48:03 +01:00
|
|
|
// CHECK: movzwl 2(%rcx), %edi
|
|
|
|
movzx EDI, WORD PTR [RCX + 2]
|
2012-01-17 19:30:45 +01:00
|
|
|
// CHECK: callq _test
|
|
|
|
call _test
|
2012-01-18 23:42:29 +01:00
|
|
|
// CHECK: andw $12, %ax
|
|
|
|
and ax, 12
|
|
|
|
// CHECK: andw $-12, %ax
|
|
|
|
and ax, -12
|
|
|
|
// CHECK: andw $257, %ax
|
|
|
|
and ax, 257
|
|
|
|
// CHECK: andw $-257, %ax
|
|
|
|
and ax, -257
|
|
|
|
// CHECK: andl $12, %eax
|
|
|
|
and eax, 12
|
|
|
|
// CHECK: andl $-12, %eax
|
|
|
|
and eax, -12
|
|
|
|
// CHECK: andl $257, %eax
|
|
|
|
and eax, 257
|
|
|
|
// CHECK: andl $-257, %eax
|
|
|
|
and eax, -257
|
|
|
|
// CHECK: andq $12, %rax
|
|
|
|
and rax, 12
|
|
|
|
// CHECK: andq $-12, %rax
|
|
|
|
and rax, -12
|
|
|
|
// CHECK: andq $257, %rax
|
|
|
|
and rax, 257
|
|
|
|
// CHECK: andq $-257, %rax
|
|
|
|
and rax, -257
|
2019-02-04 05:15:02 +01:00
|
|
|
// CHECK: fld %st(0)
|
|
|
|
fld ST(0)
|
2012-01-23 19:31:58 +01:00
|
|
|
// CHECK: movl %fs:(%rdi), %eax
|
2013-01-14 23:31:35 +01:00
|
|
|
mov EAX, DWORD PTR FS:[RDI]
|
|
|
|
// CHECK: leal (,%rdi,4), %r8d
|
|
|
|
lea R8D, DWORD PTR [4*RDI]
|
|
|
|
// CHECK: movl _fnan(,%ecx,4), %ecx
|
|
|
|
mov ECX, DWORD PTR [4*ECX + _fnan]
|
|
|
|
// CHECK: movq %fs:320, %rax
|
|
|
|
mov RAX, QWORD PTR FS:[320]
|
2013-08-27 23:56:17 +02:00
|
|
|
// CHECK: movq %fs:320, %rax
|
|
|
|
mov RAX, QWORD PTR FS:320
|
|
|
|
// CHECK: movq %rax, %fs:320
|
|
|
|
mov QWORD PTR FS:320, RAX
|
|
|
|
// CHECK: movq %rax, %fs:20(%rbx)
|
|
|
|
mov QWORD PTR FS:20[rbx], RAX
|
2013-09-27 03:44:23 +02:00
|
|
|
// CHECK: vshufpd $1, %xmm2, %xmm1, %xmm0
|
|
|
|
vshufpd XMM0, XMM1, XMM2, 1
|
2013-01-14 23:31:35 +01:00
|
|
|
// CHECK: vpgatherdd %xmm8, (%r15,%xmm9,2), %xmm1
|
2016-02-25 14:30:17 +01:00
|
|
|
vpgatherdd XMM10, XMMWORD PTR [R15 + 2*XMM9], XMM8
|
|
|
|
// CHECK: movsd -8, %xmm5
|
2013-01-14 23:31:35 +01:00
|
|
|
movsd XMM5, QWORD PTR [-8]
|
2016-11-21 16:50:56 +01:00
|
|
|
// CHECK: movsl (%rsi), %es:(%rdi)
|
|
|
|
movsd
|
2013-01-14 23:31:35 +01:00
|
|
|
// CHECK: movl %ecx, (%eax)
|
|
|
|
mov [eax], ecx
|
|
|
|
// CHECK: movl %ecx, (,%ebx,4)
|
|
|
|
mov [4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, (,%ebx,4)
|
|
|
|
mov [ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 1024
|
|
|
|
mov [1024], ecx
|
|
|
|
// CHECK: movl %ecx, 4132
|
|
|
|
mov [0x1024], ecx
|
|
|
|
// CHECK: movl %ecx, 32
|
|
|
|
mov [16 + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 0
|
|
|
|
mov [16 - 16], ecx
|
|
|
|
// CHECK: movl %ecx, 32
|
|
|
|
mov [16][16], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [eax + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [eax + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [4*ebx + eax], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [ebx*4 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [eax][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [4*ebx][eax], ecx
|
|
|
|
// CHECK: movl %ecx, (%eax,%ebx,4)
|
|
|
|
mov [ebx*4][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 12(%eax)
|
|
|
|
mov [eax + 12], ecx
|
|
|
|
// CHECK: movl %ecx, 12(%eax)
|
|
|
|
mov [12 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [eax + 16 + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16 + eax + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16 + 16 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, 12(%eax)
|
|
|
|
mov [eax][12], ecx
|
|
|
|
// CHECK: movl %ecx, 12(%eax)
|
|
|
|
mov [12][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [eax][16 + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [eax + 16][16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [eax][16][16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16][eax + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16 + eax][16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16][16 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16 + 16][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [eax][16][16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16][eax][16], ecx
|
|
|
|
// CHECK: movl %ecx, 32(%eax)
|
|
|
|
mov [16][16][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [4*ebx + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [ebx*4 + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [4*ebx][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [ebx*4][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [16 + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [16 + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [16][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(,%ebx,4)
|
|
|
|
mov [16][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + 4*ebx + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + 16 + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx + eax + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx + 16 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][4*ebx + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][16 + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx][eax + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx][16 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax + 4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + 4*ebx][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + 16][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx + eax][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx + 16][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][4*ebx][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][16][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx][eax][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [4*ebx][16][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax][4*ebx], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + ebx*4 + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + 16 + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4 + eax + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4 + 16 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4 + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][16 + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4][eax + 16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4][16 + eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + ebx*4][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax + 16][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4 + eax][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4 + 16][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16 + eax][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [eax][16][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4][eax][16], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [ebx*4][16][eax], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, 16(%eax,%ebx,4)
|
|
|
|
mov [16][eax][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4 - 16], ecx
|
2013-04-05 18:28:55 +02:00
|
|
|
|
|
|
|
// CHECK: prefetchnta 12800(%esi)
|
|
|
|
prefetchnta [esi + (200*64)]
|
|
|
|
// CHECK: prefetchnta 32(%esi)
|
|
|
|
prefetchnta [esi + (64/2)]
|
|
|
|
// CHECK: prefetchnta 128(%esi)
|
|
|
|
prefetchnta [esi + (64/2*4)]
|
|
|
|
// CHECK: prefetchnta 8(%esi)
|
|
|
|
prefetchnta [esi + (64/(2*4))]
|
|
|
|
// CHECK: prefetchnta 48(%esi)
|
|
|
|
prefetchnta [esi + (64/(2*4)+40)]
|
|
|
|
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4 - 2*8], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax][4*ebx - 2*8], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax + 4*ebx - 2*8], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [12 + eax + (4*ebx) - 2*14], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4 - 2*2*2*2], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4 - (2*8)], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax][ebx*4 - 2 * 8 + 4 - 4], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax + ebx*4 - 2 * 8 + 4 - 4], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax + ebx*4 - 2 * ((8 + 4) - 4)], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [-2 * ((8 + 4) - 4) + eax + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [((-2) * ((8 + 4) - 4)) + eax + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, -16(%eax,%ebx,4)
|
|
|
|
mov [eax + ((-2) * ((8 + 4) - 4)) + ebx*4], ecx
|
2013-04-17 23:01:45 +02:00
|
|
|
// CHECK: movl %ecx, 96(%eax,%ebx,4)
|
|
|
|
mov [eax + ((-2) * ((8 + 4) * -4)) + ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, -8(%eax,%ebx,4)
|
|
|
|
mov [eax][-8][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, -2(%eax,%ebx,4)
|
|
|
|
mov [eax][16/-8][ebx*4], ecx
|
|
|
|
// CHECK: movl %ecx, -2(%eax,%ebx,4)
|
|
|
|
mov [eax][(16)/-8][ebx*4], ecx
|
2013-04-19 01:16:12 +02:00
|
|
|
|
|
|
|
// CHECK: setb %al
|
|
|
|
setc al
|
|
|
|
// CHECK: sete %al
|
|
|
|
setz al
|
|
|
|
// CHECK: setbe %al
|
|
|
|
setna al
|
|
|
|
// CHECK: setae %al
|
|
|
|
setnb al
|
|
|
|
// CHECK: setae %al
|
|
|
|
setnc al
|
|
|
|
// CHECK: setle %al
|
|
|
|
setng al
|
|
|
|
// CHECK: setge %al
|
|
|
|
setnl al
|
|
|
|
// CHECK: setne %al
|
|
|
|
setnz al
|
|
|
|
// CHECK: setp %al
|
|
|
|
setpe al
|
|
|
|
// CHECK: setnp %al
|
|
|
|
setpo al
|
|
|
|
// CHECK: setb %al
|
|
|
|
setnae al
|
|
|
|
// CHECK: seta %al
|
|
|
|
setnbe al
|
|
|
|
// CHECK: setl %al
|
|
|
|
setnge al
|
|
|
|
// CHECK: setg %al
|
|
|
|
setnle al
|
2013-04-23 00:30:01 +02:00
|
|
|
// CHECK: jne _foo
|
|
|
|
jnz _foo
|
2013-05-10 01:48:53 +02:00
|
|
|
// CHECK: outb %al, $4
|
|
|
|
out 4, al
|
2013-04-05 18:28:55 +02:00
|
|
|
ret
|
2013-06-13 17:45:24 +02:00
|
|
|
|
|
|
|
// CHECK: cmovbl %ebx, %eax
|
|
|
|
cmovc eax, ebx
|
|
|
|
// CHECK: cmovel %ebx, %eax
|
|
|
|
cmovz eax, ebx
|
|
|
|
// CHECK: cmovbel %ebx, %eax
|
|
|
|
cmovna eax, ebx
|
|
|
|
// CHECK: cmovael %ebx, %eax
|
|
|
|
cmovnb eax, ebx
|
|
|
|
// CHECK: cmovael %ebx, %eax
|
|
|
|
cmovnc eax, ebx
|
|
|
|
// CHECK: cmovlel %ebx, %eax
|
|
|
|
cmovng eax, ebx
|
|
|
|
// CHECK: cmovgel %ebx, %eax
|
|
|
|
cmovnl eax, ebx
|
|
|
|
// CHECK: cmovnel %ebx, %eax
|
|
|
|
cmovnz eax, ebx
|
|
|
|
// CHECK: cmovpl %ebx, %eax
|
|
|
|
cmovpe eax, ebx
|
|
|
|
// CHECK: cmovnpl %ebx, %eax
|
|
|
|
cmovpo eax, ebx
|
|
|
|
// CHECK: cmovbl %ebx, %eax
|
|
|
|
cmovnae eax, ebx
|
|
|
|
// CHECK: cmoval %ebx, %eax
|
|
|
|
cmovnbe eax, ebx
|
|
|
|
// CHECK: cmovll %ebx, %eax
|
|
|
|
cmovnge eax, ebx
|
|
|
|
// CHECK: cmovgl %ebx, %eax
|
|
|
|
cmovnle eax, ebx
|
2013-07-26 07:39:33 +02:00
|
|
|
|
|
|
|
// CHECK: shldw %cl, %bx, %dx
|
|
|
|
// CHECK: shldw %cl, %bx, %dx
|
|
|
|
// CHECK: shldw $1, %bx, %dx
|
|
|
|
// CHECK: shldw %cl, %bx, (%rax)
|
|
|
|
// CHECK: shldw %cl, %bx, (%rax)
|
|
|
|
// CHECK: shrdw %cl, %bx, %dx
|
|
|
|
// CHECK: shrdw %cl, %bx, %dx
|
|
|
|
// CHECK: shrdw $1, %bx, %dx
|
|
|
|
// CHECK: shrdw %cl, %bx, (%rax)
|
|
|
|
// CHECK: shrdw %cl, %bx, (%rax)
|
|
|
|
|
|
|
|
shld DX, BX
|
|
|
|
shld DX, BX, CL
|
|
|
|
shld DX, BX, 1
|
|
|
|
shld [RAX], BX
|
|
|
|
shld [RAX], BX, CL
|
|
|
|
shrd DX, BX
|
|
|
|
shrd DX, BX, CL
|
|
|
|
shrd DX, BX, 1
|
|
|
|
shrd [RAX], BX
|
|
|
|
shrd [RAX], BX, CL
|
|
|
|
|
|
|
|
// CHECK: btl $1, (%eax)
|
|
|
|
// CHECK: btsl $1, (%eax)
|
|
|
|
// CHECK: btrl $1, (%eax)
|
|
|
|
// CHECK: btcl $1, (%eax)
|
|
|
|
bt DWORD PTR [EAX], 1
|
|
|
|
bt DWORD PTR [EAX], 1
|
|
|
|
bts DWORD PTR [EAX], 1
|
|
|
|
btr DWORD PTR [EAX], 1
|
|
|
|
btc DWORD PTR [EAX], 1
|
|
|
|
|
|
|
|
//CHECK: divb %bl
|
|
|
|
//CHECK: divw %bx
|
|
|
|
//CHECK: divl %ecx
|
|
|
|
//CHECK: divl 3735928559(%ebx,%ecx,8)
|
|
|
|
//CHECK: divl 69
|
|
|
|
//CHECK: divl 32493
|
|
|
|
//CHECK: divl 3133065982
|
|
|
|
//CHECK: divl 305419896
|
|
|
|
//CHECK: idivb %bl
|
|
|
|
//CHECK: idivw %bx
|
|
|
|
//CHECK: idivl %ecx
|
|
|
|
//CHECK: idivl 3735928559(%ebx,%ecx,8)
|
|
|
|
//CHECK: idivl 69
|
|
|
|
//CHECK: idivl 32493
|
|
|
|
//CHECK: idivl 3133065982
|
|
|
|
//CHECK: idivl 305419896
|
|
|
|
div AL, BL
|
|
|
|
div AX, BX
|
|
|
|
div EAX, ECX
|
|
|
|
div EAX, [ECX*8+EBX+0xdeadbeef]
|
|
|
|
div EAX, [0x45]
|
|
|
|
div EAX, [0x7eed]
|
|
|
|
div EAX, [0xbabecafe]
|
|
|
|
div EAX, [0x12345678]
|
|
|
|
idiv AL, BL
|
|
|
|
idiv AX, BX
|
|
|
|
idiv EAX, ECX
|
|
|
|
idiv EAX, [ECX*8+EBX+0xdeadbeef]
|
|
|
|
idiv EAX, [0x45]
|
|
|
|
idiv EAX, [0x7eed]
|
|
|
|
idiv EAX, [0xbabecafe]
|
|
|
|
idiv EAX, [0x12345678]
|
|
|
|
|
|
|
|
|
|
|
|
// CHECK: inb %dx, %al
|
|
|
|
// CHECK: inw %dx, %ax
|
|
|
|
// CHECK: inl %dx, %eax
|
|
|
|
// CHECK: outb %al, %dx
|
|
|
|
// CHECK: outw %ax, %dx
|
|
|
|
// CHECK: outl %eax, %dx
|
|
|
|
inb DX
|
|
|
|
inw DX
|
|
|
|
inl DX
|
|
|
|
outb DX
|
|
|
|
outw DX
|
|
|
|
outl DX
|
|
|
|
|
|
|
|
// CHECK: xchgq %rcx, %rax
|
|
|
|
// CHECK: xchgq %rcx, %rax
|
|
|
|
// CHECK: xchgl %ecx, %eax
|
|
|
|
// CHECK: xchgl %ecx, %eax
|
|
|
|
// CHECK: xchgw %cx, %ax
|
|
|
|
// CHECK: xchgw %cx, %ax
|
|
|
|
xchg RAX, RCX
|
|
|
|
xchg RCX, RAX
|
|
|
|
xchg EAX, ECX
|
|
|
|
xchg ECX, EAX
|
|
|
|
xchg AX, CX
|
|
|
|
xchg CX, AX
|
|
|
|
|
|
|
|
// CHECK: xchgq %rax, (%ecx)
|
|
|
|
// CHECK: xchgq %rax, (%ecx)
|
|
|
|
// CHECK: xchgl %eax, (%ecx)
|
|
|
|
// CHECK: xchgl %eax, (%ecx)
|
|
|
|
// CHECK: xchgw %ax, (%ecx)
|
|
|
|
// CHECK: xchgw %ax, (%ecx)
|
|
|
|
xchg RAX, [ECX]
|
|
|
|
xchg [ECX], RAX
|
|
|
|
xchg EAX, [ECX]
|
|
|
|
xchg [ECX], EAX
|
|
|
|
xchg AX, [ECX]
|
|
|
|
xchg [ECX], AX
|
|
|
|
|
2017-10-02 01:53:53 +02:00
|
|
|
// CHECK: testq %rax, (%ecx)
|
|
|
|
// CHECK: testq %rax, (%ecx)
|
|
|
|
// CHECK: testl %eax, (%ecx)
|
|
|
|
// CHECK: testl %eax, (%ecx)
|
|
|
|
// CHECK: testw %ax, (%ecx)
|
|
|
|
// CHECK: testw %ax, (%ecx)
|
|
|
|
// CHECK: testb %al, (%ecx)
|
|
|
|
// CHECK: testb %al, (%ecx)
|
2013-07-26 07:39:33 +02:00
|
|
|
test RAX, [ECX]
|
|
|
|
test [ECX], RAX
|
|
|
|
test EAX, [ECX]
|
|
|
|
test [ECX], EAX
|
|
|
|
test AX, [ECX]
|
|
|
|
test [ECX], AX
|
|
|
|
test AL, [ECX]
|
|
|
|
test [ECX], AL
|
|
|
|
|
|
|
|
// CHECK: fnstsw %ax
|
|
|
|
// CHECK: fnstsw %ax
|
2015-12-08 13:00:24 +01:00
|
|
|
// CHECK: fnstsw (%eax)
|
2013-07-26 07:39:33 +02:00
|
|
|
fnstsw
|
|
|
|
fnstsw AX
|
2015-12-08 13:00:24 +01:00
|
|
|
fnstsw WORD PTR [EAX]
|
2013-07-26 07:39:33 +02:00
|
|
|
|
2019-02-04 18:28:18 +01:00
|
|
|
// CHECK: faddp %st, %st(1)
|
|
|
|
// CHECK: fmulp %st, %st(1)
|
|
|
|
// CHECK: fsubrp %st, %st(1)
|
|
|
|
// CHECK: fsubp %st, %st(1)
|
|
|
|
// CHECK: fdivrp %st, %st(1)
|
|
|
|
// CHECK: fdivp %st, %st(1)
|
2019-02-04 05:15:02 +01:00
|
|
|
faddp ST(1), ST(0)
|
|
|
|
fmulp ST(1), ST(0)
|
|
|
|
fsubp ST(1), ST(0)
|
|
|
|
fsubrp ST(1), ST(0)
|
|
|
|
fdivp ST(1), ST(0)
|
|
|
|
fdivrp ST(1), ST(0)
|
2013-07-26 07:39:33 +02:00
|
|
|
|
2019-02-04 18:28:18 +01:00
|
|
|
// CHECK: faddp %st, %st(1)
|
|
|
|
// CHECK: fmulp %st, %st(1)
|
|
|
|
// CHECK: fsubrp %st, %st(1)
|
|
|
|
// CHECK: fsubp %st, %st(1)
|
|
|
|
// CHECK: fdivrp %st, %st(1)
|
|
|
|
// CHECK: fdivp %st, %st(1)
|
2019-02-04 05:15:02 +01:00
|
|
|
faddp ST(0), ST(1)
|
|
|
|
fmulp ST(0), ST(1)
|
|
|
|
fsubp ST(0), ST(1)
|
|
|
|
fsubrp ST(0), ST(1)
|
|
|
|
fdivp ST(0), ST(1)
|
|
|
|
fdivrp ST(0), ST(1)
|
2013-07-26 07:39:33 +02:00
|
|
|
|
2019-02-04 18:28:18 +01:00
|
|
|
// CHECK: faddp %st, %st(1)
|
|
|
|
// CHECK: fmulp %st, %st(1)
|
|
|
|
// CHECK: fsubrp %st, %st(1)
|
|
|
|
// CHECK: fsubp %st, %st(1)
|
|
|
|
// CHECK: fdivrp %st, %st(1)
|
|
|
|
// CHECK: fdivp %st, %st(1)
|
2013-07-26 07:39:33 +02:00
|
|
|
faddp ST(1)
|
|
|
|
fmulp ST(1)
|
|
|
|
fsubp ST(1)
|
|
|
|
fsubrp ST(1)
|
|
|
|
fdivp ST(1)
|
|
|
|
fdivrp ST(1)
|
|
|
|
|
[x86] translating "fp" (floating point) instructions from {fadd,fdiv,fmul,fsub,fsubr,fdivr} to {faddp,fdivp,fmulp,fsubp,fsubrp,fdivrp}
LLVM Missing the following instructions: fadd\fdiv\fmul\fsub\fsubr\fdivr.
GAS and MS supporting this instruction and lowering them in to a faddp\fdivp\fmulp\fsubp\fsubrp\fdivrp instructions.
Differential Revision: http://reviews.llvm.org/D14217
llvm-svn: 252908
2015-11-12 17:58:51 +01:00
|
|
|
|
2019-02-04 18:28:18 +01:00
|
|
|
// CHECK: faddp %st, %st(1)
|
|
|
|
// CHECK: fmulp %st, %st(1)
|
|
|
|
// CHECK: fsubrp %st, %st(1)
|
|
|
|
// CHECK: fsubp %st, %st(1)
|
|
|
|
// CHECK: fdivrp %st, %st(1)
|
|
|
|
// CHECK: fdivp %st, %st(1)
|
[x86] translating "fp" (floating point) instructions from {fadd,fdiv,fmul,fsub,fsubr,fdivr} to {faddp,fdivp,fmulp,fsubp,fsubrp,fdivrp}
LLVM Missing the following instructions: fadd\fdiv\fmul\fsub\fsubr\fdivr.
GAS and MS supporting this instruction and lowering them in to a faddp\fdivp\fmulp\fsubp\fsubrp\fdivrp instructions.
Differential Revision: http://reviews.llvm.org/D14217
llvm-svn: 252908
2015-11-12 17:58:51 +01:00
|
|
|
fadd
|
|
|
|
fmul
|
|
|
|
fsub
|
|
|
|
fsubr
|
|
|
|
fdiv
|
|
|
|
fdivr
|
|
|
|
|
2019-02-04 18:28:18 +01:00
|
|
|
// CHECK: faddp %st, %st(1)
|
|
|
|
// CHECK: fmulp %st, %st(1)
|
|
|
|
// CHECK: fsubrp %st, %st(1)
|
|
|
|
// CHECK: fsubp %st, %st(1)
|
|
|
|
// CHECK: fdivrp %st, %st(1)
|
|
|
|
// CHECK: fdivp %st, %st(1)
|
2013-07-26 07:39:33 +02:00
|
|
|
faddp
|
|
|
|
fmulp
|
|
|
|
fsubp
|
|
|
|
fsubrp
|
|
|
|
fdivp
|
|
|
|
fdivrp
|
|
|
|
|
2019-02-04 18:28:18 +01:00
|
|
|
// CHECK: fadd %st(1), %st
|
|
|
|
// CHECK: fmul %st(1), %st
|
|
|
|
// CHECK: fsub %st(1), %st
|
|
|
|
// CHECK: fsubr %st(1), %st
|
|
|
|
// CHECK: fdiv %st(1), %st
|
|
|
|
// CHECK: fdivr %st(1), %st
|
2019-02-04 05:15:02 +01:00
|
|
|
fadd ST(0), ST(1)
|
|
|
|
fmul ST(0), ST(1)
|
|
|
|
fsub ST(0), ST(1)
|
|
|
|
fsubr ST(0), ST(1)
|
|
|
|
fdiv ST(0), ST(1)
|
|
|
|
fdivr ST(0), ST(1)
|
2013-07-26 07:39:33 +02:00
|
|
|
|
2019-02-04 05:15:10 +01:00
|
|
|
// CHECK: fadd %st, %st(1)
|
|
|
|
// CHECK: fmul %st, %st(1)
|
|
|
|
// CHECK: fsubr %st, %st(1)
|
|
|
|
// CHECK: fsub %st, %st(1)
|
|
|
|
// CHECK: fdivr %st, %st(1)
|
|
|
|
// CHECK: fdiv %st, %st(1)
|
2019-02-04 05:15:02 +01:00
|
|
|
fadd ST(1), ST(0)
|
|
|
|
fmul ST(1), ST(0)
|
|
|
|
fsub ST(1), ST(0)
|
|
|
|
fsubr ST(1), ST(0)
|
|
|
|
fdiv ST(1), ST(0)
|
|
|
|
fdivr ST(1), ST(0)
|
2013-07-26 07:39:33 +02:00
|
|
|
|
2019-02-04 18:28:18 +01:00
|
|
|
// CHECK: fadd %st(1), %st
|
|
|
|
// CHECK: fmul %st(1), %st
|
|
|
|
// CHECK: fsub %st(1), %st
|
|
|
|
// CHECK: fsubr %st(1), %st
|
|
|
|
// CHECK: fdiv %st(1), %st
|
|
|
|
// CHECK: fdivr %st(1), %st
|
2013-07-26 07:39:33 +02:00
|
|
|
fadd ST(1)
|
|
|
|
fmul ST(1)
|
|
|
|
fsub ST(1)
|
|
|
|
fsubr ST(1)
|
|
|
|
fdiv ST(1)
|
|
|
|
fdivr ST(1)
|
2014-01-17 08:25:39 +01:00
|
|
|
|
|
|
|
|
2015-02-03 12:03:57 +01:00
|
|
|
// CHECK: fxsave64 (%rax)
|
|
|
|
// CHECK: fxrstor64 (%rax)
|
2018-05-01 06:42:00 +02:00
|
|
|
fxsave64 [rax]
|
|
|
|
fxrstor64 [rax]
|
2014-03-04 01:33:17 +01:00
|
|
|
|
|
|
|
.bss
|
|
|
|
.globl _g0
|
|
|
|
.text
|
|
|
|
|
|
|
|
// CHECK: movq _g0, %rbx
|
|
|
|
// CHECK: movq _g0+8, %rcx
|
2017-08-24 10:46:25 +02:00
|
|
|
// CHECK: movq _g0+18(%rbp), %rax
|
|
|
|
// CHECK: movq _g0(,%rsi,4), %rax
|
2014-03-04 01:33:17 +01:00
|
|
|
mov rbx, qword ptr [_g0]
|
|
|
|
mov rcx, qword ptr [_g0 + 8]
|
2017-08-24 10:46:25 +02:00
|
|
|
mov rax, QWORD PTR _g0[rbp + 1 + (2 * 5) - 3 + 1<<1]
|
|
|
|
mov rax, QWORD PTR _g0[rsi*4]
|
2014-06-19 03:25:43 +02:00
|
|
|
|
|
|
|
"?half@?0??bar@@YAXXZ@4NA":
|
|
|
|
.quad 4602678819172646912
|
|
|
|
|
2014-08-27 22:10:38 +02:00
|
|
|
fadd dword ptr "?half@?0??bar@@YAXXZ@4NA"
|
|
|
|
fadd dword ptr "?half@?0??bar@@YAXXZ@4NA"@IMGREL
|
2014-06-19 03:25:43 +02:00
|
|
|
// CHECK: fadds "?half@?0??bar@@YAXXZ@4NA"
|
2014-09-25 04:09:18 +02:00
|
|
|
// CHECK: fadds "?half@?0??bar@@YAXXZ@4NA"@IMGREL
|
2014-08-26 22:32:34 +02:00
|
|
|
|
|
|
|
inc qword ptr [rax]
|
2017-09-28 13:04:08 +02:00
|
|
|
inc long ptr [rax]
|
2014-08-26 22:32:34 +02:00
|
|
|
inc dword ptr [rax]
|
|
|
|
inc word ptr [rax]
|
|
|
|
inc byte ptr [rax]
|
|
|
|
// CHECK: incq (%rax)
|
|
|
|
// CHECK: incl (%rax)
|
2017-09-28 13:04:08 +02:00
|
|
|
// CHECK: incl (%rax)
|
2014-08-26 22:32:34 +02:00
|
|
|
// CHECK: incw (%rax)
|
|
|
|
// CHECK: incb (%rax)
|
|
|
|
|
|
|
|
dec qword ptr [rax]
|
|
|
|
dec dword ptr [rax]
|
|
|
|
dec word ptr [rax]
|
|
|
|
dec byte ptr [rax]
|
|
|
|
// CHECK: decq (%rax)
|
|
|
|
// CHECK: decl (%rax)
|
|
|
|
// CHECK: decw (%rax)
|
|
|
|
// CHECK: decb (%rax)
|
|
|
|
|
|
|
|
add qword ptr [rax], 1
|
|
|
|
add dword ptr [rax], 1
|
|
|
|
add word ptr [rax], 1
|
|
|
|
add byte ptr [rax], 1
|
|
|
|
// CHECK: addq $1, (%rax)
|
|
|
|
// CHECK: addl $1, (%rax)
|
|
|
|
// CHECK: addw $1, (%rax)
|
|
|
|
// CHECK: addb $1, (%rax)
|
|
|
|
|
2015-07-19 13:03:08 +02:00
|
|
|
fstp tbyte ptr [rax]
|
2014-08-26 22:32:34 +02:00
|
|
|
fstp xword ptr [rax]
|
|
|
|
fstp qword ptr [rax]
|
|
|
|
fstp dword ptr [rax]
|
|
|
|
// CHECK: fstpt (%rax)
|
2015-07-19 13:03:08 +02:00
|
|
|
// CHECK: fstpt (%rax)
|
2014-08-26 22:32:34 +02:00
|
|
|
// CHECK: fstpl (%rax)
|
|
|
|
// CHECK: fstps (%rax)
|
2014-08-27 22:10:38 +02:00
|
|
|
|
|
|
|
fxsave [eax]
|
|
|
|
fsave [eax]
|
|
|
|
fxrstor [eax]
|
|
|
|
frstor [eax]
|
|
|
|
// CHECK: fxsave (%eax)
|
|
|
|
// CHECK: wait
|
|
|
|
// CHECK: fnsave (%eax)
|
|
|
|
// CHECK: fxrstor (%eax)
|
|
|
|
// CHECK: frstor (%eax)
|
|
|
|
|
|
|
|
// FIXME: Should we accept this? Masm accepts it, but gas does not.
|
|
|
|
fxsave dword ptr [eax]
|
|
|
|
fsave dword ptr [eax]
|
|
|
|
fxrstor dword ptr [eax]
|
|
|
|
frstor dword ptr [eax]
|
|
|
|
// CHECK: fxsave (%eax)
|
|
|
|
// CHECK: wait
|
|
|
|
// CHECK: fnsave (%eax)
|
|
|
|
// CHECK: fxrstor (%eax)
|
|
|
|
// CHECK: frstor (%eax)
|
2015-05-29 03:03:37 +02:00
|
|
|
|
|
|
|
// CHECK: cmpnless %xmm1, %xmm0
|
|
|
|
cmpnless xmm0, xmm1
|
2015-07-23 12:23:48 +02:00
|
|
|
|
|
|
|
insb
|
|
|
|
insw
|
|
|
|
insd
|
|
|
|
// CHECK: insb %dx, %es:(%rdi)
|
|
|
|
// CHECK: insw %dx, %es:(%rdi)
|
|
|
|
// CHECK: insl %dx, %es:(%rdi)
|
|
|
|
|
|
|
|
outsb
|
|
|
|
outsw
|
|
|
|
outsd
|
|
|
|
// CHECK: outsb (%rsi), %dx
|
|
|
|
// CHECK: outsw (%rsi), %dx
|
|
|
|
// CHECK: outsl (%rsi), %dx
|
2015-08-11 12:43:04 +02:00
|
|
|
|
|
|
|
imul bx, 123
|
|
|
|
imul ebx, 123
|
|
|
|
imul rbx, 123
|
|
|
|
// CHECK: imulw $123, %bx
|
|
|
|
// CHECK: imull $123, %ebx
|
|
|
|
// CHECK: imulq $123, %rbx
|
2015-08-11 13:28:10 +02:00
|
|
|
|
|
|
|
repe cmpsb
|
|
|
|
repz cmpsb
|
|
|
|
repne cmpsb
|
|
|
|
repnz cmpsb
|
|
|
|
// CHECK: rep
|
|
|
|
// CHECK: cmpsb %es:(%rdi), (%rsi)
|
|
|
|
// CHECK: rep
|
|
|
|
// CHECK: cmpsb %es:(%rdi), (%rsi)
|
|
|
|
// CHECK: repne
|
|
|
|
// CHECK: cmpsb %es:(%rdi), (%rsi)
|
|
|
|
// CHECK: repne
|
|
|
|
// CHECK: cmpsb %es:(%rdi), (%rsi)
|
2015-08-11 14:05:06 +02:00
|
|
|
|
|
|
|
sal eax, 123
|
|
|
|
// CHECK: shll $123, %eax
|
2015-08-20 13:21:36 +02:00
|
|
|
|
2015-08-24 12:26:54 +02:00
|
|
|
psignw mm0, MMWORD PTR t2
|
|
|
|
// CHECK: psignw t2, %mm0
|
|
|
|
|
2015-08-20 13:21:36 +02:00
|
|
|
comisd xmm0, QWORD PTR [eax]
|
|
|
|
comiss xmm0, DWORD PTR [eax]
|
|
|
|
vcomisd xmm0, QWORD PTR [eax]
|
|
|
|
vcomiss xmm0, DWORD PTR [eax]
|
|
|
|
|
|
|
|
// CHECK: comisd (%eax), %xmm0
|
|
|
|
// CHECK: comiss (%eax), %xmm0
|
|
|
|
// CHECK: vcomisd (%eax), %xmm0
|
|
|
|
// CHECK: vcomiss (%eax), %xmm0
|
2015-08-20 13:51:24 +02:00
|
|
|
|
|
|
|
fbld tbyte ptr [eax]
|
|
|
|
fbstp tbyte ptr [eax]
|
|
|
|
// CHECK: fbld (%eax)
|
|
|
|
// CHECK: fbstp (%eax)
|
2015-12-03 09:55:33 +01:00
|
|
|
|
2017-09-28 13:04:08 +02:00
|
|
|
fld float ptr [rax]
|
|
|
|
fld double ptr [rax]
|
|
|
|
// CHECK: flds (%rax)
|
|
|
|
// CHECK: fldl (%rax)
|
|
|
|
|
2015-12-03 09:55:33 +01:00
|
|
|
fcomip st, st(2)
|
|
|
|
fucomip st, st(2)
|
|
|
|
// CHECK: fcompi %st(2)
|
|
|
|
// CHECK: fucompi %st(2)
|
2015-12-06 16:31:47 +01:00
|
|
|
|
|
|
|
loopz _foo
|
|
|
|
loopnz _foo
|
|
|
|
// CHECK: loope _foo
|
|
|
|
// CHECK: loopne _foo
|
2015-12-07 14:09:20 +01:00
|
|
|
|
|
|
|
sidt fword ptr [eax]
|
|
|
|
// CHECK: sidtq (%eax)
|
2016-01-19 16:37:56 +01:00
|
|
|
|
|
|
|
ins byte ptr [eax], dx
|
|
|
|
// CHECK: insb %dx, %es:(%edi)
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: ins byte ptr [eax], dx
|
2016-01-19 16:37:56 +01:00
|
|
|
outs dx, word ptr [eax]
|
|
|
|
// CHECK: outsw (%esi), %dx
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: outs dx, word ptr [eax]
|
2016-01-19 16:37:56 +01:00
|
|
|
lods dword ptr [eax]
|
|
|
|
// CHECK: lodsl (%esi), %eax
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: lods dword ptr [eax]
|
2016-01-19 16:37:56 +01:00
|
|
|
stos qword ptr [eax]
|
|
|
|
// CHECK: stosq %rax, %es:(%edi)
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: stos qword ptr [eax]
|
2016-01-19 16:37:56 +01:00
|
|
|
scas byte ptr [eax]
|
|
|
|
// CHECK: scasb %es:(%edi), %al
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: scas byte ptr [eax]
|
2016-01-19 16:37:56 +01:00
|
|
|
cmps word ptr [eax], word ptr [ebx]
|
|
|
|
// CHECK: cmpsw %es:(%edi), (%esi)
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: cmps word ptr [eax], word ptr [ebx]
|
2016-01-19 16:37:56 +01:00
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: cmps word ptr [eax], word ptr [ebx]
|
2016-01-19 16:37:56 +01:00
|
|
|
movs dword ptr [eax], dword ptr [ebx]
|
|
|
|
// CHECK: movsl (%esi), %es:(%edi)
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)DI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: movs dword ptr [eax], dword ptr [ebx]
|
2016-01-19 16:37:56 +01:00
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, ES:(R|E)SI will be used for the location
|
2016-01-21 12:37:06 +01:00
|
|
|
// CHECK-STDERR-NEXT: movs dword ptr [eax], dword ptr [ebx]
|
|
|
|
|
|
|
|
movsd qword ptr [rax], xmm0
|
|
|
|
// CHECK: movsd %xmm0, (%rax)
|
|
|
|
// CHECK-STDERR-NOT: movsd qword ptr [rax], xmm0
|
2016-01-19 17:35:38 +01:00
|
|
|
|
|
|
|
xlat byte ptr [eax]
|
|
|
|
// CHECK: xlatb
|
|
|
|
// CHECK-STDERR: memory operand is only for determining the size, (R|E)BX will be used for the location
|
2017-12-29 09:31:01 +01:00
|
|
|
|
|
|
|
// CHECK: punpcklbw
|
|
|
|
punpcklbw mm0, dword ptr [rsp]
|
|
|
|
// CHECK: punpcklwd
|
|
|
|
punpcklwd mm0, dword ptr [rsp]
|
|
|
|
// CHECK: punpckldq
|
|
|
|
punpckldq mm0, dword ptr [rsp]
|
|
|
|
|
2018-02-15 02:21:53 +01:00
|
|
|
// CHECK: lslq (%eax), %rbx
|
|
|
|
lsl rbx, word ptr [eax]
|
|
|
|
|
|
|
|
// CHECK: lsll (%eax), %ebx
|
|
|
|
lsl ebx, word ptr [eax]
|
|
|
|
|
|
|
|
// CHECK: lslw (%eax), %bx
|
|
|
|
lsl bx, word ptr [eax]
|
2018-04-30 00:55:54 +02:00
|
|
|
|
|
|
|
// CHECK: sysexitl
|
|
|
|
sysexit
|
|
|
|
// CHECK: sysexitq
|
|
|
|
sysexitq
|
|
|
|
// CHECK: sysretl
|
|
|
|
sysret
|
|
|
|
// CHECK: sysretq
|
|
|
|
sysretq
|
2018-06-22 22:20:38 +02:00
|
|
|
|
2018-06-22 23:57:24 +02:00
|
|
|
// CHECK: leaq (%rsp,%rax), %rax
|
|
|
|
lea rax, [rax+rsp]
|
|
|
|
// CHECK: leaq (%rsp,%rax), %rax
|
|
|
|
lea rax, [rsp+rax]
|
|
|
|
// CHECK: leal (%esp,%eax), %eax
|
|
|
|
lea eax, [eax+esp]
|
|
|
|
// CHECK: leal (%esp,%eax), %eax
|
|
|
|
lea eax, [esp+eax]
|
2018-06-25 19:26:51 +02:00
|
|
|
|
|
|
|
// CHECK: vpgatherdq %ymm2, (%rdi,%xmm1), %ymm0
|
|
|
|
vpgatherdq ymm0, [rdi+xmm1], ymm2
|
|
|
|
// CHECK: vpgatherdq %ymm2, (%rdi,%xmm1), %ymm0
|
|
|
|
vpgatherdq ymm0, [xmm1+rdi], ymm2
|