www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/07/16/08:14:16

Date: Fri, 16 Jul 1999 14:53:54 +0300 (EEST)
From: root <root AT linuxware DOT adm DOT deu DOT edu DOT tr>
To: pgcc AT delorie DOT com
Subject: clobbering revisited ...
Message-ID: <Pine.LNX.4.10.9907161452030.2178-100000@linuxware.adm.deu.edu.tr>
MIME-Version: 1.0
Reply-To: pgcc AT delorie DOT com

  hello there ,

  I was tring trying to compile the xfree86 stuff but some clobbering
problems occured ...

      in xc/programs/Xserver/hw/vga2/mfb.banked/mfblinebank.h


#define DO_BANK_READ_WRITE(_bank)
$__asm__ __volatile__                                                    \
("call *%0"                                                             \
 : /* OUT     */ \
 : /* IN      */ "c" /*ecx*/ ((unsigned long)vgaSetReadWriteFunc),      \
                 "a" /*eax*/ (_bank)                                    \
 : /* CLOBBER */ "ax","dx","memory" /*eax,edx*/                         \
);


when i try to compile this i get

mfbline.c: In function `mfbLineSS':
mfblinebank.h:241: Invalid `asm' statement:
mfblinebank.h:241: fixed or forbidden register 0 (ax) was spilled for
class AREG.
mfblinebank.h:256: Invalid `asm' statement:
mfblinebank.h:256: fixed or forbidden register 0 (ax) was spilled for
class AREG.
mfbline.c: In function `mfbLineSD':
mfblinebank.h:241: Invalid `asm' statement:
mfblinebank.h:241: fixed or forbidden register 0 (ax) was spilled for
class AREG.
mfblinebank.h:256: Invalid `asm' statement:
mfblinebank.h:256: fixed or forbidden register 0 (ax) was spilled for
class AREG.
make: *** [mfbline.o] Error 1


 yes , it clobbers register ax where it is also used as input . the manual
says that it is illegal and should also be declared as output , too . but
that did not work either . i use

Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/pgcc-2.95/specs
gcc version pgcc-2.95 19990629 (prerelease)

 on an amd k6-2 . there is no problem with pgcc-1.1.3 that it accepts the
code . is it a problem of gcc-2.95 ? or is the code just broken ?


*******************************************************************************
    eRHan Bilgili ---  bilgili AT unimedya DOT net DOT tr - erhan AT altay DOT deu DOT edu DOT tr
*******************************************************************************


- Raw text -


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