From 950b2dfa2c42e6d8e0d1af546efb9368d5b89dc3 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Sat, 20 Feb 2010 06:29:23 +0000 Subject: Clarify comments in ARMv6 divider regarding special-case handling of large (high bit set) numerators. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24783 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/demac/libdemac/udiv32_arm.S | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'apps/codecs') diff --git a/apps/codecs/demac/libdemac/udiv32_arm.S b/apps/codecs/demac/libdemac/udiv32_arm.S index 939fce1..10c0731 100644 --- a/apps/codecs/demac/libdemac/udiv32_arm.S +++ b/apps/codecs/demac/libdemac/udiv32_arm.S @@ -234,10 +234,12 @@ udiv32_arm: mul \inv, \divisor, \neg smlawt \divisor, \divisor, \inv, \divisor mul \inv, \divisor, \neg - /* This will save a cycle on ARMv6, but does not produce a correct result - if numerator sign bit is set. This case accounts for about 1 in 10^7 of - divisions, done by the APE decoder, so we specialize for the more common - case and handle the uncommon large-numerator separately */ + /* This will save a cycle on ARMv6, but requires that the numerator sign + bit is not set (that of inv is guaranteed unset). The branch should + predict very well, making it typically 1 cycle, and thus both the branch + and test fill delay cycles for the multiplies. Based on logging of + numerator sizes in the APE codec, the branch is taken about 1/10^7 of + the time. */ #if ARM_ARCH >= 6 tst \numerator, \numerator smmla \divisor, \divisor, \inv, \divisor -- cgit v1.1