From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8189 invoked by alias); 17 Jun 2006 23:41:47 -0000 Received: (qmail 8178 invoked by uid 22791); 17 Jun 2006 23:41:46 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 17 Jun 2006 23:41:44 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k5HNfXAt009855; Sun, 18 Jun 2006 01:41:33 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k5HNfXMw021923; Sun, 18 Jun 2006 01:41:33 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k5HNfXT6006424; Sun, 18 Jun 2006 01:41:33 +0200 (CEST) Date: Sat, 17 Jun 2006 23:41:00 -0000 Message-Id: <200606172341.k5HNfXT6006424@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: msnyder@redhat.com CC: brobecker@adacore.com, gdb-patches@sources.redhat.com, fnf@specifix.com In-reply-to: <447E2AEB.504@redhat.com> (message from Michael Snyder on Wed, 31 May 2006 16:46:51 -0700) Subject: Re: [RFA] mips eabi, passing corner-case structs References: <447E2AEB.504@redhat.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-06/txt/msg00248.txt.bz2 > Date: Wed, 31 May 2006 16:46:51 -0700 > From: Michael Snyder > > That odd little corner case in eabi, wherein structs whose > single field is a float or double are passed like a float or double. Is the MIPS eabi documented somewhere? Or are you just implementing whatever the GCC du jour emits? Doesn't your fix also affect structs that have a single "long long" field? > 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)); > > --------------090500030309010101070908-- >