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: RFA: make PLUS commutative by default


> > Unfortunately, I can't test this patch on an hppa system; I have
> > checked that it can cross-built a cc1, though, and am running
> > an i686-pc-linux-gnu bootstrap / regtest.
> 
> I've started a test of the change on hppa2.0w-hp-hpux11.11 and
> hppa-unknown-linux-gnu.  Should know in the morning how things
> turn out.  However, the main is rather broken at the moment.

The builds were successful and no new regressions were noticed.

> > +/* ??? Addition is not commutative on the PA due to the weird implicit
> > +   space register selection rules for memory addresses.  Therefore, we
> > +   don't consider a + b == b + a, as this might be inside a MEM.  */
> > +static bool
> > +pa_commutative_p (rtx x, int outer_code)
> > +{
> > +  return (COMMUTATIVE_P (x)
> > +	  && ((outer_code != UNKNOWN && outer_code != MEM)
> > +	      || GET_CODE (x) != PLUS));
> > +}
> 
> The 32-bit linux runtime loads the same value in all space registers.
> Thus, the default definition should work for this target.

It's TARGET_NO_SPACE_REGS that determines whether or not addition
is commutative on HP PA.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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