2 * ashldi3.c extracted from gcc-2.7.2.3/libgcc2.c and
3 * gcc-2.7.2.3/longlong.h
5 * Copyright (C) 1989-2015 Free Software Foundation, Inc.
7 * SPDX-License-Identifier: GPL-2.0+
10 #define BITS_PER_UNIT 8
12 typedef int SItype __attribute__ ((mode (SI)));
13 typedef unsigned int USItype __attribute__ ((mode (SI)));
14 typedef int DItype __attribute__ ((mode (DI)));
15 typedef int word_type __attribute__ ((mode (__word__)));
17 struct DIstruct {SItype high, low;};
25 DItype __ashldi3 (DItype u, word_type b)
36 bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
40 w.s.high = (USItype)uu.s.low << -bm;
44 USItype carries = (USItype)uu.s.low >> bm;
45 w.s.low = (USItype)uu.s.low << b;
46 w.s.high = ((USItype)uu.s.high << b) | carries;