public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* alphafbsd_use_struct_convention
@ 2003-06-04  5:27 Richard Henderson
  2003-06-04 16:45 ` alphafbsd_use_struct_convention Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2003-06-04  5:27 UTC (permalink / raw)
  To: gdb

Can anyone tell me where this function came from?
Unless the freebsd folk have some private hack to
their gcc, it's wrong...


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alphafbsd_use_struct_convention
  2003-06-04  5:27 alphafbsd_use_struct_convention Richard Henderson
@ 2003-06-04 16:45 ` Mark Kettenis
  2003-06-04 18:13   ` alphafbsd_use_struct_convention Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2003-06-04 16:45 UTC (permalink / raw)
  To: Richard Henderson; +Cc: gdb

Richard Henderson <rth@redhat.com> writes:

> Can anyone tell me where this function came from?

I added the function back in 2001.

> Unless the freebsd folk have some private hack to
> their gcc, it's wrong...

Do you mean that the implementation of the function isn't entirely
correct, or that it is wrong that we have this function at all for
FreeBSD.  I believe you when you say that the implementation isn't
quite correct: I don't understand exactly how GCC determines which
structures it passes in registers.  However, I do think that we do
need alphafbsd_use_struct_convention.  In gcc/config/alpha/freebsd.h
we have:

/* Don't default to pcc-struct-return, we want to retain compatibility with
   older FreeBSD releases AND pcc-struct-return may not be reentrant.  */

#undef  DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0

which means that it doesn't use the same convention as the other alpha
targets.

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alphafbsd_use_struct_convention
  2003-06-04 16:45 ` alphafbsd_use_struct_convention Mark Kettenis
@ 2003-06-04 18:13   ` Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2003-06-04 18:13 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb

On Wed, Jun 04, 2003 at 06:45:04PM +0200, Mark Kettenis wrote:
> However, I do think that we do
> need alphafbsd_use_struct_convention.  In gcc/config/alpha/freebsd.h
> we have:
> 
> /* Don't default to pcc-struct-return, we want to retain compatibility with
>    older FreeBSD releases AND pcc-struct-return may not be reentrant.  */
> 
> #undef  DEFAULT_PCC_STRUCT_RETURN
> #define DEFAULT_PCC_STRUCT_RETURN 0
> 
> which means that it doesn't use the same convention as the other alpha
> targets.

Hum.  I hadn't remembered that.  Nor had a remembered that that
overrode the RETURN_IN_MEMORY macro elsewhere.  But by experimentation
you are correct.

Of course, neither of the two justifications above are correct
for alpha-freebsd -- there *were* no older FreeBSD releases, this
was just copied from the x86 port; and the indirect struct return
mechanism is completely re-entrant.

Probably too late to do anything about this though.


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-04 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-04  5:27 alphafbsd_use_struct_convention Richard Henderson
2003-06-04 16:45 ` alphafbsd_use_struct_convention Mark Kettenis
2003-06-04 18:13   ` alphafbsd_use_struct_convention Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).