From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27859 invoked by alias); 6 Jun 2006 12:31:25 -0000 Received: (qmail 27830 invoked by uid 22791); 6 Jun 2006 12:31:23 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 06 Jun 2006 12:30:53 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Fnahp-00062v-HV; Tue, 06 Jun 2006 08:30:45 -0400 Date: Tue, 06 Jun 2006 12:31:00 -0000 From: Daniel Jacobowitz To: Andreas Schwab Cc: Nathan Sidwell , gdb-patches@sourceware.org Subject: Re: [m68k] fix return value extraction Message-ID: <20060606123044.GA23121@nevyn.them.org> Mail-Followup-To: Andreas Schwab , Nathan Sidwell , gdb-patches@sourceware.org References: <44844CBA.6030600@codesourcery.com> <4485563A.6020503@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00065.txt.bz2 On Tue, Jun 06, 2006 at 12:50:41PM +0200, Andreas Schwab wrote: > Nathan Sidwell writes: > > > + /* a.out */ > > + > > + void > > + m68k_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) > > + { > > + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > > + > > + set_gdbarch_return_value (gdbarch, m68k_return_value); > > + > > + /* aout uses %a1 */ > > + tdep->struct_value_regnum = M68K_A1_REGNUM; > > + tdep->struct_return = reg_struct_return; > > + /* Pointers are returned in %a0 */ > > + tdep->ptr_value_regnum = M68K_A0_REGNUM; > > I don't think this is correct. The GCC default for m68k is the old Sun3 > ABI, which returns everything in %d0 and uses pcc structure return. Ah - sort of, but not. I spent a while last week disecting the configuration defaults when Nathan asked me about this. In fact, while m68k.h defaults to pcc structure return, the "embedded" configurations all turn it right back off again - including m68k-aout, m68k-coff, m68k-elf, and m68k-rtems. The only thing I saw which definitively used it was NetBSD ELF. -- Daniel Jacobowitz CodeSourcery