forked from len0rd/rockbox
H1x0: Slight optimisation of the grayscale library.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7646 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4b2aa9830e
commit
ddad7197ed
2 changed files with 10 additions and 8 deletions
|
@ -562,7 +562,7 @@ void gray_update_rect(int x, int y, int width, int height)
|
|||
/* pop all 8 patterns */
|
||||
"not.l %[mask] \n" /* set mask -> keep mask */
|
||||
"and.l #0xFF,%[mask] \n"
|
||||
"beq.b .ur_sloop \n" /* yes: jump to short loop */
|
||||
"beq.b .ur_sstart \n" /* yes: jump to short loop */
|
||||
|
||||
".ur_floop: \n" /** full loop (there are bits to keep)**/
|
||||
"clr.l %%d0 \n"
|
||||
|
@ -599,6 +599,9 @@ void gray_update_rect(int x, int y, int width, int height)
|
|||
"bhi.b .ur_floop \n" /* no: loop */
|
||||
|
||||
"bra.b .ur_end \n"
|
||||
|
||||
".ur_sstart: \n"
|
||||
"move.l %%a0,%[mask]\n" /* mask isn't needed here, reuse reg */
|
||||
|
||||
".ur_sloop: \n" /** short loop (nothing to keep) **/
|
||||
"clr.l %%d0 \n"
|
||||
|
@ -612,10 +615,8 @@ void gray_update_rect(int x, int y, int width, int height)
|
|||
"addx.l %%d0,%%d0 \n"
|
||||
"lsr.l #1,%%d6 \n"
|
||||
"addx.l %%d0,%%d0 \n"
|
||||
"move.l %%a0,%%d1 \n"
|
||||
"lsr.l #1,%%d1 \n"
|
||||
"lsr.l #1,%[mask] \n"
|
||||
"addx.l %%d0,%%d0 \n"
|
||||
"move.l %%d1,%%a0 \n"
|
||||
"move.l %%a1,%%d1 \n"
|
||||
"lsr.l #1,%%d1 \n"
|
||||
"addx.l %%d0,%%d0 \n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue