1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 unsigned int _IDEC_glbround
;
5 unsigned int _IDEC_glbflags
;
6 typedef unsigned UINT32
;
8 typedef unsigned long long UINT64
;
9 typedef signed long long SINT64
;
11 __attribute__ ((aligned(16)))
16 static __inline UINT64
17 unpack_BID128 (UINT64
* psign_x
, int *pexponent_x
,
18 UINT128
* pcoefficient_x
, UINT128
* px
) {
21 *psign_x
= (px
->w
[1]) & 0x8000000000000000ull
;
22 ex
= (px
->w
[1]) >> 49;
23 *pexponent_x
= ((int) ex
) & 0x3fff;
24 return coeff
.w
[0] | coeff
.w
[1];
27 static __inline UINT32
28 get_BID32 (UINT32 sgn
, int expon
, UINT64 coeff
, int rmode
,
32 if (((unsigned) expon
) > 191) {
33 r
= sgn
| 0x78000000ul
;
46 bid128_to_bid32 (UINT128 x
)
54 if (!unpack_BID128 (&sign_x
, &exponent_x
, &CX
, px
)) {
57 res
= get_BID32 ((UINT32
) (sign_x
>> 32),
58 exponent_x
, CX
.w
[0], _IDEC_glbround
, &_IDEC_glbflags
);