From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1830 invoked by alias); 14 Jul 2004 20:00:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1819 invoked from network); 14 Jul 2004 20:00:06 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 14 Jul 2004 20:00:06 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BkpuX-0005Fl-Ul; Wed, 14 Jul 2004 15:59:26 -0400 Date: Wed, 14 Jul 2004 20:37:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Chris Zankel , gdb@sources.redhat.com Subject: Re: Extract the return value in finish_command on Xtensa. Message-ID: <20040714195925.GA20006@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Chris Zankel , gdb@sources.redhat.com References: <40F31BA9.2060101@tensilica.com> <40F58BBA.5060300@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40F58BBA.5060300@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-07/txt/msg00151.txt.bz2 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