[ARM,CDE] Implement CDE feature test macros
authorMikhail Maltsev <mikhail.maltsev@arm.com>
Mon, 9 Mar 2020 16:13:02 +0000 (16:13 +0000)
committerMikhail Maltsev <mikhail.maltsev@arm.com>
Mon, 9 Mar 2020 16:14:06 +0000 (16:14 +0000)
commitcdeeb548bbebdff7661fb20b72839b920be0adbe
tree17ebd2ee04ee5e2040e25e69883e53d32ba4a5ba
parentc3d981aebaba1f9e0bc6a60e913ae71762b65496
[ARM,CDE] Implement CDE feature test macros

Summary:
This patch implements feature test macros for the CDE extension
according to the upcoming ACLE specification.

The following 2 macros are being added:
- __ARM_FEATURE_CDE - defined as '1' when any coprocessor is
  configured as a CDE coprocessor
- __ARM_FEATURE_CDE_COPROC - defined as an 8-bit mask, each bit of the
  mask corresponds to a coprocessor and is set when the corresponding
  coprocessor is configured as CDE (and cleared otherwise).

The patch also exposes the value of __ARM_FEATURE_CDE_COPROC in the
target-independent method TargetInfo::getARMCDECorpocMask, the method
will be used in follow-up patches implementing semantic checks of CDE
intrinsics (we want to diagnose the cases when CDE intrinsics are used
with coprocessors that are not configured as CDE).

Reviewers: simon_tatham, dmgreen, ostannard, MarkMurrayARM

Reviewed By: simon_tatham

Subscribers: kristof.beyls, danielkiss, cfe-commits

Tags: #clang

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