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: 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)


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