delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/21/16:02:40

From: buers AT gmx DOT de (Dieter Buerssner)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: grx23 help needed
Date: 21 Mar 2000 19:35:34 GMT
Lines: 100
Message-ID: <8b8iu5$4jkep$2@fu-berlin.de>
References: <20000321132543 DOT 6246 DOT qmail AT web4102 DOT mail DOT yahoo DOT com>
NNTP-Posting-Host: pec-1-189.tnt1.s2.uunet.de (149.225.1.189)
Mime-Version: 1.0
X-Trace: fu-berlin.de 953667334 4837849 149.225.1.189 (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

Paolo Rovelli wrote:

>Unfortunately, I cannot install GRX, although I think
>I have performed all the necessary steps listed in the
>Readme file.

GRX inline assembly is not compatible with current gcc.
FAQ 8.17 says something about this, and also has two pointers
to patches. 

From reading some messages in this group, at least one of the
patches seems to be wrong. It just makes the source compilable,
but the function won't work as intended. You may want to try
the following patch instead.

When you are not comfortable with the patch utility, the patch
can also be applied manually, just change all the lines with
"-" to the lines with "+".

Maurice Lombardi reported, that he needed the other patches
from the FAQ as well.

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           ;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019