| 1 |
/* Test that FMA macro is correctly undef. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-skip-if "Default no fma" { *-*-* } { "-mfpu=*vfpv4*" "-mfpu=*armv8"} } */ |
| 4 |
/* { dg-skip-if "-mpure-code supports M-profile without Neon only" { *-*-* } { "-mpure-code" } } */ |
| 5 |
/* { dg-require-effective-target arm_fp_ok } */ |
| 6 |
/* { dg-add-options arm_fp } */ |
| 7 |
|
| 8 |
/* Reset fpu to a value compatible with the next pragmas. */ |
| 9 |
#pragma GCC target ("fpu=vfp") |
| 10 |
|
| 11 |
#pragma GCC push_options |
| 12 |
#pragma GCC target ("fpu=crypto-neon-fp-armv8") |
| 13 |
|
| 14 |
#ifndef __ARM_FEATURE_FMA |
| 15 |
#error "__ARM_FEATURE_FMA is not defined but should be" |
| 16 |
#endif |
| 17 |
|
| 18 |
#ifndef __ARM_FEATURE_CRYPTO |
| 19 |
#error "__ARM_FEATURE_CRYPTO is not defined but should be" |
| 20 |
#endif |
| 21 |
|
| 22 |
#if __ARM_NEON_FP != 6 |
| 23 |
#error "__ARM_NEON_FP" |
| 24 |
#endif |
| 25 |
|
| 26 |
#if __ARM_FP != 14 |
| 27 |
#error "__ARM_FP" |
| 28 |
#endif |
| 29 |
|
| 30 |
#pragma GCC pop_options |
| 31 |
|
| 32 |
#pragma GCC push_options |
| 33 |
#pragma GCC target ("fpu=neon-vfpv4") |
| 34 |
#pragma GCC pop_options |
| 35 |
|
| 36 |
#ifdef __ARM_FEATURE_FMA |
| 37 |
#error "__ARM_FEATURE_FMA is defined but should not be" |
| 38 |
#endif |
| 39 |
|
| 40 |
|