From 11353fcb6cc52dad713221080769bce33ead1ab6 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 11 May 2000 21:45:09 +0000 Subject: [PATCH] Fixed asm() constraints. --- graphics/x11drv/dib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 06bf928e9a7..db8e083b0e3 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -907,19 +907,21 @@ static void X11DRV_DIB_SetImageBits_8( int lines, const BYTE *srcbits, case 16: #if defined(__i386__) && defined(__GNUC__) /* 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--; ) { + int _cl1,_cl2; /* temp outputs for asm below */ /* Borrowed from DirectDraw */ __asm__ __volatile__( "xor %%eax,%%eax\n" + "cld\n" "1:\n" " lodsb\n" " movw (%%edx,%%eax,4),%%ax\n" " stosw\n" " xor %%eax,%%eax\n" " loop 1b\n" - : /*"=S" (bits), "=D" (dstbits)*/ + :"=S" (bits), "=D" (_cl1), "=c" (_cl2) :"S" (bits), "D" (bmpImage->data+h*bmpImage->bytes_per_line+left*2), "c" (dstwidth-left), -- 2.11.4.GIT