Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:27

0001 //===-- AArch64BuildAttributes.h - AARch64 Build Attributes -----*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file contains enumerations and support routines for AArch64 build
0010 // attributes as defined in Build Attributes for the AArch64 document.
0011 //
0012 // Build Attributes for the ArmĀ® 64-bit Architecture (AArch64) 2024Q1
0013 //
0014 // https://github.com/ARM-software/abi-aa/pull/230
0015 //
0016 //===----------------------------------------------------------------------===//
0017 
0018 #ifndef LLVM_SUPPORT_AARCH64BUILDATTRIBUTES_H
0019 #define LLVM_SUPPORT_AARCH64BUILDATTRIBUTES_H
0020 
0021 #include "llvm/ADT/StringRef.h"
0022 
0023 namespace llvm {
0024 
0025 namespace AArch64BuildAttrs {
0026 
0027 /// AArch64 build attributes vendors IDs (a.k.a subsection name)
0028 enum VendorID : unsigned {
0029   AEABI_FEATURE_AND_BITS = 0,
0030   AEABI_PAUTHABI = 1,
0031   VENDOR_UNKNOWN = 404 // Treated as a private subsection name
0032 };
0033 StringRef getVendorName(unsigned const Vendor);
0034 VendorID getVendorID(StringRef const Vendor);
0035 
0036 enum SubsectionOptional : unsigned {
0037   REQUIRED = 0,
0038   OPTIONAL = 1,
0039   OPTIONAL_NOT_FOUND = 404
0040 };
0041 StringRef getOptionalStr(unsigned Optional);
0042 SubsectionOptional getOptionalID(StringRef Optional);
0043 StringRef getSubsectionOptionalUnknownError();
0044 
0045 enum SubsectionType : unsigned { ULEB128 = 0, NTBS = 1, TYPE_NOT_FOUND = 404 };
0046 StringRef getTypeStr(unsigned Type);
0047 SubsectionType getTypeID(StringRef Type);
0048 StringRef getSubsectionTypeUnknownError();
0049 
0050 enum PauthABITags : unsigned {
0051   TAG_PAUTH_PLATFORM = 1,
0052   TAG_PAUTH_SCHEMA = 2,
0053   PAUTHABI_TAG_NOT_FOUND = 404
0054 };
0055 StringRef getPauthABITagsStr(unsigned PauthABITag);
0056 PauthABITags getPauthABITagsID(StringRef PauthABITag);
0057 
0058 enum FeatureAndBitsTags : unsigned {
0059   TAG_FEATURE_BTI = 0,
0060   TAG_FEATURE_PAC = 1,
0061   TAG_FEATURE_GCS = 2,
0062   FEATURE_AND_BITS_TAG_NOT_FOUND = 404
0063 };
0064 StringRef getFeatureAndBitsTagsStr(unsigned FeatureAndBitsTag);
0065 FeatureAndBitsTags getFeatureAndBitsTagsID(StringRef FeatureAndBitsTag);
0066 
0067 enum FeatureAndBitsFlag : unsigned {
0068   Feature_BTI_Flag = 1 << 0,
0069   Feature_PAC_Flag = 1 << 1,
0070   Feature_GCS_Flag = 1 << 2
0071 };
0072 } // namespace AArch64BuildAttrs
0073 } // namespace llvm
0074 
0075 #endif // LLVM_SUPPORT_AARCH64BUILDATTRIBUTES_H