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 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.

-- 
Daniel Jacobowitz


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