SSE5 patches round 3

Meissner, Michael
Tue Sep 11 14:45:00 GMT 2007

Yes, I know, that is why the test is:

	 || (!reg_mentioned (operands[0], operands[1])
	     && !reg_mentioned (operands[0], operands[2]))

Post reload, we can count on the & constraint, hence the first line.
Pre-reload, we have to make sure we handle the corner case. 

Michael Meissner
AMD, MS 83-29
90 Central Street
Boxborough, MA 01719

> -----Original Message-----
> From: Uros Bizjak []
> Sent: Tuesday, September 11, 2007 4:36 AM
> To: Meissner, Michael
> Cc: GCC Patches; Harle, Christophe; rajagopal, dwarak
> Subject: Re: SSE5 patches round 3
> On 9/10/07, Meissner, Michael <> wrote:
> > I was just being conservative, since it would be possible to have
> > register being stored to in operands[0] be used as an index/base
> > register in one of the memory operations.  If you load up op0 with
> > memory operand that doesn't use op0, you will get a segfault in the
> > instruction when you use op0 as an index regiser.  Hence checking
> > reload_completed (reload won't use op0 due to the '&' constraint),
> > the register not being mentioned (which I would anticipate happening
> > just about every code, but without doing the tests, you can't verify
> > it).
> In post-reload case, you don't have to check registers with
> "!reg_mentioned_p", bercause (quote from the documentation):
> `&'
>      Means (in a particular alternative) that this operand is an
>      "earlyclobber" operand, which is modified before the instruction
>      finished using the input operands.  Therefore, this operand may
>      not lie in a register that is used as an input operand or as part
>      of any memory address.
> Uros.

More information about the Gcc-patches mailing list