forked from OSchip/llvm-project
Simplify code that filtered certain instructions in two different ways. No functional change.
llvm-svn: 160948
This commit is contained in:
parent
3cb72b476d
commit
b58dc17025
|
@ -475,7 +475,7 @@ RecognizableInstr::filter_ret RecognizableInstr::filter() const {
|
||||||
if (HasFROperands && Name.find("MOV") != Name.npos &&
|
if (HasFROperands && Name.find("MOV") != Name.npos &&
|
||||||
((Name.find("2") != Name.npos && Name.find("32") == Name.npos) ||
|
((Name.find("2") != Name.npos && Name.find("32") == Name.npos) ||
|
||||||
(Name.find("to") != Name.npos)))
|
(Name.find("to") != Name.npos)))
|
||||||
return FILTER_WEAK;
|
return FILTER_STRONG;
|
||||||
|
|
||||||
return FILTER_NORMAL;
|
return FILTER_NORMAL;
|
||||||
}
|
}
|
||||||
|
@ -568,9 +568,6 @@ void RecognizableInstr::emitInstructionSpecifier(DisassemblerTables &tables) {
|
||||||
// operandMapping maps from operands in OperandList to their originals.
|
// operandMapping maps from operands in OperandList to their originals.
|
||||||
// If operandMapping[i] != i, then the entry is a duplicate.
|
// If operandMapping[i] != i, then the entry is a duplicate.
|
||||||
unsigned operandMapping[X86_MAX_OPERANDS];
|
unsigned operandMapping[X86_MAX_OPERANDS];
|
||||||
|
|
||||||
bool hasFROperands = false;
|
|
||||||
|
|
||||||
assert(numOperands <= X86_MAX_OPERANDS && "X86_MAX_OPERANDS is not large enough");
|
assert(numOperands <= X86_MAX_OPERANDS && "X86_MAX_OPERANDS is not large enough");
|
||||||
|
|
||||||
for (unsigned operandIndex = 0; operandIndex < numOperands; ++operandIndex) {
|
for (unsigned operandIndex = 0; operandIndex < numOperands; ++operandIndex) {
|
||||||
|
@ -588,18 +585,8 @@ void RecognizableInstr::emitInstructionSpecifier(DisassemblerTables &tables) {
|
||||||
++numPhysicalOperands;
|
++numPhysicalOperands;
|
||||||
operandMapping[operandIndex] = operandIndex;
|
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)
|
if (!ShouldBeEmitted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue