Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: David Edelsohn <dje@watson.ibm.com>
Cc: Janani Janakiraman <janani@us.ibm.com>,
	gdb-patches@sourceware.org, 	pgilliam@us.ibm.com,
	Alan Modra <amodra@bigpond.net.au>
Subject: Re: [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines
Date: Wed, 04 Oct 2006 20:52:00 -0000	[thread overview]
Message-ID: <20061004205221.GA7149@nevyn.them.org> (raw)
In-Reply-To: <200610042043.k94Kh4V28680@makai.watson.ibm.com>

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 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."

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 == 1.
  - Call set_gdbarch_push_dummy_call in the PPC64 section of
    ppc_linux_init_abi.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-10-04 20:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20041026075115.4A2C354AAB5@stray.canids>
     [not found] ` <20041026132924.GA26886@nevyn.them.org>
     [not found]   ` <drow@false.org>
2004-10-26 15:01     ` backtrace changes current source location Felix Lee
2004-10-27 17:35       ` Andrew Cagney
2004-10-27 17:40         ` Daniel Jacobowitz
2004-10-28  0:52         ` Felix Lee
2004-10-29 15:22           ` Andrew Cagney
2004-10-29 15:36             ` Daniel Jacobowitz
2004-10-29 22:07             ` Felix Lee
2004-10-30  0:02               ` Andrew Cagney
2004-10-30  3:28                 ` Felix Lee
2004-11-01  4:38                   ` Felix Lee
2004-11-01 16:04                     ` Andrew Cagney
2004-11-01 16:13                     ` Daniel Jacobowitz
2004-11-05  8:51     ` Felix Lee
2006-10-04 20:43     ` [patch] Pushing Inferior Function Arguments onto Stack on PowerPC64 machines David Edelsohn
2006-10-04 20:52       ` Daniel Jacobowitz [this message]
2006-10-04 21:02 janani
  -- strict thread matches above, loose matches on Subject: below --
2006-10-04 19:54 janani
2006-10-04 19:00 janani
2006-10-04 19:11 ` Daniel Jacobowitz
2006-10-04 19:14   ` Daniel Jacobowitz
2006-10-04 20:19   ` Mark Kettenis
2006-10-04 20:27     ` Andreas Schwab
     [not found]   ` <OFE88464A1.C58B072A-ON872571FD.006ABA69-862571FD.006C7CFB@us.ibm.com>
2006-10-04 20:26     ` Daniel Jacobowitz
2006-10-03 19:15 Janani Janakiraman
2006-10-03 19:20 ` Daniel Jacobowitz
2005-08-15 13:37 Procedure for large drop? Paul Hilfinger
2005-08-15 14:15 ` Daniel Jacobowitz
2005-08-15 21:50   ` Paul Hilfinger
2005-08-16  2:36     ` Jason Molenda
2005-08-20 22:15   ` Paul Hilfinger
2005-08-22 19:00     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061004205221.GA7149@nevyn.them.org \
    --to=drow@false.org \
    --cc=amodra@bigpond.net.au \
    --cc=dje@watson.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=janani@us.ibm.com \
    --cc=pgilliam@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox