]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[AArch64] Add feature flags and command line for ARMv8.2 FP16 support.
authorMatthew Wahab <matthew.wahab@arm.com>
Fri, 27 Nov 2015 13:19:50 +0000 (13:19 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 24 Aug 2017 12:46:27 +0000 (09:46 -0300)
ARMv8.2 adds optional support for 16-bit operations to the FP and
Adv.SIMD instructions. This patch adds a feature macro for this support
with a new command line option "+fp16" to enable/disable it.

Although the command line option is added as an architecture extension,
it only affects instructions available with when +fp or +simd is
enabled. If +fp16 is specified then it will also enable +fp.

There are currently no FP16 instructions implemented in binutils, this
patch is to enable subsequent work on supporting the extension.

gas/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-aarch64.c (aarch64_features): Add "fp16".
* doc/c-aarch64.texi (Architecture Extensions): Add "fp16".

include/opcode/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_F16): New.
(AARCH64_ARCH_V8_2): Add AARCH64_FEATURE_F16 to ARMv8.2
features.

Change-Id: Id2021e0513946e16d0935c2a5b9605574cdff95a

gas/ChangeLog
gas/config/tc-aarch64.c
gas/doc/c-aarch64.texi
include/opcode/ChangeLog
include/opcode/aarch64.h

index c5c0dfef14a1f132bc103a30d2052ad34e9dec1b..1e4df989437a9f61dcda88cc1174a9f1b74da0b0 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>
+
+       * config/tc-aarch64.c (aarch64_features): Add "fp16".
+       * doc/c-aarch64.texi (Architecture Extensions): Add "fp16".
+
 2015-11-19  Matthew Wahab  <matthew.wahab@arm.com>
 
        * config/tc-arm.c (arm_archs): Add "armv8.2-a".
index 454db7281fcf4bf26a0050eaa7758a26774bbe7c..c52f441265a0994d907bf2ba92f7992696176b1a 100644 (file)
@@ -7247,6 +7247,8 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = {
   {"lor",              AARCH64_FEATURE (AARCH64_FEATURE_LOR, 0)},
   {"rdma",             AARCH64_FEATURE (AARCH64_FEATURE_SIMD
                                         | AARCH64_FEATURE_RDMA, 0)},
+  {"fp16",             AARCH64_FEATURE (AARCH64_FEATURE_F16
+                                        | AARCH64_FEATURE_FP, 0)},
   {NULL,               AARCH64_ARCH_NONE}
 };
 
index 0acae3b0cde420430c6528823da39ee6ba60486b..de456735491cfe8d1c1c29e0d8ad3fbb69944b86 100644 (file)
@@ -137,6 +137,9 @@ automatically cause those extensions to be disabled.
  @tab Enable Limited Ordering Regions extensions.
 @item @code{rdma} @tab ARMv8-A @tab ARMv8-A or later
  @tab Enable ARMv8.1 Advanced SIMD extensions.  This implies @code{simd}.
+@item @code{fp16} @tab ARMv8.2-A @tab ARMv8.2-A or later
+ @tab Enable ARMv8.2 16-bit floating-point support.  This implies
+ @code{fp}.
 @end multitable
 
 @node AArch64 Syntax
index e027c424193ce429d7626f1a2dc08fc21e249927..17604ec9d30903d6a87ab6a4018a970947f7c014 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>
+
+       * aarch64.h (AARCH64_FEATURE_F16): New.
+       (AARCH64_ARCH_V8_2): Add AARCH64_FEATURE_F16 to ARMv8.2
+       features.
+
 2015-11-20  Matthew Wahab  <matthew.wahab@arm.com>
 
        * aarch64.h (AARCH64_FEATURE_V8_1): New.
index 80ca48bdcf7b05736a4600bbf562bba6721753a4..a0559de099d24fbce83e37d71338070a1814d801 100644 (file)
@@ -44,6 +44,7 @@ typedef uint32_t aarch64_insn;
 #define AARCH64_FEATURE_LOR    0x00400000      /* LOR instructions.  */
 #define AARCH64_FEATURE_RDMA   0x00800000      /* v8.1 SIMD instructions.  */
 #define AARCH64_FEATURE_V8_1   0x01000000      /* v8.1 features.  */
+#define AARCH64_FEATURE_F16    0x01000000      /* v8.2 FP16 instructions.  */
 
 /* Architectures are the sum of the base and extensions.  */
 #define AARCH64_ARCH_V8                AARCH64_FEATURE (AARCH64_FEATURE_V8, \
@@ -59,6 +60,7 @@ typedef uint32_t aarch64_insn;
                                                 | AARCH64_FEATURE_RDMA)
 #define AARCH64_ARCH_V8_2      AARCH64_FEATURE (AARCH64_FEATURE_V8,    \
                                                 AARCH64_FEATURE_V8_2   \
+                                                | AARCH64_FEATURE_F16  \
                                                 | AARCH64_FEATURE_FP   \
                                                 | AARCH64_FEATURE_SIMD \
                                                 | AARCH64_FEATURE_LSE  \