aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/ashldi3.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-20 11:45:32 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-20 11:45:32 -0400
commit3ade2fe0fd0238d68938b8f5f73ebd0561d2d2e5 (patch)
tree495ace47f01695acc4effdc8d71e3961689c52e5 /arch/arm/lib/ashldi3.c
parentf29481c0e7e55efc25598c1a6c503015cfe45245 (diff)
[PATCH] ARM: Lindent GCC helper functions
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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 02d2b628ebc1..b62875cfd8f8 100644
--- a/arch/arm/lib/ashldi3.c
+++ b/arch/arm/lib/ashldi3.c
@@ -31,31 +31,26 @@ Boston, MA 02111-1307, USA. */
31 31
32#include "gcclib.h" 32#include "gcclib.h"
33 33
34s64 34s64 __ashldi3(s64 u, int b)
35__ashldi3 (s64 u, int b)
36{ 35{
37 DIunion w; 36 DIunion w;
38 int bm; 37 int bm;
39 DIunion uu; 38 DIunion uu;
40 39
41 if (b == 0) 40 if (b == 0)
42 return u; 41 return u;
43 42
44 uu.ll = u; 43 uu.ll = u;
45 44
46 bm = (sizeof (s32) * BITS_PER_UNIT) - b; 45 bm = (sizeof(s32) * BITS_PER_UNIT) - b;
47 if (bm <= 0) 46 if (bm <= 0) {
48 { 47 w.s.low = 0;
49 w.s.low = 0; 48 w.s.high = (u32) uu.s.low << -bm;
50 w.s.high = (u32)uu.s.low << -bm; 49 } else {
51 } 50 u32 carries = (u32) uu.s.low >> bm;
52 else 51 w.s.low = (u32) uu.s.low << b;
53 { 52 w.s.high = ((u32) uu.s.high << b) | carries;
54 u32 carries = (u32)uu.s.low >> bm; 53 }
55 w.s.low = (u32)uu.s.low << b; 54
56 w.s.high = ((u32)uu.s.high << b) | carries; 55 return w.ll;
57 }
58
59 return w.ll;
60} 56}
61