From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa] mips argument passing fixes for o32
Date: Thu, 12 Jul 2001 00:47:00 -0000 [thread overview]
Message-ID: <3B4D5552.4070403@cygnus.com> (raw)
In-Reply-To: <20010706112635.A5870@nevyn.them.org>
> These are based on testsuite failures (call-*-st, if I remember correctly)
> and reading the argument passing code in GCC. The struct alignment fix
> definitely agrees with the ABI, though it's not always clear on this point -
> it becomes necessary for us when the return value is a struct and thus there
> is a hidden pointer as the first argument. The shift fix matches this
> comment in GCC and is not really specified by the ABI document:
I get the feeling that these two changes fix two separate bugs:
o botched struct parameter pass
o botched struct return
Looking at just the first one:
> + /* Structures should be aligned to eight bytes (even arg registers)
> + on MIPS_ABI_O32 if their first member has double precision. */
> + if (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_O32
> + && mips_type_needs_double_align (arg_type))
> + {
> + argreg += argreg & 1;
> + }
this is approved. However could you please change the expression:
argreg += argreg & 1;
to something like:
if ((argreg & 1))
argreg++;
your original expression makes my head hurt :-)
Andrew
next prev parent reply other threads:[~2001-07-12 0:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-06 11:26 Daniel Jacobowitz
2001-07-06 14:24 ` Andrew Cagney
2001-07-12 0:47 ` Andrew Cagney [this message]
2001-07-12 10:35 ` Daniel Jacobowitz
2001-07-12 1:23 ` Andrew Cagney
2001-07-12 10:39 ` Daniel Jacobowitz
2001-07-12 11:59 ` Andrew Cagney
2001-07-12 12:21 ` Daniel Jacobowitz
2001-07-12 12:38 ` Andrew Cagney
[not found] ` <3B58AEBE.1000304@cygnus.com>
[not found] ` <20010720152547.A10028@nevyn.them.org>
2001-07-20 16:35 ` Andrew Cagney
2001-07-20 16:46 ` Elena Zannoni
2001-07-23 20:36 ` Andrew Cagney
2001-11-14 14:15 ` Daniel Jacobowitz
2001-11-27 7:48 ` Daniel Jacobowitz
2001-07-12 17:03 David B Anderson
2001-07-15 14:50 ` Andrew Cagney
2001-07-15 15:22 ` Daniel Jacobowitz
2001-07-16 7:46 ` Andrew Cagney
2001-07-15 20:29 ` David B Anderson
2001-07-16 16:44 ` Andrew Cagney
2001-07-17 7:49 ` David B Anderson
2001-07-18 13:29 ` Andrew Cagney
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=3B4D5552.4070403@cygnus.com \
--to=ac131313@cygnus.com \
--cc=dmj+@andrew.cmu.edu \
--cc=gdb-patches@sources.redhat.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