compnerd added a subscriber: compnerd. compnerd accepted this revision. compnerd added a reviewer: compnerd. compnerd added a comment. This revision is now accepted and ready to land.
LGTM with the small change to rename isValidAsmValue at least. ================ Comment at: include/clang/Basic/TargetInfo.h:591 @@ -587,3 +590,3 @@ } - int getImmConstantMin() const { return ImmRange.Min; } - int getImmConstantMax() const { return ImmRange.Max; } + bool isValidAsmValue(const llvm::APInt &Value) const { + return (Value.sge(ImmRange.Min) && Value.sle(ImmRange.Max)) || ---------------- This would be better named as isValidAsmImmediate. ================ Comment at: lib/Basic/Targets.cpp:3357 @@ -3348,3 +3356,3 @@ case 'L': - // FIXME: properly analyze this constraint: - // must be one of 0xff, 0xffff, or 0xffffffff + Info.setRequiresImmediate(0xff); + Info.setRequiresImmediate(0xffff); ---------------- Might be nice to have the interface take an ArrayRef instead. ================ Comment at: test/Sema/inline-asm-validate-x86.c:56 @@ +55,3 @@ +void L(int i, int j) { + static const int NotValid1 = 1; + static const int NotValid2 = 42; ---------------- Invalid perhaps (instead of NotValid). Repository: rL LLVM http://reviews.llvm.org/D10536 _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits