1
0
Fork 0
forked from len0rd/rockbox

Grayscale lib: let the compiler decide when to save the pr register.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6051 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-02-24 23:24:00 +00:00
parent 527e121757
commit 6e372abb0e
2 changed files with 2 additions and 6 deletions

View file

@ -54,7 +54,6 @@ static void _writeblock(unsigned char *address, unsigned mask, unsigned bits)
* see there for an explanation) for all 8 pixels and put them on an
* extra stack */
asm (
"sts.l pr,@-r15 \n" /* save pr (fix GCC331 build, cleaner) */
"mov #8,r3 \n" /* loop count in r3: 8 pixels */
"mov %6,r2 \n" /* copy mask */
@ -104,7 +103,6 @@ static void _writeblock(unsigned char *address, unsigned mask, unsigned bits)
"add #-1,r3 \n" /* decrease loop count */
"cmp/pl r3 \n" /* loop count > 0? */
"bt .wb_loop \n" /* yes: loop */
"lds.l @r15+,pr \n" /* retsore pr */
: /* outputs */
/* %0, in & out */ "+r"(_gray_random_buffer),
/* %1, in & out */ "+r"(pat_ptr)
@ -116,7 +114,7 @@ static void _writeblock(unsigned char *address, unsigned mask, unsigned bits)
/* %6 */ "r"(mask),
/* %7 */ "r"(bits)
: /* clobbers */
"r0", "r1", "r2", "r3", "r4", "r5", "macl"
"r0", "r1", "r2", "r3", "r4", "r5", "macl", "pr"
);
end_addr = address + MULU16(_graybuf->depth, _graybuf->plane_size);

View file

@ -49,7 +49,6 @@ static void _writearray(unsigned char *address, const unsigned char *src,
* _writepixel, see there for an explanation) for all 8 pixels and put them
* on an extra "stack" */
asm (
"sts.l pr,@-r15 \n" /* save pr (fix GCC331 build, cleaner) */
"mov #8,r3 \n" /* loop count in r3: 8 pixels */
"mov %7,r2 \n" /* copy mask */
@ -99,7 +98,6 @@ static void _writearray(unsigned char *address, const unsigned char *src,
"add #-1,r3 \n" /* decrease loop count */
"cmp/pl r3 \n" /* loop count > 0? */
"bt .wa_loop \n" /* yes: loop */
"lds.l @r15+,pr \n" /* restore pr */
: /* outputs */
/* %0, in & out */ "+r"(_gray_random_buffer),
/* %1, in & out */ "+r"(pat_ptr)
@ -111,7 +109,7 @@ static void _writearray(unsigned char *address, const unsigned char *src,
/* %6 */ "r"(_graybuf->randmask),
/* %7 */ "r"(mask)
: /* clobbers */
"r0", "r1", "r2", "r3", "r4", "r5", "macl"
"r0", "r1", "r2", "r3", "r4", "r5", "macl", "pr"
);
end_addr = address + MULU16(_graybuf->depth, _graybuf->plane_size);