[llvm] r360953 - [X86][AsmParser] Rename "ConditionCode" variable to "ConditionPredicate".
David L. Jones via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 16:27:05 PDT 2019
Author: dlj
Date: Thu May 16 16:27:05 2019
New Revision: 360953
URL: http://llvm.org/viewvc/llvm-project?rev=360953&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=360953&r1=360952&r2=360953&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Thu May 16 16:27:05 2019
@@ -2374,7 +2374,7 @@ bool X86AsmParser::ParseInstruction(Pars
PatchedName != "setb" && PatchedName != "setnb")
PatchedName = PatchedName.substr(0, Name.size()-1);
- unsigned ComparisonCode = ~0U;
+ unsigned ComparisonPredicate = ~0U;
// FIXME: Hack to recognize cmp<comparison code>{ss,sd,ps,pd}.
if ((PatchedName.startswith("cmp") || PatchedName.startswith("vcmp")) &&
@@ -2442,9 +2442,9 @@ bool X86AsmParser::ParseInstruction(Pars
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(Pars
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(Pars
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(Pars
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(Pars
}
// 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));
}
More information about the llvm-commits
mailing list