Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: David B Anderson <davea@quasar.engr.sgi.com>
Cc: drow@mvista.com, gdb-patches@sources.redhat.com
Subject: Re: [rfa] mips argument passing fixes for o32
Date: Mon, 16 Jul 2001 16:44:00 -0000	[thread overview]
Message-ID: <3B537C4C.1000102@cygnus.com> (raw)
In-Reply-To: <200107160328.UAA42806@quasar.engr.sgi.com>

> |> if (!MIPS_EABI
> |> && MIPS_SAVED_REGSIZE < 8
> |> -		      && TARGET_BYTE_ORDER == BIG_ENDIAN
> |> +		      && (TARGET_BYTE_ORDER == BIG_ENDIAN
> |> +			  || TYPE_LENGTH (arg_type) < MIPS_SAVED_REGSIZE)
> |> && partial_len < MIPS_SAVED_REGSIZE
> |> && (typecode == TYPE_CODE_STRUCT ||
> |> typecode == TYPE_CODE_UNION))
> |
> |I don't know that line being added should be
> 
> 
> ||| TYPE_LENGTH (arg_type) < MIPS_SAVED_REGSIZE
> |
> |
> |it should at least be guarded by ``ABI == o32''.  What does LE n32 do 
> |for instance?
> |If GCC, for o32, always left shifts the structs dregs (PARTIAL_LEN < |MIPS_SAVED_REGSIZE) then is just the ABI test needed?
> |
> |	Andrew
> |
> |PS: That function is the official example of how to _not_ multi-arch an ABI.
> 
> And now I confess I don't quite understand the question.
> Ah. mips_push_arguments().
> The question is whether to shift the contents?
> 
> It's likely I don't really grasp the subtleties of the question
> here at the moment.
> struct mys {
>         int a;
>         char b;
> };
> 
> as a struct argument, with cc -32 -EL, does not seem to do more than
> load b into the second arg reg (r5) and a into r4  if one does
> 	struct mys m
> 	myfunc(m);
> But I don't feel confident that answers anything, really.


The debate os over a possible exception to this rule.  Given a very 
small structure and the code segment:

	struct c1 { char c; } s1;
	foo (struct c1);
	...
	foo (s1);

GCC is always left shifting s1 in a register (regardless of -EL or EB).


> I (and anyone with IRIX cc -32) can do -EL -32.
> (With -n32 and -64,  -EL is ignored by IRIX cc.  )
> If you had a sample you wondered about I could certainly
> compile it -EL, send assembler to anyone. 
> If it would help. As I said,
> any IRIX cc -32 still sort of, unoficially, does try to honor -EL.


gdb/testsuite/gdb.base/structs.c is pretty good but just the above 
segment is :-)

	Andrew


  reply	other threads:[~2001-07-16 16:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2001-07-17  7:49   ` David B Anderson
2001-07-18 13:29     ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2001-07-06 11:26 Daniel Jacobowitz
2001-07-06 14:24 ` Andrew Cagney
2001-07-12  0:47 ` Andrew Cagney
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

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=3B537C4C.1000102@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=davea@quasar.engr.sgi.com \
    --cc=drow@mvista.com \
    --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