This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: Extract the return value in finish_command on Xtensa.


On Thu, Jul 15, 2004 at 10:21:39AM -0400, Andrew Cagney wrote:
> >On Wed, Jul 14, 2004 at 03:38:34PM -0400, Andrew Cagney wrote:
> >
> >>>>>I am working on a port of GDB to the Xtensa architecture.
> >>>>>
> >>>>>Unfortunately, it is impossible on Xtensa to extract the return value 
> >>>>once >the 'callee' has returned to the 'caller' without analyzing the 
> >>>>call >instruction (if there was one). Depending on the call 
> >>>>instruction, the >return value can be in register a6, a10, oder a14.
> >>
> >>>
> >>>Puzzled expression.  The ABI should specify which return-value 
> >>>convention will be used?
> >>>
> >>>I suspect you'll need to explain a little more about your architecture.
> >
> >
> >Xtensa has register windows.  The call instruction determines how far
> >the window shifts; the return value is always going to be in some fixed
> >register (a0?) at the end of the function, but the caller has to choose
> >which call instruction to use and expect the return value in the
> >correct location based on that.
> 
> Keep going :-)  For instance, what logic determines the shift amount 
> (the insn just reflects that decision), and how does the mechanism 
> compare to ia64 and SPARC?

That I'll have to leave to Chris :-)  I don't know.  SPARC only has
fixed size windows; I have labored hard and long not to know anything
about ia64.

-- 
Daniel Jacobowitz


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