[PATCH] D115501: [clang][ARM] Emit warnings when PACBTI-M is used with unsupported architectures
Amilendra Kodithuwakku via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 10 02:54:21 PST 2021
amilendra created this revision.
amilendra added reviewers: chill, vhscampos.
Herald added a subscriber: kristof.beyls.
Herald added a reviewer: aaron.ballman.
amilendra requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Branch protection in M-class is supported by
- Armv8.1-M.Main
- Armv8-M.Main
- Armv7-M
Attempting to enable this for other architectures, either by
command-line (e.g -mbranch-protection=bti) or by target attribute
in source code (e.g. __attribute__((target("branch-protection=..."))) )
will generate a warning.
In both cases function attributes related to branch protection will not
be emitted. Regardless of the warning, module level attributes related to
branch protection will be emitted when it is enabled via the command-line.
The following people also contributed to this patch:
- Victor Campos
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115501
Files:
clang/include/clang/Basic/DiagnosticCommonKinds.td
clang/include/clang/Basic/TargetInfo.h
clang/lib/Basic/Targets/AArch64.cpp
clang/lib/Basic/Targets/AArch64.h
clang/lib/Basic/Targets/ARM.cpp
clang/lib/Basic/Targets/ARM.h
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/TargetInfo.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGen/arm-branch-protection-attr-2.c
clang/test/CodeGen/arm_acle.c
clang/test/Driver/arm-security-options.c
clang/test/Frontend/arm-branch-protection-default-arch.c
clang/test/Frontend/arm-ignore-branch-protection-option.c
clang/test/Frontend/arm-invalid-branch-protection.c
clang/test/Sema/arm-branch-protection-attr-warn.c
clang/test/Sema/arm-branch-protection.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115501.393419.patch
Type: text/x-patch
Size: 32031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211210/d41b5d60/attachment-0001.bin>
More information about the cfe-commits
mailing list