From fe04e40be7a26c758a82e410e58be63c1f3d571c Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 5 Nov 2008 00:10:05 +0000 Subject: Further optimised (vs. libgcc) unsigned 32 bit division for ARMv4 (based on the ARMv5(+) version from libgcc), in IRAM on PP for better performance on PP5002, and put into the codeclib for possible reuse. APE -c1000 is now usable on both PP502x and PP5002 (~138% realtime, they're on par now). Gigabeat F/X should also see an APE speedup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19009 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/lib/codeclib.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/codecs/lib/codeclib.h') diff --git a/apps/codecs/lib/codeclib.h b/apps/codecs/lib/codeclib.h index 744accb..477818a 100644 --- a/apps/codecs/lib/codeclib.h +++ b/apps/codecs/lib/codeclib.h @@ -57,6 +57,15 @@ void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, con extern void mdct_backward(int n, int32_t *in, int32_t *out); +#if defined(CPU_ARM) && (ARM_ARCH == 4) +/* optimised unsigned integer division for ARMv4, in IRAM */ +unsigned udiv32_arm(unsigned a, unsigned b); +#define UDIV32(a, b) udiv32_arm(a, b) +#else +/* default */ +#define UDIV32(a, b) (a / b) +#endif + /* Various codec helper functions */ int codec_init(void); -- cgit v1.1