ARMBuildAttrs.cpp 3.7 KB

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