Question regarding constraint usage within inline asm

Alan Modra
Thu Feb 21 03:40:00 GMT 2019

On Wed, Feb 20, 2019 at 08:57:52PM -0600, Peter Bergner wrote:
> On 2/20/19 4:19 PM, Alan Modra wrote:
> > I forgot to say, gcc-6, gcc-7 and gcc-8 handle your original testcase
> > with the register asm just fine.
> Yes, because they don't have my IRA and LRA patches that exposed this
> problem. I would say they were buggy for not complaining and silently
> spilling a hard register in the case where we used asm reg("...").

I don't follow your reasoning.  It seems to me that giving some
variable a register asm doesn't mean that the value of that variable
can't appear in some other register.  An obvious example is when
passing that variable to a function.

So why shouldn't a hard reg be reloaded in order to satisfy
incompatible constraints?

Alan Modra
Australia Development Lab, IBM

More information about the Gcc mailing list