LLVM
22.0.0git
lib
Support
AArch64AttributeParser.cpp
Go to the documentation of this file.
1
//===-- AArch64AttributeParser.cpp - AArch64 Build Attributes PArser------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with
4
// LLVM Exceptions.
5
// See https://llvm.org/LICENSE.txt for license information.
6
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
//
8
//===---------------------------------------------------------------------===//
9
10
#include "
llvm/Support/AArch64AttributeParser.h
"
11
#include "
llvm/Support/AArch64BuildAttributes.h
"
12
13
std::vector<llvm::SubsectionAndTagToTagName> &
14
llvm::AArch64AttributeParser::returnTagsNamesMap() {
15
static
std::vector<SubsectionAndTagToTagName>
TagsNamesMap
= {
16
{
"aeabi_pauthabi"
, 1,
"Tag_PAuth_Platform"
},
17
{
"aeabi_pauthabi"
, 2,
"Tag_PAuth_Schema"
},
18
{
"aeabi_feature_and_bits"
, 0,
"Tag_Feature_BTI"
},
19
{
"aeabi_feature_and_bits"
, 1,
"Tag_Feature_PAC"
},
20
{
"aeabi_feature_and_bits"
, 2,
"Tag_Feature_GCS"
}};
21
return
TagsNamesMap
;
22
}
23
24
llvm::AArch64BuildAttrSubsections
llvm::extractBuildAttributesSubsections
(
25
const
llvm::AArch64AttributeParser
&Attributes) {
26
27
llvm::AArch64BuildAttrSubsections
SubSections;
28
auto
GetPauthValue = [&
Attributes
](
unsigned
Tag
) {
29
return
Attributes
.getAttributeValue(
"aeabi_pauthabi"
,
Tag
).value_or(0);
30
};
31
SubSections.
Pauth
.
TagPlatform
=
32
GetPauthValue(
llvm::AArch64BuildAttributes::TAG_PAUTH_PLATFORM
);
33
SubSections.
Pauth
.
TagSchema
=
34
GetPauthValue(
llvm::AArch64BuildAttributes::TAG_PAUTH_SCHEMA
);
35
36
auto
GetFeatureValue = [&
Attributes
](
unsigned
Tag
) {
37
return
Attributes
.getAttributeValue(
"aeabi_feature_and_bits"
,
Tag
)
38
.value_or(0);
39
};
40
SubSections.
AndFeatures
|=
41
GetFeatureValue(
llvm::AArch64BuildAttributes::TAG_FEATURE_BTI
);
42
SubSections.
AndFeatures
|=
43
GetFeatureValue(
llvm::AArch64BuildAttributes::TAG_FEATURE_PAC
) << 1;
44
SubSections.
AndFeatures
|=
45
GetFeatureValue(
llvm::AArch64BuildAttributes::TAG_FEATURE_GCS
) << 2;
46
47
return
SubSections;
48
}
AArch64AttributeParser.h
AArch64BuildAttributes.h
Attributes
AMDGPU Kernel Attributes
Definition:
AMDGPULowerKernelAttributes.cpp:371
llvm::AArch64AttributeParser
Definition:
AArch64AttributeParser.h:18
llvm::ELFExtendedAttrParser::TagsNamesMap
const std::vector< SubsectionAndTagToTagName > TagsNamesMap
Definition:
ELFAttrParserExtended.h:34
llvm::AArch64BuildAttributes::TAG_FEATURE_PAC
@ TAG_FEATURE_PAC
Definition:
AArch64BuildAttributes.h:60
llvm::AArch64BuildAttributes::TAG_FEATURE_GCS
@ TAG_FEATURE_GCS
Definition:
AArch64BuildAttributes.h:61
llvm::AArch64BuildAttributes::TAG_FEATURE_BTI
@ TAG_FEATURE_BTI
Definition:
AArch64BuildAttributes.h:59
llvm::AArch64BuildAttributes::TAG_PAUTH_PLATFORM
@ TAG_PAUTH_PLATFORM
Definition:
AArch64BuildAttributes.h:51
llvm::AArch64BuildAttributes::TAG_PAUTH_SCHEMA
@ TAG_PAUTH_SCHEMA
Definition:
AArch64BuildAttributes.h:52
llvm::extractBuildAttributesSubsections
LLVM_ABI AArch64BuildAttrSubsections extractBuildAttributesSubsections(const llvm::AArch64AttributeParser &)
Definition:
AArch64AttributeParser.cpp:24
llvm::HighlightColor::Tag
@ Tag
llvm::AArch64BuildAttrSubsections::PauthSubSection::TagSchema
uint64_t TagSchema
Definition:
AArch64AttributeParser.h:32
llvm::AArch64BuildAttrSubsections::PauthSubSection::TagPlatform
uint64_t TagPlatform
Definition:
AArch64AttributeParser.h:31
llvm::AArch64BuildAttrSubsections
Definition:
AArch64AttributeParser.h:29
llvm::AArch64BuildAttrSubsections::AndFeatures
uint32_t AndFeatures
Definition:
AArch64AttributeParser.h:34
llvm::AArch64BuildAttrSubsections::Pauth
struct llvm::AArch64BuildAttrSubsections::PauthSubSection Pauth
Generated on Wed Sep 3 2025 04:14:04 for LLVM by
1.9.6