1 /* { dg-do run { target { powerpc*-*-linux* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-skip-if "" { powerpc*-*-*spe* } } */
4 /* { dg-require-effective-target dfp_hw } */
5 /* { dg-options "-O2 -mhard-dfp" } */
18 _Decimal128 one
= (_Decimal128
)1.0;
19 _Decimal128 two
= (_Decimal128
)2.0;
20 _Decimal128 ten
= (_Decimal128
)10.0;
24 unsigned long long x0
;
25 unsigned long long x1
;
28 for (i
= 0; i
< 25; i
++)
33 x0
= __builtin_unpack_dec128 (a
, 0);
34 x1
= __builtin_unpack_dec128 (a
, 1);
35 b
= __builtin_pack_dec128 (x0
, x1
);
36 c
= __builtin_dscliq (one
, 25) + two
;
42 unsigned long long ull
;
43 unsigned char uc
[sizeof (_Decimal128
)];
48 for (i
= 0; i
< sizeof (_Decimal128
); i
++)
49 printf ("%.2x", u
.uc
[i
]);
51 printf (", %Lg\n", (long double)a
);
55 for (i
= 0; i
< sizeof (_Decimal128
); i
++)
56 printf ("%.2x", u
.uc
[i
]);
58 printf (", %Lg\n", (long double)b
);
62 for (i
= 0; i
< sizeof (_Decimal128
); i
++)
63 printf ("%.2x", u
.uc
[i
]);
65 printf (", %Lg\n", (long double)c
);
69 for (i
= 0; i
< sizeof (unsigned long long); i
++)
70 printf ("%.2x", u
.uc
[i
]);
74 for (i
= 0; i
< sizeof (unsigned long long); i
++)
75 printf ("%.2x", u
.uc
[i
]);