From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23302 invoked by alias); 5 May 2006 18:06:51 -0000 Received: (qmail 23294 invoked by uid 22791); 5 May 2006 18:06:50 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 May 2006 18:06:47 +0000 Received: from [::1] (duck.specifix.com [64.220.152.99]) by duck.specifix.com (Postfix) with ESMTP id DF705FCBD; Fri, 5 May 2006 11:06:45 -0700 (PDT) From: Fred Fish Reply-To: fnf@specifix.com To: Daniel Jacobowitz Subject: [commit] Patch for mips_o64_return_value to fix calling functions by hand (additional patch) Date: Fri, 05 May 2006 18:06:00 -0000 User-Agent: KMail/1.9.1 Cc: gdb-patches@sourceware.org References: <200604271004.44938.fnf@specifix.com> <200605021630.15861.fnf@specifix.com> <20060505171050.GD31029@nevyn.them.org> In-Reply-To: <20060505171050.GD31029@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605051407.10818.fnf@specifix.com> 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/msg00074.txt.bz2 On Friday 05 May 2006 13:10, Daniel Jacobowitz wrote: > 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. OK, I added that to the change. > > 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. Checked in now. -Fred ============================================================================ 2006-05-06 Fred Fish * mips-tdep.c (mips_o64_push_dummy_call): Left shift big endian structs or unions independent of ABI register size. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.390 diff -u -p -r1.390 mips-tdep.c --- mips-tdep.c 5 May 2006 17:50:33 -0000 1.390 +++ mips-tdep.c 5 May 2006 18:02:59 -0000 @@ -3719,26 +3719,9 @@ mips_o64_push_dummy_call (struct gdbarch big endian targets. It does not seem to be necessary to do the - same for integral types. + same for integral types. */ - Also don't do this adjustment on O64 binaries. - - cagney/2001-07-23: gdb/179: Also, GCC, when - outputting LE O32 with sizeof (struct) < - mips_abi_regsize(), generates a left shift as - part of storing the argument in a register a - register (the left shift isn't generated when - sizeof (struct) >= mips_abi_regsize()). Since - it is quite possible that this is GCC - contradicting the LE/O32 ABI, GDB has not been - adjusted to accommodate this. Either someone - needs to demonstrate that the LE/O32 ABI - specifies such a left shift OR this new ABI gets - identified as such and GDB gets tweaked - accordingly. */ - - if (mips_abi_regsize (gdbarch) < 8 - && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && partial_len < mips_abi_regsize (gdbarch) && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION))