summaryrefslogtreecommitdiffstats
path: root/apps/plugins/fractals
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-15 19:40:55 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch)
tree98ec96946eeb2ae709cb0528cc6998e21bb9b290 /apps/plugins/fractals
parent17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff)
downloadrockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.gz
rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.zip
[1/4] Remove SH support and all archos targets
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
Diffstat (limited to 'apps/plugins/fractals')
-rw-r--r--apps/plugins/fractals/cpu_sh7043.h96
-rw-r--r--apps/plugins/fractals/fractal.h28
-rw-r--r--apps/plugins/fractals/mandelbrot_set.h9
3 files changed, 3 insertions, 130 deletions
diff --git a/apps/plugins/fractals/cpu_sh7043.h b/apps/plugins/fractals/cpu_sh7043.h
deleted file mode 100644
index 0d773432a8..0000000000
--- a/apps/plugins/fractals/cpu_sh7043.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2009 Tomer Shalev
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#ifndef _CPU_SH7043_H
-#define _CPU_SH7043_H
-
-inline static short muls16_asr10(short a, short b)
-{
- short r;
- asm (
- "muls %[a],%[b] \n"
- "sts macl,%[r] \n"
- "shlr8 %[r] \n"
- "shlr2 %[r] \n"
- : /* outputs */
- [r]"=r"(r)
- : /* inputs */
- [a]"r"(a),
- [b]"r"(b)
- );
- return r;
-}
-
-inline static long muls32_asr26(long a, long b)
-{
- long r, t1, t2, t3;
- asm (
- /* Signed 32bit * 32bit -> 64bit multiplication.
- Notation: xxab * xxcd, where each letter represents 16 bits.
- xx is the 64 bit sign extension. */
- "swap.w %[a],%[t1] \n" /* t1 = ba */
- "mulu %[t1],%[b] \n" /* a * d */
- "swap.w %[b],%[t3] \n" /* t3 = dc */
- "sts macl,%[t2] \n" /* t2 = a * d */
- "mulu %[t1],%[t3] \n" /* a * c */
- "sts macl,%[r] \n" /* hi = a * c */
- "mulu %[a],%[t3] \n" /* b * c */
- "clrt \n"
- "sts macl,%[t3] \n" /* t3 = b * c */
- "addc %[t2],%[t3] \n" /* t3 += t2, carry -> t2 */
- "movt %[t2] \n"
- "mulu %[a],%[b] \n" /* b * d */
- "mov %[t3],%[t1] \n" /* t1t3 = t2t3 << 16 */
- "xtrct %[t2],%[t1] \n"
- "shll16 %[t3] \n"
- "sts macl,%[t2] \n" /* lo = b * d */
- "clrt \n" /* hi.lo += t1t3 */
- "addc %[t3],%[t2] \n"
- "addc %[t1],%[r] \n"
- "cmp/pz %[a] \n" /* ab >= 0 ? */
- "bt 1f \n"
- "sub %[b],%[r] \n" /* no: hi -= cd (sign extension of ab is -1) */
- "1: \n"
- "cmp/pz %[b] \n" /* cd >= 0 ? */
- "bt 2f \n"
- "sub %[a],%[r] \n" /* no: hi -= ab (sign extension of cd is -1) */
- "2: \n"
- /* Shift right by 26 and return low 32 bits */
- "shll2 %[r] \n" /* hi <<= 6 */
- "shll2 %[r] \n"
- "shll2 %[r] \n"
- "shlr16 %[t2] \n" /* (unsigned)lo >>= 26 */
- "shlr8 %[t2] \n"
- "shlr2 %[t2] \n"
- "or %[t2],%[r] \n" /* combine result */
- : /* outputs */
- [r] "=&r"(r),
- [t1]"=&r"(t1),
- [t2]"=&r"(t2),
- [t3]"=&r"(t3)
- : /* inputs */
- [a] "r" (a),
- [b] "r" (b)
- );
- return r;
-}
-
-#endif
diff --git a/apps/plugins/fractals/fractal.h b/apps/plugins/fractals/fractal.h
index c7a822c2c6..92a0b87c48 100644
--- a/apps/plugins/fractals/fractal.h
+++ b/apps/plugins/fractals/fractal.h
@@ -22,33 +22,7 @@
#define _FRACTAL_H
/* variable button definitions */
-#if CONFIG_KEYPAD == RECORDER_PAD
-#define FRACTAL_QUIT BUTTON_OFF
-#define FRACTAL_UP BUTTON_UP
-#define FRACTAL_DOWN BUTTON_DOWN
-#define FRACTAL_LEFT BUTTON_LEFT
-#define FRACTAL_RIGHT BUTTON_RIGHT
-#define FRACTAL_ZOOM_IN BUTTON_PLAY
-#define FRACTAL_ZOOM_OUT BUTTON_ON
-#define FRACTAL_PRECISION_INC BUTTON_F2
-#define FRACTAL_PRECISION_DEC BUTTON_F1
-#define FRACTAL_RESET BUTTON_F3
-
-#elif CONFIG_KEYPAD == ONDIO_PAD
-#define FRACTAL_QUIT BUTTON_OFF
-#define FRACTAL_UP BUTTON_UP
-#define FRACTAL_DOWN BUTTON_DOWN
-#define FRACTAL_LEFT BUTTON_LEFT
-#define FRACTAL_RIGHT BUTTON_RIGHT
-#define FRACTAL_ZOOM_IN_PRE BUTTON_MENU
-#define FRACTAL_ZOOM_IN (BUTTON_MENU | BUTTON_REL)
-#define FRACTAL_ZOOM_IN2 (BUTTON_MENU | BUTTON_UP)
-#define FRACTAL_ZOOM_OUT (BUTTON_MENU | BUTTON_DOWN)
-#define FRACTAL_PRECISION_INC (BUTTON_MENU | BUTTON_RIGHT)
-#define FRACTAL_PRECISION_DEC (BUTTON_MENU | BUTTON_LEFT)
-#define FRACTAL_RESET (BUTTON_MENU | BUTTON_OFF)
-
-#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
+#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define FRACTAL_QUIT BUTTON_OFF
#define FRACTAL_UP BUTTON_UP
diff --git a/apps/plugins/fractals/mandelbrot_set.h b/apps/plugins/fractals/mandelbrot_set.h
index 4eeb68461b..2814d24e58 100644
--- a/apps/plugins/fractals/mandelbrot_set.h
+++ b/apps/plugins/fractals/mandelbrot_set.h
@@ -24,18 +24,13 @@
#include "fractal_sets.h"
/* CPU stuff */
-#if CONFIG_CPU == SH7034
-#include "cpu_sh7043.h"
-#elif defined CPU_COLDFIRE
+#if defined CPU_COLDFIRE
#include "cpu_coldfire.h"
#elif defined CPU_ARM
#include "cpu_arm.h"
#endif
-#if CONFIG_CPU == SH7034
-#define MULS16_ASR10(a, b) muls16_asr10(a, b)
-#define MULS32_ASR26(a, b) muls32_asr26(a, b)
-#elif defined CPU_COLDFIRE
+#if defined CPU_COLDFIRE
/* Needs the EMAC initialised to fractional mode w/o rounding and saturation */
#define MULS32_INIT() coldfire_set_macsr(EMAC_FRACTIONAL)
#define MULS16_ASR10(a, b) muls16_asr10(a, b)