[1/4,ARM] Add attribute/pragma target fpu=
diff mbox

Message ID 84D96C45-DD45-4155-AF6C-97AAC3EFB155@gmail.com
State New
Headers show

Commit Message

Bernhard Reutner-Fischer Sept. 14, 2015, 3:40 p.m. UTC
On September 14, 2015 11:36:13 AM GMT+02:00, Christian Bruel <christian.bruel@st.com> wrote:
>Hi,
>
>This patch moves the FPU flags settings and checks to the attribute 
>hooks. .e.g neon must be checked in arm_option_check_internal. FPU name
>
>is emitted before each function and arm_fpu_index is Saved to be
>handled 
>by the cl_target_option_save/restore functions.

I keep forgetting if it's a capital W or a lowercase one but you'll know.
Thanks,

Patch
diff mbox

diff -ruN gnu_trunk.p0/gcc/gcc/config/arm/arm.c gnu_trunk.p1/gcc/gcc/config/arm/arm.c
--- gnu_trunk.p0/gcc/gcc/config/arm/arm.c	2015-09-10 14:27:28.931847219 +0200
+++ gnu_trunk.p1/gcc/gcc/config/arm/arm.c	2015-09-11 14:53:45.388771537 +0200
@@ -2713,6 +2713,12 @@ 
 arm_option_check_internal (struct gcc_options *opts)
 {
   int flags = opts->x_target_flags;
+  const struct arm_fpu_desc *fpu_desc = &all_fpus[opts->x_arm_fpu_index];
+
+  /* iWMMXt and NEON are incompatible.  */
+    if (TARGET_IWMMXT && TARGET_VFP  
+      && ARM_FPU_FSET_HAS (fpu_desc->features, FPU_FL_NEON))
+    error ("iWMMXt `and NEON are incompatible");

Maybe there is just dirt on my screen or my graphic-memory is broken, but I see an odd character between iWMMXt and and?