r351561 - Revert "Clang side support for @cc assembly operands."
Nirav Dave via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 18 08:03:09 PST 2019
Author: niravd
Date: Fri Jan 18 08:03:08 2019
New Revision: 351561
URL: http://llvm.org/viewvc/llvm-project?rev=351561&view=rev
Log:
Revert "Clang side support for @cc assembly operands."
Modified:
cfe/trunk/lib/Basic/Targets/X86.cpp
Modified: cfe/trunk/lib/Basic/Targets/X86.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/X86.cpp?rev=351561&r1=351560&r2=351561&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/X86.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/X86.cpp Fri Jan 18 08:03:08 2019
@@ -1554,42 +1554,6 @@ bool X86TargetInfo::validateCpuIs(String
.Default(false);
}
-
-static unsigned matchAsmCCConstraint(const char *&Name) {
- auto RV = llvm::StringSwitch<unsigned>(Name)
- .Case("@cca", 4)
- .Case("@ccae", 5)
- .Case("@ccb", 4)
- .Case("@ccbe", 5)
- .Case("@ccc", 4)
- .Case("@cce", 4)
- .Case("@ccz", 4)
- .Case("@ccg", 4)
- .Case("@ccge", 4)
- .Case("@ccl", 4)
- .Case("@ccle", 5)
- .Case("@ccna", 5)
- .Case("@ccnae",6)
- .Case("@ccnb", 5)
- .Case("@ccnbe",6)
- .Case("@ccnc", 5)
- .Case("@ccne", 5)
- .Case("@ccnz", 5)
- .Case("@ccng", 5)
- .Case("@ccnge",6)
- .Case("@ccnl", 5)
- .Case("@ccnle",6)
- .Case("@ccno", 5)
- .Case("@ccnp", 5)
- .Case("@ccns", 5)
- .Case("@cco", 4)
- .Case("@ccp", 4)
- .Case("@ccs", 4)
- .Default(0);
- return RV;
-}
-
-
bool X86TargetInfo::validateAsmConstraint(
const char *&Name, TargetInfo::ConstraintInfo &Info) const {
switch (*Name) {
@@ -1672,14 +1636,6 @@ bool X86TargetInfo::validateAsmConstrain
case 'C': // SSE floating point constant.
case 'G': // x87 floating point constant.
return true;
- case '@':
- // CC condition changes.
- if (auto Len = matchAsmCCConstraint(Name)) {
- Name+=Len-1;
- Info.setAllowsRegister();
- return true;
- }
- return false;
}
}
@@ -1749,16 +1705,8 @@ bool X86TargetInfo::validateOperandSize(
return true;
}
-//niravd
std::string X86TargetInfo::convertConstraint(const char *&Constraint) const {
switch (*Constraint) {
- case '@':
- if (auto Len = matchAsmCCConstraint(Constraint)) {
- std::string Converted = "{" + std::string(Constraint, Len) + "}";
- Constraint+=Len-1;
- return Converted;
- }
- break;
case 'a':
return std::string("{ax}");
case 'b':
More information about the cfe-commits
mailing list