aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2009-09-12 02:25:20 +0000
committerSean Callanan <scallanan@apple.com>2009-09-12 02:25:20 +0000
commit29849eadef6b8355ee1db161e74c2cdc5b8d1f5c (patch)
tree1f5263190d6eb9fe656c814ec251239096a2e935
parent760c92a5be4513bef7ae0e5c417ff6a7d3543f97 (diff)
downloadllvm-29849eadef6b8355ee1db161e74c2cdc5b8d1f5c.zip
llvm-29849eadef6b8355ee1db161e74c2cdc5b8d1f5c.tar.gz
llvm-29849eadef6b8355ee1db161e74c2cdc5b8d1f5c.tar.bz2
Added CMPS (string comparison) instructions for all
operand widths to the Intel instruction tables, for the purposes of the disassembler. llvm-svn: 81601
-rw-r--r--llvm/lib/Target/X86/X86Instr64bit.td2
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.td4
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Instr64bit.td b/llvm/lib/Target/X86/X86Instr64bit.td
index f165336..353868a 100644
--- a/llvm/lib/Target/X86/X86Instr64bit.td
+++ b/llvm/lib/Target/X86/X86Instr64bit.td
@@ -286,6 +286,8 @@ def REP_STOSQ : RI<0xAB, RawFrm, (outs), (ins), "{rep;stosq|rep stosq}",
def SCAS64 : RI<0xAF, RawFrm, (outs), (ins), "scas{q}", []>;
+def CMPS64 : RI<0xA7, RawFrm, (outs), (ins), "cmps{q}", []>;
+
// Fast system-call instructions
def SYSEXIT64 : RI<0x35, RawFrm,
(outs), (ins), "sysexit", []>, TB;
diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td
index 8c22bc6..fbb5fa9 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.td
+++ b/llvm/lib/Target/X86/X86InstrInfo.td
@@ -818,6 +818,10 @@ def SCAS8 : I<0xAE, RawFrm, (outs), (ins), "scas{b}", []>;
def SCAS16 : I<0xAF, RawFrm, (outs), (ins), "scas{w}", []>, OpSize;
def SCAS32 : I<0xAF, RawFrm, (outs), (ins), "scas{l}", []>;
+def CMPS8 : I<0xA6, RawFrm, (outs), (ins), "cmps{b}", []>;
+def CMPS16 : I<0xA7, RawFrm, (outs), (ins), "cmps{w}", []>, OpSize;
+def CMPS32 : I<0xA7, RawFrm, (outs), (ins), "cmps{l}", []>;
+
let Defs = [RAX, RDX] in
def RDTSC : I<0x31, RawFrm, (outs), (ins), "rdtsc", [(X86rdtsc)]>,
TB;