public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/107727] error: multiversioning needs 'ifunc' which is not supported on this target (x86_64-w64-mingw32 target)
Date: Wed, 16 Nov 2022 21:50:15 +0000	[thread overview]
Message-ID: <bug-107727-4-IZ0dcV8keg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107727-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107727

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
              Build|x86_64-linux-gnu            |
     Ever confirmed|0                           |1
           Severity|normal                      |enhancement
             Target|x86_64-w64-mingw32          |ones which don't support
                   |                            |ifunc
   Last reconfirmed|                            |2022-11-16
               Host|x86_64-linux-gnu            |
          Component|target                      |middle-end

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What they do is basically have the resolver always called:
        callq   __cpu_indicator_init
        movl    __cpu_model+12(%rip), %eax
        andl    $1024, %eax                     # imm = 0x400
        cmpl    $1024, %eax                     # imm = 0x400
        sete    %al
        andb    $1, %al
        testb   $1, %al
        jne     .LBB1_1
        jmp     .LBB1_2
.LBB1_1:
        addq    $40, %rsp
        jmp     _Z3foov.avx2                    # TAILCALL
.LBB1_2:
        nop
        addq    $40, %rsp
        jmp     _Z3foov                         # TAILCALL

Not the fastest way of implementing this either.
A faster way to caching the result of the resolver.

Anyways we currently don't support multiversioning for non-ifuncs supported
targets. Someone will need to program up that support but it might be years
unless you pay someone to do it.

  parent reply	other threads:[~2022-11-16 21:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 21:19 [Bug target/107727] New: " unlvsur at live dot com
2022-11-16 21:20 ` [Bug target/107727] " unlvsur at live dot com
2022-11-16 21:29 ` unlvsur at live dot com
2022-11-16 21:50 ` pinskia at gcc dot gnu.org
2022-11-16 21:50 ` pinskia at gcc dot gnu.org [this message]
2022-11-16 21:51 ` [Bug middle-end/107727] " pinskia at gcc dot gnu.org

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=bug-107727-4-IZ0dcV8keg@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).