public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: gcc-patches@gcc.gnu.org, Uros Bizjak <ubizjak@gmail.com>
Subject: Re: [PATCH] i386: fix assert (__builtin_cpu_supports ("x86-64") >= 0)
Date: Fri, 9 Dec 2022 10:31:16 +0100	[thread overview]
Message-ID: <Y5MAZLyb5FWuPOmt@tucnak> (raw)
In-Reply-To: <38137444-4255-6e0d-db37-f635748363db@suse.cz>

On Fri, Dec 09, 2022 at 10:18:34AM +0100, Martin Liška wrote:
> I'm going to push the revision.
> 
> What exactly do you mean by random? I just know there are differences in between
> x86 and ppc:
> 
> int __builtin_cpu_supports(const char *feature)
> This function returns a positive integer if the run-time CPU supports feature and returns 0 otherwise.
> 
> This function returns a value of 1 if the run-time CPU supports the HWCAP feature feature and returns 0 otherwise.

Because x86-64-v2 etc. isn't a HWCAP feature, but rather an architecture
(or set of canned HWCAP features).  So __builtin_cpu_is for those,
or especially for __builtin_cpu_is ("x86-64") would make more sense.
Though I see that many of the valid -march= values actually aren't supported
by __builtin_cpu_is either, whether it is pentium, nocona, lakemont etc.
but does support say some vendors (intel, amd).

	Jakub


      reply	other threads:[~2022-12-09  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 12:57 Martin Liška
2022-12-02  9:46 ` Martin Liška
2022-12-02  9:54   ` Uros Bizjak
2022-12-07 10:30     ` Martin Liška
2022-12-07 11:27 ` Jakub Jelinek
2022-12-09  9:18   ` Martin Liška
2022-12-09  9:31     ` Jakub Jelinek [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=Y5MAZLyb5FWuPOmt@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    --cc=ubizjak@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).