From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7243 invoked by alias); 6 Jun 2006 10:50:49 -0000 Received: (qmail 7235 invoked by uid 22791); 6 Jun 2006 10:50:48 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Jun 2006 10:50:45 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 33027EFF4; Tue, 6 Jun 2006 12:50:42 +0200 (CEST) From: Andreas Schwab To: Nathan Sidwell Cc: gdb-patches@sourceware.org Subject: Re: [m68k] fix return value extraction References: <44844CBA.6030600@codesourcery.com> <4485563A.6020503@codesourcery.com> X-Yow: Two LITTLE black dots and one BIG black dot...nice 'n' FLUFFY!! Date: Tue, 06 Jun 2006 10:50:00 -0000 In-Reply-To: <4485563A.6020503@codesourcery.com> (Nathan Sidwell's message of "Tue, 06 Jun 2006 11:17:30 +0100") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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/msg00064.txt.bz2 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. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."