public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [ARM] Add support for ARMv8.1 command line option.
@ 2015-05-21 10:06 Matthew Wahab
  2015-05-29 15:05 ` Nicholas Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wahab @ 2015-05-21 10:06 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

ARMv8.1 is a set of optional architectural extensions to ARMv8. Support for the
individual extensions, added by other patches, is enabled by adding the
extension name to the "armv8-a" architecture name.  This patch adds support for
using "armv8.1-a" as an architecture name in its own right, making it the same
as "armv8-a" with all ARMv8.1 extensions enabled.

This patch depends on the ARMv8.1 patches submitted earlier:
- PAN extension: https://sourceware.org/ml/binutils/2015-05/msg00209.html
- Adv.SIMD extensions: https://sourceware.org/ml/binutils/2015-05/msg00211.html

Tested with check-binutils and check-gas for arm-none-linux-gnueabihf.

Ok for trunk?
Matthew

gas/
2015-05-21  Matthew Wahab  <matthew.wahab@arm.com>

	* config/tc-arm.c (arm_archs): Add "armv8.1-a".
	* doc/c-arm.texi (ARM Options, -march): Add "armv8.1-a".

include/opcode
2015-05-21  Matthew Wahab  <matthew.wahab@arm.com>

	* arm.h (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1): New.
	(ARM_ARCH_V8_1A): New.
	(ARM_ARCH_V8_1A_FP): New.
	(ARM_ARCH_V8_1A_SIMD): New.
	(ARM_ARCH_V8_1A_CRYPTOV1): New.
	(ARM_FEATURE_CORE): New.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: armv8.1_arch.patch --]
[-- Type: text/x-patch; name=armv8.1_arch.patch, Size: 2987 bytes --]

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index c69a942..b57f85c 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -24650,6 +24650,7 @@ static const struct arm_arch_option_table arm_archs[] =
   ARM_ARCH_OPT ("armv7-m",	ARM_ARCH_V7M,	 FPU_ARCH_VFP),
   ARM_ARCH_OPT ("armv7e-m",	ARM_ARCH_V7EM,	 FPU_ARCH_VFP),
   ARM_ARCH_OPT ("armv8-a",	ARM_ARCH_V8A,	 FPU_ARCH_VFP),
+  ARM_ARCH_OPT ("armv8.1-a",	ARM_ARCH_V8_1A,	 FPU_ARCH_VFP),
   ARM_ARCH_OPT ("xscale",	ARM_ARCH_XSCALE, FPU_ARCH_VFP),
   ARM_ARCH_OPT ("iwmmxt",	ARM_ARCH_IWMMXT, FPU_ARCH_VFP),
   ARM_ARCH_OPT ("iwmmxt2",	ARM_ARCH_IWMMXT2,FPU_ARCH_VFP),
diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi
index acb897f..a1022eb 100644
--- a/gas/doc/c-arm.texi
+++ b/gas/doc/c-arm.texi
@@ -220,6 +220,7 @@ names are recognized:
 @code{armv7-m},
 @code{armv7e-m},
 @code{armv8-a},
+@code{armv8.1-a},
 @code{iwmmxt}
 @code{iwmmxt2}
 and
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index d88ff27..a5aa3a1 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -208,6 +208,9 @@
   ARM_FEATURE_COPROC (FPU_NEON_ARMV8				 \
 		      | FPU_VFP_ARMV8				 \
 		      | FPU_NEON_EXT_RDMA)
+#define FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1 \
+  ARM_FEATURE_COPROC (FPU_CRYPTO_ARMV8 | FPU_NEON_ARMV8 | FPU_VFP_ARMV8 \
+		      | FPU_NEON_EXT_RDMA)
 
 
 #define FPU_ARCH_ENDIAN_PURE ARM_FEATURE_COPROC (FPU_ENDIAN_PURE)
@@ -247,6 +250,7 @@
 #define ARM_ARCH_V7M	ARM_FEATURE_CORE_LOW (ARM_AEXT_V7M)
 #define ARM_ARCH_V7EM	ARM_FEATURE_CORE_LOW (ARM_AEXT_V7EM)
 #define ARM_ARCH_V8A	ARM_FEATURE_CORE_LOW (ARM_AEXT_V8A)
+#define ARM_ARCH_V8_1A	ARM_FEATURE_CORE (ARM_AEXT_V8A, ARM_EXT2_PAN)
 
 /* Some useful combinations:  */
 #define ARM_ARCH_NONE	ARM_FEATURE_LOW (0, 0)
@@ -275,6 +279,17 @@
 #define ARM_ARCH_V8A_CRYPTOV1 	ARM_FEATURE_LOW (ARM_AEXT_V8A, \
 					     FPU_ARCH_CRYPTO_NEON_VFP_ARMV8)
 
+/* v8.1-a+fp.  */
+#define ARM_ARCH_V8_1A_FP	ARM_FEATURE (ARM_AEXT_V8A, ARM_EXT2_PAN, \
+				     FPU_ARCH_VFP_ARMV8)
+/* v8.1-a+simd (implies fp).  */
+#define ARM_ARCH_V8_1A_SIMD	ARM_FEATURE (ARM_AEXT_V8A, ARM_EXT2_PAN, \
+				     FPU_ARCH_NEON_VFP_ARMV8_1)
+/* v8.1-a+crypto (implies simd+fp).  */
+#define ARM_ARCH_V8_1A_CRYPTOV1   ARM_FEATURE (ARM_AEXT_V8A, ARM_EXT2_PAN, \
+					       FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1)
+
+
 /* There are too many feature bits to fit in a single word, so use a
    structure.  For simplicity we put all core features in array CORE
    and everything else in the other.  All the bits in element core[0]
@@ -328,6 +343,7 @@ typedef struct
   ((T1).core[0] == (T2).core[0] && (T1).core[1] == (T2).core[1])
 
 #define ARM_FEATURE_LOW(core, coproc) {{(core), 0}, (coproc)}
+#define ARM_FEATURE_CORE(core1, core2) {{(core1), (core2)}, 0}
 #define ARM_FEATURE_CORE_LOW(core) {{(core), 0}, 0}
 #define ARM_FEATURE_CORE_HIGH(core) {{0, (core)}, 0}
 #define ARM_FEATURE_COPROC(coproc) {{0, 0}, (coproc)}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ARM] Add support for ARMv8.1 command line option.
  2015-05-21 10:06 [ARM] Add support for ARMv8.1 command line option Matthew Wahab
@ 2015-05-29 15:05 ` Nicholas Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nicholas Clifton @ 2015-05-29 15:05 UTC (permalink / raw)
  To: Matthew Wahab, binutils

Hi Matthew,

> gas/
> 2015-05-21  Matthew Wahab  <matthew.wahab@arm.com>
>
>      * config/tc-arm.c (arm_archs): Add "armv8.1-a".
>      * doc/c-arm.texi (ARM Options, -march): Add "armv8.1-a".
>
> include/opcode
> 2015-05-21  Matthew Wahab  <matthew.wahab@arm.com>
>
>      * arm.h (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1): New.
>      (ARM_ARCH_V8_1A): New.
>      (ARM_ARCH_V8_1A_FP): New.
>      (ARM_ARCH_V8_1A_SIMD): New.
>      (ARM_ARCH_V8_1A_CRYPTOV1): New.
>      (ARM_FEATURE_CORE): New.

Approved - please apply - but please add a mention of the support to the 
gas/NEWS file.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-29 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 10:06 [ARM] Add support for ARMv8.1 command line option Matthew Wahab
2015-05-29 15:05 ` Nicholas Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).