public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@mengyan1223.wang>
To: Qing Zhao <qing.zhao@oracle.com>,
	Richard Sandiford <richard.sandiford@arm.com>
Cc: Jeff Law <law@redhat.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	YunQiang Su <yunqiang.su@cipunited.com>,
	Jakub Jelinek <jakub@gcc.gnu.org>
Subject: Re: [PATCH RFC] mips: add TARGET_ZERO_CALL_USED_REGS hook [PR104817, PR104820]
Date: Sun, 13 Mar 2022 14:03:23 +0800	[thread overview]
Message-ID: <a35edea4182d9472a4914458dee129f2b084bcff.camel@mengyan1223.wang> (raw)
In-Reply-To: <4ec3ce765b9959334d2a3e08d8957fc2fcf57f7d.camel@mengyan1223.wang>

On Sat, 2022-03-12 at 18:48 +0800, Xi Ruoyao via Gcc-patches wrote:
> On Fri, 2022-03-11 at 21:26 +0000, Qing Zhao wrote:
> > Hi, Ruoyao,
> > 
> > (I might not be able to reply to this thread till next Wed due to a
> > short vacation).
> > 
> > First, some comments on opening bugs against Gcc:
> > 
> > I took a look at the bug reports PR104817 and PR104820:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104820
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104817
> > 
> > I didn’t see a testing case and a script to repeat the error, so I
> > cannot repeat the error at my side.
> 
> I've put the test case, but maybe you didn't see it because it is too
> simple:
> 
> echo 'int t() {}' | /home/xry111/git-repos/gcc-test-mips/gcc/cc1 -
> nostdinc -fzero-call-used-regs=all
> 
> An empty function is enough to break -fzero-call-used-regs=all.  And
> if
> you append -mips64r2 to the cc1 command line you'll get 104820.  I
> enabled 4 existing tests for MIPS (reported "not work" on MIPS) in the
> patch so I think it's unnecessary to add new test cases.
> 
> Richard: can we use MIPS_EPILOGUE_TEMP as a scratch register in the
> sequence for zeroing the call-used registers, and then zero itself
> (despite it's not in need_zeroed_hardregs)?

No, it leads to an ICE at stage 3 bootstrapping :(.

Now I think the only rational ways are:

(1) allow zeroing more registers than need_zeroed_hardregs.

Or

(2) allow zeroing less registers than need_zeroed_hardregs (then I'll
skip ST_REGS, after all they are just 8 bits in total).

If all these are unacceptable, then

(3) I'll just call sorry in MIPS target hook to tell not to use this
feature on MIPS.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2022-03-13  6:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 20:40 Xi Ruoyao
2022-03-09 18:25 ` Richard Sandiford
2022-03-10 11:53   ` Xi Ruoyao
2022-03-10 13:41     ` [PATCH v2 " Xi Ruoyao
2022-03-10 13:45       ` [PATCH v2 RFC, resend] " Xi Ruoyao
2022-03-10 20:31   ` [PATCH RFC] " Qing Zhao
2022-03-11  2:54     ` Xi Ruoyao
2022-03-11 16:08       ` Qing Zhao
2022-03-11 17:29         ` Xi Ruoyao
2022-03-11 17:31           ` Xi Ruoyao
2022-03-11 21:26           ` Qing Zhao
2022-03-12 10:48             ` Xi Ruoyao
2022-03-13  6:03               ` Xi Ruoyao [this message]
2022-03-14 16:04                 ` Richard Sandiford
2022-03-14 17:05                   ` Xi Ruoyao
2022-03-16 20:27                   ` Qing Zhao
2022-03-18 13:11                     ` Xi Ruoyao
2022-03-18 16:09                       ` Richard Sandiford
2022-03-18 18:51                         ` Qing Zhao
2022-04-01 14:32           ` Maciej W. Rozycki

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=a35edea4182d9472a4914458dee129f2b084bcff.camel@mengyan1223.wang \
    --to=xry111@mengyan1223.wang \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=qing.zhao@oracle.com \
    --cc=richard.sandiford@arm.com \
    --cc=yunqiang.su@cipunited.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).