public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: DJ Delorie <dj@redhat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: question about TARGET_MUST_PASS_IN_STACK
Date: Wed, 03 Jun 2009 07:04:00 -0000	[thread overview]
Message-ID: <m3my8pztlr.fsf@google.com> (raw)
In-Reply-To: <200906030335.n533ZZJ6031276@greed.delorie.com> (DJ Delorie's message of "Tue\, 2 Jun 2009 23\:35\:35 -0400")

DJ Delorie <dj@redhat.com> writes:

> On xstormy16, when structures with variable-length arrays are passed
> to functions (execute/20020412-1.c), it appears that they're passed by
> reference (based on examining the stack), despite the port not
> explicitly requesting that.
>
> This causes a mis-match in the va_arg code, which assumes the array is
> passed by value, just pushed to the stack portion of the argument
> list.
>
> Which interpretation of these macros is correct?  (based on that, I'll
> debug further)
>
> Xstormy16 uses the default TARGET_MUST_PASS_IN_STACK, which returns
> true only for variable-length arrays, and uses the default
> TARGET_PASS_BY_REFERENCE, which always returns false.

See the function pass_by_reference in function.c.

      /* GCC post 3.4 passes *all* variable sized types by reference.  */

Ian

      reply	other threads:[~2009-06-03  7:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03  3:35 DJ Delorie
2009-06-03  7:04 ` Ian Lance Taylor [this message]

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=m3my8pztlr.fsf@google.com \
    --to=iant@google.com \
    --cc=dj@redhat.com \
    --cc=gcc@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).