This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Janani Janakiraman <janani at us dot ibm dot com>, gdb-patches at sourceware dot org, pgilliam at us dot ibm dot com, Alan Modra <amodra at bigpond dot net dot au>
- Date: Wed, 04 Oct 2006 16:43:04 -0400
- Subject: Re: [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines
- References: <20061004191056.GA4000@nevyn.them.org> <OFE88464A1.C58B072A-ON872571FD.006ABA69-862571FD.006C7CFB@us.ibm.com> <20061004202638.GA6253@nevyn.them.org>
>>>>> 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 rules and right
>> aligns the values which are put on the
>> registers. This matches Andrew Cagney comment in the code, that says that
>> ABI specifies that the values
>> should be left aligned. But like I said in my earlier note, GCC appears to
>> want the values to be
>> right aligned. Would appreciate another set of eyes looking at it as 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."
David