From: buers AT gmx DOT de (Dieter Buerssner) Newsgroups: comp.os.msdos.djgpp Subject: Re: NEED HELP WITH GRX Date: 16 Mar 2000 15:00:46 GMT Lines: 98 Message-ID: <8aqsuf$42fh4$1@fu-berlin.de> References: <38D0C9F8 DOT 40BECC63 AT ujf-grenoble DOT fr> NNTP-Posting-Host: 149.225.75.150 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 953218846 4275748 149.225.75.150 (16 [17104]) X-Posting-Agent: Hamster/1.3.13.0 User-Agent: Xnews/03.02.04 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Maurice Lombardi wrote: >Well... I have applied the two patches, compiled (no more error message) >and run the tests contained in the grx23/test subdirectory. Three tests >fails with a SIGSEGV error: blittest, curstest, and imgtest. Using rhide >I find that the error in curstest is in the function __GR_shift_scanline >contained in grx23/src/utils/shifscl.c, in the asm section which has >been patched with patgrx23.diff. I cannot say more since I know >absolutely nothing about AT&T assembly syntax. Anybody knows ??? This may be unrelated, but have you also applied the update patches that can be found on the grx home page? I didn't apply any offical patches to shiftscl.c, but rather tried the patch I append. The test programs you mention seem to work here in a full screen DOS window in 16 color mode (and in other color modes as weel, but I think, then that function won't be used) with the VESA driver. One other change I made, that could be related, is to set the optimization options to -O only (but I kept -fomit-frame-pointer). Regards, Dieter /* Not well tested */ --- shiftscl.co Sun Apr 5 22:48:50 1998 +++ shiftscl.c Thu Mar 16 15:28:10 2000 @@ -25,26 +25,26 @@ GR_int8u far *s = *(src++) + ws; GR_int8u far *d = *(dst++) + ws; # if defined(__GNUC__) && defined(__i386__) - int w = ws; + int w = ws, dum; /* sad but true: the x86 bytesex forces this inefficient code :( */ asm volatile ("\n" - " movb (%3),%%ch \n" + " movb (%4),%%ch \n" " jmp 1f \n" " .align 4,0x90 \n" - "1: decl %3 \n" + "1: decl %4 \n" " movb %%ch,%%al \n" - " movb (%3),%%ah \n" + " movb (%4),%%ah \n" " movb %%ah,%%ch \n" " shrl %%cl,%%eax \n" - " movb %%al,(%4) \n" - " decl %4 \n" + " movb %%al,(%5) \n" " decl %5 \n" + " decl %6 \n" " jne 1b \n" " shrb %%cl,%%ch \n" - " movb %%ch,(%4) " - : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w) - : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "c" ((int)shift) - : "ax", "cx" + " movb %%ch,(%5) " + : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w), "=c" (dum) + : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "3" ((int)shift) + : "ax" /*, "cx" buers */ ); # elif defined(__TURBOC__) asm push ds ; @@ -82,23 +82,23 @@ GR_int8u far *s = *(src++); GR_int8u far *d = *(dst++); # if defined(__GNUC__) && defined(__i386__) - int w = ws; + int w = ws, dum; asm volatile ("\n" - " movb (%3),%%ch \n" + " movb (%4),%%ch \n" " jmp 1f \n" " .align 4,0x90 \n" - "1: incl %3 \n" + "1: incl %4 \n" " movb %%ch,%%ah \n" - " movb (%3),%%al \n" + " movb (%4),%%al \n" " movb %%al,%%ch \n" " shrl %%cl,%%eax \n" - " movb %%al,(%4) \n" - " incl %4 \n" - " decl %5 \n" + " movb %%al,(%5) \n" + " incl %5 \n" + " decl %6 \n" " jne 1b " - : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w) - : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "c" ((int)shift) - : "ax", "cx" + : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w), "=c" (dum) + : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "3" ((int)shift) + : "ax"/* , "cx" buers */ ); # elif defined(__TURBOC__) asm push ds ;