summaryrefslogtreecommitdiff
path: root/src/arch/armv7/lib/div64.S
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2013-02-14 15:53:18 -0800
committerRonald G. Minnich <rminnich@gmail.com>2013-02-25 17:01:27 +0100
commit1cd616082100f47dc2d6d73669c6aa2e5eb039ad (patch)
tree70db9335a653a03551cc12f50cba9cde716be154 /src/arch/armv7/lib/div64.S
parent14c2398ce936da3856ae64e97f976767f3c7669c (diff)
downloadcoreboot-1cd616082100f47dc2d6d73669c6aa2e5eb039ad.tar.xz
ARMv7: Simplify div64
We don't need the overly complex optimized version, since we're only doing this in very few non-critical places. Also, add the div* files to the bootblock, they're needed if we do printk. Signed-off-by: Stefan Reinauer <reinauer@google.com> Change-Id: I83bd766d4b03b488326ade1c13b7c364a7119e7b Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/2508 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/arch/armv7/lib/div64.S')
-rw-r--r--src/arch/armv7/lib/div64.S9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/arch/armv7/lib/div64.S b/src/arch/armv7/lib/div64.S
index 44edf480ca..41a094941e 100644
--- a/src/arch/armv7/lib/div64.S
+++ b/src/arch/armv7/lib/div64.S
@@ -13,8 +13,7 @@
*/
// FIXME
-//#include <linux/linkage.h>
-#define __LINUX_ARM_ARCH__ 7
+#define __ARM_ARCH__ 7
#ifdef __ARMEB__
#define xh r0
@@ -65,7 +64,7 @@ __do_div64:
@ The aligned divisor is stored in yl preserving the original.
@ The bit position is stored in ip.
-#if __LINUX_ARM_ARCH__ >= 5
+#if __ARM_ARCH__ >= 5
clz yl, r4
clz ip, xh
@@ -125,7 +124,7 @@ __do_div64:
@ We still have remainer bits in the low part. Bring them up.
-#if __LINUX_ARM_ARCH__ >= 5
+#if __ARM_ARCH__ >= 5
clz xh, xl @ we know xh is zero here so...
add xh, xh, #1
@@ -152,7 +151,7 @@ __do_div64:
8: @ Division by a power of 2: determine what that divisor order is
@ then simply shift values around
-#if __LINUX_ARM_ARCH__ >= 5
+#if __ARM_ARCH__ >= 5
clz ip, r4
rsb ip, ip, #31