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.wa...@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 0ae697751afd9420ece15432e4892a60574b1d56 Mon Sep 17 00:00:00 2001 From: Matthew Wahab <matthew.wa...@arm.com> Date: Wed, 10 Jun 2015 09:57:55 +0100 Subject: [PATCH 1/2] Add fpu feature set definitions. Change-Id: I9614d12b19f068ae2e0cebc1a6c3903972c73d6a --- 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 373dc85..eadbcec 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_fset; + +/* 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