diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-15 19:40:55 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch) | |
tree | 98ec96946eeb2ae709cb0528cc6998e21bb9b290 /apps/plugins/imageviewer/jpeg/jpeg_decoder.c | |
parent | 17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff) | |
download | rockbox-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/imageviewer/jpeg/jpeg_decoder.c')
-rw-r--r-- | apps/plugins/imageviewer/jpeg/jpeg_decoder.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/plugins/imageviewer/jpeg/jpeg_decoder.c b/apps/plugins/imageviewer/jpeg/jpeg_decoder.c index 342b59c6a4..b014fa0ed1 100644 --- a/apps/plugins/imageviewer/jpeg/jpeg_decoder.c +++ b/apps/plugins/imageviewer/jpeg/jpeg_decoder.c | |||
@@ -39,23 +39,7 @@ | |||
39 | 39 | ||
40 | INLINE unsigned range_limit(int value) | 40 | INLINE unsigned range_limit(int value) |
41 | { | 41 | { |
42 | #if CONFIG_CPU == SH7034 | 42 | #if defined(CPU_COLDFIRE) |
43 | unsigned tmp; | ||
44 | asm ( /* Note: Uses knowledge that only low byte of result is used */ | ||
45 | "mov #-128,%[t] \n" | ||
46 | "sub %[t],%[v] \n" /* value -= -128; equals value += 128; */ | ||
47 | "extu.b %[v],%[t] \n" | ||
48 | "cmp/eq %[v],%[t] \n" /* low byte == whole number ? */ | ||
49 | "bt 1f \n" /* yes: no overflow */ | ||
50 | "cmp/pz %[v] \n" /* overflow: positive? */ | ||
51 | "subc %[v],%[v] \n" /* %[r] now either 0 or 0xffffffff */ | ||
52 | "1: \n" | ||
53 | : /* outputs */ | ||
54 | [v]"+r"(value), | ||
55 | [t]"=&r"(tmp) | ||
56 | ); | ||
57 | return value; | ||
58 | #elif defined(CPU_COLDFIRE) | ||
59 | asm ( /* Note: Uses knowledge that only the low byte of the result is used */ | 43 | asm ( /* Note: Uses knowledge that only the low byte of the result is used */ |
60 | "add.l #128,%[v] \n" /* value += 128; */ | 44 | "add.l #128,%[v] \n" /* value += 128; */ |
61 | "cmp.l #255,%[v] \n" /* overflow? */ | 45 | "cmp.l #255,%[v] \n" /* overflow? */ |