diff options
Diffstat (limited to 'arch/arm/lib/lshrdi3.c')
-rw-r--r-- | arch/arm/lib/lshrdi3.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/lib/lshrdi3.c b/arch/arm/lib/lshrdi3.c index b666f1bad451..5c2385acdecc 100644 --- a/arch/arm/lib/lshrdi3.c +++ b/arch/arm/lib/lshrdi3.c | |||
@@ -31,11 +31,11 @@ Boston, MA 02111-1307, USA. */ | |||
31 | 31 | ||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | 33 | ||
34 | DItype | 34 | s64 |
35 | __lshrdi3 (DItype u, word_type b) | 35 | __lshrdi3 (s64 u, int b) |
36 | { | 36 | { |
37 | DIunion w; | 37 | DIunion w; |
38 | word_type bm; | 38 | int bm; |
39 | DIunion uu; | 39 | DIunion uu; |
40 | 40 | ||
41 | if (b == 0) | 41 | if (b == 0) |
@@ -43,17 +43,17 @@ __lshrdi3 (DItype u, word_type b) | |||
43 | 43 | ||
44 | uu.ll = u; | 44 | uu.ll = u; |
45 | 45 | ||
46 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | 46 | bm = (sizeof (s32) * BITS_PER_UNIT) - b; |
47 | if (bm <= 0) | 47 | if (bm <= 0) |
48 | { | 48 | { |
49 | w.s.high = 0; | 49 | w.s.high = 0; |
50 | w.s.low = (USItype)uu.s.high >> -bm; | 50 | w.s.low = (u32)uu.s.high >> -bm; |
51 | } | 51 | } |
52 | else | 52 | else |
53 | { | 53 | { |
54 | USItype carries = (USItype)uu.s.high << bm; | 54 | u32 carries = (u32)uu.s.high << bm; |
55 | w.s.high = (USItype)uu.s.high >> b; | 55 | w.s.high = (u32)uu.s.high >> b; |
56 | w.s.low = ((USItype)uu.s.low >> b) | carries; | 56 | w.s.low = ((u32)uu.s.low >> b) | carries; |
57 | } | 57 | } |
58 | 58 | ||
59 | return w.ll; | 59 | return w.ll; |