diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-06-20 11:45:32 -0400 |
---|---|---|
committer | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-06-20 11:45:32 -0400 |
commit | 3ade2fe0fd0238d68938b8f5f73ebd0561d2d2e5 (patch) | |
tree | 495ace47f01695acc4effdc8d71e3961689c52e5 /arch/arm/lib/ashrdi3.c | |
parent | f29481c0e7e55efc25598c1a6c503015cfe45245 (diff) |
[PATCH] ARM: Lindent GCC helper functions
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/lib/ashrdi3.c')
-rw-r--r-- | arch/arm/lib/ashrdi3.c | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/arch/arm/lib/ashrdi3.c b/arch/arm/lib/ashrdi3.c index 89f6fb7ed8fb..9a8600a7543f 100644 --- a/arch/arm/lib/ashrdi3.c +++ b/arch/arm/lib/ashrdi3.c | |||
@@ -31,31 +31,27 @@ Boston, MA 02111-1307, USA. */ | |||
31 | 31 | ||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | 33 | ||
34 | s64 | 34 | s64 __ashrdi3(s64 u, int b) |
35 | __ashrdi3 (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.high = 1..1 or 0..0 */ |
49 | /* w.s.high = 1..1 or 0..0 */ | 48 | w.s.high = uu.s.high >> (sizeof(s32) * BITS_PER_UNIT - 1); |
50 | w.s.high = uu.s.high >> (sizeof (s32) * BITS_PER_UNIT - 1); | 49 | w.s.low = uu.s.high >> -bm; |
51 | w.s.low = uu.s.high >> -bm; | 50 | } else { |
52 | } | 51 | u32 carries = (u32) uu.s.high << bm; |
53 | else | 52 | w.s.high = uu.s.high >> b; |
54 | { | 53 | w.s.low = ((u32) uu.s.low >> b) | carries; |
55 | u32 carries = (u32)uu.s.high << bm; | 54 | } |
56 | w.s.high = uu.s.high >> b; | 55 | |
57 | w.s.low = ((u32)uu.s.low >> b) | carries; | 56 | return w.ll; |
58 | } | ||
59 | |||
60 | return w.ll; | ||
61 | } | 57 | } |