From: "Martin Liška" <mliska@suse.cz>
To: Stefan Kneifel <stefan.kneifel@bluewin.ch>,
Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] i386: simplify cpu_feature handling
Date: Fri, 17 Dec 2021 09:50:26 +0100 [thread overview]
Message-ID: <c1c7e47a-3eee-d586-50c2-23c786c7d0ed@suse.cz> (raw)
In-Reply-To: <7b55d00c-4ce0-3377-d0db-c9efcd32b843@bluewin.ch>
On 12/16/21 21:58, Stefan Kneifel wrote:
> Am 15.12.21 um 10:57 schrieb Martin Liška:
>> On 12/14/21 17:12, Jakub Jelinek wrote:
>>> I'd use INT_TYPE_SIZE - 1 instead of 31. Otherwise LGTM.
>>
>> Installed with that change, thanks.
>>
>> Moreover, I'm suggesting a simplification:
>>
>> The patch removes unneeded loops for cpu_features2 and CONVERT_EXPR
>> that can be simplified with NOP_EXPR.
>>
>> Survives i386.exp tests, may I install the patch after testing or
>> is it a stage1 material?
>>
>> Thanks,
>> Martin
>
> The loops indeed seem to be unnecessary.
>
> For safety reasons: what would you think about throwing an ICE if (index >= SIZE_OF_CPU_FEATURES) ?
> This should not happen - however, a lot of things shouldn't happen... and it might facilitiate locating a potential bug at a later time.
Hello.
Well, I see your point, but I don't think it's necessary as the macro is well defined.
Note we have a ASAN and UBSAN bootstrap that would caught such an error.
Cheers,
Martin
>
> Regards, Stefan
>
next prev parent reply other threads:[~2021-12-17 8:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 9:55 [PATCH] i386: Fix emissing of __builtin_cpu_supports Martin Liška
2021-12-14 10:28 ` Jakub Jelinek
2021-12-14 15:07 ` Martin Liška
2021-12-14 16:12 ` Jakub Jelinek
2021-12-15 9:57 ` [PATCH] i386: simplify cpu_feature handling Martin Liška
2021-12-16 20:58 ` Stefan Kneifel
2021-12-17 8:50 ` Martin Liška [this message]
2022-01-03 11:43 ` Martin Liška
2022-03-31 7:01 ` Martin Liška
2022-05-02 7:57 ` Martin Liška
2022-05-11 8:19 ` Martin Liška
2022-05-11 8:27 ` Uros Bizjak
2022-05-11 8:50 ` Martin Liška
2022-05-11 8:57 ` Uros Bizjak
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=c1c7e47a-3eee-d586-50c2-23c786c7d0ed@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=stefan.kneifel@bluewin.ch \
/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).