This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Extract the return value in finish_command on Xtensa.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: Chris Zankel <zankel at tensilica dot com>, gdb at sources dot redhat dot com
- Date: Wed, 14 Jul 2004 15:59:25 -0400
- Subject: Re: Extract the return value in finish_command on Xtensa.
- References: <40F31BA9.2060101@tensilica.com> <40F58BBA.5060300@gnu.org>
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