From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16865 invoked by alias); 4 Oct 2006 21:02:49 -0000 Received: (qmail 16854 invoked by uid 22791); 4 Oct 2006 21:02:48 -0000 X-Spam-Check-By: sourceware.org Received: from e1.ny.us.ibm.com (HELO e1.ny.us.ibm.com) (32.97.182.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 04 Oct 2006 21:02:39 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.13.8/8.12.11) with ESMTP id k94L2cg4027704 for ; Wed, 4 Oct 2006 17:02:38 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k94L2bLs280680 for ; Wed, 4 Oct 2006 17:02:37 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k94L2bRQ007102 for ; Wed, 4 Oct 2006 17:02:37 -0400 Received: from linux.ibm.com (imap.raleigh.ibm.com [9.37.253.145]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k94L2bBU007010; Wed, 4 Oct 2006 17:02:37 -0400 Received: from HELLO-009053038156.austin.ibm.com (HELLO-009053038156.austin.ibm.com [9.53.38.156]) by imap.linux.ibm.com (Horde MIME library) with HTTP; Wed, 4 Oct 2006 17:02:36 -0400 Message-ID: <20061004170236.mg3mwg4dw8o4gs4w@imap.linux.ibm.com> Date: Wed, 04 Oct 2006 21:02:00 -0000 From: janani@linux.ibm.com To: gdb-patches@sourceware.org Cc: janani@us.ibm.com, drow@false.org Subject: Re: [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) 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-10/txt/msg00024.txt.bz2 Thanks for all the feedback. Will try to write up the fix along the=20=20 lines which Daniel mentioned and post to the list. Janani Daniel Jacobowitz wrote on 10/04/2006 03:52:21 PM: > On Wed, Oct 04, 2006 at 04:43:04PM -0400, David Edelsohn wrote: > > >>>>> Daniel Jacobowitz writes: > > > >> From reading the PPC64 Platform ABI at > > >> http://www.freestandards.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html > > >> ( see section 3.1.7) it appears that on Big Endian machines, > > >> values are left aligned. But looks like GCC has different=20=20 > rules and right > > >> aligns the values which are put on the > > >> registers. This matches Andrew Cagney comment in the code,=20=20 > that says that > > >> ABI specifies that the values > > >> should be left aligned. But like I said in my earlier note,=20=20 > GCCappears to > > >> want the values to be > > >> right aligned. Would appreciate another set of eyes looking at it a= s I > > >> don't have too much experience > > >> in this area. > > > The PPC64 Linux ABI changed. AIX always pads upwards. PPC64 > > Linux pads aggregates smaller than a doubleword downward. > > > "An aggregate or union smaller than one doubleword in size is padded = so > > that it appears in the least significant bits of the doubleword. All > > others are padded, if necessary, at their tail." > > Thank you (and thanks to Andreas for answering, too). > > In that case, the Linux and AIX configurations ought to be calling > different functions here. Janani, if you want to try to fix this, > I would recommend: > > - Rename the existing function. Add an argument to it, is_linux. > - Create a wrapper function with the old name, in the same file, > for AIX to use. > - Create a wrapper function in ppc-linux-tdep.c which calls it with > is_linux =3D=3D 1. > - Call set_gdbarch_push_dummy_call in the PPC64 section of > ppc_linux_init_abi. > > --=20 > Daniel Jacobowitz > CodeSourcery