Mail Archives: pgcc/1999/07/20/17:04:42.7
On Fri, Jul 16, 1999 at 02:53:54PM +0300, root wrote:
> #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*/ \
> );
>
>
> 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
anything _more_ specific than "that did not work"?
> on an amd k6-2 . there is no problem with pgcc-1.1.3 that it accepts the
> code
And still miscompiles it quite as often.
> is it a problem of gcc-2.95 ? or is the code just broken ?
Just broken. However, declaring them as dummy outputs instead of as
clobbers would make it legal.
--
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg AT goof DOT com |e|
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
The choice of a GNU generation |
|
- Raw text -