// SPDX-License-Identifier: GPL-2.0-or-later1/*2*/34#include <linux/export.h>56#include <linux/libgcc.h>78long long notrace __ashrdi3(long long u, word_type b)9{10DWunion uu, w;11word_type bm;1213if (b == 0)14return u;1516uu.ll = u;17bm = 32 - b;1819if (bm <= 0) {20/* w.s.high = 1..1 or 0..0 */21w.s.high =22uu.s.high >> 31;23w.s.low = uu.s.high >> -bm;24} else {25const unsigned int carries = (unsigned int) uu.s.high << bm;2627w.s.high = uu.s.high >> b;28w.s.low = ((unsigned int) uu.s.low >> b) | carries;29}3031return w.ll;32}33EXPORT_SYMBOL(__ashrdi3);343536