Subject: Re: EGCS and kernel source
To: David Edelsohn <dje@watson.ibm.com>
From: Todd Whitesel <toddpw@best.com>
List: tech-toolchain
Date: 11/02/1998 02:29:43
> 	I am afraid that you are the one who does not understand GCC
> clobber semantics.  EGCS now is being much more strict in order to better
> implement register reloading; it has not broken anything relative to
> gcc-2.8 except some programmers' incorrect gcc asm statements.

Sorry, all I have to go on is the official Free documentation, and what
people report works (or doesn't) with actual GNU compilers. If that is
not clear on a fine point, then I'm afraid our collective psychic powers
were not much help either.

Would it really have been so much extra effort to simply quote us this:

> GCC 2.7 would let you do it anyway, specifying an input in class
> "a" and saying that "ax" is clobbered.  GCC 2.8 and egcs are getting
> picky, and complaining that there are no free registers in class
> "a" available.  This is not the way to do it.  If you corrupt an input
> register, include a dummy output in the same register, the value of which
> is never used.  E.g.
> 
>   int dummy;
>   asm("munge %0" : "=r" (dummy) : "0" (input));

If the egcs list had responded to the original query with this approved
syntax, there would not be a protracted discussion of these issues now.

This syntax is decidedly messier than what GCC 2.7 allowed us to use,
but if this is the officially approved way to indicate clobbered inputs,
then so be it. Issue resolved.

Todd Whitesel
toddpw @ best.com