diff options
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 8ccd2893b83..b86cdf861ed 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/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; } |

