[RS6000] float128-type-2.c unsupported
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / float128-type-2.c
blob02dbad1fa4f23cfd2c064aa40f79fab9f96e56fe
1 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9 -O2 -mno-float128" } */
5 /* This test tests whether the underlying IEEE 128-bit floating point) is
6 enabled by default on VSX Linux 64-bit systems, even if the keyword
7 __float128 is not enabled . Test that power9 generates the xsaddqp
8 instruction. */
10 #ifdef __LONG_DOUBLE_IEEE128
11 typedef double __attribute__((__mode__(__TF__))) f128_t;
12 typedef _Complex double __attribute__((__mode__(__TC__))) f128c_t;
14 #else
15 typedef double __attribute__((__mode__(__KF__))) f128_t;
16 typedef _Complex double __attribute__((__mode__(__KC__))) f128c_t;
17 #endif
19 f128_t
20 add_scalar (f128_t a, f128_t b)
22 return a+b;
26 f128c_t
27 add_complex (f128c_t a, f128c_t b)
29 return a+b;
32 /* { dg-final { scan-assembler "xsaddqp" } } */