]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/i386/funcspec-6.c
Add ability to set target options (ix86 only) and optimization options on a function...
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / funcspec-6.c
1 /* Test whether all of the 64-bit function specific options are accepted
2 without error. */
3 /* { dg-do compile } */
4 /* { dg-require-effective-target lp64 } */
5
6 extern void test_abm (void) __attribute__((__option__("abm")));
7 extern void test_aes (void) __attribute__((__option__("aes")));
8 extern void test_fused_madd (void) __attribute__((__option__("fused-madd")));
9 extern void test_mmx (void) __attribute__((__option__("mmx")));
10 extern void test_pclmul (void) __attribute__((__option__("pclmul")));
11 extern void test_popcnt (void) __attribute__((__option__("popcnt")));
12 extern void test_recip (void) __attribute__((__option__("recip")));
13 extern void test_sse (void) __attribute__((__option__("sse")));
14 extern void test_sse2 (void) __attribute__((__option__("sse2")));
15 extern void test_sse3 (void) __attribute__((__option__("sse3")));
16 extern void test_sse4 (void) __attribute__((__option__("sse4")));
17 extern void test_sse4_1 (void) __attribute__((__option__("sse4.1")));
18 extern void test_sse4_2 (void) __attribute__((__option__("sse4.2")));
19 extern void test_sse4a (void) __attribute__((__option__("sse4a")));
20 extern void test_sse5 (void) __attribute__((__option__("sse5")));
21 extern void test_ssse3 (void) __attribute__((__option__("ssse3")));
22
23 extern void test_no_abm (void) __attribute__((__option__("no-abm")));
24 extern void test_no_aes (void) __attribute__((__option__("no-aes")));
25 extern void test_no_fused_madd (void) __attribute__((__option__("no-fused-madd")));
26 extern void test_no_mmx (void) __attribute__((__option__("no-mmx")));
27 extern void test_no_pclmul (void) __attribute__((__option__("no-pclmul")));
28 extern void test_no_popcnt (void) __attribute__((__option__("no-popcnt")));
29 extern void test_no_recip (void) __attribute__((__option__("no-recip")));
30 extern void test_no_sse (void) __attribute__((__option__("no-sse")));
31 extern void test_no_sse2 (void) __attribute__((__option__("no-sse2")));
32 extern void test_no_sse3 (void) __attribute__((__option__("no-sse3")));
33 extern void test_no_sse4 (void) __attribute__((__option__("no-sse4")));
34 extern void test_no_sse4_1 (void) __attribute__((__option__("no-sse4.1")));
35 extern void test_no_sse4_2 (void) __attribute__((__option__("no-sse4.2")));
36 extern void test_no_sse4a (void) __attribute__((__option__("no-sse4a")));
37 extern void test_no_sse5 (void) __attribute__((__option__("no-sse5")));
38 extern void test_no_ssse3 (void) __attribute__((__option__("no-ssse3")));
39
40 extern void test_arch_nocona (void) __attribute__((__option__("arch=nocona")));
41 extern void test_arch_core2 (void) __attribute__((__option__("arch=core2")));
42 extern void test_arch_k8 (void) __attribute__((__option__("arch=k8")));
43 extern void test_arch_k8_sse3 (void) __attribute__((__option__("arch=k8-sse3")));
44 extern void test_arch_opteron (void) __attribute__((__option__("arch=opteron")));
45 extern void test_arch_opteron_sse3 (void) __attribute__((__option__("arch=opteron-sse3")));
46 extern void test_arch_athlon64 (void) __attribute__((__option__("arch=athlon64")));
47 extern void test_arch_athlon64_sse3 (void) __attribute__((__option__("arch=athlon64-sse3")));
48 extern void test_arch_athlon_fx (void) __attribute__((__option__("arch=athlon-fx")));
49 extern void test_arch_amdfam10 (void) __attribute__((__option__("arch=amdfam10")));
50 extern void test_arch_barcelona (void) __attribute__((__option__("arch=barcelona")));
51 extern void test_arch_foo (void) __attribute__((__option__("arch=foo"))); /* { dg-error "bad value" } */
52
53 extern void test_tune_nocona (void) __attribute__((__option__("tune=nocona")));
54 extern void test_tune_core2 (void) __attribute__((__option__("tune=core2")));
55 extern void test_tune_k8 (void) __attribute__((__option__("tune=k8")));
56 extern void test_tune_k8_sse3 (void) __attribute__((__option__("tune=k8-sse3")));
57 extern void test_tune_opteron (void) __attribute__((__option__("tune=opteron")));
58 extern void test_tune_opteron_sse3 (void) __attribute__((__option__("tune=opteron-sse3")));
59 extern void test_tune_athlon64 (void) __attribute__((__option__("tune=athlon64")));
60 extern void test_tune_athlon64_sse3 (void) __attribute__((__option__("tune=athlon64-sse3")));
61 extern void test_tune_athlon_fx (void) __attribute__((__option__("tune=athlon-fx")));
62 extern void test_tune_amdfam10 (void) __attribute__((__option__("tune=amdfam10")));
63 extern void test_tune_barcelona (void) __attribute__((__option__("tune=barcelona")));
64 extern void test_tune_generic (void) __attribute__((__option__("tune=generic")));
65 extern void test_tune_foo (void) __attribute__((__option__("tune=foo"))); /* { dg-error "bad value" } */
66
67 extern void test_fpmath_sse (void) __attribute__((__option__("sse2,fpmath=sse")));
68 extern void test_fpmath_387 (void) __attribute__((__option__("sse2,fpmath=387")));
69 extern void test_fpmath_sse_387 (void) __attribute__((__option__("sse2,fpmath=sse+387")));
70 extern void test_fpmath_387_sse (void) __attribute__((__option__("sse2,fpmath=387+sse")));
71 extern void test_fpmath_both (void) __attribute__((__option__("sse2,fpmath=both")));