summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/MC/X86/FXSAVE-32.s50
-rw-r--r--llvm/test/MC/X86/FXSAVE-64.s50
-rw-r--r--llvm/test/MC/X86/FXSAVE64-64.s50
-rw-r--r--llvm/test/MC/X86/XSAVE-32.s58
-rw-r--r--llvm/test/MC/X86/XSAVE-64.s106
-rw-r--r--llvm/test/MC/X86/XSAVEC-32.s26
-rw-r--r--llvm/test/MC/X86/XSAVEC-64.s50
-rw-r--r--llvm/test/MC/X86/XSAVEOPT-32.s26
-rw-r--r--llvm/test/MC/X86/XSAVEOPT-64.s50
-rw-r--r--llvm/test/MC/X86/XSAVES-32.s50
-rw-r--r--llvm/test/MC/X86/XSAVES-64.s98
11 files changed, 614 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/FXSAVE-32.s b/llvm/test/MC/X86/FXSAVE-32.s
new file mode 100644
index 00000000000..83881c16fd1
--- /dev/null
+++ b/llvm/test/MC/X86/FXSAVE-32.s
@@ -0,0 +1,50 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: fxrstor -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0x8c,0x82,0x10,0xe3,0x0f,0xe3]
+fxrstor -485498096(%edx,%eax,4)
+
+// CHECK: fxrstor 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0x8c,0x82,0xf0,0x1c,0xf0,0x1c]
+fxrstor 485498096(%edx,%eax,4)
+
+// CHECK: fxrstor 485498096(%edx)
+// CHECK: encoding: [0x0f,0xae,0x8a,0xf0,0x1c,0xf0,0x1c]
+fxrstor 485498096(%edx)
+
+// CHECK: fxrstor 485498096
+// CHECK: encoding: [0x0f,0xae,0x0d,0xf0,0x1c,0xf0,0x1c]
+fxrstor 485498096
+
+// CHECK: fxrstor 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xae,0x4c,0x02,0x40]
+fxrstor 64(%edx,%eax)
+
+// CHECK: fxrstor (%edx)
+// CHECK: encoding: [0x0f,0xae,0x0a]
+fxrstor (%edx)
+
+// CHECK: fxsave -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0x84,0x82,0x10,0xe3,0x0f,0xe3]
+fxsave -485498096(%edx,%eax,4)
+
+// CHECK: fxsave 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0x84,0x82,0xf0,0x1c,0xf0,0x1c]
+fxsave 485498096(%edx,%eax,4)
+
+// CHECK: fxsave 485498096(%edx)
+// CHECK: encoding: [0x0f,0xae,0x82,0xf0,0x1c,0xf0,0x1c]
+fxsave 485498096(%edx)
+
+// CHECK: fxsave 485498096
+// CHECK: encoding: [0x0f,0xae,0x05,0xf0,0x1c,0xf0,0x1c]
+fxsave 485498096
+
+// CHECK: fxsave 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xae,0x44,0x02,0x40]
+fxsave 64(%edx,%eax)
+
+// CHECK: fxsave (%edx)
+// CHECK: encoding: [0x0f,0xae,0x02]
+fxsave (%edx)
+
diff --git a/llvm/test/MC/X86/FXSAVE-64.s b/llvm/test/MC/X86/FXSAVE-64.s
new file mode 100644
index 00000000000..04edc080a92
--- /dev/null
+++ b/llvm/test/MC/X86/FXSAVE-64.s
@@ -0,0 +1,50 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: fxrstor 485498096
+// CHECK: encoding: [0x0f,0xae,0x0c,0x25,0xf0,0x1c,0xf0,0x1c]
+fxrstor 485498096
+
+// CHECK: fxrstor 64(%rdx)
+// CHECK: encoding: [0x0f,0xae,0x4a,0x40]
+fxrstor 64(%rdx)
+
+// CHECK: fxrstor 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x4c,0x82,0x40]
+fxrstor 64(%rdx,%rax,4)
+
+// CHECK: fxrstor -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x4c,0x82,0xc0]
+fxrstor -64(%rdx,%rax,4)
+
+// CHECK: fxrstor 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xae,0x4c,0x02,0x40]
+fxrstor 64(%rdx,%rax)
+
+// CHECK: fxrstor (%rdx)
+// CHECK: encoding: [0x0f,0xae,0x0a]
+fxrstor (%rdx)
+
+// CHECK: fxsave 485498096
+// CHECK: encoding: [0x0f,0xae,0x04,0x25,0xf0,0x1c,0xf0,0x1c]
+fxsave 485498096
+
+// CHECK: fxsave 64(%rdx)
+// CHECK: encoding: [0x0f,0xae,0x42,0x40]
+fxsave 64(%rdx)
+
+// CHECK: fxsave 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x44,0x82,0x40]
+fxsave 64(%rdx,%rax,4)
+
+// CHECK: fxsave -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x44,0x82,0xc0]
+fxsave -64(%rdx,%rax,4)
+
+// CHECK: fxsave 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xae,0x44,0x02,0x40]
+fxsave 64(%rdx,%rax)
+
+// CHECK: fxsave (%rdx)
+// CHECK: encoding: [0x0f,0xae,0x02]
+fxsave (%rdx)
+
diff --git a/llvm/test/MC/X86/FXSAVE64-64.s b/llvm/test/MC/X86/FXSAVE64-64.s
new file mode 100644
index 00000000000..dc535c50985
--- /dev/null
+++ b/llvm/test/MC/X86/FXSAVE64-64.s
@@ -0,0 +1,50 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: fxrstor64 485498096
+// CHECK: encoding: [0x48,0x0f,0xae,0x0c,0x25,0xf0,0x1c,0xf0,0x1c]
+fxrstor64 485498096
+
+// CHECK: fxrstor64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x4a,0x40]
+fxrstor64 64(%rdx)
+
+// CHECK: fxrstor64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x4c,0x82,0x40]
+fxrstor64 64(%rdx,%rax,4)
+
+// CHECK: fxrstor64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x4c,0x82,0xc0]
+fxrstor64 -64(%rdx,%rax,4)
+
+// CHECK: fxrstor64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xae,0x4c,0x02,0x40]
+fxrstor64 64(%rdx,%rax)
+
+// CHECK: fxrstor64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x0a]
+fxrstor64 (%rdx)
+
+// CHECK: fxsave64 485498096
+// CHECK: encoding: [0x48,0x0f,0xae,0x04,0x25,0xf0,0x1c,0xf0,0x1c]
+fxsave64 485498096
+
+// CHECK: fxsave64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x42,0x40]
+fxsave64 64(%rdx)
+
+// CHECK: fxsave64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x44,0x82,0x40]
+fxsave64 64(%rdx,%rax,4)
+
+// CHECK: fxsave64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x44,0x82,0xc0]
+fxsave64 -64(%rdx,%rax,4)
+
+// CHECK: fxsave64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xae,0x44,0x02,0x40]
+fxsave64 64(%rdx,%rax)
+
+// CHECK: fxsave64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x02]
+fxsave64 (%rdx)
+
diff --git a/llvm/test/MC/X86/XSAVE-32.s b/llvm/test/MC/X86/XSAVE-32.s
new file mode 100644
index 00000000000..0b63f83d86c
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVE-32.s
@@ -0,0 +1,58 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xgetbv
+// CHECK: encoding: [0x0f,0x01,0xd0]
+xgetbv
+
+// CHECK: xrstor -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xac,0x82,0x10,0xe3,0x0f,0xe3]
+xrstor -485498096(%edx,%eax,4)
+
+// CHECK: xrstor 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xac,0x82,0xf0,0x1c,0xf0,0x1c]
+xrstor 485498096(%edx,%eax,4)
+
+// CHECK: xrstor 485498096(%edx)
+// CHECK: encoding: [0x0f,0xae,0xaa,0xf0,0x1c,0xf0,0x1c]
+xrstor 485498096(%edx)
+
+// CHECK: xrstor 485498096
+// CHECK: encoding: [0x0f,0xae,0x2d,0xf0,0x1c,0xf0,0x1c]
+xrstor 485498096
+
+// CHECK: xrstor 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xae,0x6c,0x02,0x40]
+xrstor 64(%edx,%eax)
+
+// CHECK: xrstor (%edx)
+// CHECK: encoding: [0x0f,0xae,0x2a]
+xrstor (%edx)
+
+// CHECK: xsave -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xa4,0x82,0x10,0xe3,0x0f,0xe3]
+xsave -485498096(%edx,%eax,4)
+
+// CHECK: xsave 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xa4,0x82,0xf0,0x1c,0xf0,0x1c]
+xsave 485498096(%edx,%eax,4)
+
+// CHECK: xsave 485498096(%edx)
+// CHECK: encoding: [0x0f,0xae,0xa2,0xf0,0x1c,0xf0,0x1c]
+xsave 485498096(%edx)
+
+// CHECK: xsave 485498096
+// CHECK: encoding: [0x0f,0xae,0x25,0xf0,0x1c,0xf0,0x1c]
+xsave 485498096
+
+// CHECK: xsave 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xae,0x64,0x02,0x40]
+xsave 64(%edx,%eax)
+
+// CHECK: xsave (%edx)
+// CHECK: encoding: [0x0f,0xae,0x22]
+xsave (%edx)
+
+// CHECK: xsetbv
+// CHECK: encoding: [0x0f,0x01,0xd1]
+xsetbv
+
diff --git a/llvm/test/MC/X86/XSAVE-64.s b/llvm/test/MC/X86/XSAVE-64.s
new file mode 100644
index 00000000000..0c4e35f9313
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVE-64.s
@@ -0,0 +1,106 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xgetbv
+// CHECK: encoding: [0x0f,0x01,0xd0]
+xgetbv
+
+// CHECK: xrstor 485498096
+// CHECK: encoding: [0x0f,0xae,0x2c,0x25,0xf0,0x1c,0xf0,0x1c]
+xrstor 485498096
+
+// CHECK: xrstor64 485498096
+// CHECK: encoding: [0x48,0x0f,0xae,0x2c,0x25,0xf0,0x1c,0xf0,0x1c]
+xrstor64 485498096
+
+// CHECK: xrstor64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x6a,0x40]
+xrstor64 64(%rdx)
+
+// CHECK: xrstor64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x6c,0x82,0x40]
+xrstor64 64(%rdx,%rax,4)
+
+// CHECK: xrstor64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x6c,0x82,0xc0]
+xrstor64 -64(%rdx,%rax,4)
+
+// CHECK: xrstor64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xae,0x6c,0x02,0x40]
+xrstor64 64(%rdx,%rax)
+
+// CHECK: xrstor 64(%rdx)
+// CHECK: encoding: [0x0f,0xae,0x6a,0x40]
+xrstor 64(%rdx)
+
+// CHECK: xrstor64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x2a]
+xrstor64 (%rdx)
+
+// CHECK: xrstor 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x6c,0x82,0x40]
+xrstor 64(%rdx,%rax,4)
+
+// CHECK: xrstor -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x6c,0x82,0xc0]
+xrstor -64(%rdx,%rax,4)
+
+// CHECK: xrstor 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xae,0x6c,0x02,0x40]
+xrstor 64(%rdx,%rax)
+
+// CHECK: xrstor (%rdx)
+// CHECK: encoding: [0x0f,0xae,0x2a]
+xrstor (%rdx)
+
+// CHECK: xsave 485498096
+// CHECK: encoding: [0x0f,0xae,0x24,0x25,0xf0,0x1c,0xf0,0x1c]
+xsave 485498096
+
+// CHECK: xsave64 485498096
+// CHECK: encoding: [0x48,0x0f,0xae,0x24,0x25,0xf0,0x1c,0xf0,0x1c]
+xsave64 485498096
+
+// CHECK: xsave64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x62,0x40]
+xsave64 64(%rdx)
+
+// CHECK: xsave64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x64,0x82,0x40]
+xsave64 64(%rdx,%rax,4)
+
+// CHECK: xsave64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x64,0x82,0xc0]
+xsave64 -64(%rdx,%rax,4)
+
+// CHECK: xsave64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xae,0x64,0x02,0x40]
+xsave64 64(%rdx,%rax)
+
+// CHECK: xsave 64(%rdx)
+// CHECK: encoding: [0x0f,0xae,0x62,0x40]
+xsave 64(%rdx)
+
+// CHECK: xsave64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x22]
+xsave64 (%rdx)
+
+// CHECK: xsave 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x64,0x82,0x40]
+xsave 64(%rdx,%rax,4)
+
+// CHECK: xsave -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x64,0x82,0xc0]
+xsave -64(%rdx,%rax,4)
+
+// CHECK: xsave 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xae,0x64,0x02,0x40]
+xsave 64(%rdx,%rax)
+
+// CHECK: xsave (%rdx)
+// CHECK: encoding: [0x0f,0xae,0x22]
+xsave (%rdx)
+
+// CHECK: xsetbv
+// CHECK: encoding: [0x0f,0x01,0xd1]
+xsetbv
+
diff --git a/llvm/test/MC/X86/XSAVEC-32.s b/llvm/test/MC/X86/XSAVEC-32.s
new file mode 100644
index 00000000000..cb85359fed7
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVEC-32.s
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xsavec -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xc7,0xa4,0x82,0x10,0xe3,0x0f,0xe3]
+xsavec -485498096(%edx,%eax,4)
+
+// CHECK: xsavec 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xc7,0xa4,0x82,0xf0,0x1c,0xf0,0x1c]
+xsavec 485498096(%edx,%eax,4)
+
+// CHECK: xsavec 485498096(%edx)
+// CHECK: encoding: [0x0f,0xc7,0xa2,0xf0,0x1c,0xf0,0x1c]
+xsavec 485498096(%edx)
+
+// CHECK: xsavec 485498096
+// CHECK: encoding: [0x0f,0xc7,0x25,0xf0,0x1c,0xf0,0x1c]
+xsavec 485498096
+
+// CHECK: xsavec 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xc7,0x64,0x02,0x40]
+xsavec 64(%edx,%eax)
+
+// CHECK: xsavec (%edx)
+// CHECK: encoding: [0x0f,0xc7,0x22]
+xsavec (%edx)
+
diff --git a/llvm/test/MC/X86/XSAVEC-64.s b/llvm/test/MC/X86/XSAVEC-64.s
new file mode 100644
index 00000000000..2a55bdabf4b
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVEC-64.s
@@ -0,0 +1,50 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xsavec 485498096
+// CHECK: encoding: [0x0f,0xc7,0x24,0x25,0xf0,0x1c,0xf0,0x1c]
+xsavec 485498096
+
+// CHECK: xsavec64 485498096
+// CHECK: encoding: [0x48,0x0f,0xc7,0x24,0x25,0xf0,0x1c,0xf0,0x1c]
+xsavec64 485498096
+
+// CHECK: xsavec64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x62,0x40]
+xsavec64 64(%rdx)
+
+// CHECK: xsavec64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x64,0x82,0x40]
+xsavec64 64(%rdx,%rax,4)
+
+// CHECK: xsavec64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x64,0x82,0xc0]
+xsavec64 -64(%rdx,%rax,4)
+
+// CHECK: xsavec64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x64,0x02,0x40]
+xsavec64 64(%rdx,%rax)
+
+// CHECK: xsavec 64(%rdx)
+// CHECK: encoding: [0x0f,0xc7,0x62,0x40]
+xsavec 64(%rdx)
+
+// CHECK: xsavec64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x22]
+xsavec64 (%rdx)
+
+// CHECK: xsavec 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xc7,0x64,0x82,0x40]
+xsavec 64(%rdx,%rax,4)
+
+// CHECK: xsavec -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xc7,0x64,0x82,0xc0]
+xsavec -64(%rdx,%rax,4)
+
+// CHECK: xsavec 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xc7,0x64,0x02,0x40]
+xsavec 64(%rdx,%rax)
+
+// CHECK: xsavec (%rdx)
+// CHECK: encoding: [0x0f,0xc7,0x22]
+xsavec (%rdx)
+
diff --git a/llvm/test/MC/X86/XSAVEOPT-32.s b/llvm/test/MC/X86/XSAVEOPT-32.s
new file mode 100644
index 00000000000..5c5c10868c0
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVEOPT-32.s
@@ -0,0 +1,26 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xsaveopt -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xb4,0x82,0x10,0xe3,0x0f,0xe3]
+xsaveopt -485498096(%edx,%eax,4)
+
+// CHECK: xsaveopt 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xae,0xb4,0x82,0xf0,0x1c,0xf0,0x1c]
+xsaveopt 485498096(%edx,%eax,4)
+
+// CHECK: xsaveopt 485498096(%edx)
+// CHECK: encoding: [0x0f,0xae,0xb2,0xf0,0x1c,0xf0,0x1c]
+xsaveopt 485498096(%edx)
+
+// CHECK: xsaveopt 485498096
+// CHECK: encoding: [0x0f,0xae,0x35,0xf0,0x1c,0xf0,0x1c]
+xsaveopt 485498096
+
+// CHECK: xsaveopt 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xae,0x74,0x02,0x40]
+xsaveopt 64(%edx,%eax)
+
+// CHECK: xsaveopt (%edx)
+// CHECK: encoding: [0x0f,0xae,0x32]
+xsaveopt (%edx)
+
diff --git a/llvm/test/MC/X86/XSAVEOPT-64.s b/llvm/test/MC/X86/XSAVEOPT-64.s
new file mode 100644
index 00000000000..cfa208862c1
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVEOPT-64.s
@@ -0,0 +1,50 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xsaveopt 485498096
+// CHECK: encoding: [0x0f,0xae,0x34,0x25,0xf0,0x1c,0xf0,0x1c]
+xsaveopt 485498096
+
+// CHECK: xsaveopt64 485498096
+// CHECK: encoding: [0x48,0x0f,0xae,0x34,0x25,0xf0,0x1c,0xf0,0x1c]
+xsaveopt64 485498096
+
+// CHECK: xsaveopt64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x72,0x40]
+xsaveopt64 64(%rdx)
+
+// CHECK: xsaveopt64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x74,0x82,0x40]
+xsaveopt64 64(%rdx,%rax,4)
+
+// CHECK: xsaveopt64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xae,0x74,0x82,0xc0]
+xsaveopt64 -64(%rdx,%rax,4)
+
+// CHECK: xsaveopt64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xae,0x74,0x02,0x40]
+xsaveopt64 64(%rdx,%rax)
+
+// CHECK: xsaveopt 64(%rdx)
+// CHECK: encoding: [0x0f,0xae,0x72,0x40]
+xsaveopt 64(%rdx)
+
+// CHECK: xsaveopt64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xae,0x32]
+xsaveopt64 (%rdx)
+
+// CHECK: xsaveopt 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x74,0x82,0x40]
+xsaveopt 64(%rdx,%rax,4)
+
+// CHECK: xsaveopt -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xae,0x74,0x82,0xc0]
+xsaveopt -64(%rdx,%rax,4)
+
+// CHECK: xsaveopt 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xae,0x74,0x02,0x40]
+xsaveopt 64(%rdx,%rax)
+
+// CHECK: xsaveopt (%rdx)
+// CHECK: encoding: [0x0f,0xae,0x32]
+xsaveopt (%rdx)
+
diff --git a/llvm/test/MC/X86/XSAVES-32.s b/llvm/test/MC/X86/XSAVES-32.s
new file mode 100644
index 00000000000..6380abdfa49
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVES-32.s
@@ -0,0 +1,50 @@
+// RUN: llvm-mc -triple i386-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xrstors -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xc7,0x9c,0x82,0x10,0xe3,0x0f,0xe3]
+xrstors -485498096(%edx,%eax,4)
+
+// CHECK: xrstors 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xc7,0x9c,0x82,0xf0,0x1c,0xf0,0x1c]
+xrstors 485498096(%edx,%eax,4)
+
+// CHECK: xrstors 485498096(%edx)
+// CHECK: encoding: [0x0f,0xc7,0x9a,0xf0,0x1c,0xf0,0x1c]
+xrstors 485498096(%edx)
+
+// CHECK: xrstors 485498096
+// CHECK: encoding: [0x0f,0xc7,0x1d,0xf0,0x1c,0xf0,0x1c]
+xrstors 485498096
+
+// CHECK: xrstors 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xc7,0x5c,0x02,0x40]
+xrstors 64(%edx,%eax)
+
+// CHECK: xrstors (%edx)
+// CHECK: encoding: [0x0f,0xc7,0x1a]
+xrstors (%edx)
+
+// CHECK: xsaves -485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xc7,0xac,0x82,0x10,0xe3,0x0f,0xe3]
+xsaves -485498096(%edx,%eax,4)
+
+// CHECK: xsaves 485498096(%edx,%eax,4)
+// CHECK: encoding: [0x0f,0xc7,0xac,0x82,0xf0,0x1c,0xf0,0x1c]
+xsaves 485498096(%edx,%eax,4)
+
+// CHECK: xsaves 485498096(%edx)
+// CHECK: encoding: [0x0f,0xc7,0xaa,0xf0,0x1c,0xf0,0x1c]
+xsaves 485498096(%edx)
+
+// CHECK: xsaves 485498096
+// CHECK: encoding: [0x0f,0xc7,0x2d,0xf0,0x1c,0xf0,0x1c]
+xsaves 485498096
+
+// CHECK: xsaves 64(%edx,%eax)
+// CHECK: encoding: [0x0f,0xc7,0x6c,0x02,0x40]
+xsaves 64(%edx,%eax)
+
+// CHECK: xsaves (%edx)
+// CHECK: encoding: [0x0f,0xc7,0x2a]
+xsaves (%edx)
+
diff --git a/llvm/test/MC/X86/XSAVES-64.s b/llvm/test/MC/X86/XSAVES-64.s
new file mode 100644
index 00000000000..28effb62375
--- /dev/null
+++ b/llvm/test/MC/X86/XSAVES-64.s
@@ -0,0 +1,98 @@
+// RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
+
+// CHECK: xrstors 485498096
+// CHECK: encoding: [0x0f,0xc7,0x1c,0x25,0xf0,0x1c,0xf0,0x1c]
+xrstors 485498096
+
+// CHECK: xrstors64 485498096
+// CHECK: encoding: [0x48,0x0f,0xc7,0x1c,0x25,0xf0,0x1c,0xf0,0x1c]
+xrstors64 485498096
+
+// CHECK: xrstors64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x5a,0x40]
+xrstors64 64(%rdx)
+
+// CHECK: xrstors64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x5c,0x82,0x40]
+xrstors64 64(%rdx,%rax,4)
+
+// CHECK: xrstors64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x5c,0x82,0xc0]
+xrstors64 -64(%rdx,%rax,4)
+
+// CHECK: xrstors64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x5c,0x02,0x40]
+xrstors64 64(%rdx,%rax)
+
+// CHECK: xrstors 64(%rdx)
+// CHECK: encoding: [0x0f,0xc7,0x5a,0x40]
+xrstors 64(%rdx)
+
+// CHECK: xrstors64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x1a]
+xrstors64 (%rdx)
+
+// CHECK: xrstors 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xc7,0x5c,0x82,0x40]
+xrstors 64(%rdx,%rax,4)
+
+// CHECK: xrstors -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xc7,0x5c,0x82,0xc0]
+xrstors -64(%rdx,%rax,4)
+
+// CHECK: xrstors 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xc7,0x5c,0x02,0x40]
+xrstors 64(%rdx,%rax)
+
+// CHECK: xrstors (%rdx)
+// CHECK: encoding: [0x0f,0xc7,0x1a]
+xrstors (%rdx)
+
+// CHECK: xsaves 485498096
+// CHECK: encoding: [0x0f,0xc7,0x2c,0x25,0xf0,0x1c,0xf0,0x1c]
+xsaves 485498096
+
+// CHECK: xsaves64 485498096
+// CHECK: encoding: [0x48,0x0f,0xc7,0x2c,0x25,0xf0,0x1c,0xf0,0x1c]
+xsaves64 485498096
+
+// CHECK: xsaves64 64(%rdx)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x6a,0x40]
+xsaves64 64(%rdx)
+
+// CHECK: xsaves64 64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x6c,0x82,0x40]
+xsaves64 64(%rdx,%rax,4)
+
+// CHECK: xsaves64 -64(%rdx,%rax,4)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x6c,0x82,0xc0]
+xsaves64 -64(%rdx,%rax,4)
+
+// CHECK: xsaves64 64(%rdx,%rax)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x6c,0x02,0x40]
+xsaves64 64(%rdx,%rax)
+
+// CHECK: xsaves 64(%rdx)
+// CHECK: encoding: [0x0f,0xc7,0x6a,0x40]
+xsaves 64(%rdx)
+
+// CHECK: xsaves64 (%rdx)
+// CHECK: encoding: [0x48,0x0f,0xc7,0x2a]
+xsaves64 (%rdx)
+
+// CHECK: xsaves 64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xc7,0x6c,0x82,0x40]
+xsaves 64(%rdx,%rax,4)
+
+// CHECK: xsaves -64(%rdx,%rax,4)
+// CHECK: encoding: [0x0f,0xc7,0x6c,0x82,0xc0]
+xsaves -64(%rdx,%rax,4)
+
+// CHECK: xsaves 64(%rdx,%rax)
+// CHECK: encoding: [0x0f,0xc7,0x6c,0x02,0x40]
+xsaves 64(%rdx,%rax)
+
+// CHECK: xsaves (%rdx)
+// CHECK: encoding: [0x0f,0xc7,0x2a]
+xsaves (%rdx)
+
OpenPOWER on IntegriCloud