From 9411fd44aa4adfb0caeebd9e4355a3441d9bc104 Mon Sep 17 00:00:00 2001 From: Matthew Wahab Date: Fri, 4 Mar 2016 14:16:48 +0000 Subject: [PATCH] [ARM] Build attributes for ARMv8.1-A AdvSIMD binutils/ 2016-03-04 Matthew Wahab * readelf.c (arm_attry_tag_FP_arch): Add "NEON for ARMv8.1". gas/ 2016-03-04 Matthew Wahab * config/tc-arm.c (aeabi_set_public_attributes): Emit attribute for ARMv8.1 AdvSIMD use. * testsuite/gas/arm/attr-march-armv8-a+rdma.d: New. * testsuite/gas/arm/attr-march-armv8_1-a+simd.d: New. Change-Id: I3c356e0681b97df2f9c0dabd7c0fd1b441cc2755 --- binutils/ChangeLog | 4 ++++ binutils/readelf.c | 3 ++- gas/ChangeLog | 7 +++++++ gas/config/tc-arm.c | 4 +++- .../gas/arm/attr-march-armv8-a+rdma.d | 18 ++++++++++++++++++ .../gas/arm/attr-march-armv8_1-a+simd.d | 18 ++++++++++++++++++ 6 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/arm/attr-march-armv8-a+rdma.d create mode 100644 gas/testsuite/gas/arm/attr-march-armv8_1-a+simd.d diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 56c8adc87be..7ba4aecfc4e 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2016-03-04 Matthew Wahab + + * readelf.c (arm_attry_tag_FP_arch): Add "NEON for ARMv8.1". + 2016-02-26 H.J. Lu PR ld/19645 diff --git a/binutils/readelf.c b/binutils/readelf.c index a40453d367f..7deac04e9f7 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -12775,7 +12775,8 @@ static const char * arm_attr_tag_FP_arch[] = "FP for ARMv8", "FPv5/FP-D16 for ARMv8"}; static const char * arm_attr_tag_WMMX_arch[] = {"No", "WMMXv1", "WMMXv2"}; static const char * arm_attr_tag_Advanced_SIMD_arch[] = - {"No", "NEONv1", "NEONv1 with Fused-MAC", "NEON for ARMv8"}; + {"No", "NEONv1", "NEONv1 with Fused-MAC", "NEON for ARMv8", + "NEON for ARMv8.1"}; static const char * arm_attr_tag_PCS_config[] = {"None", "Bare platform", "Linux application", "Linux DSO", "PalmOS 2004", "PalmOS (reserved)", "SymbianOS 2004", "SymbianOS (reserved)"}; diff --git a/gas/ChangeLog b/gas/ChangeLog index 1bdc9e56994..14868ac218d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2016-03-04 Matthew Wahab + + * config/tc-arm.c (aeabi_set_public_attributes): Emit attribute + for ARMv8.1 AdvSIMD use. + * testsuite/gas/arm/attr-march-armv8-a+rdma.d: New. + * testsuite/gas/arm/attr-march-armv8_1-a+simd.d: New. + 2016-03-04 Matthew Wahab * config/gas/tc-arm.c (fpu_neon_ext_v8_1): Restrict to the ARMv8.1 RDMA diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index e725f41abb4..693022036d6 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -26158,7 +26158,9 @@ aeabi_set_public_attributes (void) aeabi_set_attribute_int (Tag_WMMX_arch, 1); /* Tag_Advanced_SIMD_arch (formerly Tag_NEON_arch). */ - if (ARM_CPU_HAS_FEATURE (flags, fpu_neon_ext_armv8)) + if (ARM_CPU_HAS_FEATURE (flags, fpu_neon_ext_v8_1)) + aeabi_set_attribute_int (Tag_Advanced_SIMD_arch, 4); + else if (ARM_CPU_HAS_FEATURE (flags, fpu_neon_ext_armv8)) aeabi_set_attribute_int (Tag_Advanced_SIMD_arch, 3); else if (ARM_CPU_HAS_FEATURE (flags, fpu_neon_ext_v1)) { diff --git a/gas/testsuite/gas/arm/attr-march-armv8-a+rdma.d b/gas/testsuite/gas/arm/attr-march-armv8-a+rdma.d new file mode 100644 index 00000000000..76414d0223a --- /dev/null +++ b/gas/testsuite/gas/arm/attr-march-armv8-a+rdma.d @@ -0,0 +1,18 @@ +# name: attributes for -march=armv8-a+rdma +# source: blank.s +# as: -march=armv8-a+rdma +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi* *-*-nacl* + +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "8-A" + Tag_CPU_arch: v8 + Tag_CPU_arch_profile: Application + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-2 + Tag_FP_arch: FP for ARMv8 + Tag_Advanced_SIMD_arch: NEON for ARMv8.1 + Tag_MPextension_use: Allowed + Tag_Virtualization_use: TrustZone and Virtualization Extensions diff --git a/gas/testsuite/gas/arm/attr-march-armv8_1-a+simd.d b/gas/testsuite/gas/arm/attr-march-armv8_1-a+simd.d new file mode 100644 index 00000000000..de002a6a3b8 --- /dev/null +++ b/gas/testsuite/gas/arm/attr-march-armv8_1-a+simd.d @@ -0,0 +1,18 @@ +# name: attributes for -march=armv8.1-a+simd +# source: blank.s +# as: -march=armv8.1-a+simd +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi* *-*-nacl* + +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "8.1-A" + Tag_CPU_arch: v8 + Tag_CPU_arch_profile: Application + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-2 + Tag_FP_arch: FP for ARMv8 + Tag_Advanced_SIMD_arch: NEON for ARMv8.1 + Tag_MPextension_use: Allowed + Tag_Virtualization_use: TrustZone and Virtualization Extensions -- 2.30.2