[all-commits] [llvm/llvm-project] cdeeb5: [ARM, CDE] Implement CDE feature test macros

Mikhail Maltsev via All-commits all-commits at lists.llvm.org
Mon Mar 9 09:14:14 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cdeeb548bbebdff7661fb20b72839b920be0adbe
      https://github.com/llvm/llvm-project/commit/cdeeb548bbebdff7661fb20b72839b920be0adbe
  Author: Mikhail Maltsev <mikhail.maltsev at arm.com>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M clang/include/clang/Basic/TargetInfo.h
    M clang/lib/Basic/TargetInfo.cpp
    M clang/lib/Basic/Targets/ARM.cpp
    M clang/lib/Basic/Targets/ARM.h
    M clang/test/Preprocessor/arm-target-features.c

  Log Message:
  -----------
  [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




More information about the All-commits mailing list