2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / float128-call.c
blobbcb5d24e3795e61248cc664a174e876cb69b4374
1 /* { dg-do compile { target { powerpc*-*-linux* } } } */
2 /* { dg-require-effective-target powerpc_float128_sw_ok } */
3 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
4 /* { dg-options "-O2 -mcpu=power7 -mfloat128 -mno-regnames" } */
6 #ifndef __FLOAT128__
7 #error "-mfloat128 is not supported."
8 #endif
10 #ifdef __LONG_DOUBLE_IEEE128__
11 #define TYPE long double
12 #define ONE 1.0L
14 #else
15 #define TYPE __float128
16 #define ONE 1.0Q
17 #endif
19 /* Test to make sure vector registers are used for passing IEEE 128-bit
20 floating point values and returning them. Also make sure the 'q' suffix is
21 handled. */
22 TYPE one (void) { return ONE; }
23 void store (TYPE a, TYPE *p) { *p = a; }
25 /* { dg-final { scan-assembler "lxvd2x 34" } } */
26 /* { dg-final { scan-assembler "stxvd2x 34" } } */