From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2400 invoked by alias); 31 Jul 2002 23:11:21 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2392 invoked from network); 31 Jul 2002 23:11:21 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 31 Jul 2002 23:11:21 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id QAA16451; Wed, 31 Jul 2002 16:10:59 -0700 (PDT) Message-ID: <3D486A4D.F3EFFEB5@redhat.com> Date: Wed, 31 Jul 2002 16:13:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Kevin Buettner CC: ac131313@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] mips_push_arguments(): Make O64 ABI test explicit References: <1020731210452.ZM23445@localhost.localdomain> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00640.txt.bz2 Kevin Buettner wrote: > > Now that mips-tdep.c defines another ABI such that > > mips_default_saved_regsize == 8, > > it becomes necessary to revise one of the conditions in > mips_push_arguments(). > > The comment above the test in question says: > > ... > Also don't do this adjustment on EABI and O64 > binaries. > ... > > I believe that the expression ``MIPS_SAVED_REGSIZE < 8'' was being used > to test to see if the O64 ABI was being used. OK, with you so far... > I've changed the test > so that it explicitly checks the tdep struct for the O64 ABI instead. Ah, but both N32 and N64 use 8-byte registers, and at least N32 does NOT want to have this adjustment. I'm guessing N64 doesn't either (haven't tried it yet). Your patch makes N32 fail, but we could add to it thusly: > Okay to commit? > > * mips-tdep.c (mips_push_arguments): Don't assume that > ``MIPS_SAVED_REGSIZE < 8'' means that the o64 abi is in use. > Instead, test for each ABI which might not want this shift. > > Index: mips-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/mips-tdep.c,v > retrieving revision 1.85 > diff -u -p -r1.85 mips-tdep.c > --- mips-tdep.c 31 Jul 2002 20:26:49 -0000 1.85 > +++ mips-tdep.c 31 Jul 2002 20:48:49 -0000 > @@ -2615,7 +2615,7 @@ mips_push_arguments (int nargs, > such and GDB gets tweaked accordingly. */ > > if (!MIPS_EABI > - && MIPS_SAVED_REGSIZE < 8 + && tdep->mips_abi != MIPS_ABI_O64 + && tdep->mips_abi != MIPS_ABI_N32 + && tdep->mips_abi != MIPS_ABI_N64 > && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG > && partial_len < MIPS_SAVED_REGSIZE > && (typecode == TYPE_CODE_STRUCT || Of course, at this point, we might as well test for all the abis that DO want the shift, instead of those that don't... Michael