diff options
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/movdir-intrinsic-x86.ll | 41 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/movdir-intrinsic-x86_64.ll | 14 | ||||
-rw-r--r-- | llvm/test/MC/Disassembler/X86/x86-16.txt | 6 | ||||
-rw-r--r-- | llvm/test/MC/Disassembler/X86/x86-32.txt | 12 | ||||
-rw-r--r-- | llvm/test/MC/Disassembler/X86/x86-64.txt | 9 | ||||
-rw-r--r-- | llvm/test/MC/X86/x86-16.s | 8 | ||||
-rw-r--r-- | llvm/test/MC/X86/x86-32-coverage.s | 24 | ||||
-rw-r--r-- | llvm/test/MC/X86/x86-64.s | 24 |
8 files changed, 138 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/movdir-intrinsic-x86.ll b/llvm/test/CodeGen/X86/movdir-intrinsic-x86.ll new file mode 100644 index 00000000000..ee7239e21c4 --- /dev/null +++ b/llvm/test/CodeGen/X86/movdir-intrinsic-x86.ll @@ -0,0 +1,41 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+movdiri -mattr=+movdir64b | FileCheck %s --check-prefix=X64 +; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+movdiri -mattr=+movdir64b | FileCheck %s --check-prefix=X32 + +define void @test_movdiri(i8* %p, i32 %v) { +; X64-LABEL: test_movdiri: +; X64: # %bb.0: # %entry +; X64-NEXT: movdiri %esi, (%rdi) +; X64-NEXT: retq +; +; X32-LABEL: test_movdiri: +; X32: # %bb.0: # %entry +; X32-NEXT: movl {{[0-9]+}}(%esp), %eax +; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X32-NEXT: movdiri %eax, (%ecx) +; X32-NEXT: retl +entry: + call void @llvm.x86.directstore32(i8* %p, i32 %v) + ret void +} + +declare void @llvm.x86.directstore32(i8*, i32) + +define void @test_movdir64b(i8* %dst, i8* %src) { +; X64-LABEL: test_movdir64b: +; X64: # %bb.0: # %entry +; X64-NEXT: movdir64b (%rsi), %rdi +; X64-NEXT: retq +; +; X32-LABEL: test_movdir64b: +; X32: # %bb.0: # %entry +; X32-NEXT: movl {{[0-9]+}}(%esp), %eax +; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X32-NEXT: movdir64b (%eax), %ecx +; X32-NEXT: retl +entry: + call void @llvm.x86.movdir64b(i8* %dst, i8* %src) + ret void +} + +declare void @llvm.x86.movdir64b(i8*, i8*) diff --git a/llvm/test/CodeGen/X86/movdir-intrinsic-x86_64.ll b/llvm/test/CodeGen/X86/movdir-intrinsic-x86_64.ll new file mode 100644 index 00000000000..91d10b1abb0 --- /dev/null +++ b/llvm/test/CodeGen/X86/movdir-intrinsic-x86_64.ll @@ -0,0 +1,14 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+movdiri | FileCheck %s + +define void @test_movdiri(i8* %p, i64 %v) { +; CHECK-LABEL: test_movdiri: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movdiri %rsi, (%rdi) +; CHECK-NEXT: retq +entry: + call void @llvm.x86.directstore64(i8* %p, i64 %v) + ret void +} + +declare void @llvm.x86.directstore64(i8*, i64) diff --git a/llvm/test/MC/Disassembler/X86/x86-16.txt b/llvm/test/MC/Disassembler/X86/x86-16.txt index cf534351157..43cd09516c3 100644 --- a/llvm/test/MC/Disassembler/X86/x86-16.txt +++ b/llvm/test/MC/Disassembler/X86/x86-16.txt @@ -800,3 +800,9 @@ # CHECK: umonitor %eax 0x67 0xf3 0x0f 0xae 0xf0 + +#CHECK: movdir64b (%esi), %eax +0x67 0x66 0x0f 0x38 0xf8 0x06 + +#CHECK: movdir64b (%si), %ax +0x66 0x0f 0x38 0xf8 0x04 diff --git a/llvm/test/MC/Disassembler/X86/x86-32.txt b/llvm/test/MC/Disassembler/X86/x86-32.txt index 20a82b5a582..ddf5dff0c9e 100644 --- a/llvm/test/MC/Disassembler/X86/x86-32.txt +++ b/llvm/test/MC/Disassembler/X86/x86-32.txt @@ -859,3 +859,15 @@ # CHECK: tpause %eax 0x66 0x0f 0xae 0xf0 + +#CHECK: movdiri %eax, 64(%edx,%edi) +0x0f 0x38 0xf9 0x44 0x3a 0x40 + +#CHECK: movdir64b 485498096, %ecx +0x66 0x0f 0x38 0xf8 0x0d 0xf0 0x1c 0xf0 0x1c + +#CHECK: movdir64b (%esi), %eax +0x66 0x0f 0x38 0xf8 0x06 + +#CHECK: movdir64b (%si), %ax +0x67 0x66 0x0f 0x38 0xf8 0x04 diff --git a/llvm/test/MC/Disassembler/X86/x86-64.txt b/llvm/test/MC/Disassembler/X86/x86-64.txt index 312f5a376cb..63c60509d2d 100644 --- a/llvm/test/MC/Disassembler/X86/x86-64.txt +++ b/llvm/test/MC/Disassembler/X86/x86-64.txt @@ -555,3 +555,12 @@ # CHECK: bswapq %rbx 0x48 0x0f 0xcb + +#CHECK: movdiri %r13d, 64(%rdx,%rax,4) +0x44 0x0f 0x38 0xf9 0x6c 0x82 0x40 + +#CHECK: movdir64b 485498096, %rax +0x66 0x0f 0x38 0xf8 0x04 0x25 0xf0 0x1c 0xf0 0x1c + +#CHECK: movdir64b 485498096, %eax +0x67 0x66 0x0f 0x38 0xf8 0x04 0x25 0xf0 0x1c 0xf0 0x1c diff --git a/llvm/test/MC/X86/x86-16.s b/llvm/test/MC/X86/x86-16.s index 7326c2a9bfa..50263beaa67 100644 --- a/llvm/test/MC/X86/x86-16.s +++ b/llvm/test/MC/X86/x86-16.s @@ -981,3 +981,11 @@ umonitor %ax // CHECK: umonitor %eax // CHECK: encoding: [0x67,0xf3,0x0f,0xae,0xf0] umonitor %eax + +// CHECK: movdir64b (%esi), %eax +// CHECK: encoding: [0x67,0x66,0x0f,0x38,0xf8,0x06] +movdir64b (%esi), %eax + +// CHECK: movdir64b (%si), %ax +// CHECK: encoding: [0x66,0x0f,0x38,0xf8,0x04] +movdir64b (%si), %ax diff --git a/llvm/test/MC/X86/x86-32-coverage.s b/llvm/test/MC/X86/x86-32-coverage.s index 79dc2e506ef..a81a5dcae59 100644 --- a/llvm/test/MC/X86/x86-32-coverage.s +++ b/llvm/test/MC/X86/x86-32-coverage.s @@ -10768,3 +10768,27 @@ btcl $4, (%eax) // CHECK: tpause %eax // CHECK: encoding: [0x66,0x0f,0xae,0xf0] tpause %eax + +// CHECK: movdiri %eax, 64(%edx,%edi) +// CHECK: # encoding: [0x0f,0x38,0xf9,0x44,0x3a,0x40] + movdiri %eax, 64(%edx,%edi) + +// CHECK: movdir64b 485498096, %ecx +// CHECK: # encoding: [0x66,0x0f,0x38,0xf8,0x0d,0xf0,0x1c,0xf0,0x1c] + movdir64b 485498096, %ecx + +// CHECK: movdir64b 485498096, %cx +// CHECK: # encoding: [0x67,0x66,0x0f,0x38,0xf8,0x0d,0xf0,0x1c,0xf0,0x1c] + movdir64b 485498096, %cx + +// CHECK: movdir64b (%edx), %eax +// CHECK: # encoding: [0x66,0x0f,0x38,0xf8,0x02] + movdir64b (%edx), %eax + +// CHECK: movdir64b (%esi), %eax +// CHECK: # encoding: [0x66,0x0f,0x38,0xf8,0x06] + movdir64b (%esi), %eax + +// CHECK: movdir64b (%si), %ax +// CHECK: # encoding: [0x67,0x66,0x0f,0x38,0xf8,0x04] + movdir64b (%si), %ax diff --git a/llvm/test/MC/X86/x86-64.s b/llvm/test/MC/X86/x86-64.s index 343f7dc5057..0ccb3d5b208 100644 --- a/llvm/test/MC/X86/x86-64.s +++ b/llvm/test/MC/X86/x86-64.s @@ -1595,6 +1595,30 @@ tpause %r15 // CHECK: encoding: [0x66,0x0f,0xae,0xf3] tpause %ebx +// CHECK: movdiri %r15, 485498096 +// CHECK: # encoding: [0x4c,0x0f,0x38,0xf9,0x3c,0x25,0xf0,0x1c,0xf0,0x1c] +movdiri %r15, 485498096 + +// CHECK: movdiri %r15, (%rdx) +// CHECK: # encoding: [0x4c,0x0f,0x38,0xf9,0x3a] +movdiri %r15, (%rdx) + +// CHECK: movdiri %r15, 64(%rdx) +// CHECK: # encoding: [0x4c,0x0f,0x38,0xf9,0x7a,0x40] +movdiri %r15, 64(%rdx) + +// CHECK: movdir64b 485498096, %rax +// CHECK: # encoding: [0x66,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] +movdir64b 485498096, %rax + +// CHECK: movdir64b 485498096, %eax +// CHECK: # encoding: [0x67,0x66,0x0f,0x38,0xf8,0x04,0x25,0xf0,0x1c,0xf0,0x1c] +movdir64b 485498096, %eax + +// CHECK: movdir64b (%rdx), %r15 +// CHECK: # encoding: [0x66,0x44,0x0f,0x38,0xf8,0x3a] +movdir64b (%rdx), %r15 + // __asm __volatile( // "pushf \n\t" // "popf \n\t" |