[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686
Phoebe Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 3 00:55:08 PDT 2022
pengfei created this revision.
pengfei added a reviewer: nickdesaulniers.
Herald added a project: All.
pengfei requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
I intended to not adding test case since it is NFC to most modern X86 targets.
Fixes #58737
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137317
Files:
clang/lib/Basic/Targets/X86.h
Index: clang/lib/Basic/Targets/X86.h
===================================================================
--- clang/lib/Basic/Targets/X86.h
+++ clang/lib/Basic/Targets/X86.h
@@ -241,12 +241,16 @@
bool
checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const override {
- return true;
+ if (CPU >= llvm::X86::CK_PentiumPro)
+ return true;
+ return TargetInfo::checkCFProtectionReturnSupported(Diags);
};
bool
checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const override {
- return true;
+ if (CPU >= llvm::X86::CK_PentiumPro)
+ return true;
+ return TargetInfo::checkCFProtectionBranchSupported(Diags);
};
virtual bool validateOperandSize(const llvm::StringMap<bool> &FeatureMap,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137317.472861.patch
Type: text/x-patch
Size: 754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221103/94d970d4/attachment.bin>
More information about the cfe-commits
mailing list