Commit 11353fcb authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Fixed asm() constraints.

parent f1822356
...@@ -907,19 +907,21 @@ static void X11DRV_DIB_SetImageBits_8( int lines, const BYTE *srcbits, ...@@ -907,19 +907,21 @@ static void X11DRV_DIB_SetImageBits_8( int lines, const BYTE *srcbits,
case 16: case 16:
#if defined(__i386__) && defined(__GNUC__) #if defined(__i386__) && defined(__GNUC__)
/* Some X servers might have 32 bit/ 16bit deep pixel */ /* Some X servers might have 32 bit/ 16bit deep pixel */
if (bmpImage->bits_per_pixel == 16) if (lines && (dstwidth!=left) && (bmpImage->bits_per_pixel == 16))
{ {
for (h = lines ; h--; ) { for (h = lines ; h--; ) {
int _cl1,_cl2; /* temp outputs for asm below */
/* Borrowed from DirectDraw */ /* Borrowed from DirectDraw */
__asm__ __volatile__( __asm__ __volatile__(
"xor %%eax,%%eax\n" "xor %%eax,%%eax\n"
"cld\n"
"1:\n" "1:\n"
" lodsb\n" " lodsb\n"
" movw (%%edx,%%eax,4),%%ax\n" " movw (%%edx,%%eax,4),%%ax\n"
" stosw\n" " stosw\n"
" xor %%eax,%%eax\n" " xor %%eax,%%eax\n"
" loop 1b\n" " loop 1b\n"
: /*"=S" (bits), "=D" (dstbits)*/ :"=S" (bits), "=D" (_cl1), "=c" (_cl2)
:"S" (bits), :"S" (bits),
"D" (bmpImage->data+h*bmpImage->bytes_per_line+left*2), "D" (bmpImage->data+h*bmpImage->bytes_per_line+left*2),
"c" (dstwidth-left), "c" (dstwidth-left),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment