aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/lib/lshrdi3.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib/lshrdi3.c')
-rw-r--r--arch/arm/lib/lshrdi3.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/arch/arm/lib/lshrdi3.c b/arch/arm/lib/lshrdi3.c
index 5c2385acdec..3681f49d2b6 100644
--- a/arch/arm/lib/lshrdi3.c
+++ b/arch/arm/lib/lshrdi3.c
@@ -31,31 +31,26 @@ Boston, MA 02111-1307, USA. */
#include "gcclib.h"
-s64
-__lshrdi3 (s64 u, int b)
+s64 __lshrdi3(s64 u, int b)
{
- 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.high = 0;
- w.s.low = (u32)uu.s.high >> -bm;
- }
- else
- {
- u32 carries = (u32)uu.s.high << bm;
- w.s.high = (u32)uu.s.high >> b;
- w.s.low = ((u32)uu.s.low >> 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.high = 0;
+ w.s.low = (u32) uu.s.high >> -bm;
+ } else {
+ u32 carries = (u32) uu.s.high << bm;
+ w.s.high = (u32) uu.s.high >> b;
+ w.s.low = ((u32) uu.s.low >> b) | carries;
+ }
+
+ return w.ll;
}
-