Commit ae5e2923 by Christian Bruel Committed by Christian Bruel

arm_neon.h: Remove #ifndef check on __ARM_NEON.

2015-11-16  Christian Bruel  <christian.bruel@st.com>

	* config/arm/arm_neon.h: Remove #ifndef check on __ARM_NEON.
	Replace #ifdef __ARM_FEATURE_CRYPTO, __ARM_FEATURE_FMA, __ARM_FP
	with appropriate pragma GCC target.

2015-11-16  Christian Bruel  <christian.bruel@st.com>

	* lib/target-supports.exp (check_effective_target_arm_neon_ok_nocache):
	 Check __ARM_NEON__ instead of "arm_neon.h.
	* gcc.target/arm/attr-neon3.c: New test.
	* gcc.target/arm/attr-neon-fp16.c: Likewise

From-SVN: r230411
parent b8c7c62b
2015-11-16 Christian Bruel <christian.bruel@st.com> 2015-11-16 Christian Bruel <christian.bruel@st.com>
* config/arm/arm_neon.h: Remove #ifndef check on __ARM_NEON.
Replace #ifdef __ARM_FEATURE_CRYPTO, __ARM_FEATURE_FMA, __ARM_FP
with appropriate pragma GCC target.
2015-11-16 Christian Bruel <christian.bruel@st.com>
PR target/65837 PR target/65837
* config/arm/arm-c.c (arm_cpu_builtins): Conditionally set and reset * config/arm/arm-c.c (arm_cpu_builtins): Conditionally set and reset
__ARM_FEATURE_FMA and __ARM_NEON_FP, __ARM_FP. __ARM_FEATURE_FMA and __ARM_NEON_FP, __ARM_FP.
2015-11-16 Christian Bruel <christian.bruel@st.com> 2015-11-16 Christian Bruel <christian.bruel@st.com>
* lib/target-supports.exp (check_effective_target_arm_neon_ok_nocache):
Check __ARM_NEON__ instead of "arm_neon.h.
* gcc.target/arm/attr-neon3.c: New test.
* gcc.target/arm/attr-neon-fp16.c: Likewise
2015-11-16 Christian Bruel <christian.bruel@st.com>
PR target/65837 PR target/65837
gcc.target/arm/lto/pr65837_0.c gcc.target/arm/lto/pr65837_0.c
gcc.target/arm/attr-neon2.c gcc.target/arm/attr-neon2.c
......
/* { dg-do compile } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-options "-mfp16-format=ieee -mfloat-abi=softfp" } */
#include "arm_neon.h"
float16x4_t __attribute__((target("fpu=neon-fp16")))
foo (float32x4_t arg)
{
return vcvt_f16_f32 (arg);
}
/* { dg-do compile } */
/* { dg-require-effective-target arm_crypto_ok } */
/* { dg-options "-O2 -mfloat-abi=softfp -mfpu=vfp" } */
#include <arm_neon.h>
/* Check that neon is used. */
int8x8_t __attribute__ ((target("fpu=neon")))
my (int8x8_t __a, int8x8_t __b)
{
return __a + __b;
}
/* Check that crypto builtins are recognized. */
poly128_t __attribute__ ((target("fpu=crypto-neon-fp-armv8")))
foo (poly128_t* ptr)
{
return vldrq_p128 (ptr);
}
/* Check that default mode is restored. */
int8x8_t
my1 (int8x8_t __a, int8x8_t __b)
{
return __a + __b;
}
/* { dg-final { scan-assembler-times "\.fpu vfp" 1 } } */
/* { dg-final { scan-assembler-times "\.fpu neon" 1 } } */
/* { dg-final { scan-assembler-times "\.fpu crypto-neon-fp-armv8" 1 } } */
/* { dg-final { scan-assembler-times "vld1" 1 } } */
/* { dg-final { scan-assembler-times "vadd" 1} } */
...@@ -2850,8 +2850,10 @@ proc check_effective_target_arm_neon_ok_nocache { } { ...@@ -2850,8 +2850,10 @@ proc check_effective_target_arm_neon_ok_nocache { } {
if { [check_effective_target_arm32] } { if { [check_effective_target_arm32] } {
foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp"} { foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon -mfloat-abi=softfp"} {
if { [check_no_compiler_messages_nocache arm_neon_ok object { if { [check_no_compiler_messages_nocache arm_neon_ok object {
#include "arm_neon.h"
int dummy; int dummy;
#ifndef __ARM_NEON__
#error not NEON
#endif
/* Avoid the case where a test adds -mfpu=neon, but the toolchain is /* Avoid the case where a test adds -mfpu=neon, but the toolchain is
configured for -mcpu=arm926ej-s, for example. */ configured for -mcpu=arm926ej-s, for example. */
#if __ARM_ARCH < 7 #if __ARM_ARCH < 7
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment