aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/X86RecognizableInstr.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-07-30 05:10:05 +0000
committerCraig Topper <craig.topper@gmail.com>2012-07-30 05:10:05 +0000
commit50c5c8275e576c2129a4ab6146ca4226dcdfe6fe (patch)
tree13486cd510ad9ec5b2b3b51414bca5151abb372e /utils/TableGen/X86RecognizableInstr.cpp
parent87a9ece154acdf2164094e6b5a47bac48a53aa4d (diff)
Simplify code that filtered certain instructions in two different ways. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/X86RecognizableInstr.cpp')
-rw-r--r--utils/TableGen/X86RecognizableInstr.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/utils/TableGen/X86RecognizableInstr.cpp b/utils/TableGen/X86RecognizableInstr.cpp
index cf89fd7d78..e05ab4a988 100644
--- a/utils/TableGen/X86RecognizableInstr.cpp
+++ b/utils/TableGen/X86RecognizableInstr.cpp
@@ -475,7 +475,7 @@ RecognizableInstr::filter_ret RecognizableInstr::filter() const {
if (HasFROperands && Name.find("MOV") != Name.npos &&
((Name.find("2") != Name.npos && Name.find("32") == Name.npos) ||
(Name.find("to") != Name.npos)))
- return FILTER_WEAK;
+ return FILTER_STRONG;
return FILTER_NORMAL;
}
@@ -568,9 +568,6 @@ void RecognizableInstr::emitInstructionSpecifier(DisassemblerTables &tables) {
// operandMapping maps from operands in OperandList to their originals.
// If operandMapping[i] != i, then the entry is a duplicate.
unsigned operandMapping[X86_MAX_OPERANDS];
-
- bool hasFROperands = false;
-
assert(numOperands <= X86_MAX_OPERANDS && "X86_MAX_OPERANDS is not large enough");
for (unsigned operandIndex = 0; operandIndex < numOperands; ++operandIndex) {
@@ -588,18 +585,8 @@ void RecognizableInstr::emitInstructionSpecifier(DisassemblerTables &tables) {
++numPhysicalOperands;
operandMapping[operandIndex] = operandIndex;
}
-
- const std::string &recName = OperandList[operandIndex].Rec->getName();
-
- if (recName.find("FR") != recName.npos)
- hasFROperands = true;
}
- if (hasFROperands && Name.find("MOV") != Name.npos &&
- ((Name.find("2") != Name.npos && Name.find("32") == Name.npos) ||
- (Name.find("to") != Name.npos)))
- ShouldBeEmitted = false;
-
if (!ShouldBeEmitted)
return;