summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/ashldi3.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-22 21:50:57 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-22 21:50:57 -0400
commita5324343955997d1439f26518ddac567cd5d134b (patch)
treef43558389c41e3a0f076c4ee55d77c4aa1561779 /arch/arm/lib/ashldi3.c
parent8199d3a79c224bbe5943fa08684e1f93a17881b0 (diff)
parenta4936044001694f033fe4ea94d6034d51a6b465c (diff)
downloadblackbird-op-linux-a5324343955997d1439f26518ddac567cd5d134b.tar.gz
blackbird-op-linux-a5324343955997d1439f26518ddac567cd5d134b.zip
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/arm/lib/ashldi3.c')
-rw-r--r--arch/arm/lib/ashldi3.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/arch/arm/lib/ashldi3.c b/arch/arm/lib/ashldi3.c
index 130f5a839669..b62875cfd8f8 100644
--- a/arch/arm/lib/ashldi3.c
+++ b/arch/arm/lib/ashldi3.c
@@ -31,31 +31,26 @@ Boston, MA 02111-1307, USA. */
#include "gcclib.h"
-DItype
-__ashldi3 (DItype u, word_type b)
+s64 __ashldi3(s64 u, int b)
{
- DIunion w;
- word_type bm;
- DIunion uu;
-
- if (b == 0)
- return u;
-
- uu.ll = u;
-
- bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
- if (bm <= 0)
- {
- w.s.low = 0;
- w.s.high = (USItype)uu.s.low << -bm;
- }
- else
- {
- USItype carries = (USItype)uu.s.low >> bm;
- w.s.low = (USItype)uu.s.low << b;
- w.s.high = ((USItype)uu.s.high << b) | carries;
- }
-
- return w.ll;
+ DIunion w;
+ int bm;
+ DIunion uu;
+
+ if (b == 0)
+ return u;
+
+ uu.ll = u;
+
+ bm = (sizeof(s32) * BITS_PER_UNIT) - b;
+ if (bm <= 0) {
+ w.s.low = 0;
+ w.s.high = (u32) uu.s.low << -bm;
+ } else {
+ u32 carries = (u32) uu.s.low >> bm;
+ w.s.low = (u32) uu.s.low << b;
+ w.s.high = ((u32) uu.s.high << b) | carries;
+ }
+
+ return w.ll;
}
-
OpenPOWER on IntegriCloud