From: Xi Ruoyao <xry111@mengyan1223.wang>
To: Jeff Law <law@redhat.com>, Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org, Robert Suchanek <Robert.Suchanek@mips.com>
Subject: Re: [PATCH] MIPS: Fix PR target/98491 (ChangeLog)
Date: Fri, 12 Feb 2021 22:54:11 +0800 [thread overview]
Message-ID: <316ada725a450fea738f4c5dc1d6abf554f0c323.camel@mengyan1223.wang> (raw)
In-Reply-To: <c52c0c3aa092efadddb30e757ba5d9842bca0633.camel@mengyan1223.wang>
Resend the mail. I had to fill in a form to send mail to Robert.
On 2021-02-12 22:17 +0800, Xi Ruoyao wrote:
> On 2021-01-11 01:01 +0800, Xi Ruoyao wrote:
> > Hi Jeff and Jakub,
> >
> > On 2021-01-04 14:19 -0700, Jeff Law wrote:
> > > On 1/4/21 2:00 PM, Jakub Jelinek wrote:
> > > > On Mon, Jan 04, 2021 at 01:51:59PM -0700, Jeff Law via Gcc-patches
> > > > wrote:
> > > > > > Sorry, I forgot to include the ChangeLog:
> > > > > >
> > > > > > gcc/ChangeLog:
> > > > > >
> > > > > > 2020-12-31 Xi Ruoyao <xry111@mengyan1223.wang>
> > > > > >
> > > > > > PR target/98491
> > > > > > * config/mips/mips.c (mips_symbol_insns): Do not use
> > > > > > MSA_SUPPORTED_MODE_P if mode is MAX_MACHINE_MODE.
> > > > > So I absolutely agree the current code is wrong as it does an out of
> > > > > bounds array access.
> > > > >
> > > > >
> > > > > Would it be better to instead to change MSA_SUPPORTED_MODE_P to
> > > > > evaluate
> > > > > to zero if MODE is MAX_MACHINE_MODE? That would protect all the uses
> > > > > of
> > > > > MSA_SUPPORTED_MODE_P. Something like this perhaps?
> > > > But MAX_MACHINE_MODE is the one past last valid mode, I'm not aware of
> > > > any target that would protect all macros that deal with modes that way.
> > > >
> > > > So, perhaps best would be stop using the MAX_MACHINE_MODE as magic value
> > > > for that function and instead use say VOIDmode that shouldn't normally
> > > > appear either?
> > > I think we have to allow VOIDmode because constants don't necessarily
> > > have modes. And I certainly agree that using MAX_MACHINE_MODE like
> > > this is ugly and error prone (as we can see from the BZ).
> > >
> > > I also couldn't convince myself that the code and comments were actually
> > > consistent, particularly for MSA targets which the comment claims can
> > > never handle constants for ld/st (and thus should be returning 0 for
> > > MAX_MACHINE_MODE). Though maybe mips_symbol_insns_1 ultimately handles
> > > that correctly.
> > >
> > >
> > > >
> > > > But I don't really see anything wrong on the mips_symbol_insns above
> > > > change either.
> > > Me neither. I'm just questioning if bullet-proofing in the
> > > MSA_SUPPORTED_MODE_P would be a better option. While I've worked in the
> > > MIPS port in the past, I don't really have any significannt experience
> > > with the MSA support.
> >
> > I can't understand the comment either. To me it looks like it's possible to
> > remove this "if (MSA_SUPPORTED_P (mode)) return 0;"
> >
> > CC Robert to get some help.
>
> Happy new lunar year folks.
>
> I found a newer email address of Robert. Hope it is still being used.
>
> Could someone update MAINTAINERS file by the way?
--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2021-02-12 14:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-31 23:29 [PATCH] MIPS: Fix PR target/98491 Xi Ruoyao
2020-12-31 23:34 ` [PATCH] MIPS: Fix PR target/98491 (ChangeLog) Xi Ruoyao
2021-01-04 20:51 ` Jeff Law
2021-01-04 21:00 ` Jakub Jelinek
2021-01-04 21:19 ` Jeff Law
2021-01-10 17:01 ` Xi Ruoyao
2021-01-10 17:04 ` Xi Ruoyao
2021-02-12 14:17 ` Xi Ruoyao
2021-02-12 14:54 ` Xi Ruoyao [this message]
2021-02-12 14:57 ` Xi Ruoyao
2021-02-12 15:15 ` Xi Ruoyao
2021-02-15 23:16 ` Jeff Law
2021-02-16 3:59 ` Xi Ruoyao
2021-02-17 11:13 ` Xi Ruoyao
2021-02-17 12:02 ` Richard Sandiford
2021-03-02 23:16 ` 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=316ada725a450fea738f4c5dc1d6abf554f0c323.camel@mengyan1223.wang \
--to=xry111@mengyan1223.wang \
--cc=Robert.Suchanek@mips.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=law@redhat.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).