xref: /netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Support/ARMAttributeParser.h (revision 82d56013d7b633d116a93943de88e08335357a7c)
1*82d56013Sjoerg //===- ARMAttributeParser.h - ARM Attribute Information Printer -*- C++ -*-===//
27330f729Sjoerg //
37330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
47330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information.
57330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
67330f729Sjoerg //
77330f729Sjoerg //===----------------------------------------------------------------------===//
87330f729Sjoerg 
97330f729Sjoerg #ifndef LLVM_SUPPORT_ARMATTRIBUTEPARSER_H
107330f729Sjoerg #define LLVM_SUPPORT_ARMATTRIBUTEPARSER_H
117330f729Sjoerg 
127330f729Sjoerg #include "ARMBuildAttributes.h"
13*82d56013Sjoerg #include "ELFAttributeParser.h"
147330f729Sjoerg #include "ScopedPrinter.h"
15*82d56013Sjoerg #include "llvm/ADT/ArrayRef.h"
16*82d56013Sjoerg #include "llvm/Support/DataExtractor.h"
17*82d56013Sjoerg #include "llvm/Support/Endian.h"
18*82d56013Sjoerg #include "llvm/Support/Error.h"
197330f729Sjoerg 
207330f729Sjoerg namespace llvm {
217330f729Sjoerg class StringRef;
227330f729Sjoerg 
23*82d56013Sjoerg class ARMAttributeParser : public ELFAttributeParser {
247330f729Sjoerg   struct DisplayHandler {
25*82d56013Sjoerg     ARMBuildAttrs::AttrType attribute;
26*82d56013Sjoerg     Error (ARMAttributeParser::*routine)(ARMBuildAttrs::AttrType);
277330f729Sjoerg   };
28*82d56013Sjoerg   static const DisplayHandler displayRoutines[];
297330f729Sjoerg 
30*82d56013Sjoerg   Error handler(uint64_t tag, bool &handled) override;
317330f729Sjoerg 
32*82d56013Sjoerg   Error stringAttribute(ARMBuildAttrs::AttrType tag);
337330f729Sjoerg 
34*82d56013Sjoerg   Error CPU_arch(ARMBuildAttrs::AttrType tag);
35*82d56013Sjoerg   Error CPU_arch_profile(ARMBuildAttrs::AttrType tag);
36*82d56013Sjoerg   Error ARM_ISA_use(ARMBuildAttrs::AttrType tag);
37*82d56013Sjoerg   Error THUMB_ISA_use(ARMBuildAttrs::AttrType tag);
38*82d56013Sjoerg   Error FP_arch(ARMBuildAttrs::AttrType tag);
39*82d56013Sjoerg   Error WMMX_arch(ARMBuildAttrs::AttrType tag);
40*82d56013Sjoerg   Error Advanced_SIMD_arch(ARMBuildAttrs::AttrType tag);
41*82d56013Sjoerg   Error MVE_arch(ARMBuildAttrs::AttrType tag);
42*82d56013Sjoerg   Error PCS_config(ARMBuildAttrs::AttrType tag);
43*82d56013Sjoerg   Error ABI_PCS_R9_use(ARMBuildAttrs::AttrType tag);
44*82d56013Sjoerg   Error ABI_PCS_RW_data(ARMBuildAttrs::AttrType tag);
45*82d56013Sjoerg   Error ABI_PCS_RO_data(ARMBuildAttrs::AttrType tag);
46*82d56013Sjoerg   Error ABI_PCS_GOT_use(ARMBuildAttrs::AttrType tag);
47*82d56013Sjoerg   Error ABI_PCS_wchar_t(ARMBuildAttrs::AttrType tag);
48*82d56013Sjoerg   Error ABI_FP_rounding(ARMBuildAttrs::AttrType tag);
49*82d56013Sjoerg   Error ABI_FP_denormal(ARMBuildAttrs::AttrType tag);
50*82d56013Sjoerg   Error ABI_FP_exceptions(ARMBuildAttrs::AttrType tag);
51*82d56013Sjoerg   Error ABI_FP_user_exceptions(ARMBuildAttrs::AttrType tag);
52*82d56013Sjoerg   Error ABI_FP_number_model(ARMBuildAttrs::AttrType tag);
53*82d56013Sjoerg   Error ABI_align_needed(ARMBuildAttrs::AttrType tag);
54*82d56013Sjoerg   Error ABI_align_preserved(ARMBuildAttrs::AttrType tag);
55*82d56013Sjoerg   Error ABI_enum_size(ARMBuildAttrs::AttrType tag);
56*82d56013Sjoerg   Error ABI_HardFP_use(ARMBuildAttrs::AttrType tag);
57*82d56013Sjoerg   Error ABI_VFP_args(ARMBuildAttrs::AttrType tag);
58*82d56013Sjoerg   Error ABI_WMMX_args(ARMBuildAttrs::AttrType tag);
59*82d56013Sjoerg   Error ABI_optimization_goals(ARMBuildAttrs::AttrType tag);
60*82d56013Sjoerg   Error ABI_FP_optimization_goals(ARMBuildAttrs::AttrType tag);
61*82d56013Sjoerg   Error compatibility(ARMBuildAttrs::AttrType tag);
62*82d56013Sjoerg   Error CPU_unaligned_access(ARMBuildAttrs::AttrType tag);
63*82d56013Sjoerg   Error FP_HP_extension(ARMBuildAttrs::AttrType tag);
64*82d56013Sjoerg   Error ABI_FP_16bit_format(ARMBuildAttrs::AttrType tag);
65*82d56013Sjoerg   Error MPextension_use(ARMBuildAttrs::AttrType tag);
66*82d56013Sjoerg   Error DIV_use(ARMBuildAttrs::AttrType tag);
67*82d56013Sjoerg   Error DSP_extension(ARMBuildAttrs::AttrType tag);
68*82d56013Sjoerg   Error T2EE_use(ARMBuildAttrs::AttrType tag);
69*82d56013Sjoerg   Error Virtualization_use(ARMBuildAttrs::AttrType tag);
70*82d56013Sjoerg   Error nodefaults(ARMBuildAttrs::AttrType tag);
717330f729Sjoerg 
727330f729Sjoerg public:
ARMAttributeParser(ScopedPrinter * sw)73*82d56013Sjoerg   ARMAttributeParser(ScopedPrinter *sw)
74*82d56013Sjoerg       : ELFAttributeParser(sw, ARMBuildAttrs::ARMAttributeTags, "aeabi") {}
ARMAttributeParser()75*82d56013Sjoerg   ARMAttributeParser()
76*82d56013Sjoerg       : ELFAttributeParser(ARMBuildAttrs::ARMAttributeTags, "aeabi") {}
777330f729Sjoerg };
787330f729Sjoerg }
797330f729Sjoerg 
807330f729Sjoerg #endif
81