From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: msnyder@redhat.com
Cc: brobecker@adacore.com, gdb-patches@sources.redhat.com, fnf@specifix.com
Subject: Re: [RFA] mips eabi, passing corner-case structs
Date: Sat, 17 Jun 2006 23:41:00 -0000 [thread overview]
Message-ID: <200606172341.k5HNfXT6006424@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <447E2AEB.504@redhat.com> (message from Michael Snyder on Wed, 31 May 2006 16:46:51 -0700)
> Date: Wed, 31 May 2006 16:46:51 -0700
> From: Michael Snyder <msnyder@redhat.com>
>
> That odd little corner case in eabi, wherein structs whose
> single field is a float or double are passed like a float or double.
Is the MIPS eabi documented somewhere? Or are you just implementing
whatever the GCC du jour emits? Doesn't your fix also affect structs
that have a single "long long" field?
> 2006-05-31 Michael Snyder <msnyder@redhat.com>
>
> * mips-tdep.c (mips_eabi_push_dummy_call): Catch corner case,
> structs with a single field of floating point type.
>
> Index: mips-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mips-tdep.c,v
> retrieving revision 1.393
> diff -p -r1.393 mips-tdep.c
> *** mips-tdep.c 31 May 2006 23:15:50 -0000 1.393
> --- mips-tdep.c 31 May 2006 23:44:31 -0000
> *************** mips_eabi_push_dummy_call (struct gdbarc
> *** 2453,2460 ****
>
> /* The EABI passes structures that do not fit in a register by
> reference. */
> ! if (len > mips_abi_regsize (gdbarch)
> ! && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION))
> {
> store_unsigned_integer (valbuf, mips_abi_regsize (gdbarch),
> VALUE_ADDRESS (arg));
> --- 2453,2467 ----
>
> /* The EABI passes structures that do not fit in a register by
> reference. */
> ! /* MVS: unles the struct has only one field, and that field
> ! will fit into two registers. */
> ! if ((typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
> ! && TYPE_NFIELDS (arg_type) == 1
> ! && len == 2 * mips_abi_regsize (gdbarch))
> ! val = value_contents (arg);
> ! else if (len > mips_abi_regsize (gdbarch)
> ! && (typecode == TYPE_CODE_STRUCT
> ! || typecode == TYPE_CODE_UNION))
> {
> store_unsigned_integer (valbuf, mips_abi_regsize (gdbarch),
> VALUE_ADDRESS (arg));
>
> --------------090500030309010101070908--
>
next prev parent reply other threads:[~2006-06-17 23:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-31 23:55 Michael Snyder
2006-06-08 19:17 ` Michael Snyder
2006-06-09 18:16 ` Joel Brobecker
2006-06-17 23:41 ` Mark Kettenis [this message]
2006-06-20 20:21 ` 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=200606172341.k5HNfXT6006424@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=brobecker@adacore.com \
--cc=fnf@specifix.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@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