summaryrefslogtreecommitdiff
path: root/apps/plugins/fractals/cpu_arm.h
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2010-01-17 22:03:36 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2010-01-17 22:03:36 +0000
commit563f2602f471208cb8544a36539a79dcceaad643 (patch)
tree0d78bda3fcd3ee085b2be88b9eba9255e22f4e6c /apps/plugins/fractals/cpu_arm.h
parentd8123629058c534835058f2db94ba1c2636408e2 (diff)
downloadrockbox-563f2602f471208cb8544a36539a79dcceaad643.tar.gz
rockbox-563f2602f471208cb8544a36539a79dcceaad643.zip
Fractals: Have helper functions in header file to keep them inlined
- Should fix performance degradation caused because of the split - Thanks for all who noticed (amiconn et al.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24266 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/fractals/cpu_arm.h')
-rw-r--r--apps/plugins/fractals/cpu_arm.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/plugins/fractals/cpu_arm.h b/apps/plugins/fractals/cpu_arm.h
index 51a3718f66..ea4595b7d2 100644
--- a/apps/plugins/fractals/cpu_arm.h
+++ b/apps/plugins/fractals/cpu_arm.h
@@ -22,6 +22,21 @@
22#ifndef _CPU_ARM_H 22#ifndef _CPU_ARM_H
23#define _CPU_ARM_H 23#define _CPU_ARM_H
24 24
25inline long muls32_asr26(long a, long b); 25inline static long muls32_asr26(long a, long b)
26{
27 long r, t1;
28 asm (
29 "smull %[r], %[t1], %[a], %[b] \n"
30 "mov %[r], %[r], lsr #26 \n"
31 "orr %[r], %[r], %[t1], lsl #6 \n"
32 : /* outputs */
33 [r] "=&r,&r,&r"(r),
34 [t1]"=&r,&r,&r"(t1)
35 : /* inputs */
36 [a] "%r,%r,%r" (a),
37 [b] "r,0,1" (b)
38 );
39 return r;
40}
26 41
27#endif 42#endif