From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2462 invoked by alias); 5 May 2006 17:11:00 -0000 Received: (qmail 2454 invoked by uid 22791); 5 May 2006 17:10:59 -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; Fri, 05 May 2006 17:10:54 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Fc3pK-0008UP-3g; Fri, 05 May 2006 13:10:50 -0400 Date: Fri, 05 May 2006 17:11:00 -0000 From: Daniel Jacobowitz To: Fred Fish Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Patch for mips_o64_return_value to fix calling functions by hand (additional patch) Message-ID: <20060505171050.GD31029@nevyn.them.org> Mail-Followup-To: Fred Fish , gdb-patches@sourceware.org References: <200604271004.44938.fnf@specifix.com> <200605021630.15861.fnf@specifix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605021630.15861.fnf@specifix.com> User-Agent: Mutt/1.5.8i 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-05/txt/msg00068.txt.bz2 On Tue, May 02, 2006 at 04:30:15PM -0400, Fred Fish wrote: > On Thursday 27 April 2006 10:04, Fred Fish wrote: > > I'm doing some work with a mips64-elf toolchain and took a look at why > > there are so many gdb testsuite failures. One problem I found is that > > calling functions by hand was broken, > > For mips_o64_push_dummy_call, mips_abi_regsize(gdbarch) always > evaluates to 8, and was suppressing a needed left shift of struct and > union arguments passed big endian. So, why didn't it used to be done on o64 targets? That's the question. This goes back to CVS revision 1.1. GCC says: pad "upwards" on little endian (i.e. in the most significant bits). On big endian, "upwards" means least significant bits. It pads floats downward for o64, but other than that o32 and o64 are treated the same. So, I'm guessing GDB is just wrong, or else the ABI change is farther back in history than I checked. Aside: The comment below the one you're deleting was written well before GCC 3.4, in particular http://gcc.gnu.org/gcc-3.4/mips-abi.html. So the FIXME is probably fixed for o32 now. And this is now an o64 only function, so that comment could be deleted entirely. > 2006-05-02 Fred Fish > > * mips-tdep.c (mips_o64_push_dummy_call): Left shift big endian > structs or unions independent of ABI register size. OK. -- Daniel Jacobowitz CodeSourcery