]> granicus.if.org Git - llvm/commitdiff
[X86][AsmParser] Rename "ConditionCode" variable to "ConditionPredicate".
authorDavid L. Jones <dlj@google.com>
Thu, 16 May 2019 23:27:05 +0000 (23:27 +0000)
committerDavid L. Jones <dlj@google.com>
Thu, 16 May 2019 23:27:05 +0000 (23:27 +0000)
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

index e3e0c989c7305cc85165ed489ef64b4ce0588e54..2ab979a7b7695ab34dd802957b9e2d61cbee2166 100644 (file)
@@ -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<comparison code>{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));
   }