| 1 |
/* Test for target attribute assembly extension generations. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-require-effective-target arm_fp_ok } */ |
| 4 |
/* { dg-add-options arm_fp } */ |
| 5 |
|
| 6 |
#include <stdint.h> |
| 7 |
|
| 8 |
extern uint32_t bar (); |
| 9 |
|
| 10 |
#pragma GCC target("fpu=vfpv3-d16") |
| 11 |
|
| 12 |
extern float fmaf (float, float, float); |
| 13 |
|
| 14 |
float |
| 15 |
__attribute__((target("fpu=vfpv4"))) vfma32 (float x, float y, float z) |
| 16 |
{ |
| 17 |
return fmaf (x, y, z); |
| 18 |
} |
| 19 |
|
| 20 |
uint32_t restored () |
| 21 |
{ |
| 22 |
return bar(); |
| 23 |
} |
| 24 |
|
| 25 |
/* We can't tell exactly how many times the following tests will match because |
| 26 |
command-line options may cause additional instances to be generated, but |
| 27 |
each must be present at least once. */ |
| 28 |
/* { dg-final { scan-assembler {\.fpu\s+vfpv4\n} } } */ |
| 29 |
/* { dg-final { scan-assembler {\.fpu\s+vfpv3-d16\n} } } */ |