From 86ecbb7b543e1d4083ab0add6364d27381d70fef Mon Sep 17 00:00:00 2001 From: Ranjeet Singh Date: Tue, 30 Jun 2015 12:32:53 +0000 Subject: Reverting r241058 because it's causing buildbot failures. llvm-svn: 241061 --- llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp') diff --git a/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp b/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp index e143df1f4bb..3aa4c6bd32d 100644 --- a/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp +++ b/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp @@ -404,7 +404,6 @@ public: bool MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, OperandVector &Operands, MCStreamer &Out, uint64_t &ErrorInfo, - FeatureBitset &ErrorMissingFeature, bool MatchingInlineAsm) override; // Used by the TableGen code to parse particular operand types. @@ -783,13 +782,12 @@ bool SystemZAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, OperandVector &Operands, MCStreamer &Out, uint64_t &ErrorInfo, - FeatureBitset &ErrorMissingFeature, bool MatchingInlineAsm) { MCInst Inst; unsigned MatchResult; MatchResult = MatchInstructionImpl(Operands, Inst, ErrorInfo, - ErrorMissingFeature, MatchingInlineAsm); + MatchingInlineAsm); switch (MatchResult) { case Match_Success: Inst.setLoc(IDLoc); @@ -797,15 +795,17 @@ bool SystemZAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, return false; case Match_MissingFeature: { - assert(ErrorMissingFeature.any() && "Unknown missing feature!"); + assert(ErrorInfo && "Unknown missing feature!"); // Special case the error message for the very common case where only // a single subtarget feature is missing std::string Msg = "instruction requires:"; - for (unsigned I = 0; I < ErrorMissingFeature.size(); ++I) { - if (ErrorMissingFeature[I]) { + uint64_t Mask = 1; + for (unsigned I = 0; I < sizeof(ErrorInfo) * 8 - 1; ++I) { + if (ErrorInfo & Mask) { Msg += " "; - Msg += getSubtargetFeatureName(I); + Msg += getSubtargetFeatureName(ErrorInfo & Mask); } + Mask <<= 1; } return Error(IDLoc, Msg); } -- cgit v1.2.3