From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30421 invoked by alias); 15 Jul 2004 14:36:26 -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 30405 invoked from network); 15 Jul 2004 14:36:26 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 15 Jul 2004 14:36:26 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1Bl7Kp-0001Jn-Hm; Thu, 15 Jul 2004 10:35:43 -0400 Date: Thu, 15 Jul 2004 14:42: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: <20040715143542.GA4966@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Chris Zankel , gdb@sources.redhat.com References: <40F31BA9.2060101@tensilica.com> <40F58BBA.5060300@gnu.org> <20040714195925.GA20006@nevyn.them.org> <40F692F3.1060302@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40F692F3.1060302@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-07/txt/msg00168.txt.bz2 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