From: Andrew Cagney <ac131313@ges.redhat.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] mips-n32 reg_struct_has_addr
Date: Tue, 06 Aug 2002 15:02:00 -0000 [thread overview]
Message-ID: <3D504783.3060706@ges.redhat.com> (raw)
In-Reply-To: <3D49EC2D.86CF5517@redhat.com>
> + static int
> + mips_newabi_reg_struct_has_addr (int gcc_p, struct type *type)
> + {
> + enum type_code typecode = TYPE_CODE (check_typedef (type));
> + int len = TYPE_LENGTH (check_typedef (type));
> +
> + if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
> + return (len > MIPS_SAVED_REGSIZE && len % MIPS_SAVED_REGSIZE != 0);
> +
> + return 0;
> + }
No, I don't think this is right. As best I can tell, there is no cap on
the size of a struct that is passed by register.
http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/srch3@o32/0650/bks/SGI_Developer/books/Mpro_n32_ABI/sgi_html/ch02.html#id80931
I.e., o32 and n32/n64 are the same -> never pass structures by reference.
> *************** mips_push_arguments (int nargs,
> *** 2428,2448 ****
> "mips_push_arguments: %d len=%d type=%d",
> argnum + 1, len, (int) typecode);
>
> ! /* The EABI passes structures that do not fit in a register by
Per other e-mail, rather than modify the existing mips_push_argument()
can you please created a dedicated mips_n32n64_push-arguments() function
and hack on that. That way, I don't have to worry about the other ABIs.
> + /* Set up reg_struct_has_addr. */
> + set_gdbarch_reg_struct_has_addr (gdbarch,
BTW, the comment here is redundant.
enjoy,
Andrew
next prev parent reply other threads:[~2002-08-06 22:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-01 19:37 Michael Snyder
2002-08-06 15:02 ` Andrew Cagney [this message]
2002-08-06 15:50 ` Michael Snyder
2002-08-06 15:51 ` Michael Snyder
2002-08-07 10:12 ` 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=3D504783.3060706@ges.redhat.com \
--to=ac131313@ges.redhat.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