1 // SPDX-License-Identifier: GPL-2.0
4 DWtype
__lshrdi3(DWtype u
, word_type b
)
6 const DWunion uu
= {.ll
= u
};
7 const word_type bm
= (sizeof (Wtype
) * BITS_PER_UNIT
) - b
;
15 w
.s
.low
= (UWtype
) uu
.s
.high
>> -bm
;
17 const UWtype carries
= (UWtype
) uu
.s
.high
<< bm
;
19 w
.s
.high
= (UWtype
) uu
.s
.high
>> b
;
20 w
.s
.low
= ((UWtype
) uu
.s
.low
>> b
) | carries
;