mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:23:01 +00:00
Assembly for DIB_16BPP_VLine, nearly no performance increase, but could be useful later anyway.
svn path=/trunk/; revision=15826
This commit is contained in:
parent
72448a5e50
commit
85b03712d5
1 changed files with 34 additions and 1 deletions
|
@ -90,7 +90,39 @@ DIB_16BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
DIB_16BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
DIB_16BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
||||||
{
|
{ /* 2610-2700 */
|
||||||
|
#ifdef _M_IX86
|
||||||
|
asm volatile(
|
||||||
|
" testl %2, %2" "\n\t"
|
||||||
|
" jle 2f" "\n\t"
|
||||||
|
" movl %2, %%ecx" "\n\t"
|
||||||
|
" shr $2, %2" "\n\t"
|
||||||
|
" andl $3, %%ecx" "\n\t"
|
||||||
|
" jz 1f" "\n\t"
|
||||||
|
"0:" "\n\t"
|
||||||
|
" movw %%ax, (%0)" "\n\t"
|
||||||
|
" addl %1, %0" "\n\t"
|
||||||
|
" decl %%ecx" "\n\t"
|
||||||
|
" jnz 0b" "\n\t"
|
||||||
|
" testl %2, %2" "\n\t"
|
||||||
|
" jz 2f" "\n\t"
|
||||||
|
"1:" "\n\t"
|
||||||
|
" movw %%ax, (%0)" "\n\t"
|
||||||
|
" addl %1, %0" "\n\t"
|
||||||
|
" movw %%ax, (%0)" "\n\t"
|
||||||
|
" addl %1, %0" "\n\t"
|
||||||
|
" movw %%ax, (%0)" "\n\t"
|
||||||
|
" addl %1, %0" "\n\t"
|
||||||
|
" movw %%ax, (%0)" "\n\t"
|
||||||
|
" addl %1, %0" "\n\t"
|
||||||
|
" decl %2" "\n\t"
|
||||||
|
" jnz 1b" "\n\t"
|
||||||
|
"2:" "\n\t"
|
||||||
|
: /* no output */
|
||||||
|
: "r"(SurfObj->pvScan0 + (y1 * SurfObj->lDelta) + (x * sizeof (WORD))),
|
||||||
|
"r"(SurfObj->lDelta), "r"(y2 - y1), "a"(c)
|
||||||
|
: "cc", "memory", "%ecx");
|
||||||
|
#else
|
||||||
PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta;
|
PBYTE byteaddr = SurfObj->pvScan0 + y1 * SurfObj->lDelta;
|
||||||
PWORD addr = (PWORD)byteaddr + x;
|
PWORD addr = (PWORD)byteaddr + x;
|
||||||
LONG lDelta = SurfObj->lDelta;
|
LONG lDelta = SurfObj->lDelta;
|
||||||
|
@ -102,6 +134,7 @@ DIB_16BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
||||||
byteaddr += lDelta;
|
byteaddr += lDelta;
|
||||||
addr = (PWORD)byteaddr;
|
addr = (PWORD)byteaddr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue