This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Register rename and hppa return
- To: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Subject: Re: Register rename and hppa return
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Tue, 2 Jan 2001 01:58:55 -0500 (EST)
Forwarded message:
From dave Tue Jan 2 01:50:51 EST 2001
Subject: Re: Register rename and hppa return
To: law@redhat.com
Date: Tue, 2 Jan 2001 01:50:51 -0500 (EST)
From: "John David Anglin" <dave@hiauly1>
Cc: alan@linuxcare.com.au, rth@cygnus.com
In-Reply-To: <24125.978395358@upchuck> from "Jeffrey A Law" at Jan 1, 2001 05:29:18 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 2520
> > > --- gcc/config/pa/pa.md~ Fri Dec 8 20:16:38 2000
> > > +++ gcc/config/pa/pa.md Mon Dec 11 00:02:44 2000
> > > @@ -5467,7 +5467,8 @@
> > > ;; Unconditional and other jump instructions.
> > >
> > > (define_insn "return"
> > > - [(return)]
> > > + [(return)
> > > + (use (reg:SI 2))]
> > > "hppa_can_use_return_insn_p ()"
> > > "*
> > > {
> >
> > Jeff had objections to this. I think the following is a better solution
> > as it doesn't require changing the return insn. However, I haven't been
> > able to do a complete test.
> >
> > Dave
> > --
> > J. David Anglin dave.anglin@nrc.ca
> > National Research Council of Canada (613) 990-0752 (FAX: 952-6
> > 605)
> >
> > 2000-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
> >
> > * pa.h: Define RETURN_POINTER_REGNUM and EPILOGUE_USES.
> Clearly the return insns need to indicate what register they use -- the
> more closely RTL matches the reality of the machine, the better. Thus
> I think this solution is actually a step backwards from the original
> proposed solution.
>
> The right way to go is to find a way to properly distinguish between a
> jump to a non-trivial epilogue and a jump to a trivial epilogue since
> we can eliminate the jump to the trivial epilogue in the latter case.
Previously, you wrote:
On Wed, Nov 29, 2000 at 11:54:09PM -0700, Jeffrey A Law wrote:
> Err, umm. Isn't this going to confuse reorg & jump.c's recognition of
> return insns? I believe they want to be able to do something like
> GET_CODE (thingie) == RETURN?
In looking at reorg and jump.c, it appeared that EPILOGUE_USES was
invented to resolve this problem in a manner which allows GET_CODE (thingie)
== RETURN. The alpha and ia64 ports seem to use exactly the approach
suggested above.
I haven't noticed any functional difference between the three previously
proposed solutions. However, I haven't checked to see if jumps to trivial
epilogues are being eliminated.
It appears from your comments that your prefered solution is the
one previously suggested by Richard in this message
<http://gcc.gnu.org/ml/gcc-bugs/2000-11/msg00377.html>:
I've wanted for quite a while to change (return) to (return <addr>)
so that this issue couldn't be overlooked.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)