arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / microblaze / lib / ashrdi3.c
blob268098a962a1cf06120cb81ec69645661000097f
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/export.h>
4 #include "libgcc.h"
6 long long __ashrdi3(long long u, word_type b)
8 DWunion uu, w;
9 word_type bm;
11 if (b == 0)
12 return u;
14 uu.ll = u;
15 bm = 32 - b;
17 if (bm <= 0) {
18 /* w.s.high = 1..1 or 0..0 */
19 w.s.high =
20 uu.s.high >> 31;
21 w.s.low = uu.s.high >> -bm;
22 } else {
23 const unsigned int carries = (unsigned int) uu.s.high << bm;
25 w.s.high = uu.s.high >> b;
26 w.s.low = ((unsigned int) uu.s.low >> b) | carries;
29 return w.ll;
31 EXPORT_SYMBOL(__ashrdi3);