summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2010-01-03 04:48:19 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2010-01-03 04:48:19 +0000
commit686c4e53ceaa3932224ed512b37b1e4fb10a247e (patch)
tree505ee278909e338a707a7bd756b1b06e296fa13a /apps
parentc1f4d4037a8be88ebb94a5c28eba0f394efe623a (diff)
downloadrockbox-686c4e53ceaa3932224ed512b37b1e4fb10a247e.tar.gz
rockbox-686c4e53ceaa3932224ed512b37b1e4fb10a247e.tar.bz2
rockbox-686c4e53ceaa3932224ed512b37b1e4fb10a247e.zip
Use long jump to reach __div0 from udiv32_arm if building with IRAM and without EABI.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24152 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/lib/udiv32_armv4.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/codecs/lib/udiv32_armv4.S b/apps/codecs/lib/udiv32_armv4.S
index b54156809c..ae2bddb20e 100644
--- a/apps/codecs/lib/udiv32_armv4.S
+++ b/apps/codecs/lib/udiv32_armv4.S
@@ -128,8 +128,19 @@ udiv32_arm:
adr r2, .L_udiv32_div0_trap
cmp r2, lr
subeq sp, sp, #4
+#if defined(__ARM_EABI__) || !defined(USE_IRAM)
bleq __div0
+#else
+ ldr r3, =__div0
+ moveq lr, pc
+ bxeq r3
+#endif
/* Otherwise, push lr to the stack before calling __div0 */
stmdb sp!, { lr }
+#if defined(__ARM_EABI__) || !defined(USE_IRAM)
bl __div0
+#else
+ mov lr, pc
+ bx r3
+#endif
.size udiv32_arm, . - udiv32_arm