From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17476 invoked by alias); 8 Jun 2006 19:17:08 -0000 Received: (qmail 17460 invoked by uid 22791); 8 Jun 2006 19:17:08 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Jun 2006 19:17:06 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k58JH4Dk014577; Thu, 8 Jun 2006 15:17:04 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k58JH385003899; Thu, 8 Jun 2006 15:17:03 -0400 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id k58JH171001948; Thu, 8 Jun 2006 15:17:02 -0400 Message-ID: <448877AD.4030502@redhat.com> Date: Thu, 08 Jun 2006 19:17:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) MIME-Version: 1.0 To: GDB Patches CC: Joel Brobecker , Fred Fish Subject: Re: [RFA] mips eabi, passing corner-case structs References: <447E2AEB.504@redhat.com> In-Reply-To: <447E2AEB.504@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00078.txt.bz2 Ping? Michael Snyder wrote: > That odd little corner case in eabi, wherein structs whose > single field is a float or double are passed like a float or double. > > > ------------------------------------------------------------------------ > > 2006-05-31 Michael Snyder > > * mips-tdep.c (mips_eabi_push_dummy_call): Catch corner case, > structs with a single field of floating point type. > > Index: mips-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/mips-tdep.c,v > retrieving revision 1.393 > diff -p -r1.393 mips-tdep.c > *** mips-tdep.c 31 May 2006 23:15:50 -0000 1.393 > --- mips-tdep.c 31 May 2006 23:44:31 -0000 > *************** mips_eabi_push_dummy_call (struct gdbarc > *** 2453,2460 **** > > /* The EABI passes structures that do not fit in a register by > reference. */ > ! if (len > mips_abi_regsize (gdbarch) > ! && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)) > { > store_unsigned_integer (valbuf, mips_abi_regsize (gdbarch), > VALUE_ADDRESS (arg)); > --- 2453,2467 ---- > > /* The EABI passes structures that do not fit in a register by > reference. */ > ! /* MVS: unles the struct has only one field, and that field > ! will fit into two registers. */ > ! if ((typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION) > ! && TYPE_NFIELDS (arg_type) == 1 > ! && len == 2 * mips_abi_regsize (gdbarch)) > ! val = value_contents (arg); > ! else if (len > mips_abi_regsize (gdbarch) > ! && (typecode == TYPE_CODE_STRUCT > ! || typecode == TYPE_CODE_UNION)) > { > store_unsigned_integer (valbuf, mips_abi_regsize (gdbarch), > VALUE_ADDRESS (arg));