From: "Gary Lloyd" Newsgroups: comp.os.msdos.djgpp Subject: grx23 under as-2.95 Forbidden register 2(cx) Date: Tue, 14 Sep 1999 21:33:56 +1000 Organization: - The APANA News Hub Brisbane - Australia Lines: 85 Message-ID: <7rlbp3$296$1@troll.apana.org.au> References: NNTP-Posting-Host: dialup-5.brisbane.apana.org.au X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com wrote in message news:B0000101004 AT stargate DOT astr DOT lu DOT lv... > Sorry, pressed send button too early in previous mail) > > Now about patch. It seems to be Ok. I had to do the same when tried > to build Allegro using recent binutils snapshot. > > Andris > > On 8 Sep 99, at 22:29, Ian Miller wrote: However,... > > > > as 2.95 interprets a couple of GRX inline > > assembler call instructions as > > PC-relative and chokes on them. > > as 2.81 interpreted them as absolute > > calls, and this is evidently what the code > > intends. > > > > The following simple patch, duplicated at > > http://www.shelob.force9.co.uk/djgpp/grxasm.dif, > > applies the * prefix to the call absolute > > operands as the as 2.95 manual requires. > > It works for me. > > > > IF IN DOUBT, DO NOT APPLY THIS PATCH Heck I did'nt get that far into the make before I got the following.... gcc -c -O6 -Wall -m486 -fomit-frame-pointer -I. -I./include -I../include -I ../addons/bmp utils/shiftscl.c -o utils/shiftscl.o utils/shiftscl.c: In function `_GR_shift_scanline': utils/shiftscl.c:48: Invalid `asm' statement: utils/shiftscl.c:48: fixed or forbidden register 2 (cx) was spilled for class CREG. utils/shiftscl.c:102: Invalid `asm' statement: utils/shiftscl.c:102: fixed or forbidden register 2 (cx) was spilled for class CREG. make.exe[1]: *** [utils/shiftscl.o] Error 1 make.exe[1]: Leaving directory `g:/djgpp/contrib/grx23/src' make.exe: *** [libs] Error 2 The offending code is as so... asm volatile ("\n" " movb (%3),%%ch \n" " jmp 1f \n" " .align 4,0x90 \n" "1: decl %3 \n" " movb %%ch,%%al \n" " movb (%3),%%ah \n" " movb %%ah,%%ch \n" " shrl %%cl,%%eax \n" " movb %%al,(%4) \n" " decl %4 \n" " decl %5 \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" ); It seems that u evidently got to and past this so any help would be appreciated,I do not have much of a clue about assembly,I have had a look in the FAQ but seen no mention of this, still it dos'nt mean that it;s not there. Also while I'm here, is GRX still being maintained,it has been sometime since last in here,I have tried the original site where it was maintained but its been over a year or so,since last going to that site and i find it no longer exists. Many thanks for any help given. Gary.