This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reload patch for PA call rewrite.
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: law at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Nov 2002 16:39:46 -0500 (EST)
- Subject: Re: Reload patch for PA call rewrite.
> I can't believe this is true. Please explain to me why
>
> push
> push
> pop
> pop
>
> maintains a stack while
>
> push
> jump
> pop
>
> doesn't.
We don't have any documentation on how the PA hardware-manged BTS works.
All seven instructions in your example are branch instructions of one
flavor or another and we don't know specifically which instructions
affect the stack. If "jump" was implemented as
copy %rp,%r1
b,l target,%rp
copy %r1,%rp
what happens to the stack? This might be useful for an intermediate
range sibcall since the maximum branch distance is a factor 32 larger
than a "b target" instruction. However, it might push the stack.
With the BVE instruction, you want it to push in some situations,
pop in others, and not affect the stack in others. The PA 2.0
architecture defines insn completers to specify what happens to the
BTS but they haven't been implemented. Although I can guess what
might have been done in the fully hardware implementation, I don't
know for certain.
With our current call sequences, I doubt that sibcalls scrog the stack
as the "jump" implementation doesn't mention %rp (the return pointer).
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)