diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-07-30 06:48:11 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-07-30 06:48:11 +0000 |
commit | c6b7ef61f4d170966b1feb099c6d834ba26e7276 (patch) | |
tree | 1c0be340d2c21499551fb53f55fd1847beca9ff0 | |
parent | 08ead0b14e5b0ed70ea42dace2dffe3261acdab7 (diff) | |
download | bcm5719-llvm-c6b7ef61f4d170966b1feb099c6d834ba26e7276.tar.gz bcm5719-llvm-c6b7ef61f4d170966b1feb099c6d834ba26e7276.zip |
Mark MOVZX32_NOREX as isCodeGenOnly and neverHasSideEffects. The isCodeGenOnly change allows special detection of _NOREX instructions to be removed from tablegen disassembler code.
llvm-svn: 160951
-rw-r--r-- | llvm/lib/Target/X86/X86InstrExtension.td | 2 | ||||
-rw-r--r-- | llvm/utils/TableGen/X86RecognizableInstr.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86InstrExtension.td b/llvm/lib/Target/X86/X86InstrExtension.td index 0d5490ad9cc..776667177d4 100644 --- a/llvm/lib/Target/X86/X86InstrExtension.td +++ b/llvm/lib/Target/X86/X86InstrExtension.td @@ -82,6 +82,7 @@ def MOVZX32rm16: I<0xB7, MRMSrcMem, (outs GR32:$dst), (ins i16mem:$src), // These are the same as the regular MOVZX32rr8 and MOVZX32rm8 // except that they use GR32_NOREX for the output operand register class // instead of GR32. This allows them to operate on h registers on x86-64. +let neverHasSideEffects = 1, isCodeGenOnly = 1 in { def MOVZX32_NOREXrr8 : I<0xB6, MRMSrcReg, (outs GR32_NOREX:$dst), (ins GR8_NOREX:$src), "movz{bl|x}\t{$src, $dst|$dst, $src}", @@ -91,6 +92,7 @@ def MOVZX32_NOREXrm8 : I<0xB6, MRMSrcMem, (outs GR32_NOREX:$dst), (ins i8mem_NOREX:$src), "movz{bl|x}\t{$src, $dst|$dst, $src}", [], IIC_MOVZX>, TB; +} // MOVSX64rr8 always has a REX prefix and it has an 8-bit register // operand, which makes it a rare instruction with an 8-bit register diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index 12ad0f21253..7ac2336d732 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -405,8 +405,7 @@ RecognizableInstr::filter_ret RecognizableInstr::filter() const { // printed as a separate "instruction". if (Name.find("_Int") != Name.npos || - Name.find("Int_") != Name.npos || - Name.find("_NOREX") != Name.npos) + Name.find("Int_") != Name.npos) return FILTER_STRONG; // Filter out instructions with segment override prefixes. |