summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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