forked from len0rd/rockbox
Patch #1392287 by Brandon Low - faster LCD update for H300 with ASM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8293 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b770d53cb4
commit
bd2f678b70
2 changed files with 31 additions and 1 deletions
|
|
@ -151,3 +151,4 @@ Jeong Taek In
|
||||||
Anders Kagerin
|
Anders Kagerin
|
||||||
Peter D'Hoye
|
Peter D'Hoye
|
||||||
Ben Basha
|
Ben Basha
|
||||||
|
Brandon Low
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,37 @@ inline void lcd_begin_write_gram(void)
|
||||||
inline void lcd_write_data(const unsigned short* p_bytes, int count) ICODE_ATTR;
|
inline void lcd_write_data(const unsigned short* p_bytes, int count) ICODE_ATTR;
|
||||||
inline void lcd_write_data(const unsigned short* p_bytes, int count)
|
inline void lcd_write_data(const unsigned short* p_bytes, int count)
|
||||||
{
|
{
|
||||||
while(count--)
|
int precount = ((-(size_t)p_bytes) & 0xf) / 2;
|
||||||
|
count -= precount;
|
||||||
|
while(precount--)
|
||||||
*(volatile unsigned short *)0xf0000002 = *p_bytes++;
|
*(volatile unsigned short *)0xf0000002 = *p_bytes++;
|
||||||
|
while((count -= 8) >= 0) asm (
|
||||||
|
"\n\tmovem.l (%[p_bytes]),%%d1-%%d4\
|
||||||
|
\n\tswap %%d1\
|
||||||
|
\n\tmove.w %%d1,(%[dest])\
|
||||||
|
\n\tswap %%d1\
|
||||||
|
\n\tmove.w %%d1,(%[dest])\
|
||||||
|
\n\tswap %%d2\
|
||||||
|
\n\tmove.w %%d2,(%[dest])\
|
||||||
|
\n\tswap %%d2\
|
||||||
|
\n\tmove.w %%d2,(%[dest])\
|
||||||
|
\n\tswap %%d3\
|
||||||
|
\n\tmove.w %%d3,(%[dest])\
|
||||||
|
\n\tswap %%d3\
|
||||||
|
\n\tmove.w %%d3,(%[dest])\
|
||||||
|
\n\tswap %%d4\
|
||||||
|
\n\tmove.w %%d4,(%[dest])\
|
||||||
|
\n\tswap %%d4\
|
||||||
|
\n\tmove.w %%d4,(%[dest])\
|
||||||
|
\n\tlea.l (16,%[p_bytes]),%[p_bytes]"
|
||||||
|
: [p_bytes] "+a" (p_bytes)
|
||||||
|
: [dest] "a" ((volatile unsigned short *)0xf0000002)
|
||||||
|
: "d1", "d2", "d3", "d4", "memory");
|
||||||
|
if (count != 0) {
|
||||||
|
count += 8;
|
||||||
|
while(count--)
|
||||||
|
*(volatile unsigned short *)0xf0000002 = *p_bytes++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** hardware configuration ***/
|
/*** hardware configuration ***/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue