summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/gray_core.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-04-20 19:48:02 +0000
committerJens Arnold <amiconn@rockbox.org>2006-04-20 19:48:02 +0000
commitd43e719d59aeadefee7b46609bdbe66812c5c380 (patch)
tree16251f9be32c2b1fa38a7ae8e16ef8e920b34da6 /apps/plugins/lib/gray_core.c
parent29ab31e8f1c68dd89dad1e9a92fe3c8a8dd223a9 (diff)
downloadrockbox-d43e719d59aeadefee7b46609bdbe66812c5c380.zip
rockbox-d43e719d59aeadefee7b46609bdbe66812c5c380.tar.gz
rockbox-d43e719d59aeadefee7b46609bdbe66812c5c380.tar.bz2
rockbox-d43e719d59aeadefee7b46609bdbe66812c5c380.tar.xz
SH1: Better placement of the C library routine references (gcc 3.4.x -Os and -O2 proof).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9748 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/gray_core.c')
-rw-r--r--apps/plugins/lib/gray_core.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/apps/plugins/lib/gray_core.c b/apps/plugins/lib/gray_core.c
index c70582c..6cc33e0 100644
--- a/apps/plugins/lib/gray_core.c
+++ b/apps/plugins/lib/gray_core.c
@@ -509,6 +509,14 @@ void gray_update_rect(int x, int y, int width, int height)
"bra .ur_end \n"
"nop \n"
+ /* References to C library routines used in the precalc block */
+ ".align 2 \n"
+ ".ashlsi3: \n" /* C library routine: */
+ ".long ___ashlsi3 \n" /* shift r4 left by r5, res. in r0 */
+ ".lshrsi3: \n" /* C library routine: */
+ ".long ___lshrsi3 \n" /* shift r4 right by r5, res. in r0 */
+ /* both routines preserve r4, destroy r5 and take ~16 cycles */
+
".ur_sloop: \n" /** short loop (nothing to keep) **/
"shlr r1 \n" /* rotate lsb of pattern 1 to t bit */
"rotcl r0 \n" /* rotate t bit into r0 */
@@ -740,18 +748,6 @@ void gray_update_rect(int x, int y, int width, int height)
dst += _gray_info.width;
}
}
-#if CONFIG_CPU == SH7034
-/* References to C library routines used in gray_update_rect() */
-asm (
- ".align 2 \n"
-".ashlsi3: \n" /* C library routine: */
- ".long ___ashlsi3 \n" /* shift r4 left by r5, return in r0 */
-".lshrsi3: \n" /* C library routine: */
- ".long ___lshrsi3 \n" /* shift r4 right by r5, return in r0 */
- /* both routines preserve r4, destroy r5 and take ~16 cycles */
-);
-#endif /* CONFIG_CPU == SH7034 */
-
#endif /* !SIMULATOR */
/* Update the whole greyscale overlay */