summaryrefslogtreecommitdiff
path: root/apps/plugins/fractals/cpu_coldfire.c
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_coldfire.c
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_coldfire.c')
-rw-r--r--apps/plugins/fractals/cpu_coldfire.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/apps/plugins/fractals/cpu_coldfire.c b/apps/plugins/fractals/cpu_coldfire.c
deleted file mode 100644
index a005a3141e..0000000000
--- a/apps/plugins/fractals/cpu_coldfire.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2009 Tomer Shalev
11 *
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22#include "cpu_coldfire.h"
23
24inline short muls16_asr10(short a, short b)
25{
26 asm (
27 "muls.w %[a],%[b] \n"
28 "asr.l #8,%[b] \n"
29 "asr.l #2,%[b] \n"
30 : /* outputs */
31 [b]"+d"(b)
32 : /* inputs */
33 [a]"d" (a)
34 );
35 return b;
36}
37
38inline long muls32_asr26(long a, long b)
39{
40 long r, t1;
41 asm (
42 "mac.l %[a], %[b], %%acc0 \n" /* multiply */
43 "move.l %%accext01, %[t1] \n" /* get low part */
44 "movclr.l %%acc0, %[r] \n" /* get high part */
45 "asl.l #5, %[r] \n" /* hi <<= 5, plus one free */
46 "lsr.l #3, %[t1] \n" /* lo >>= 3 */
47 "and.l #0x1f, %[t1] \n" /* mask out unrelated bits */
48 "or.l %[t1], %[r] \n" /* combine result */
49 : /* outputs */
50 [r] "=d"(r),
51 [t1]"=d"(t1)
52 : /* inputs */
53 [a] "d" (a),
54 [b] "d" (b)
55 );
56 return r;
57}
58