1//===-- ARMBuildAttrs.cpp - ARM Build Attributes --------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "llvm/Support/ARMBuildAttributes.h"
10#include "llvm/ADT/Twine.h"
11#include "llvm/Support/LEB128.h"
12#include <iomanip>
13#include <sstream>
14
15using namespace llvm;
16
17static const TagNameItem tagData[] = {
18 {.attr: ARMBuildAttrs::File, .tagName: "Tag_File"},
19 {.attr: ARMBuildAttrs::Section, .tagName: "Tag_Section"},
20 {.attr: ARMBuildAttrs::Symbol, .tagName: "Tag_Symbol"},
21 {.attr: ARMBuildAttrs::CPU_raw_name, .tagName: "Tag_CPU_raw_name"},
22 {.attr: ARMBuildAttrs::CPU_name, .tagName: "Tag_CPU_name"},
23 {.attr: ARMBuildAttrs::CPU_arch, .tagName: "Tag_CPU_arch"},
24 {.attr: ARMBuildAttrs::CPU_arch_profile, .tagName: "Tag_CPU_arch_profile"},
25 {.attr: ARMBuildAttrs::ARM_ISA_use, .tagName: "Tag_ARM_ISA_use"},
26 {.attr: ARMBuildAttrs::THUMB_ISA_use, .tagName: "Tag_THUMB_ISA_use"},
27 {.attr: ARMBuildAttrs::FP_arch, .tagName: "Tag_FP_arch"},
28 {.attr: ARMBuildAttrs::WMMX_arch, .tagName: "Tag_WMMX_arch"},
29 {.attr: ARMBuildAttrs::Advanced_SIMD_arch, .tagName: "Tag_Advanced_SIMD_arch"},
30 {.attr: ARMBuildAttrs::MVE_arch, .tagName: "Tag_MVE_arch"},
31 {.attr: ARMBuildAttrs::PCS_config, .tagName: "Tag_PCS_config"},
32 {.attr: ARMBuildAttrs::ABI_PCS_R9_use, .tagName: "Tag_ABI_PCS_R9_use"},
33 {.attr: ARMBuildAttrs::ABI_PCS_RW_data, .tagName: "Tag_ABI_PCS_RW_data"},
34 {.attr: ARMBuildAttrs::ABI_PCS_RO_data, .tagName: "Tag_ABI_PCS_RO_data"},
35 {.attr: ARMBuildAttrs::ABI_PCS_GOT_use, .tagName: "Tag_ABI_PCS_GOT_use"},
36 {.attr: ARMBuildAttrs::ABI_PCS_wchar_t, .tagName: "Tag_ABI_PCS_wchar_t"},
37 {.attr: ARMBuildAttrs::ABI_FP_rounding, .tagName: "Tag_ABI_FP_rounding"},
38 {.attr: ARMBuildAttrs::ABI_FP_denormal, .tagName: "Tag_ABI_FP_denormal"},
39 {.attr: ARMBuildAttrs::ABI_FP_exceptions, .tagName: "Tag_ABI_FP_exceptions"},
40 {.attr: ARMBuildAttrs::ABI_FP_user_exceptions, .tagName: "Tag_ABI_FP_user_exceptions"},
41 {.attr: ARMBuildAttrs::ABI_FP_number_model, .tagName: "Tag_ABI_FP_number_model"},
42 {.attr: ARMBuildAttrs::ABI_align_needed, .tagName: "Tag_ABI_align_needed"},
43 {.attr: ARMBuildAttrs::ABI_align_preserved, .tagName: "Tag_ABI_align_preserved"},
44 {.attr: ARMBuildAttrs::ABI_enum_size, .tagName: "Tag_ABI_enum_size"},
45 {.attr: ARMBuildAttrs::ABI_HardFP_use, .tagName: "Tag_ABI_HardFP_use"},
46 {.attr: ARMBuildAttrs::ABI_VFP_args, .tagName: "Tag_ABI_VFP_args"},
47 {.attr: ARMBuildAttrs::ABI_WMMX_args, .tagName: "Tag_ABI_WMMX_args"},
48 {.attr: ARMBuildAttrs::ABI_optimization_goals, .tagName: "Tag_ABI_optimization_goals"},
49 {.attr: ARMBuildAttrs::ABI_FP_optimization_goals, .tagName: "Tag_ABI_FP_optimization_goals"},
50 {.attr: ARMBuildAttrs::compatibility, .tagName: "Tag_compatibility"},
51 {.attr: ARMBuildAttrs::CPU_unaligned_access, .tagName: "Tag_CPU_unaligned_access"},
52 {.attr: ARMBuildAttrs::FP_HP_extension, .tagName: "Tag_FP_HP_extension"},
53 {.attr: ARMBuildAttrs::ABI_FP_16bit_format, .tagName: "Tag_ABI_FP_16bit_format"},
54 {.attr: ARMBuildAttrs::MPextension_use, .tagName: "Tag_MPextension_use"},
55 {.attr: ARMBuildAttrs::DIV_use, .tagName: "Tag_DIV_use"},
56 {.attr: ARMBuildAttrs::DSP_extension, .tagName: "Tag_DSP_extension"},
57 {.attr: ARMBuildAttrs::PAC_extension, .tagName: "Tag_PAC_extension"},
58 {.attr: ARMBuildAttrs::BTI_extension, .tagName: "Tag_BTI_extension"},
59 {.attr: ARMBuildAttrs::BTI_use, .tagName: "Tag_BTI_use"},
60 {.attr: ARMBuildAttrs::PACRET_use, .tagName: "Tag_PACRET_use"},
61 {.attr: ARMBuildAttrs::nodefaults, .tagName: "Tag_nodefaults"},
62 {.attr: ARMBuildAttrs::also_compatible_with, .tagName: "Tag_also_compatible_with"},
63 {.attr: ARMBuildAttrs::T2EE_use, .tagName: "Tag_T2EE_use"},
64 {.attr: ARMBuildAttrs::conformance, .tagName: "Tag_conformance"},
65 {.attr: ARMBuildAttrs::Virtualization_use, .tagName: "Tag_Virtualization_use"},
66
67 // Legacy Names
68 {.attr: ARMBuildAttrs::FP_arch, .tagName: "Tag_VFP_arch"},
69 {.attr: ARMBuildAttrs::FP_HP_extension, .tagName: "Tag_VFP_HP_extension"},
70 {.attr: ARMBuildAttrs::ABI_align_needed, .tagName: "Tag_ABI_align8_needed"},
71 {.attr: ARMBuildAttrs::ABI_align_preserved, .tagName: "Tag_ABI_align8_preserved"},
72};
73
74constexpr TagNameMap ARMAttributeTags{tagData};
75const TagNameMap &llvm::ARMBuildAttrs::getARMAttributeTags() {
76 return ARMAttributeTags;
77}
78