[PATCH] D10536: [X86, inlineasm] Implement v, k, Y2, Yk, Yz constraints, improve analysis for x, Y*, L, e, Z, s
Saleem Abdulrasool
compnerd at compnerd.org
Sun Jul 12 16:12:47 PDT 2015
- Previous message: [PATCH] D10536: [X86, inlineasm] Implement v, k, Y2, Yk, Yz constraints, improve analysis for x, Y*, L, e, Z, s
- Next message: [PATCH] D9741: Reject multiplication by zero cases in MallocOverflowSecurityChecker
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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
- Previous message: [PATCH] D10536: [X86, inlineasm] Implement v, k, Y2, Yk, Yz constraints, improve analysis for x, Y*, L, e, Z, s
- Next message: [PATCH] D9741: Reject multiplication by zero cases in MallocOverflowSecurityChecker
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cfe-commits
mailing list