Mail Archives: djgpp/2000/03/21/16:02:40
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 -