aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/ashrdi3.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-20 10:49:59 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-20 10:49:59 -0400
commitf29481c0e7e55efc25598c1a6c503015cfe45245 (patch)
tree6ff6a52e54e5ec46648260df9cfb97308f8c05c2 /arch/arm/lib/ashrdi3.c
parent34c8eacab670e578a2aaafdf1061efd214b2f639 (diff)
[PATCH] ARM: Remove gcc type-isms from GCC helper functions
Convert ugly GCC types to Linux types: UQImode -> u8 SImode -> s32 USImode -> u32 DImode -> s64 UDImode -> u64 word_type -> int 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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/lib/ashrdi3.c b/arch/arm/lib/ashrdi3.c
index 71625d218f8d..89f6fb7ed8fb 100644
--- a/arch/arm/lib/ashrdi3.c
+++ b/arch/arm/lib/ashrdi3.c
@@ -31,11 +31,11 @@ Boston, MA 02111-1307, USA. */
31 31
32#include "gcclib.h" 32#include "gcclib.h"
33 33
34DItype 34s64
35__ashrdi3 (DItype u, word_type b) 35__ashrdi3 (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,18 +43,18 @@ __ashrdi3 (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 = 1..1 or 0..0 */ 49 /* w.s.high = 1..1 or 0..0 */
50 w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1); 50 w.s.high = uu.s.high >> (sizeof (s32) * BITS_PER_UNIT - 1);
51 w.s.low = uu.s.high >> -bm; 51 w.s.low = uu.s.high >> -bm;
52 } 52 }
53 else 53 else
54 { 54 {
55 USItype carries = (USItype)uu.s.high << bm; 55 u32 carries = (u32)uu.s.high << bm;
56 w.s.high = uu.s.high >> b; 56 w.s.high = uu.s.high >> b;
57 w.s.low = ((USItype)uu.s.low >> b) | carries; 57 w.s.low = ((u32)uu.s.low >> b) | carries;
58 } 58 }
59 59
60 return w.ll; 60 return w.ll;