ARMAttributeParser.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- ARMAttributeParser.h - ARM Attribute Information Printer -*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_SUPPORT_ARMATTRIBUTEPARSER_H
  14. #define LLVM_SUPPORT_ARMATTRIBUTEPARSER_H
  15. #include "ARMBuildAttributes.h"
  16. #include "ELFAttributeParser.h"
  17. #include "llvm/ADT/StringRef.h"
  18. #include "llvm/Support/Error.h"
  19. namespace llvm {
  20. class ScopedPrinter;
  21. class ARMAttributeParser : public ELFAttributeParser {
  22. struct DisplayHandler {
  23. ARMBuildAttrs::AttrType attribute;
  24. Error (ARMAttributeParser::*routine)(ARMBuildAttrs::AttrType);
  25. };
  26. static const DisplayHandler displayRoutines[];
  27. Error handler(uint64_t tag, bool &handled) override;
  28. Error stringAttribute(ARMBuildAttrs::AttrType tag);
  29. Error CPU_arch(ARMBuildAttrs::AttrType tag);
  30. Error CPU_arch_profile(ARMBuildAttrs::AttrType tag);
  31. Error ARM_ISA_use(ARMBuildAttrs::AttrType tag);
  32. Error THUMB_ISA_use(ARMBuildAttrs::AttrType tag);
  33. Error FP_arch(ARMBuildAttrs::AttrType tag);
  34. Error WMMX_arch(ARMBuildAttrs::AttrType tag);
  35. Error Advanced_SIMD_arch(ARMBuildAttrs::AttrType tag);
  36. Error MVE_arch(ARMBuildAttrs::AttrType tag);
  37. Error PCS_config(ARMBuildAttrs::AttrType tag);
  38. Error ABI_PCS_R9_use(ARMBuildAttrs::AttrType tag);
  39. Error ABI_PCS_RW_data(ARMBuildAttrs::AttrType tag);
  40. Error ABI_PCS_RO_data(ARMBuildAttrs::AttrType tag);
  41. Error ABI_PCS_GOT_use(ARMBuildAttrs::AttrType tag);
  42. Error ABI_PCS_wchar_t(ARMBuildAttrs::AttrType tag);
  43. Error ABI_FP_rounding(ARMBuildAttrs::AttrType tag);
  44. Error ABI_FP_denormal(ARMBuildAttrs::AttrType tag);
  45. Error ABI_FP_exceptions(ARMBuildAttrs::AttrType tag);
  46. Error ABI_FP_user_exceptions(ARMBuildAttrs::AttrType tag);
  47. Error ABI_FP_number_model(ARMBuildAttrs::AttrType tag);
  48. Error ABI_align_needed(ARMBuildAttrs::AttrType tag);
  49. Error ABI_align_preserved(ARMBuildAttrs::AttrType tag);
  50. Error ABI_enum_size(ARMBuildAttrs::AttrType tag);
  51. Error ABI_HardFP_use(ARMBuildAttrs::AttrType tag);
  52. Error ABI_VFP_args(ARMBuildAttrs::AttrType tag);
  53. Error ABI_WMMX_args(ARMBuildAttrs::AttrType tag);
  54. Error ABI_optimization_goals(ARMBuildAttrs::AttrType tag);
  55. Error ABI_FP_optimization_goals(ARMBuildAttrs::AttrType tag);
  56. Error compatibility(ARMBuildAttrs::AttrType tag);
  57. Error CPU_unaligned_access(ARMBuildAttrs::AttrType tag);
  58. Error FP_HP_extension(ARMBuildAttrs::AttrType tag);
  59. Error ABI_FP_16bit_format(ARMBuildAttrs::AttrType tag);
  60. Error MPextension_use(ARMBuildAttrs::AttrType tag);
  61. Error DIV_use(ARMBuildAttrs::AttrType tag);
  62. Error DSP_extension(ARMBuildAttrs::AttrType tag);
  63. Error T2EE_use(ARMBuildAttrs::AttrType tag);
  64. Error Virtualization_use(ARMBuildAttrs::AttrType tag);
  65. Error PAC_extension(ARMBuildAttrs::AttrType tag);
  66. Error BTI_extension(ARMBuildAttrs::AttrType tag);
  67. Error PACRET_use(ARMBuildAttrs::AttrType tag);
  68. Error BTI_use(ARMBuildAttrs::AttrType tag);
  69. Error nodefaults(ARMBuildAttrs::AttrType tag);
  70. public:
  71. ARMAttributeParser(ScopedPrinter *sw)
  72. : ELFAttributeParser(sw, ARMBuildAttrs::getARMAttributeTags(), "aeabi") {}
  73. ARMAttributeParser()
  74. : ELFAttributeParser(ARMBuildAttrs::getARMAttributeTags(), "aeabi") {}
  75. };
  76. }
  77. #endif
  78. #ifdef __GNUC__
  79. #pragma GCC diagnostic pop
  80. #endif