From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 32B14396DC30; Wed, 16 Nov 2022 21:50:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32B14396DC30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668635415; bh=1frSw1LzkSsEjj8ooP1fUkMjemGp7ekcMI7961K2xsk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TZtJkct4R3Iznfd7Uv8TZYpadlJNopkVz6vSfMfVnZ2nP2rkUMv++2ea1oDV/tvdv VrPBofCcgKD3DfEpfwxR28MU35brJTkufidivqy4Z/TU+sTZMOGk26q3bNcxLb2qYO lwFXSzrj7ivG2g9qhReGQUJRLpUC+B6Hc7SkALkk= From: "pinskia at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_gccbuild everconfirmed bug_severity cf_gcctarget cf_reconfirmed_on cf_gcchost component Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107727 Andrew Pinski 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 --- What they do is basically have the resolver always called: callq __cpu_indicator_init movl __cpu_model+12(%rip), %eax andl $1024, %eax # imm =3D 0x400 cmpl $1024, %eax # imm =3D 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.=