This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]