summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGadi Haber <gadi.haber@intel.com>2017-12-20 08:28:24 +0000
committerGadi Haber <gadi.haber@intel.com>2017-12-20 08:28:24 +0000
commit0ae485c58160c53ca9f7c15f10dc236d7e1df8d4 (patch)
tree0514ce862b93aa218808bc3a9c01bffd36831053
parentabed821c36726fdde97ab2d2525fe8ab21f0e0c3 (diff)
downloadbcm5719-llvm-0ae485c58160c53ca9f7c15f10dc236d7e1df8d4.tar.gz
bcm5719-llvm-0ae485c58160c53ca9f7c15f10dc236d7e1df8d4.zip
[X86][CLFLUSH]: Adding full coverage of MC encoding for the CLFLUSH isa sets.<NFC>
NFC. Adding MC regressions tests to cover the CLFLSH and CLFLUSHOPT isa sets. This patch is part of a larger task to cover MC encoding of all X86 isa sets started in revision: https://reviews.llvm.org/D39952 Reviewers: zvi, RKSimon, craig.topper, m_zuckerman Differential Revision: https://reviews.llvm.org/D41331 Change-Id: Ifa643dd52f1b7184c52bc1806038dc74b234fc65 llvm-svn: 321153
-rw-r--r--llvm/test/MC/X86/CLFLUSHOPT-32.s26
-rw-r--r--llvm/test/MC/X86/CLFLUSHOPT-64.s26
-rw-r--r--llvm/test/MC/X86/CLFSH-32.s26
-rw-r--r--llvm/test/MC/X86/CLFSH-64.s26
4 files changed, 104 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/CLFLUSHOPT-32.s b/llvm/test/MC/X86/CLFLUSHOPT-32.s
new file mode 100644
index 00000000000..e3df46ced7b
--- /dev/null
+++ b/llvm/test/MC/X86/CLFLUSHOPT-32.s
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: clflushopt -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x66,0x0f,0xae,0xbc,0x82,0x10,0xe3,0x0f,0xe3]
+clflushopt -485498096(%edx,%eax,4)
+
+// CHECK: clflushopt 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x66,0x0f,0xae,0xbc,0x82,0xf0,0x1c,0xf0,0x1c]
+clflushopt 485498096(%edx,%eax,4)
+
+// CHECK: clflushopt 485498096(%edx)
+// CHECK: encoding: [0x66,0x0f,0xae,0xba,0xf0,0x1c,0xf0,0x1c]
+clflushopt 485498096(%edx)
+
+// CHECK: clflushopt 485498096
+// CHECK: encoding: [0x66,0x0f,0xae,0x3d,0xf0,0x1c,0xf0,0x1c]
+clflushopt 485498096
+
+// CHECK: clflushopt 64(%edx,%eax)
+// CHECK: encoding: [0x66,0x0f,0xae,0x7c,0x02,0x40]
+clflushopt 64(%edx,%eax)
+
+// CHECK: clflushopt (%edx)
+// CHECK: encoding: [0x66,0x0f,0xae,0x3a]
+clflushopt (%edx)
+
diff --git a/llvm/test/MC/X86/CLFLUSHOPT-64.s b/llvm/test/MC/X86/CLFLUSHOPT-64.s
new file mode 100644
index 00000000000..cdecced6fa2
--- /dev/null
+++ b/llvm/test/MC/X86/CLFLUSHOPT-64.s
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: clflushopt 485498096
+// CHECK: encoding: [0x66,0x0f,0xae,0x3c,0x25,0xf0,0x1c,0xf0,0x1c]
+clflushopt 485498096
+
+// CHECK: clflushopt 64(%rdx)
+// CHECK: encoding: [0x66,0x0f,0xae,0x7a,0x40]
+clflushopt 64(%rdx)
+
+// CHECK: clflushopt 64(%rdx,%rax,4)
+// CHECK: encoding: [0x66,0x0f,0xae,0x7c,0x82,0x40]
+clflushopt 64(%rdx,%rax,4)
+
+// CHECK: clflushopt -64(%rdx,%rax,4)
+// CHECK: encoding: [0x66,0x0f,0xae,0x7c,0x82,0xc0]
+clflushopt -64(%rdx,%rax,4)
+
+// CHECK: clflushopt 64(%rdx,%rax)
+// CHECK: encoding: [0x66,0x0f,0xae,0x7c,0x02,0x40]
+clflushopt 64(%rdx,%rax)
+
+// CHECK: clflushopt (%rdx)
+// CHECK: encoding: [0x66,0x0f,0xae,0x3a]
+clflushopt (%rdx)
+
diff --git a/llvm/test/MC/X86/CLFSH-32.s b/llvm/test/MC/X86/CLFSH-32.s
new file mode 100644
index 00000000000..898569ec2df
--- /dev/null
+++ b/llvm/test/MC/X86/CLFSH-32.s
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: clflush -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xbc,0x82,0x10,0xe3,0x0f,0xe3]
+clflush -485498096(%edx,%eax,4)
+
+// CHECK: clflush 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xbc,0x82,0xf0,0x1c,0xf0,0x1c]
+clflush 485498096(%edx,%eax,4)
+
+// CHECK: clflush 485498096(%edx)
+// CHECK: encoding: [0x0f,0xae,0xba,0xf0,0x1c,0xf0,0x1c]
+clflush 485498096(%edx)
+
+// CHECK: clflush 485498096
+// CHECK: encoding: [0x0f,0xae,0x3d,0xf0,0x1c,0xf0,0x1c]
+clflush 485498096
+
+// CHECK: clflush 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xae,0x7c,0x02,0x40]
+clflush 64(%edx,%eax)
+
+// CHECK: clflush (%edx)
+// CHECK: encoding: [0x0f,0xae,0x3a]
+clflush (%edx)
+
diff --git a/llvm/test/MC/X86/CLFSH-64.s b/llvm/test/MC/X86/CLFSH-64.s
new file mode 100644
index 00000000000..f2c2ae51c81
--- /dev/null
+++ b/llvm/test/MC/X86/CLFSH-64.s
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: clflush 485498096
+// CHECK: encoding: [0x0f,0xae,0x3c,0x25,0xf0,0x1c,0xf0,0x1c]
+clflush 485498096
+
+// CHECK: clflush 64(%rdx)
+// CHECK: encoding: [0x0f,0xae,0x7a,0x40]
+clflush 64(%rdx)
+
+// CHECK: clflush 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x7c,0x82,0x40]
+clflush 64(%rdx,%rax,4)
+
+// CHECK: clflush -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x7c,0x82,0xc0]
+clflush -64(%rdx,%rax,4)
+
+// CHECK: clflush 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xae,0x7c,0x02,0x40]
+clflush 64(%rdx,%rax)
+
+// CHECK: clflush (%rdx)
+// CHECK: encoding: [0x0f,0xae,0x3a]
+clflush (%rdx)
+
OpenPOWER on IntegriCloud