aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/X86/X86InstrInfo.td1
-rw-r--r--lib/Target/X86/X86InstrSystem.td5
-rw-r--r--test/MC/X86/x86-32-coverage.s7
-rw-r--r--test/MC/X86/x86-64.s12
-rw-r--r--test/MC/X86/x86_errors.s2
5 files changed, 24 insertions, 3 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index aa35cf0f00..2a85ba193f 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -1573,6 +1573,7 @@ def : MnemonicAlias<"verrw", "verr">;
// System instruction aliases.
def : MnemonicAlias<"iret", "iretl">;
def : MnemonicAlias<"sysret", "sysretl">;
+def : MnemonicAlias<"sysexit", "sysexitl">;
def : MnemonicAlias<"lgdtl", "lgdt">, Requires<[In32BitMode]>;
def : MnemonicAlias<"lgdtq", "lgdt">, Requires<[In64BitMode]>;
diff --git a/lib/Target/X86/X86InstrSystem.td b/lib/Target/X86/X86InstrSystem.td
index b5651f314c..be3500adec 100644
--- a/lib/Target/X86/X86InstrSystem.td
+++ b/lib/Target/X86/X86InstrSystem.td
@@ -51,9 +51,8 @@ def SYSRETQ :RI<0x07, RawFrm, (outs), (ins), "sysretq", []>, TB,
def SYSENTER : I<0x34, RawFrm, (outs), (ins), "sysenter", []>, TB;
-def SYSEXIT : I<0x35, RawFrm, (outs), (ins), "sysexit", []>, TB,
- Requires<[In32BitMode]>;
-def SYSEXIT64 :RI<0x35, RawFrm, (outs), (ins), "sysexit", []>, TB,
+def SYSEXIT : I<0x35, RawFrm, (outs), (ins), "sysexitl", []>, TB;
+def SYSEXIT64 :RI<0x35, RawFrm, (outs), (ins), "sysexitq", []>, TB,
Requires<[In64BitMode]>;
def IRET16 : I<0xcf, RawFrm, (outs), (ins), "iretw", []>, OpSize;
diff --git a/test/MC/X86/x86-32-coverage.s b/test/MC/X86/x86-32-coverage.s
index 0954ce2b02..577ac40e32 100644
--- a/test/MC/X86/x86-32-coverage.s
+++ b/test/MC/X86/x86-32-coverage.s
@@ -500,6 +500,9 @@
// CHECK: sysexit
sysexit
+// CHECK: sysexitl
+ sysexitl
+
// CHECK: ud2
ud2
@@ -4417,6 +4420,10 @@
// CHECK: encoding: [0x0f,0x35]
sysexit
+// CHECK: sysexitl
+// CHECK: encoding: [0x0f,0x35]
+ sysexitl
+
// CHECK: fxsave 3735928559(%ebx,%ecx,8)
// CHECK: encoding: [0x0f,0xae,0x84,0xcb,0xef,0xbe,0xad,0xde]
fxsave 0xdeadbeef(%ebx,%ecx,8)
diff --git a/test/MC/X86/x86-64.s b/test/MC/X86/x86-64.s
index a9cdaa495f..6c836fca90 100644
--- a/test/MC/X86/x86-64.s
+++ b/test/MC/X86/x86-64.s
@@ -1191,3 +1191,15 @@ xchgl %ecx, %eax
// CHECK: xchgl %ecx, %eax
// CHECK: encoding: [0x91]
xchgl %eax, %ecx
+
+// CHECK: sysexit
+// CHECK: encoding: [0x0f,0x35]
+sysexit
+
+// CHECK: sysexitl
+// CHECK: encoding: [0x0f,0x35]
+sysexitl
+
+// CHECK: sysexitq
+// CHECK: encoding: [0x48,0x0f,0x35]
+sysexitq
diff --git a/test/MC/X86/x86_errors.s b/test/MC/X86/x86_errors.s
index 054331ad81..8de7444ea6 100644
--- a/test/MC/X86/x86_errors.s
+++ b/test/MC/X86/x86_errors.s
@@ -18,3 +18,5 @@ addl $0, 0(%rax)
movl 0(%rax), 0(%edx) // error: invalid operand for instruction
+// 32: error: instruction requires a CPU feature not currently enabled
+sysexitq