1 /* { dg-do compile { target { powerpc64*-*-linux* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p8vector_ok } */
3 /* { dg-options "-mdejagnu-cpu=power8 -O2 -mno-float128" } */
4 
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 power8 generates a call to the
8    __addkf3 emulation function.  */
9 
10 #ifdef __LONG_DOUBLE_IEEE128
11 typedef double          __attribute__((__mode__(__TF__))) f128_t;
12 typedef _Complex double __attribute__((__mode__(__TC__))) f128c_t;
13 
14 #else
15 typedef double          __attribute__((__mode__(__KF__))) f128_t;
16 typedef _Complex double __attribute__((__mode__(__KC__))) f128c_t;
17 #endif
18 
19 f128_t
add_scalar(f128_t a,f128_t b)20 add_scalar (f128_t a, f128_t b)
21 {
22   return a+b;
23 }
24 
25 
26 f128c_t
add_complex(f128c_t a,f128c_t b)27 add_complex (f128c_t a, f128c_t b)
28 {
29   return a+b;
30 }
31 
32 /* { dg-final { scan-assembler "bl __addkf3" } } */
33