[ARM][clang] Option b-key must not affect __ARM_FEATURE_PAC_DEFAULT
authorTies Stuij <ties.stuij@arm.com>
Thu, 9 Dec 2021 11:51:31 +0000 (11:51 +0000)
committerTies Stuij <ties.stuij@arm.com>
Thu, 9 Dec 2021 13:37:52 +0000 (13:37 +0000)
commitbfe07195bb1f517b2809107098b91767ad8c9460
treede171d45bf73a6eacc7beedd79758cc8ca38705e
parentcc45a13422ca78ea750cce0fc502ac44b784d811
[ARM][clang] Option b-key must not affect __ARM_FEATURE_PAC_DEFAULT

When using -mbranch-protection=pac-ret+b-key, macro __ARM_FEATURE_PAC_DEFAULT
should still have the value corresponding to a-key, because b-key is only valid
for AArch64.

This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:

https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension

The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:

https://developer.arm.com/documentation/ddi0553/latest

The following people contributed to this patch:

- Victor Campos

Reviewed By: danielkiss

Differential Revision: https://reviews.llvm.org/D115140
clang/lib/Basic/Targets/ARM.cpp
clang/test/Preprocessor/arm-target-features.c