1 /* Test for #pragma 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 #pragma GCC target("fpu=vfpv3-d16")
9
10 extern uint32_t bar();
11
12 #pragma GCC push_options
13 #pragma GCC target("fpu=vfpv4")
14 extern float fmaf (float, float, float);
15
16 float
17 vfma32 (float x, float y, float z)
18 {
19 return fmaf (x, y, z);
20 }
21 #pragma GCC pop_options
22
23 uint32_t restored ()
24 {
25 return bar();
26 }
27
28 /* We can't tell exactly how many times the following tests will match because
29 command-line options may cause additional instances to be generated, but
30 each must be present at least once. */
31 /* { dg-final { scan-assembler {\.fpu\s+vfpv4\n} } } */
32 /* { dg-final { scan-assembler {\.fpu\s+vfpv3-d16\n} } } */