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]

RE: [PATCH][GAS][AArch64] Move new FP16 instructions to new flag


Hi All,

As was pointed out to fp16 is not mandatory on any architecture,

So I have modified this patch accordingly.

Regtested on aarch64-none-elf and no issues.

Ok for master?
Thanks,
Tamar

gas/
2017-11-15  Tamar Christina  <tamar.christina@arm.com>

	* config/tc-aarch64.c (fp16fml): New.
	* doc/c-aarch64.texi (fp16fml): New.
	* testsuite/gas/aarch64/armv8_2-a-crypto-fp16.d (fp16): Make fp16fml.
	* testsuite/gas/aarch64/armv8_3-a-crypto-fp16.d (fp16): Make fp16fml.
	

include/
2017-11-15  Tamar Christina  <tamar.christina@arm.com>

	* opcode/aarch64.h: (AARCH64_FEATURE_F16_FML): New.
	(AARCH64_ARCH_V8_4): Enable AARCH64_FEATURE_F16_FML by default.

opcodes/
2017-11-15  Tamar Christina  <tamar.christina@arm.com>

	* aarch64-tbl.h (aarch64_feature_fp_16_v8_2): Require AARCH64_FEATURE_F16_FML
	and AARCH64_FEATURE_F16.

> -----Original Message-----
> From: binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] On Behalf Of Tamar Christina
> Sent: Wednesday, November 15, 2017 11:51
> To: binutils@sourceware.org
> Cc: nd <nd@arm.com>; Richard Earnshaw <Richard.Earnshaw@arm.com>;
> Marcus Shawcroft <Marcus.Shawcroft@arm.com>
> Subject: [PATCH][GAS][AArch64] Move new FP16 instructions to new flag
> 
> Hi All,
> 
> This patch separates the new FP16 instructions backported from Armv8.4-a
> to Armv8.2-a into a new flag order to distinguish them from the rest of the
> already existing optional
> FP16 instructions in Armv8.2-a.
> 
> The new flag "+fp16fml" is available from Armv8.2-a and implies +fp16 and is
> mandatory on Armv8.4-a.
> 
> Regtested on aarch64-none-elf and no regressions.
> 
> Ok for master?
> 
> Thanks,
> Tamar
> 
> gas/
> 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
> 
> 	* config/tc-aarch64.c (fp16fml): New.
> 	* doc/c-aarch64.texi (fp16fml): New.
> 	* testsuite/gas/aarch64/armv8_2-a-crypto-fp16.d (fp16): Make
> fp16fml.
> 	* testsuite/gas/aarch64/armv8_3-a-crypto-fp16.d (fp16): Make
> fp16fml.
> 	* testsuite/gas/aarch64/armv8_4-a-crypto-fp16.d (fp16): Remove
> +fp16.
> 
> 
> include/
> 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
> 
> 	* opcode/aarch64.h: (AARCH64_FEATURE_F16_FML): New.
> 	(AARCH64_ARCH_V8_2): Enable AARCH64_FEATURE_F16 by default.
> 	(AARCH64_ARCH_V8_4): Enable AARCH64_FEATURE_F16_FML by
> default.
> 
> opcodes/
> 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
> 
> 	* aarch64-tbl.h (aarch64_feature_fp_16_v8_2): Use
> AARCH64_FEATURE_F16_FML.
> 
> --
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 84b3dc7a84da9a9cc971e659debff42068455b65..f964441ad303c65cf817fbbd46240dda1b441622 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -8498,6 +8498,9 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = {
 			AARCH64_FEATURE (AARCH64_FEATURE_SIMD, 0)},
   {"fp16",		AARCH64_FEATURE (AARCH64_FEATURE_F16, 0),
 			AARCH64_FEATURE (AARCH64_FEATURE_FP, 0)},
+  {"fp16fml",		AARCH64_FEATURE (AARCH64_FEATURE_F16_FML, 0),
+			AARCH64_FEATURE (AARCH64_FEATURE_FP
+					 | AARCH64_FEATURE_F16, 0)},
   {"profile",		AARCH64_FEATURE (AARCH64_FEATURE_PROFILE, 0),
 			AARCH64_ARCH_NONE},
   {"sve",		AARCH64_FEATURE (AARCH64_FEATURE_SVE, 0),
diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi
index 7d872b0049f9e466f4d2aa7e4a82276cfb9755a5..538b103e2034f805e5fd768e93d39ff326298dae 100644
--- a/gas/doc/c-aarch64.texi
+++ b/gas/doc/c-aarch64.texi
@@ -176,6 +176,9 @@ automatically cause those extensions to be disabled.
  @code{simd} and @code{compnum}.
 @item @code{dotprod} @tab ARMv8.2-A @tab ARMv8.4-A or later
  @tab Enable the Dot Product extension.  This implies @code{simd}.
+@item @code{fp16fml} @tab ARMv8.2-A @tab ARMv8.4-A or later
+ @tab Enable ARMv8.2 16-bit floating-point multiplication variant support.
+ This implies @code{fp16}.
 @end multitable
 
 @node AArch64 Syntax
diff --git a/gas/testsuite/gas/aarch64/armv8_2-a-crypto-fp16.d b/gas/testsuite/gas/aarch64/armv8_2-a-crypto-fp16.d
index 10c7786e4ad59cce02c5eae3de9b332cc88a2fcb..244ba1424c53a3926ad7c5a15ff2f3802c7ad93e 100644
--- a/gas/testsuite/gas/aarch64/armv8_2-a-crypto-fp16.d
+++ b/gas/testsuite/gas/aarch64/armv8_2-a-crypto-fp16.d
@@ -1,4 +1,4 @@
-#as: -march=armv8.2-a+crypto+sm4+sha3+fp16
+#as: -march=armv8.2-a+crypto+sm4+sha3+fp16fml
 #objdump: -dr
 
 .*:     file format .*
diff --git a/gas/testsuite/gas/aarch64/armv8_3-a-crypto-fp16.d b/gas/testsuite/gas/aarch64/armv8_3-a-crypto-fp16.d
index 93909f17720743eb6010a022f3134aca389d991a..6a4c9e3a4421a5b6712d9ef0d9459d6eba2a991f 100644
--- a/gas/testsuite/gas/aarch64/armv8_3-a-crypto-fp16.d
+++ b/gas/testsuite/gas/aarch64/armv8_3-a-crypto-fp16.d
@@ -1,4 +1,4 @@
-#as: -march=armv8.3-a+crypto+sm4+sha3+fp16
+#as: -march=armv8.3-a+crypto+sm4+sha3+fp16fml
 #source: armv8_2-a-crypto-fp16.s
 #objdump: -dr
 
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index a1bc81a4e6b2ddb409b1fb053dbdcff666450658..6e1931122abc5b25fdae74581aebab5e220be126 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -61,6 +61,7 @@ typedef uint32_t aarch64_insn;
 #define AARCH64_FEATURE_RCPC	0x20000000	/* RCPC instructions.  */
 #define AARCH64_FEATURE_COMPNUM	0x40000000	/* Complex # instructions.  */
 #define AARCH64_FEATURE_DOTPROD 0x080000000     /* Dot Product instructions.  */
+#define AARCH64_FEATURE_F16_FML	0x1000000000ULL	/* v8.2 FP16FML ins.  */
 
 /* Architectures are the sum of the base and extensions.  */
 #define AARCH64_ARCH_V8		AARCH64_FEATURE (AARCH64_FEATURE_V8, \
@@ -82,7 +83,8 @@ typedef uint32_t aarch64_insn;
 						 | AARCH64_FEATURE_COMPNUM)
 #define AARCH64_ARCH_V8_4	AARCH64_FEATURE (AARCH64_ARCH_V8_3,	\
 						 AARCH64_FEATURE_V8_4   \
-						 | AARCH64_FEATURE_DOTPROD)
+						 | AARCH64_FEATURE_DOTPROD \
+						 | AARCH64_FEATURE_F16_FML)
 
 #define AARCH64_ARCH_NONE	AARCH64_FEATURE (0, 0)
 #define AARCH64_ANY		AARCH64_FEATURE (-1, 0)	/* Any basic core.  */
diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h
index ad6fae4f6fdfcfbadab8e6d844170d36c6e40526..11587dc5733ec2d62b9ab7eda253bfadb455d850 100644
--- a/opcodes/aarch64-tbl.h
+++ b/opcodes/aarch64-tbl.h
@@ -2143,8 +2143,8 @@ static const aarch64_feature_set aarch64_feature_sha3 =
   AARCH64_FEATURE (AARCH64_FEATURE_V8_2 | AARCH64_FEATURE_SHA2
 		   | AARCH64_FEATURE_SHA3 | AARCH64_FEATURE_SIMD | AARCH64_FEATURE_FP, 0);
 static const aarch64_feature_set aarch64_feature_fp_16_v8_2 =
-  AARCH64_FEATURE (AARCH64_FEATURE_V8_2 | AARCH64_FEATURE_F16
-		   | AARCH64_FEATURE_FP, 0);
+  AARCH64_FEATURE (AARCH64_FEATURE_V8_2 | AARCH64_FEATURE_F16_FML
+		   | AARCH64_FEATURE_F16 | AARCH64_FEATURE_FP, 0);
 
 #define CORE		&aarch64_feature_v8
 #define FP		&aarch64_feature_fp

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