On Wed, Nov 14, 2018 at 06:50:38PM +0300, Alexander Monakov wrote:
> On Wed, 14 Nov 2018, Segher Boessenkool wrote:
> > > I think with "=g" rather than "+g" this example is ok.
> > 
> > No, it needs the register var as an input.  That is the whole *point*.
> 
> Hm. I think I see what you meant, but "+g" is not correct either: the
> asm, by intent, depends *on the current value in the 'sp' hardreg*, not
> *on the current value of some automatic variable that is supposed to be
> passed on the 'sp' hardreg to the asm* (which is what expressed by the
> input constraint).

Yeah, using local register vars to access global registers only works
by accident.  It does work currently though, and people apparently use
it, so we shouldn't break it :-/


Segher

Reply via email to