Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/float128-type-1.c

raw
1 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
2 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2 -mno-float128" } */
3 /* { dg-require-effective-target powerpc_vsx } */
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
20 add_scalar (f128_t a, f128_t b)
21 {
22 return a+b;
23 }
24
25
26 f128c_t
27 add_complex (f128c_t a, f128c_t b)
28 {
29 return a+b;
30 }
31
32 /* { dg-final { scan-assembler "bl __addkf3" } } */