aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp2
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index fef8eb0..8507070 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -83,7 +83,7 @@ private:
bool MatchInstruction(SMLoc IDLoc,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
MCInst &Inst) {
- if (!MatchInstructionImpl(Operands, Inst))
+ if (MatchInstructionImpl(Operands, Inst) == Match_Success)
return false;
// FIXME: We should give nicer diagnostics about the exact failure.
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 7e922ed..10c2b9c 100644
--- a/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -881,7 +881,7 @@ X86ATTAsmParser::MatchInstruction(SMLoc IDLoc,
assert(!Operands.empty() && "Unexpect empty operand list!");
// First, try a direct match.
- if (!MatchInstructionImpl(Operands, Inst))
+ if (MatchInstructionImpl(Operands, Inst) == Match_Success)
return false;
// FIXME: Ideally, we would only attempt suffix matches for things which are
@@ -901,13 +901,13 @@ X86ATTAsmParser::MatchInstruction(SMLoc IDLoc,
// Check for the various suffix matches.
Tmp[Base.size()] = 'b';
- bool MatchB = MatchInstructionImpl(Operands, Inst);
+ bool MatchB = MatchInstructionImpl(Operands, Inst) != Match_Success;
Tmp[Base.size()] = 'w';
- bool MatchW = MatchInstructionImpl(Operands, Inst);
+ bool MatchW = MatchInstructionImpl(Operands, Inst) != Match_Success;
Tmp[Base.size()] = 'l';
- bool MatchL = MatchInstructionImpl(Operands, Inst);
+ bool MatchL = MatchInstructionImpl(Operands, Inst) != Match_Success;
Tmp[Base.size()] = 'q';
- bool MatchQ = MatchInstructionImpl(Operands, Inst);
+ bool MatchQ = MatchInstructionImpl(Operands, Inst) != Match_Success;
// Restore the old token.
Op->setTokenValue(Base);