target/cxgbit: Use T6 specific macros to get ETH/IP hdr len
[linux/fpc-iii.git] / arch / mips / lib / ashldi3.c
blobc3e22053d13eb2172374c90c2a8eb75cb0299784
1 #include <linux/export.h>
3 #include "libgcc.h"
5 long long notrace __ashldi3(long long u, word_type b)
7 DWunion uu, w;
8 word_type bm;
10 if (b == 0)
11 return u;
13 uu.ll = u;
14 bm = 32 - b;
16 if (bm <= 0) {
17 w.s.low = 0;
18 w.s.high = (unsigned int) uu.s.low << -bm;
19 } else {
20 const unsigned int carries = (unsigned int) uu.s.low >> bm;
22 w.s.low = (unsigned int) uu.s.low << b;
23 w.s.high = ((unsigned int) uu.s.high << b) | carries;
26 return w.ll;
29 EXPORT_SYMBOL(__ashldi3);