diff mbox

[1/2,ARM] Record FPU features as a bit-set

Message ID 55C87CB6.3090402@foss.arm.com
State New
Headers show

Commit Message

Matthew Wahab Aug. 10, 2015, 10:28 a.m. UTC
Ping. Updated patch attached.

Also, retested the series for arm-none-linux-gnueabihf with native bootstrap and make 
check.

On 22/06/15 16:16, Matthew Wahab wrote:
> Hello,
>
> The ARM backend records FPU features as booleans, one for each feature. This
> means that adding support for a new feature involves updating every entry in the
> list of FPU descriptions in arm-fpus.def. This patch series changes the
> representation of FPU features to use a simple bit-set and flags, as is done
> elsewhere.
>
> This patch adds the new FPU feature representation, with feature sets
> represented as unsigned longs.
>
> Tested the series for arm-none-linux-gnueabihf with check-gcc
>
> Ok for trunk?
> Matthew
>
> gcc/
> 2015-06-22  Matthew Wahab  <matthew.wahab@arm.com>
>
> 	* config/arm/arm.h (arm_fpu_fset): New.
> 	(ARM_FPU_FSET_HAS): New.
> 	(FPU_FL_NONE): New.
> 	(FPU_FL_NEON): New.
> 	(FPU_FL_FP16): New.
> 	(FPU_FL_CRYPTO): New.
>

Comments

Kyrylo Tkachov Aug. 10, 2015, 10:55 a.m. UTC | #1
Hi Matthew,

On 10/08/15 11:28, Matthew Wahab wrote:
> Ping. Updated patch attached.
>
> Also, retested the series for arm-none-linux-gnueabihf with native bootstrap and make
> check.
>
> On 22/06/15 16:16, Matthew Wahab wrote:
>> Hello,
>>
>> The ARM backend records FPU features as booleans, one for each feature. This
>> means that adding support for a new feature involves updating every entry in the
>> list of FPU descriptions in arm-fpus.def. This patch series changes the
>> representation of FPU features to use a simple bit-set and flags, as is done
>> elsewhere.
>>
>> This patch adds the new FPU feature representation, with feature sets
>> represented as unsigned longs.
>>
>> Tested the series for arm-none-linux-gnueabihf with check-gcc
>>
>> Ok for trunk?
>> Matthew
>>
>> gcc/
>> 2015-06-22  Matthew Wahab  <matthew.wahab@arm.com>
>>
>> 	* config/arm/arm.h (arm_fpu_fset): New.
>> 	(ARM_FPU_FSET_HAS): New.
>> 	(FPU_FL_NONE): New.
>> 	(FPU_FL_NEON): New.
>> 	(FPU_FL_FP16): New.
>> 	(FPU_FL_CRYPTO): New.

This is ok.
Thanks,
Kyrill
Ramana Radhakrishnan Aug. 10, 2015, 2:57 p.m. UTC | #2
On Mon, Aug 10, 2015 at 11:28:06AM +0100, Matthew Wahab wrote:
> Ping. Updated patch attached.
> 
> Also, retested the series for arm-none-linux-gnueabihf with native
> bootstrap and make check.
> 
> On 22/06/15 16:16, Matthew Wahab wrote:
> >Hello,
> >
> >The ARM backend records FPU features as booleans, one for each feature. This
> >means that adding support for a new feature involves updating every entry in the
> >list of FPU descriptions in arm-fpus.def. This patch series changes the
> >representation of FPU features to use a simple bit-set and flags, as is done
> >elsewhere.
> >
> >This patch adds the new FPU feature representation, with feature sets
> >represented as unsigned longs.
> >
> >Tested the series for arm-none-linux-gnueabihf with check-gcc
> >
> >Ok for trunk?
> >Matthew

This is OK, thanks

Ramana
> >
> >gcc/
> >2015-06-22  Matthew Wahab  <matthew.wahab@arm.com>
> >
> >	* config/arm/arm.h (arm_fpu_fset): New.
> >	(ARM_FPU_FSET_HAS): New.
> >	(FPU_FL_NONE): New.
> >	(FPU_FL_NEON): New.
> >	(FPU_FL_FP16): New.
> >	(FPU_FL_CRYPTO): New.
> >
> 

> From 571416d9e7bc9cb6c16008486faf357873270991 Mon Sep 17 00:00:00 2001
> From: Matthew Wahab <matthew.wahab@arm.com>
> Date: Thu, 23 Jul 2015 12:44:51 +0100
> Subject: [PATCH 1/2] Add fpu feature set definitions.
> 
> Change-Id: I9f0fcc9627e3c435cbbc9056b9244781b438447e
> ---
>  gcc/config/arm/arm.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
> index bb64be0..f49eb48 100644
> --- a/gcc/config/arm/arm.h
> +++ b/gcc/config/arm/arm.h
> @@ -318,6 +318,19 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
>    {"mode", "%{!marm:%{!mthumb:-m%(VALUE)}}"}, \
>    {"tls", "%{!mtls-dialect=*:-mtls-dialect=%(VALUE)}"},
>  
> +/* FPU feature sets.  */
> +
> +typedef unsigned long arm_fpu_feature_set;
> +
> +/* Test for an FPU feature.  */
> +#define ARM_FPU_FSET_HAS(S,F) (((S) & (F)) == (F))
> +
> +/* FPU Features.  */
> +#define FPU_FL_NONE	(0)
> +#define FPU_FL_NEON	(1 << 0)	/* NEON instructions.  */
> +#define FPU_FL_FP16	(1 << 1)	/* Half-precision.  */
> +#define FPU_FL_CRYPTO	(1 << 2)	/* Crypto extensions.  */
> +
>  /* Which floating point model to use.  */
>  enum arm_fp_model
>  {
> -- 
> 1.9.1
>
diff mbox

Patch

From 571416d9e7bc9cb6c16008486faf357873270991 Mon Sep 17 00:00:00 2001
From: Matthew Wahab <matthew.wahab@arm.com>
Date: Thu, 23 Jul 2015 12:44:51 +0100
Subject: [PATCH 1/2] Add fpu feature set definitions.

Change-Id: I9f0fcc9627e3c435cbbc9056b9244781b438447e
---
 gcc/config/arm/arm.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index bb64be0..f49eb48 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -318,6 +318,19 @@  extern void (*arm_lang_output_object_attributes_hook)(void);
   {"mode", "%{!marm:%{!mthumb:-m%(VALUE)}}"}, \
   {"tls", "%{!mtls-dialect=*:-mtls-dialect=%(VALUE)}"},
 
+/* FPU feature sets.  */
+
+typedef unsigned long arm_fpu_feature_set;
+
+/* Test for an FPU feature.  */
+#define ARM_FPU_FSET_HAS(S,F) (((S) & (F)) == (F))
+
+/* FPU Features.  */
+#define FPU_FL_NONE	(0)
+#define FPU_FL_NEON	(1 << 0)	/* NEON instructions.  */
+#define FPU_FL_FP16	(1 << 1)	/* Half-precision.  */
+#define FPU_FL_CRYPTO	(1 << 2)	/* Crypto extensions.  */
+
 /* Which floating point model to use.  */
 enum arm_fp_model
 {
-- 
1.9.1