1 /* { dg-require-effective-target ppc_float128_hw } */
2 /* { dg-options "-mdejagnu-cpu=power9 -O2 -mlong-double-128 -Wno-psabi -mabi=ieeelongdouble" } */
4 /* Test if switching long double to IEEE 128-bit maps the printf and scanf
5 function names correctly. We leave off the \M in matching the calls, so
6 power10 will match using bl foo@notoc. */
10 volatile long double x
= 1.0L;
11 volatile long double y
, z
;
18 /* { dg-final { scan-assembler {\mbl __sprintfieee128} } } */
19 __builtin_sprintf (buffer
, "%Lg", x
);
21 /* { dg-final { scan-assembler {\mbl __printfieee128} } } */
22 __builtin_printf ("x is %Lg [%s]\n", x
, buffer
);
24 /* { dg-final { scan-assembler {\mbl __isoc99_sscanfieee128} } } */
25 __builtin_sscanf (buffer
, "%Lg", &y
);
27 __builtin_printf ("Type 1.0: ");
29 /* { dg-final { scan-assembler {\mbl __isoc99_scanfieee128} } } */
30 __builtin_scanf ("%Lg", &z
);