From: Kyrylo Tkachov Date: Wed, 14 Jan 2015 12:03:22 +0000 (+0000) Subject: [AArch64] Error out of arm_neon.h if nofp/nosimd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a62514fca6566e85dcc84e1c5b8e91a3207e1d1;p=gcc.git [AArch64] Error out of arm_neon.h if nofp/nosimd * config/aarch64/arm_neon.h: Error out if AdvancedSIMD is not available. * gcc.target/aarch64/arm_neon-nosimd-error.c: New test. From-SVN: r219594 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dcf97dda445..857531f0c63 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-01-14 Kyrylo Tkachov + + * config/aarch64/arm_neon.h: Error out if AdvancedSIMD + is not available. + 2015-01-14 Kyrylo Tkachov * doc/invoke.texi (mapcs): Mention deprecation. diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index 3d1bcd5dc77..c679802e9e5 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -27,6 +27,10 @@ #ifndef _AARCH64_NEON_H_ #define _AARCH64_NEON_H_ +#ifndef __ARM_NEON +#error You must enable AdvancedSIMD instructions to use arm_neon.h +#else + #include #define __AARCH64_UINT64_C(__C) ((uint64_t) __C) @@ -25209,3 +25213,5 @@ __INTERLEAVE_LIST (zip) #undef __aarch64_vdupq_laneq_u64 #endif + +#endif diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6429922d59f..6bb356cdba1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-01-14 Kyrylo Tkachov + + * gcc.target/aarch64/arm_neon-nosimd-error.c: New test. + 2015-01-14 Thomas Preud'homme PR target/64453 diff --git a/gcc/testsuite/gcc.target/aarch64/arm_neon-nosimd-error.c b/gcc/testsuite/gcc.target/aarch64/arm_neon-nosimd-error.c new file mode 100644 index 00000000000..6c508ec6b8c --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/arm_neon-nosimd-error.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-mgeneral-regs-only" } */ +/* { dg-excess-errors "You must enable" } */ + +#include "arm_neon.h" + +int +foo () +{ + return 0; +}