Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/float128-5.c

raw
1 /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2 /* { dg-options "-O2 -mvsx -mno-float128" } */
3 /* { dg-additional-options "-mdejagnu-cpu=power9" { target { ! has_arch_pwr9 } } } */
4 /* { dg-require-effective-target powerpc_vsx } */
5
6 /* Test that we can use #pragma GCC target to enable -mfloat128 and generate
7 code on ISA 3.0 for the float128 built-in functions. Lp64 is required
8 because we need TImode to be available to enable __float128 using hardware
9 instructions. */
10
11 #ifdef __FLOAT128__
12 #error "-mno-float128 should disable initially defining __FLOAT128__"
13 #endif
14
15 #pragma GCC target("float128")
16
17 #ifndef __FLOAT128__
18 #error "#pragma GCC target(\"float128\") should enable -mfloat128"
19 #endif
20
21 __float128
22 qabs (__float128 a)
23 {
24 return __builtin_fabsf128 (a);
25 }
26
27 /* { dg-final { scan-assembler "xsabsqp" } } */