This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ARM] Build attributes for ARMv8.1-A AdvSIMD


Hello,

The ARM 32-bit ABI sets the build attribute Tag_Advanced_SIMD_arch to 4
for object files using the ARMv8.1 AdvSIMD instructions (enabled with
+rdma). This patch adds support to binutils for this value, emitting it
when ARMv8.1 AdvSIMD is used or when the user specifies ARMv8.1
AdvSIMD as a target.

The build attribute is described in the addenda to version 2.10 of the
ABI, available at
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045e/IHI0045E_ABI_addenda.pdf.

This patch depends on
https://sourceware.org/ml/binutils/2016-02/msg00392.html which records
the use of the ARMv8.1 AdvSIMD features.

Tested for arm-none-linux-gnueabihf and for arm-none-eabi with
cross-compiled check-binutils, check-ld and check-gas.

Ok for trunk?
Matthew

binutils/
2016-02-25  Matthew Wahab  <matthew.wahab@arm.com>

	* readelf.c (arm_attry_tag_FP_arch): Add "NEON for ARMv8.1".

gas/
2016-02-25  Matthew Wahab  <matthew.wahab@arm.com>

	* config/tc-arm.c (aeabi_set_public_attributes): Emit attribute
	for ARMv8.1 AdvSIMD use.

gas/testsuite/
2016-02-25  Matthew Wahab  <matthew.wahab@arm.com>

	* gas/arm/attr-march-armv8-a+rdma.d: New.
	* gas/arm/attr-march-armv8_1-a+simd.d: New.
>From df885a7946182fc8aba8985df292bb2ad6da7969 Mon Sep 17 00:00:00 2001
From: Matthew Wahab <matthew.wahab@arm.com>
Date: Fri, 8 Jan 2016 13:15:07 +0000
Subject: [PATCH] [ARM] Add the Tag_Advanced_SIMD_arc build attribute for
 ARMv8.1

Change-Id: If81f62eed61448042d310e4538d360d0ea7a6f8a
---
 binutils/readelf.c                                |  3 ++-
 gas/config/tc-arm.c                               |  4 +++-
 gas/testsuite/gas/arm/attr-march-armv8-a+rdma.d   | 18 ++++++++++++++++++
 gas/testsuite/gas/arm/attr-march-armv8_1-a+simd.d | 18 ++++++++++++++++++
 4 files changed, 41 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/readelf.c b/binutils/readelf.c
index 7a755b4..4497192 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12774,7 +12774,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/config/tc-arm.c b/gas/config/tc-arm.c
index 3b110bb..5c5b040 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -25894,7 +25894,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 0000000..76414d0
--- /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 0000000..de002a6
--- /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.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]