diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-20 12:08:00 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-20 12:08:00 +0000 |
commit | 91e5860fad7e567a915303ba9f5234b629f455d8 (patch) | |
tree | b4fdaaeb2fbec62e00505eed54f1e57bf1f83888 /clang/lib/Sema/SemaStmtAsm.cpp | |
parent | a24a1a411ddc1e1b9dc2d6736aa845475dfbba4d (diff) | |
download | bcm5719-llvm-91e5860fad7e567a915303ba9f5234b629f455d8.tar.gz bcm5719-llvm-91e5860fad7e567a915303ba9f5234b629f455d8.zip |
[X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)
Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536
llvm-svn: 242665
Diffstat (limited to 'clang/lib/Sema/SemaStmtAsm.cpp')
-rw-r--r-- | clang/lib/Sema/SemaStmtAsm.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp index 8e3e89f1e57..8e584919363 100644 --- a/clang/lib/Sema/SemaStmtAsm.cpp +++ b/clang/lib/Sema/SemaStmtAsm.cpp @@ -260,8 +260,7 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, return StmtError( Diag(InputExpr->getLocStart(), diag::err_asm_immediate_expected) << Info.getConstraintStr() << InputExpr->getSourceRange()); - if (Result.slt(Info.getImmConstantMin()) || - Result.sgt(Info.getImmConstantMax())) + if (!Info.isValidAsmImmediate(Result)) return StmtError(Diag(InputExpr->getLocStart(), diag::err_invalid_asm_value_for_constraint) << Result.toString(10) << Info.getConstraintStr() |