public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>,
	Maxim Blinov <maxim.blinov@embecosm.com>
Cc: Iain Sandoe <iain@sandoe.co.uk>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 1/2] Add cumulative_args_t variants of TARGET_FUNCTION_ROUND_BOUNDARY and friends
Date: Thu, 2 Dec 2021 14:08:52 -0700	[thread overview]
Message-ID: <f65bae86-3c5b-0644-ef39-8bc09e78ba7f@gmail.com> (raw)
In-Reply-To: <CAFiYyc2QHwiTXZtJE7_-q-omxw9fPUkLheO5LZTVtXxDGEMf=Q@mail.gmail.com>



On 11/22/2021 8:15 AM, Richard Biener via Gcc-patches wrote:
> On Mon, Nov 22, 2021 at 3:40 PM Maxim Blinov <maxim.blinov@embecosm.com> wrote:
>> Hi Richard,
>>
>> The purpose of this patch is to give more of the target code access to
>> the cumulative_args_t structure in order to enable certain (otherwise
>> currently impossible) stack layout constraints, specifically for
>> parameters that are passed over the stack. For example, there are some
>> targets (not yet in GCC trunk) which explicitly require the
>> distinction between named and variadic parameters in order to enforce
>> different alignment rules (when passing over the stack.) Such a
>> constraint would be accommodated by this patch.
>>
>> The patch itself is very straightforward and simply adds the parameter
>> to the two functions which we'd like to extend. The motivation of
>> defining new target hooks was to minimize the patch size.
> I would prefer to adjust the existing hooks if there's currently no way to
> implement the aarch64 darwin ABI instead of optimizing for patch size.
Agreed.  Additionally I don't think we want any -f options controlling 
this behavior.


>
> I have no opinion on whether passing down cummulative args is the
> proper thing to do design-wise.  It might be that TARGET_FUNCTION_ARG_BOUNDARY
> is only one part that cummulative args using code should look at
> (given you don't show the other users of function_arg_boundary that do not
> conveniently have a CA struct around).
In the past I think we passed some additional parameters indicated where 
the last named parameter was so that it could be used to set up the CA 
struct.  But if the aarch64 darwin ABI needs that info somewhere we 
didn't before, then we'd likely need to add the CA structure.


Jeff

  reply	other threads:[~2021-12-02 21:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13  9:42 Maxim Blinov
2021-11-13  9:42 ` [PATCH 2/2] Implement TARGET_..._CA target hooks for AArch64 Darwin Maxim Blinov
2021-11-15  7:11 ` [PATCH 1/2] Add cumulative_args_t variants of TARGET_FUNCTION_ROUND_BOUNDARY and friends Richard Biener
2021-11-22 14:40   ` Maxim Blinov
2021-11-22 15:15     ` Richard Biener
2021-12-02 21:08       ` Jeff Law [this message]
2021-12-02 21:24         ` Iain Sandoe
2021-12-02 21:37           ` Jeff Law

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=f65bae86-3c5b-0644-ef39-8bc09e78ba7f@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=maxim.blinov@embecosm.com \
    --cc=richard.guenther@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).