make inline asm -O3 compatible (remove L1 and L2 label) thx blight and alex to explain how to do that.

svn path=/trunk/; revision=16065
This commit is contained in:
Magnus Olsen 2005-06-18 22:54:12 +00:00
parent bc47c238df
commit 46f26a073b
3 changed files with 11 additions and 11 deletions

View file

@ -56,18 +56,18 @@ DIB_16BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
" or %0, %%eax\n"
" mov %2, %%edi\n"
" test $0x03, %%edi\n" /* Align to fullword boundary */
" jz .L1\n"
" jz 0f\n"
" stosw\n"
" dec %1\n"
" jz .L2\n"
".L1:\n"
" jz 1f\n"
"0:\n"
" mov %1,%%ecx\n" /* Setup count of fullwords to fill */
" shr $1,%%ecx\n"
" rep stosl\n" /* The actual fill */
" test $0x01, %1\n" /* One left to do at the right side? */
" jz .L2\n"
" jz 1f\n"
" stosw\n"
".L2:\n"
"1:\n"
: /* no output */
: "r"(c), "r"(Count), "m"(addr)
: "%eax", "%ecx", "%edi");

View file

@ -95,13 +95,13 @@ DIB_24BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
" movl %2, %%ecx\n" /* Load count */
" shr $2, %%ecx\n"
" movl %3, %%edi\n" /* Load dest */
".L1:\n"
"0:\n"
" movl %%eax, (%%edi)\n" /* Store 4 pixels, 12 bytes */
" movl %%ebx, 4(%%edi)\n"
" movl %%edx, 8(%%edi)\n"
" addl $12, %%edi\n"
" dec %%ecx\n"
" jnz .L1\n"
" jnz 0b\n"
" movl %%edi, %0\n"
: "=m"(addr)
: "m"(c), "m"(Count), "m"(addr)

View file

@ -54,11 +54,11 @@ DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
" mov %0, %%eax\n"
" mov %2, %%edi\n"
" test $0x03, %%edi\n" /* Align to fullword boundary */
" jnz .L1\n"
" jnz 0f\n"
" mov %1,%%ecx\n" /* Setup count of fullwords to fill */
" rep stosl\n" /* The actual fill */
" jmp .L2\n"
".L1:\n"
" jmp 1f\n"
"0:\n"
" stosw\n"
" ror $0x10,%%eax\n"
" mov %1,%%ecx\n" /* Setup count of fullwords to fill */
@ -66,7 +66,7 @@ DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
" rep stosl\n" /* The actual fill */
" shr $0x10,%%eax\n"
" stosw\n"
".L2:\n"
"1:\n"
: /* no output */
: "m"(c), "r"(cx), "m"(addr)
: "%eax", "%ecx", "%edi");