summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-05-10 13:16:08 +0000
committerDave Chapman <dave@dchapman.com>2007-05-10 13:16:08 +0000
commitf02cba80967b7e42d03962625394bf5d1691a59c (patch)
treeab752be0024ec544500eaf6fcba4207848c9a89e /apps
parent1fc2d91a83f6154c11a203c8da993d647799691a (diff)
downloadrockbox-f02cba80967b7e42d03962625394bf5d1691a59c.tar.gz
rockbox-f02cba80967b7e42d03962625394bf5d1691a59c.tar.bz2
rockbox-f02cba80967b7e42d03962625394bf5d1691a59c.zip
Code cleaning - remove some unnecessary defined(SIMULATOR) checks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13369 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/SOURCES4
-rw-r--r--apps/codecs/Tremor/asm_mcf5249.h2
-rw-r--r--apps/codecs/Tremor/floor1.c2
-rw-r--r--apps/codecs/Tremor/vorbisfile.c2
-rw-r--r--apps/codecs/liba52/a52_internal.h2
-rw-r--r--apps/codecs/liba52/parse.c2
-rw-r--r--apps/codecs/libfaad/decoder.c2
-rw-r--r--apps/codecs/libfaad/fixed.h2
-rw-r--r--apps/codecs/libffmpegFLAC/decoder.c10
-rw-r--r--apps/codecs/libffmpegFLAC/shndec.c6
-rw-r--r--apps/codecs/libmad/global.h4
-rw-r--r--apps/codecs/libmad/layer3.c8
-rw-r--r--apps/codecs/libmad/synth.c2
-rw-r--r--apps/codecs/libmusepack/math.h4
-rw-r--r--apps/codecs/libmusepack/mpc_decoder.c2
-rw-r--r--apps/codecs/libmusepack/synth_filter.c4
-rw-r--r--apps/codecs/libspeex/config-speex.h2
-rw-r--r--apps/codecs/libwavpack/unpack.c10
-rw-r--r--apps/debug_menu.c4
-rw-r--r--apps/dsp.c4
-rw-r--r--apps/dsp.h4
-rw-r--r--apps/dsp_asm.h4
-rw-r--r--apps/eq.c2
-rw-r--r--apps/pcmbuf.h2
-rw-r--r--apps/plugins/alpine_cdc.c4
-rw-r--r--apps/plugins/doom/i_video.c2
-rw-r--r--apps/plugins/doom/m_fixed.h2
-rw-r--r--apps/plugins/doom/r_draw.c2
-rw-r--r--apps/plugins/rockbox_flash.c4
-rw-r--r--apps/plugins/rockboy/lcd.c18
30 files changed, 59 insertions, 63 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index 9467914bca..ccc481b07b 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -94,10 +94,10 @@ dsp.c
enc_config.c
#endif
eq.c
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
dsp_cf.S
eq_cf.S
-#elif defined(CPU_ARM) && !defined(SIMULATOR)
+#elif defined(CPU_ARM)
dsp_arm.S
eq_arm.S
#endif
diff --git a/apps/codecs/Tremor/asm_mcf5249.h b/apps/codecs/Tremor/asm_mcf5249.h
index 4d7f92c089..7d366fa9ca 100644
--- a/apps/codecs/Tremor/asm_mcf5249.h
+++ b/apps/codecs/Tremor/asm_mcf5249.h
@@ -19,7 +19,7 @@
#include "os_types.h"
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
/* attribute for 16-byte alignment */
#define LINE_ATTR __attribute__ ((aligned (16)))
diff --git a/apps/codecs/Tremor/floor1.c b/apps/codecs/Tremor/floor1.c
index a66e7379d7..5f43d563f0 100644
--- a/apps/codecs/Tremor/floor1.c
+++ b/apps/codecs/Tremor/floor1.c
@@ -197,7 +197,7 @@ static vorbis_look_floor *floor1_look(vorbis_dsp_state *vd,vorbis_info_mode *mi,
static int render_point(int x0,int x1,int y0,int y1,int x){
y0&=0x7fff; /* mask off flag */
y1&=0x7fff;
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
asm volatile ("sub.l %[x0],%[x];"
"sub.l %[y0],%[y1];"
"sub.l %[x0],%[x1];"
diff --git a/apps/codecs/Tremor/vorbisfile.c b/apps/codecs/Tremor/vorbisfile.c
index 0f39826388..a32d9f2a48 100644
--- a/apps/codecs/Tremor/vorbisfile.c
+++ b/apps/codecs/Tremor/vorbisfile.c
@@ -763,7 +763,7 @@ int ov_clear(OggVorbis_File *vf){
int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes,
ov_callbacks callbacks){
- #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
/* this seems to be the closest we get to an init function, let's init emac
here. rounding is disabled because of MULT31_SHIFT15, which will be
inaccurate with rounding in its current incarnation */
diff --git a/apps/codecs/liba52/a52_internal.h b/apps/codecs/liba52/a52_internal.h
index 14e5795146..cd3286b17a 100644
--- a/apps/codecs/liba52/a52_internal.h
+++ b/apps/codecs/liba52/a52_internal.h
@@ -141,7 +141,7 @@ typedef int16_t quantizer_t;
#if 0
#define MUL(a,b) ((int)(((int64_t)(a) * (b) + (1 << 29)) >> 30))
#define MUL_L(a,b) ((int)(((int64_t)(a) * (b) + (1 << 25)) >> 26))
-#elif defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#elif defined(CPU_COLDFIRE)
/* loses 1 bit of accuracy */
#define MUL(a, b) \
({ \
diff --git a/apps/codecs/liba52/parse.c b/apps/codecs/liba52/parse.c
index 18fb901699..2a065b4fc4 100644
--- a/apps/codecs/liba52/parse.c
+++ b/apps/codecs/liba52/parse.c
@@ -58,7 +58,7 @@ a52_state_t * a52_init (uint32_t mm_accel)
a52_state_t * state;
int i;
- #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_ROUND | EMAC_SATURATE);
#endif
/*
diff --git a/apps/codecs/libfaad/decoder.c b/apps/codecs/libfaad/decoder.c
index 145247784f..2285168253 100644
--- a/apps/codecs/libfaad/decoder.c
+++ b/apps/codecs/libfaad/decoder.c
@@ -95,7 +95,7 @@ NeAACDecHandle NEAACDECAPI NeAACDecOpen(void)
uint8_t i;
NeAACDecHandle hDecoder = NULL;
- #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE);
#endif
diff --git a/apps/codecs/libfaad/fixed.h b/apps/codecs/libfaad/fixed.h
index 7478d2ef0f..da895e81bc 100644
--- a/apps/codecs/libfaad/fixed.h
+++ b/apps/codecs/libfaad/fixed.h
@@ -59,7 +59,7 @@ typedef int32_t real_t;
#define Q2_PRECISION (1 << Q2_BITS)
#define Q2_CONST(A) (((A) >= 0) ? ((real_t)((A)*(Q2_PRECISION)+0.5)) : ((real_t)((A)*(Q2_PRECISION)-0.5)))
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
static INLINE real_t MUL_F(real_t A, real_t B)
{
diff --git a/apps/codecs/libffmpegFLAC/decoder.c b/apps/codecs/libffmpegFLAC/decoder.c
index 8a1f84c6b6..88fcbfd0bd 100644
--- a/apps/codecs/libffmpegFLAC/decoder.c
+++ b/apps/codecs/libffmpegFLAC/decoder.c
@@ -42,9 +42,9 @@
#include "decoder.h"
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
#include "coldfire.h"
-#elif defined(CPU_ARM) && !defined(SIMULATOR)
+#elif defined(CPU_ARM)
#include "arm.h"
#endif
@@ -260,11 +260,11 @@ static int decode_subframe_lpc(FLACContext *s, int32_t* decoded, int pred_order)
return -8;
if ((s->bps + coeff_prec + av_log2(pred_order)) <= 32) {
- #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
(void)sum;
lpc_decode_emac(s->blocksize - pred_order, qlevel, pred_order,
decoded + pred_order, coeffs);
- #elif defined(CPU_ARM) && !defined(SIMULATOR)
+ #elif defined(CPU_ARM)
(void)sum;
lpc_decode_arm(s->blocksize - pred_order, qlevel, pred_order,
decoded + pred_order, coeffs);
@@ -278,7 +278,7 @@ static int decode_subframe_lpc(FLACContext *s, int32_t* decoded, int pred_order)
}
#endif
} else {
- #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
(void)wsum;
(void)j;
lpc_decode_emac_wide(s->blocksize - pred_order, qlevel, pred_order,
diff --git a/apps/codecs/libffmpegFLAC/shndec.c b/apps/codecs/libffmpegFLAC/shndec.c
index 61b3703188..1afcff6fbe 100644
--- a/apps/codecs/libffmpegFLAC/shndec.c
+++ b/apps/codecs/libffmpegFLAC/shndec.c
@@ -82,7 +82,7 @@ static unsigned int get_uint(ShortenContext *s, int k)
return get_ur_golomb_shorten(&s->gb, k);
}
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
static void coldfire_lshift_samples(int n, int shift, int32_t *samples) ICODE_ATTR_FLAC;
static void coldfire_lshift_samples(int n, int shift, int32_t *samples)
{
@@ -132,7 +132,7 @@ static inline void fix_bitshift(ShortenContext *s, int32_t *samples)
/* Wrapped samples don't get bitshifted, so we'll do them during
the next iteration. */
if (s->bitshift != 0) {
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
coldfire_lshift_samples(s->blocksize, s->bitshift, samples - s->nwrap);
#else
for (i = -s->nwrap; i < (s->blocksize - s->nwrap); i++)
@@ -349,7 +349,7 @@ int shorten_decode_frames(ShortenContext *s, int *nsamples,
/* Scale the samples for the pcmbuf */
int scale = SHN_OUTPUT_DEPTH - s->bits_per_sample;
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
coldfire_lshift_samples(*nsamples, scale, decoded0 + s->nwrap);
coldfire_lshift_samples(*nsamples, scale, decoded1 + s->nwrap);
#else
diff --git a/apps/codecs/libmad/global.h b/apps/codecs/libmad/global.h
index 1ecfea1c14..38e4aade35 100644
--- a/apps/codecs/libmad/global.h
+++ b/apps/codecs/libmad/global.h
@@ -24,9 +24,9 @@
# ifndef LIBMAD_GLOBAL_H
# define LIBMAD_GLOBAL_H
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
#define FPM_COLDFIRE_EMAC
-#elif defined(CPU_ARM) && !defined(SIMULATOR)
+#elif defined(CPU_ARM)
#define FPM_ARM
#define ASO_IMDCT
#else
diff --git a/apps/codecs/libmad/layer3.c b/apps/codecs/libmad/layer3.c
index 64169a7cbd..38e488ddbb 100644
--- a/apps/codecs/libmad/layer3.c
+++ b/apps/codecs/libmad/layer3.c
@@ -46,7 +46,7 @@
# include "layer3.h"
/* depending on the cpu "leftshift32" may be supported or not */
-# if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+# if defined(CPU_COLDFIRE)
#define MAXLSHIFT 32
#else
#define MAXLSHIFT 31
@@ -1569,7 +1569,7 @@ void III_aliasreduce(mad_fixed_t xr[576], int lines)
# if defined(ASO_ZEROCHECK)
if (a | b) {
# endif
-# if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+# if defined(CPU_COLDFIRE)
(void)hi, (void)lo;
asm volatile ("mac.l %[a], %[csi], %%acc0\n\t"
"msac.l %[b], %[cai], %%acc0\n\t"
@@ -1796,7 +1796,7 @@ void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36])
* DESCRIPTION: perform X[18]->x[36] IMDCT
*/
-# if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+# if defined(CPU_COLDFIRE)
/* emac optimized imdct36, it is very ugly and i hope to replace it soon.
* for now it is actually somewhat faster than the stock implementation.
*/
@@ -2813,7 +2813,7 @@ void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36],
* DESCRIPTION: perform IMDCT and windowing for short blocks
*/
-# if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+# if defined(CPU_COLDFIRE)
void III_imdct_s(mad_fixed_t const X[18], mad_fixed_t z[36]);
#else
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c
index 2da8f64db7..8613f77f79 100644
--- a/apps/codecs/libmad/synth.c
+++ b/apps/codecs/libmad/synth.c
@@ -42,7 +42,7 @@ void mad_synth_init(struct mad_synth *synth)
synth->pcm.samplerate = 0;
synth->pcm.channels = 0;
synth->pcm.length = 0;
- #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
/* init the emac unit here, since this function should always be called
before using libmad */
coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE | EMAC_ROUND);
diff --git a/apps/codecs/libmusepack/math.h b/apps/codecs/libmusepack/math.h
index eb9b0e978a..f9e9d08b08 100644
--- a/apps/codecs/libmusepack/math.h
+++ b/apps/codecs/libmusepack/math.h
@@ -68,7 +68,7 @@ typedef mpc_int64_t MPC_SAMPLE_FORMAT_MULTIPLY;
#define MAKE_MPC_SAMPLE(X) (MPC_SAMPLE_FORMAT)((double)(X) * (double)(((mpc_int64_t)1)<<MPC_FIXED_POINT_FRACTPART))
#define MAKE_MPC_SAMPLE_EX(X,Y) (MPC_SAMPLE_FORMAT)((double)(X) * (double)(((mpc_int64_t)1)<<(Y)))
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
#define MPC_MULTIPLY(X,Y) mpc_multiply((X), (Y))
#define MPC_MULTIPLY_EX(X,Y,Z) mpc_multiply_ex((X), (Y), (Z))
@@ -158,7 +158,7 @@ static inline MPC_SAMPLE_FORMAT MPC_MULTIPLY_EX(MPC_SAMPLE_FORMAT item1,MPC_SAMP
#ifdef MPC_HAVE_MULHIGH
#define MPC_MULTIPLY_FRACT(X,Y) _MulHigh(X,Y)
#else
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
/* loses one bit of accuracy.
the rest of the macros won't be as easy as this... */
#define MPC_MULTIPLY_FRACT(X,Y) \
diff --git a/apps/codecs/libmusepack/mpc_decoder.c b/apps/codecs/libmusepack/mpc_decoder.c
index 89d7254356..a5a24d6c8a 100644
--- a/apps/codecs/libmusepack/mpc_decoder.c
+++ b/apps/codecs/libmusepack/mpc_decoder.c
@@ -1492,7 +1492,7 @@ void mpc_decoder_setup(mpc_decoder *d, mpc_reader *r)
d->Y_L = Y_L;
d->Y_R = Y_R;
- #if defined(CPU_COLDFIRE)&& !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE);
#endif
}
diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c
index 2b14c26c92..0dabe59150 100644
--- a/apps/codecs/libmusepack/synth_filter.c
+++ b/apps/codecs/libmusepack/synth_filter.c
@@ -343,7 +343,7 @@ static void Synthese_Filter_float_internal(MPC_SAMPLE_FORMAT * OutData,MPC_SAMPL
- #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ #if defined(CPU_COLDFIRE)
for ( k = 0; k < 32; k++, D += 16, V++ ) {
asm volatile (
"movem.l (%[D]), %%d0-%%d3 \n\t"
@@ -372,7 +372,7 @@ static void Synthese_Filter_float_internal(MPC_SAMPLE_FORMAT * OutData,MPC_SAMPL
: [Data] "+a" (Data)
: [V] "a" (V), [D] "a" (D)
: "d0", "d1", "d2", "d3", "a5");
- #elif defined(CPU_ARM) && !defined(SIMULATOR)
+ #elif defined(CPU_ARM)
for ( k = 0; k < 32; k++, V++ ) {
asm volatile (
"ldmia %[D]!, { r0-r3 } \n\t"
diff --git a/apps/codecs/libspeex/config-speex.h b/apps/codecs/libspeex/config-speex.h
index 10555c7fa8..efdb7dbb54 100644
--- a/apps/codecs/libspeex/config-speex.h
+++ b/apps/codecs/libspeex/config-speex.h
@@ -7,7 +7,7 @@
/* #undef ARM4_ASM */
/* Make use of ARM5E assembly optimizations */
-#if defined(CPU_ARM) && !defined(SIMULATOR)
+#if defined(CPU_ARM)
#define ARM4_ASM
#endif
diff --git a/apps/codecs/libwavpack/unpack.c b/apps/codecs/libwavpack/unpack.c
index daf88718c8..f2eca7619f 100644
--- a/apps/codecs/libwavpack/unpack.c
+++ b/apps/codecs/libwavpack/unpack.c
@@ -286,9 +286,9 @@ int read_config_info (WavpackContext *wpc, WavpackMetadata *wpmd)
// samples unpacked, which can be less than the number requested if an error
// occurs or the end of the block is reached.
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
extern void decorr_stereo_pass_cont_mcf5249 (struct decorr_pass *dpp, int32_t *buffer, int32_t sample_count);
-#elif defined(CPU_ARM) && !defined(SIMULATOR)
+#elif defined(CPU_ARM)
extern void decorr_stereo_pass_cont_arm (struct decorr_pass *dpp, int32_t *buffer, int32_t sample_count);
extern void decorr_stereo_pass_cont_arml (struct decorr_pass *dpp, int32_t *buffer, int32_t sample_count);
#else
@@ -351,9 +351,9 @@ int32_t unpack_samples (WavpackContext *wpc, int32_t *buffer, uint32_t sample_co
else
for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) {
decorr_stereo_pass (dpp, buffer, 8);
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
decorr_stereo_pass_cont_mcf5249 (dpp, buffer + 16, sample_count - 8);
-#elif defined(CPU_ARM) && !defined(SIMULATOR)
+#elif defined(CPU_ARM)
if (((flags & MAG_MASK) >> MAG_LSB) > 15)
decorr_stereo_pass_cont_arml (dpp, buffer + 16, sample_count - 8);
else
@@ -525,7 +525,7 @@ static void decorr_stereo_pass (struct decorr_pass *dpp, int32_t *buffer, int32_
dpp->weight_B = weight_B;
}
-#if (!defined(CPU_COLDFIRE) && !defined(CPU_ARM)) || defined(SIMULATOR)
+#if (!defined(CPU_COLDFIRE) && !defined(CPU_ARM))
static void decorr_stereo_pass_cont (struct decorr_pass *dpp, int32_t *buffer, int32_t sample_count)
{
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 9e654b1d45..9b3e6e9f8b 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -342,7 +342,7 @@ static bool dbg_audio_thread(void)
#endif /* HAVE_LCD_BITMAP */
-#if (CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE)) && !defined(SIMULATOR)
+#if (CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE))
/* Tool function to read the flash manufacturer and type, if available.
Only chips which could be reprogrammed in system will return values.
(The mode switch addresses vary between flash manufacturers, hence addr1/2) */
@@ -396,7 +396,7 @@ static bool dbg_flash_id(unsigned* p_manufacturer, unsigned* p_device,
}
return false; /* fail */
}
-#endif /* (CONFIG_CPU == SH7034 || CPU_COLDFIRE) && !SIMULATOR */
+#endif /* (CONFIG_CPU == SH7034 || CPU_COLDFIRE) */
#ifndef SIMULATOR
#ifdef HAVE_LCD_BITMAP
diff --git a/apps/dsp.c b/apps/dsp.c
index 609b2d6d0d..f05c6f14ce 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -1124,7 +1124,7 @@ int dsp_process(char *dst, const char *src[], int count)
int written = 0;
int samples;
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
/* set emac unit for dsp processing, and save old macsr, we're running in
codec thread context at this point, so can't clobber it */
unsigned long old_macsr = coldfire_get_macsr();
@@ -1177,7 +1177,7 @@ int dsp_process(char *dst, const char *src[], int count)
yield();
}
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
/* set old macsr again */
coldfire_set_macsr(old_macsr);
#endif
diff --git a/apps/dsp.h b/apps/dsp.h
index 5d6e964d89..4e57adfc12 100644
--- a/apps/dsp.h
+++ b/apps/dsp.h
@@ -60,7 +60,7 @@ enum {
};
/* A bunch of fixed point assembler helper macros */
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
/* These macros use the Coldfire EMAC extension and need the MACSR flags set
* to fractional mode with no rounding.
*/
@@ -133,7 +133,7 @@ enum {
#define ACC_INIT(acc, x, y) ACC(acc, x, y)
-#elif defined(CPU_ARM) && !defined(SIMULATOR)
+#elif defined(CPU_ARM)
/* Multiply two S.31 fractional integers and return the sign bit and the
* 31 most significant bits of the result.
diff --git a/apps/dsp_asm.h b/apps/dsp_asm.h
index 14875d21d8..02307dbd89 100644
--- a/apps/dsp_asm.h
+++ b/apps/dsp_asm.h
@@ -23,8 +23,6 @@
#define _DSP_ASM_H
/* Set the appropriate #defines based on CPU or whatever matters */
-#ifndef SIMULATOR
-
#if defined(CPU_ARM)
#define DSP_HAVE_ASM_RESAMPLING
#define DSP_HAVE_ASM_CROSSFEED
@@ -39,8 +37,6 @@
#define DSP_HAVE_ASM_SAMPLE_OUTPUT_STEREO
#endif /* CPU_COLDFIRE */
-#endif /* SIMULATOR */
-
/* Declare prototypes based upon what's #defined above */
#ifdef DSP_HAVE_ASM_CROSSFEED
void apply_crossfeed(int count, int32_t *buf[]);
diff --git a/apps/eq.c b/apps/eq.c
index b03a651812..e71af7cefc 100644
--- a/apps/eq.c
+++ b/apps/eq.c
@@ -322,7 +322,7 @@ void eq_hs_coefs(unsigned long cutoff, unsigned long Q, long db, int32_t *c)
* implementations.
*/
-#if (!defined(CPU_COLDFIRE) && !defined(CPU_ARM)) || defined(SIMULATOR)
+#if (!defined(CPU_COLDFIRE) && !defined(CPU_ARM))
void eq_filter(int32_t **x, struct eqfilter *f, unsigned num,
unsigned channels, unsigned shift)
{
diff --git a/apps/pcmbuf.h b/apps/pcmbuf.h
index bddc7bb93d..bb7da52644 100644
--- a/apps/pcmbuf.h
+++ b/apps/pcmbuf.h
@@ -52,7 +52,7 @@ void pcmbuf_play_stop(void);
bool pcmbuf_is_crossfade_active(void);
/* These functions are for playing chained buffers of PCM data */
-#if defined(HAVE_ADJUSTABLE_CPU_FREQ) && !defined(SIMULATOR)
+#if defined(HAVE_ADJUSTABLE_CPU_FREQ)
void pcmbuf_boost(bool state);
void pcmbuf_set_boost_mode(bool state);
#else
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c
index 8b285d413a..f0f2939de1 100644
--- a/apps/plugins/alpine_cdc.c
+++ b/apps/plugins/alpine_cdc.c
@@ -32,7 +32,7 @@
#include "plugin.h"
/* Only build for (correct) target */
-#if !defined(SIMULATOR) && CONFIG_CPU==SH7034 && !defined(HAVE_MMC)
+#if CONFIG_CPU==SH7034 && !defined(HAVE_MMC)
PLUGIN_HEADER
@@ -1201,4 +1201,4 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
return (main(parameter)==0) ? PLUGIN_OK : PLUGIN_ERROR;
}
-#endif /* #ifndef SIMULATOR, etc. */
+#endif /* CONFIG_CPU==SH7034 && !defined(HAVE_MMC) */
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 2274854b4a..c3ac30f272 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -583,7 +583,7 @@ void I_InitGraphics(void)
gray_show(true);
#endif
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#ifdef CPU_COLDFIRE
coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE);
d_screens[0] = fastscreen;
#else
diff --git a/apps/plugins/doom/m_fixed.h b/apps/plugins/doom/m_fixed.h
index e29933befd..15fd9867a3 100644
--- a/apps/plugins/doom/m_fixed.h
+++ b/apps/plugins/doom/m_fixed.h
@@ -44,7 +44,7 @@ typedef int fixed_t;
inline static int FixedMul( int a, int b )
{
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
// Code contributed by Thom Johansen
register int result;
asm (
diff --git a/apps/plugins/doom/r_draw.c b/apps/plugins/doom/r_draw.c
index 5f45323a36..ee107f9839 100644
--- a/apps/plugins/doom/r_draw.c
+++ b/apps/plugins/doom/r_draw.c
@@ -526,7 +526,7 @@ byte *ds_source IBSS_ATTR;
void R_DrawSpan (void)
{
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#ifdef CPU_COLDFIRE
// only slightly faster
asm volatile (
"tst %[count] \n"
diff --git a/apps/plugins/rockbox_flash.c b/apps/plugins/rockbox_flash.c
index 575fb894a5..7ea149dc4e 100644
--- a/apps/plugins/rockbox_flash.c
+++ b/apps/plugins/rockbox_flash.c
@@ -21,7 +21,7 @@
****************************************************************************/
#include "plugin.h"
-#if !defined(SIMULATOR) && (CONFIG_CPU == SH7034) /* Only for SH targets */
+#if (CONFIG_CPU == SH7034) /* Only for SH targets */
PLUGIN_HEADER
@@ -1038,4 +1038,4 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
}
-#endif /* !SIMULATOR or a SH-target */
+#endif /* SH-target */
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index a34db2fd3c..7fe531041c 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -43,7 +43,7 @@ struct scan scan IBSS_ATTR;
#define WV (scan.wv)
byte patpix[4096][8][8]
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
__attribute__ ((aligned(16))) /* to profit from burst mode */
#endif
;
@@ -62,7 +62,7 @@ fb_data *vdest;
void updatepatpix(void)
{
int i, j;
-#if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE)) || defined(SIMULATOR)
+#if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE))
int k, a, c;
#endif
byte *vram = lcd.vbank[0];
@@ -76,7 +76,7 @@ void updatepatpix(void)
patdirty[i] = 0;
for (j = 0; j < 8; j++)
{
-#if CONFIG_CPU == SH7034 && !defined(SIMULATOR)
+#if CONFIG_CPU == SH7034
asm volatile (
"mov.w @%2,r1 \n"
"swap.b r1,r2 \n"
@@ -145,7 +145,7 @@ void updatepatpix(void)
: /* clobbers */
"r0", "r1", "r2"
);
-#elif defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#elif defined(CPU_COLDFIRE)
asm volatile (
"move.b (%2),%%d2 \n"
"move.b (1,%2),%%d1 \n"
@@ -222,7 +222,7 @@ void updatepatpix(void)
patpix[i+1024][j][7-k];
#endif
}
-#if CONFIG_CPU == SH7034 && !defined(SIMULATOR)
+#if CONFIG_CPU == SH7034
asm volatile (
"mov.l @%0,r0 \n"
"mov.l @(4,%0),r1 \n"
@@ -300,7 +300,7 @@ void updatepatpix(void)
: /* clobbers */
"r0", "r1"
);
-#elif defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#elif defined(CPU_COLDFIRE)
asm volatile (
"movem.l (%0),%%d0-%%d3 \n"
"move.l %%d0,%%d4 \n"
@@ -486,7 +486,7 @@ void bg_scan(void)
if (cnt <= 0) return;
while (cnt >= 8)
{
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
asm volatile (
"move.l (%1)+,(%0)+ \n"
"move.l (%1)+,(%0)+ \n"
@@ -521,7 +521,7 @@ void wnd_scan(void)
while (cnt >= 8)
{
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
asm volatile (
"move.l (%1)+,(%0)+ \n"
"move.l (%1)+,(%0)+ \n"
@@ -629,7 +629,7 @@ void bg_scan_color(void)
while (cnt >= 8)
{
src = patpix[*(tile++)][V];
-#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#if defined(CPU_COLDFIRE)
asm volatile (
"move.l (%2)+,%%d1 \n"