diff mbox

[ARM] Add ARMv8.1 command line options.

Message ID 56164CBE.7050508@foss.arm.com
State New
Headers show

Commit Message

Matthew Wahab Oct. 8, 2015, 11 a.m. UTC
Ping.

Updated patch attached, I've broken the over-long lines added to arm-arches.def and 
arm-fpus.def.

Matthew

On 17/09/15 18:54, Matthew Wahab wrote:
> Hello,
>
> ARMv8.1 is a set of architectural extensions to ARMv8. Support has been
> enabled in binutils for ARMv8.1 for the architechure, using the name
> "armv8.1-a".
>
> This patch adds support to gcc for specifying an ARMv8.1 architecture
> using options "-march=armv8.1-a" and "-march=armv8.1-a+crc". It also
> adds the FPU options "-mfpu=neon-fp-armv8.1" and
> "-mpu=crypto-neon-fp-armv8.1", to specify the ARMv8.1 Adv.SIMD
> instruction set.  The changes set the apropriate architecture and fpu
> options for binutils but don't otherwise change the code generated by
> gcc.
>
> Tested for arm-none-linux-gnueabihf with native bootstrap and make
> check.
>
> Ok for trunk?
> Matthew
>
> 2015-09-17  Matthew Wahab  <matthew.wahab@arm.com>
>
>      * config/arm/arm-arches.def: Add "armv8.1-a" and "armv8.1-a+crc".
>      * config/arm/arm-fpus.def: Add "neon-fp-armv8.1" and
>      "crypto-neon-fp-armv8.1".
>      * config/arm/arm-protos.h (FL2_ARCH8_1): New.
>      (FL2_FOR_ARCH8_1A): New.
>      * config/arm/arm-tables.opt: Regenerate.
>      * config/arm/arm.h (FPU_FL_RDMA): New.
>      * doc/invoke.texi (ARM -march): Add "armv8.1-a" and
>      "armv8.1-a+crc".
>      (ARM -mfpu): Add "neon-fp-armv8.1" and "crypto-neon-fp-armv8.1".

Comments

Matthew Wahab Oct. 13, 2015, 11:10 a.m. UTC | #1
Some of the command line options may be unnecessary so I'll drop this patch.
Matthew

On 08/10/15 12:00, Matthew Wahab wrote:
> Ping.
>
> Updated patch attached, I've broken the over-long lines added to arm-arches.def and
> arm-fpus.def.
>
> Matthew
>
> On 17/09/15 18:54, Matthew Wahab wrote:
>> Hello,
>>
>> ARMv8.1 is a set of architectural extensions to ARMv8. Support has been
>> enabled in binutils for ARMv8.1 for the architechure, using the name
>> "armv8.1-a".
>>
>> This patch adds support to gcc for specifying an ARMv8.1 architecture
>> using options "-march=armv8.1-a" and "-march=armv8.1-a+crc". It also
>> adds the FPU options "-mfpu=neon-fp-armv8.1" and
>> "-mpu=crypto-neon-fp-armv8.1", to specify the ARMv8.1 Adv.SIMD
>> instruction set.  The changes set the apropriate architecture and fpu
>> options for binutils but don't otherwise change the code generated by
>> gcc.
>>
>> Tested for arm-none-linux-gnueabihf with native bootstrap and make
>> check.
>>
>> Ok for trunk?
>> Matthew
>>
>> 2015-09-17  Matthew Wahab  <matthew.wahab@arm.com>
>>
>>      * config/arm/arm-arches.def: Add "armv8.1-a" and "armv8.1-a+crc".
>>      * config/arm/arm-fpus.def: Add "neon-fp-armv8.1" and
>>      "crypto-neon-fp-armv8.1".
>>      * config/arm/arm-protos.h (FL2_ARCH8_1): New.
>>      (FL2_FOR_ARCH8_1A): New.
>>      * config/arm/arm-tables.opt: Regenerate.
>>      * config/arm/arm.h (FPU_FL_RDMA): New.
>>      * doc/invoke.texi (ARM -march): Add "armv8.1-a" and
>>      "armv8.1-a+crc".
>>      (ARM -mfpu): Add "neon-fp-armv8.1" and "crypto-neon-fp-armv8.1".
>
diff mbox

Patch

diff --git a/gcc/config/arm/arm-arches.def b/gcc/config/arm/arm-arches.def
index ddf6c3c..2635c7b 100644
--- a/gcc/config/arm/arm-arches.def
+++ b/gcc/config/arm/arm-arches.def
@@ -57,6 +57,11 @@  ARM_ARCH("armv7-m", cortexm3,	7M,	ARM_FSET_MAKE_CPU1 (FL_CO_PROC |	      FL_FOR_
 ARM_ARCH("armv7e-m", cortexm4,  7EM,	ARM_FSET_MAKE_CPU1 (FL_CO_PROC |	      FL_FOR_ARCH7EM))
 ARM_ARCH("armv8-a", cortexa53,  8A,	ARM_FSET_MAKE_CPU1 (FL_CO_PROC |             FL_FOR_ARCH8A))
 ARM_ARCH("armv8-a+crc",cortexa53, 8A,   ARM_FSET_MAKE_CPU1 (FL_CO_PROC | FL_CRC32  | FL_FOR_ARCH8A))
+ARM_ARCH("armv8.1-a", cortexa53,  8A,
+	 ARM_FSET_MAKE (FL_CO_PROC | FL_FOR_ARCH8A,  FL2_FOR_ARCH8_1A))
+ARM_ARCH("armv8.1-a+crc",cortexa53, 8A,
+	 ARM_FSET_MAKE (FL_CO_PROC | FL_CRC32 | FL_FOR_ARCH8A,
+			FL2_FOR_ARCH8_1A))
 ARM_ARCH("iwmmxt",  iwmmxt,     5TE,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_STRONG | FL_FOR_ARCH5TE | FL_XSCALE | FL_IWMMXT))
 ARM_ARCH("iwmmxt2", iwmmxt2,    5TE,	ARM_FSET_MAKE_CPU1 (FL_LDSCHED | FL_STRONG | FL_FOR_ARCH5TE | FL_XSCALE | FL_IWMMXT | FL_IWMMXT2))
 
diff --git a/gcc/config/arm/arm-fpus.def b/gcc/config/arm/arm-fpus.def
index efd5896..2c7b82e 100644
--- a/gcc/config/arm/arm-fpus.def
+++ b/gcc/config/arm/arm-fpus.def
@@ -44,5 +44,9 @@  ARM_FPU("fp-armv8",	ARM_FP_MODEL_VFP, 8, VFP_REG_D32, FPU_FL_FP16)
 ARM_FPU("neon-fp-armv8",ARM_FP_MODEL_VFP, 8, VFP_REG_D32, FPU_FL_NEON | FPU_FL_FP16)
 ARM_FPU("crypto-neon-fp-armv8",
 			ARM_FP_MODEL_VFP, 8, VFP_REG_D32, FPU_FL_NEON | FPU_FL_FP16 | FPU_FL_CRYPTO)
+ARM_FPU("neon-fp-armv8.1", ARM_FP_MODEL_VFP, 8, VFP_REG_D32,
+	FPU_FL_NEON | FPU_FL_FP16 | FPU_FL_RDMA)
+ARM_FPU("crypto-neon-fp-armv8.1", ARM_FP_MODEL_VFP, 8, VFP_REG_D32,
+	FPU_FL_NEON | FPU_FL_FP16 | FPU_FL_RDMA | FPU_FL_CRYPTO)
 /* Compatibility aliases.  */
 ARM_FPU("vfp3",		ARM_FP_MODEL_VFP, 3, VFP_REG_D32, FPU_FL_NONE)
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index f9b1276..9631ac9 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -387,6 +387,8 @@  extern bool arm_is_constant_pool_ref (rtx);
 #define FL_IWMMXT2    (1 << 30)       /* "Intel Wireless MMX2 technology".  */
 #define FL_ARCH6KZ    (1 << 31)       /* ARMv6KZ architecture.  */
 
+#define FL2_ARCH8_1   (1 << 0)	      /* Architecture 8.1.  */
+
 /* Flags that only effect tuning, not available instructions.  */
 #define FL_TUNE		(FL_WBUF | FL_VFPV2 | FL_STRONG | FL_LDSCHED \
 			 | FL_CO_PROC)
@@ -415,6 +417,7 @@  extern bool arm_is_constant_pool_ref (rtx);
 #define FL_FOR_ARCH7M	(FL_FOR_ARCH7 | FL_THUMB_DIV)
 #define FL_FOR_ARCH7EM  (FL_FOR_ARCH7M | FL_ARCH7EM)
 #define FL_FOR_ARCH8A	(FL_FOR_ARCH7VE | FL_ARCH8)
+#define FL2_FOR_ARCH8_1A	FL2_ARCH8_1
 
 /* There are too many feature bits to fit in a single word so the set of cpu and
    fpu capabilities is a structure.  A feature set is created and manipulated
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 87c9f90..4037933 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -320,6 +320,7 @@  typedef unsigned long arm_fpu_feature_set;
 #define FPU_FL_NEON	(1 << 0)	/* NEON instructions.  */
 #define FPU_FL_FP16	(1 << 1)	/* Half-precision.  */
 #define FPU_FL_CRYPTO	(1 << 2)	/* Crypto extensions.  */
+#define FPU_FL_RDMA	(1 << 3)	/* ARMv8.1 extensions.  */
 
 /* Which floating point model to use.  */
 enum arm_fp_model
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3a9594c..2dd89a3 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -13372,8 +13372,8 @@  of the @option{-mcpu=} option.  Permissible names are: @samp{armv2},
 @samp{armv6}, @samp{armv6j},
 @samp{armv6t2}, @samp{armv6z}, @samp{armv6kz}, @samp{armv6-m},
 @samp{armv7}, @samp{armv7-a}, @samp{armv7-r}, @samp{armv7-m}, @samp{armv7e-m},
-@samp{armv7ve}, @samp{armv8-a}, @samp{armv8-a+crc},
-@samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}.
+@samp{armv7ve}, @samp{armv8-a}, @samp{armv8-a+crc}, @samp{armv8.1-a},
+@samp{armv8.1-a+crc}, @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}.
 
 @option{-march=armv7ve} is the armv7-a architecture with virtualization
 extensions.
@@ -13475,7 +13475,8 @@  available on the target.  Permissible names are: @samp{vfp}, @samp{vfpv3},
 @samp{vfpv3xd-fp16}, @samp{neon}, @samp{neon-fp16}, @samp{vfpv4},
 @samp{vfpv4-d16}, @samp{fpv4-sp-d16}, @samp{neon-vfpv4},
 @samp{fpv5-d16}, @samp{fpv5-sp-d16},
-@samp{fp-armv8}, @samp{neon-fp-armv8}, and @samp{crypto-neon-fp-armv8}.
+@samp{fp-armv8}, @samp{neon-fp-armv8}, @samp{crypto-neon-fp-armv8},
+@samp{neon-fp-armv8.1} and @samp{crypto-neon-fp-armv8.1}.
 
 If @option{-msoft-float} is specified this specifies the format of
 floating-point values.