aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGStmt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index 8ccd2893b8..b86cdf861e 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -938,7 +938,8 @@ AddVariableConstraints(const std::string &Constraint, const Expr &AsmExpr,
return Constraint;
llvm::StringRef Register = Attr->getLabel();
assert(Target.isValidGCCRegisterName(Register));
- if (Constraint != "r") {
+ // FIXME: We should check which registers are compatible with "r" or "x".
+ if (Constraint != "r" && Constraint != "x") {
CGM.ErrorUnsupported(&Stmt, "__asm__");
return Constraint;
}