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: SSE5 patches round 3


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

	reload_completed
	 || (!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 [mailto:ubizjak@gmail.com]
> 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 <michael.meissner@amd.com> wrote:
> > I was just being conservative, since it would be possible to have
the
> > 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
the
> > 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
for
> > reload_completed (reload won't use op0 due to the '&' constraint),
or
> > the register not being mentioned (which I would anticipate happening
in
> > 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
is
>      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.
> 




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