From 4612172954641de1f38f0b1f6cf022ced3648ca1 Mon Sep 17 00:00:00 2001 From: "David L. Jones" Date: Thu, 16 May 2019 23:27:05 +0000 Subject: [PATCH] [X86][AsmParser] Rename "ConditionCode" variable to "ConditionPredicate". This better matches the verbiage in Intel documentation, and should help avoid confusion between these two different kinds of values, both of which are parsed from mnemonics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360953 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/AsmParser/X86AsmParser.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index e3e0c989c73..2ab979a7b76 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -2374,7 +2374,7 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, PatchedName != "setb" && PatchedName != "setnb") PatchedName = PatchedName.substr(0, Name.size()-1); - unsigned ComparisonCode = ~0U; + unsigned ComparisonPredicate = ~0U; // FIXME: Hack to recognize cmp{ss,sd,ps,pd}. if ((PatchedName.startswith("cmp") || PatchedName.startswith("vcmp")) && @@ -2442,9 +2442,9 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, else if (PatchedName.endswith("pd")) PatchedName = IsVCMP ? "vcmppd" : "cmppd"; else - llvm_unreachable("Unexpecte suffix!"); + llvm_unreachable("Unexpected suffix!"); - ComparisonCode = CC; + ComparisonPredicate = CC; } } @@ -2473,7 +2473,7 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, case 'q': PatchedName = SuffixSize == 2 ? "vpcmpuq" : "vpcmpq"; break; } // Set up the immediate to push into the operands later. - ComparisonCode = CC; + ComparisonPredicate = CC; } } @@ -2502,7 +2502,7 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, case 'q': PatchedName = SuffixSize == 2 ? "vpcomuq" : "vpcomq"; break; } // Set up the immediate to push into the operands later. - ComparisonCode = CC; + ComparisonPredicate = CC; } } @@ -2578,8 +2578,8 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, Operands.push_back(X86Operand::CreateToken(PatchedName, NameLoc)); // Push the immediate if we extracted one from the mnemonic. - if (ComparisonCode != ~0U && !isParsingIntelSyntax()) { - const MCExpr *ImmOp = MCConstantExpr::create(ComparisonCode, + if (ComparisonPredicate != ~0U && !isParsingIntelSyntax()) { + const MCExpr *ImmOp = MCConstantExpr::create(ComparisonPredicate, getParser().getContext()); Operands.push_back(X86Operand::CreateImm(ImmOp, NameLoc, NameLoc)); } @@ -2619,8 +2619,8 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, } // Push the immediate if we extracted one from the mnemonic. - if (ComparisonCode != ~0U && isParsingIntelSyntax()) { - const MCExpr *ImmOp = MCConstantExpr::create(ComparisonCode, + if (ComparisonPredicate != ~0U && isParsingIntelSyntax()) { + const MCExpr *ImmOp = MCConstantExpr::create(ComparisonPredicate, getParser().getContext()); Operands.push_back(X86Operand::CreateImm(ImmOp, NameLoc, NameLoc)); } -- 2.50.1