summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2010-01-28 09:04:38 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2010-01-28 09:04:38 +0000
commit2347a7dc655e3fe9415558095b43a5f7102f999d (patch)
tree42fc8e80c6762218efa30315216f53f6677221f5
parent8efec13e6b4ad05d79bb4e4535df552702a6cae6 (diff)
downloadrockbox-2347a7dc655e3fe9415558095b43a5f7102f999d.tar.gz
rockbox-2347a7dc655e3fe9415558095b43a5f7102f999d.zip
Small fix for ARMv5e/v6 APE divider, correct large-divisor path and remove specialized version of it for small dividend, as the test and branch can't be fit into delay slots on that path.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24360 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/lib/udiv32_arm.S19
1 files changed, 0 insertions, 19 deletions
diff --git a/apps/codecs/lib/udiv32_arm.S b/apps/codecs/lib/udiv32_arm.S
index d080205f08..33ab7a43a5 100644
--- a/apps/codecs/lib/udiv32_arm.S
+++ b/apps/codecs/lib/udiv32_arm.S
@@ -243,16 +243,7 @@ udiv32_arm:
243 rsb \bits, \bits, #0 243 rsb \bits, \bits, #0
244 sub \inv, \inv, #4 244 sub \inv, \inv, #4
245 mov \divisor, \inv, lsr \bits 245 mov \divisor, \inv, lsr \bits
246#if ARM_ARCH >= 6
247 tst \numerator, \numerator
248 smmla \divisor, \divisor, \inv, \divisor
249 bmi 50f
250 smmul \inv, \numerator, \divisor
251#else
252 mov \bits, #0
253 smlal \bits, \divisor, \inv, \divisor
254 umull \bits, \inv, \numerator, \divisor 246 umull \bits, \inv, \numerator, \divisor
255#endif
256 mla \divisor, \inv, \neg, \numerator 247 mla \divisor, \inv, \neg, \numerator
257 mov \quotient, \inv 248 mov \quotient, \inv
258 cmn \neg, \divisor, lsr #1 249 cmn \neg, \divisor, lsr #1
@@ -281,16 +272,6 @@ udiv32_arm:
281 addcc \quotient, \quotient, #1 272 addcc \quotient, \quotient, #1
282 addpl \quotient, \quotient, #2 273 addpl \quotient, \quotient, #2
283 bx lr 274 bx lr
28450:
285 umull \bits, \inv, \numerator, \divisor
286 mla \divisor, \inv, \neg, \numerator
287 mov \quotient, \inv
288 cmn \neg, \divisor, lsr #1
289 addcs \divisor, \divisor, \neg, lsl #1
290 addcs \quotient, \quotient, #2
291 cmn \neg, \divisor
292 addcs \quotient, \quotient, #1
293 bx lr
294#endif 275#endif
295.endm 276.endm
296 277