This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2][ARM] Record FPU features as a bit-set
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- To: Matthew Wahab <matthew dot wahab at foss dot arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Aug 2015 15:57:22 +0100
- Subject: Re: [PATCH 1/2][ARM] Record FPU features as a bit-set
- Authentication-results: sourceware.org; auth=none
- References: <558826B0 dot 401 at arm dot com> <55C87CB6 dot 3090402 at foss dot arm dot com>
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
>