diff --git a/include/llvm/Support/ARMBuildAttributes.h b/include/llvm/Support/ARMBuildAttributes.h index eef30cb2a4c..ef52ffba085 100644 --- a/include/llvm/Support/ARMBuildAttributes.h +++ b/include/llvm/Support/ARMBuildAttributes.h @@ -33,8 +33,6 @@ enum SpecialAttr { enum AttrType { // Rest correspond to ELF/.ARM.attributes File = 1, - Section = 2, - Symbol = 3, CPU_raw_name = 4, CPU_name = 5, CPU_arch = 6, @@ -55,8 +53,8 @@ enum AttrType { ABI_FP_exceptions = 21, ABI_FP_user_exceptions = 22, ABI_FP_number_model = 23, - ABI_align8_needed = 24, - ABI_align8_preserved = 25, + ABI_align_needed = 24, + ABI_align_preserved = 25, ABI_enum_size = 26, ABI_HardFP_use = 27, ABI_VFP_args = 28, @@ -67,14 +65,20 @@ enum AttrType { CPU_unaligned_access = 34, FP_HP_extension = 36, ABI_FP_16bit_format = 38, - MPextension_use = 42, // was 70, 2.08 ABI + MPextension_use = 42, // recoded from 70 (ABI r2.08) DIV_use = 44, - nodefaults = 64, also_compatible_with = 65, - T2EE_use = 66, conformance = 67, Virtualization_use = 68, - MPextension_use_old = 70 + + /// Legacy Tags + Section = 2, // deprecated (ABI r2.09) + Symbol = 3, // deprecated (ABI r2.09) + ABI_align8_needed = 24, // renamed to ABI_align_needed (ABI r2.09) + ABI_align8_preserved = 25, // renamed to ABI_align_preserved (ABI r2.09) + nodefaults = 64, // deprecated (ABI r2.09) + T2EE_use = 66, // deprecated (ABI r2.09) + MPextension_use_old = 70 // recoded to MPextension_use (ABI r2.08) }; StringRef AttrTypeAsString(unsigned Attr, bool HasTagPrefix = true); diff --git a/lib/Support/ARMBuildAttrs.cpp b/lib/Support/ARMBuildAttrs.cpp index 14b7b0dd31d..960a0f13c67 100644 --- a/lib/Support/ARMBuildAttrs.cpp +++ b/lib/Support/ARMBuildAttrs.cpp @@ -40,8 +40,8 @@ const struct { { ARMBuildAttrs::ABI_FP_exceptions, "Tag_ABI_FP_exceptions" }, { ARMBuildAttrs::ABI_FP_user_exceptions, "Tag_ABI_FP_user_exceptions" }, { ARMBuildAttrs::ABI_FP_number_model, "Tag_ABI_FP_number_model" }, - { ARMBuildAttrs::ABI_align8_needed, "Tag_ABI_align8_needed" }, - { ARMBuildAttrs::ABI_align8_preserved, "Tag_ABI_align8_preserved" }, + { ARMBuildAttrs::ABI_align_needed, "Tag_ABI_align_needed" }, + { ARMBuildAttrs::ABI_align_preserved, "Tag_ABI_align_preserved" }, { ARMBuildAttrs::ABI_enum_size, "Tag_ABI_enum_size" }, { ARMBuildAttrs::ABI_HardFP_use, "Tag_ABI_HardFP_use" }, { ARMBuildAttrs::ABI_VFP_args, "Tag_ABI_VFP_args" }, @@ -62,9 +62,9 @@ const struct { // Legacy Names { ARMBuildAttrs::FP_arch, "Tag_VFP_arch" }, - { ARMBuildAttrs::ABI_align8_needed, "Tag_ABI_align_needed" }, - { ARMBuildAttrs::ABI_align8_preserved, "Tag_ABI_align_preserved" }, { ARMBuildAttrs::FP_HP_extension, "Tag_VFP_HP_extension" }, + { ARMBuildAttrs::ABI_align_needed, "Tag_ABI_align8_needed" }, + { ARMBuildAttrs::ABI_align_preserved, "Tag_ABI_align8_preserved" }, }; } diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 697ee77226f..4701cb44884 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -699,8 +699,8 @@ void ARMAsmPrinter::emitAttributes() { // FIXME: add more flags to ARMBuildAttributes.h // 8-bytes alignment stuff. - ATS.emitAttribute(ARMBuildAttrs::ABI_align8_needed, 1); - ATS.emitAttribute(ARMBuildAttrs::ABI_align8_preserved, 1); + ATS.emitAttribute(ARMBuildAttrs::ABI_align_needed, 1); + ATS.emitAttribute(ARMBuildAttrs::ABI_align_preserved, 1); // ABI_HardFP_use attribute to indicate single precision FP. if (Subtarget->isFPOnlySP()) diff --git a/test/CodeGen/ARM/build-attributes.ll b/test/CodeGen/ARM/build-attributes.ll index 1b735a6c278..d49a70d932e 100644 --- a/test/CodeGen/ARM/build-attributes.ll +++ b/test/CodeGen/ARM/build-attributes.ll @@ -170,7 +170,7 @@ ; CORTEX-A7-NOFPU: .eabi_attribute 24, 1 ; CORTEX-A7-FPUV4: .eabi_attribute 24, 1 -; Tag_ABI_align8_preserved +; Tag_ABI_align_preserved ; CORTEX-A7-CHECK: .eabi_attribute 25, 1 ; CORTEX-A7-NOFPU: .eabi_attribute 25, 1 ; CORTEX-A7-FPUV4: .eabi_attribute 25, 1 diff --git a/test/MC/ARM/directive-eabi_attribute-2.s b/test/MC/ARM/directive-eabi_attribute-2.s index fc8dc6149a5..8f00ac80780 100644 --- a/test/MC/ARM/directive-eabi_attribute-2.s +++ b/test/MC/ARM/directive-eabi_attribute-2.s @@ -43,9 +43,9 @@ @ CHECK: .eabi_attribute 22, 1 .eabi_attribute Tag_ABI_FP_number_model, 3 @ CHECK: .eabi_attribute 23, 3 - .eabi_attribute Tag_ABI_align8_needed, 1 + .eabi_attribute Tag_ABI_align_needed, 1 @ CHECK: .eabi_attribute 24, 1 - .eabi_attribute Tag_ABI_align8_preserved, 2 + .eabi_attribute Tag_ABI_align_preserved, 2 @ CHECK: .eabi_attribute 25, 2 .eabi_attribute Tag_ABI_enum_size, 3 @ CHECK: .eabi_attribute 26, 3 @@ -82,6 +82,13 @@ .eabi_attribute Tag_Virtualization_use, 0 @ CHECK: .eabi_attribute 68, 0 +@ ===--- Compatibility Checks ---=== + + .eabi_attribute Tag_ABI_align8_needed, 1 +@ CHECK: .eabi_attribute 24, 1 + .eabi_attribute Tag_ABI_align8_preserved, 2 +@ CHECK: .eabi_attribute 25, 2 + @ ===--- GNU AS Compatibility Checks ---=== .eabi_attribute 2 * 2 + 1, "cortex-a9"