public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: "Takayuki 'January June' Suwa" <jjsuwa_sys3175@yahoo.co.jp>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v2] xtensa: Make register A0 allocable for the CALL0 ABI
Date: Sat, 22 Oct 2022 00:26:43 -0700	[thread overview]
Message-ID: <CAMo8BfJWudQaE-VkFxGOo_psO+Dzyj5FO9xQdfYddOZw5m2SPg@mail.gmail.com> (raw)
In-Reply-To: <dfa5eafc-d6a9-dfe3-7bb5-e82932de0add@yahoo.co.jp>

On Fri, Oct 21, 2022 at 3:46 PM Takayuki 'January June' Suwa
<jjsuwa_sys3175@yahoo.co.jp> wrote:
>
> This patch offers an additional allocable register by RA for the CALL0
> ABI.
>
> > Register a0 holds the return address upon entry to a function, but
> > unlike the windowed register ABI, it is not reserved for this purpose
> > and may hold other values after the return address has been saved.
>   - Xtensa ISA Reference Manual,
>                    8.1.2 "CALL0 Register Usage and Stack Layout" [p.589]
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.cc (xtensa_conditional_register_usage):
>         Remove register A0 from FIXED_REGS if the CALL0 ABI.
>         (xtensa_expand_epilogue): Change to emit '(use (reg:SI A0_REG))'
>         unconditionally after restoring callee-saved registers for
>         sibling-call functions, in order to prevent misleading that
>         register A0 is free to use.
> ---
>  gcc/config/xtensa/xtensa.cc | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.

-- 
Thanks.
-- Max

      reply	other threads:[~2022-10-22  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <faee7f9c-aef5-33e7-5f22-a52464ee4c35.ref@yahoo.co.jp>
2022-10-21  2:58 ` [PATCH] " Takayuki 'January June' Suwa
2022-10-21  5:49   ` Max Filippov
2022-10-21 22:46     ` [PATCH v2] " Takayuki 'January June' Suwa
2022-10-22  7:26       ` Max Filippov [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=CAMo8BfJWudQaE-VkFxGOo_psO+Dzyj5FO9xQdfYddOZw5m2SPg@mail.gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jjsuwa_sys3175@yahoo.co.jp \
    /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).