From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D72333858413; Mon, 25 Oct 2021 15:59:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D72333858413 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libffi/102923] [12 Regression] powerpc64 (BE) linux all languages bootstrap broken after libffi 3.4.2 import. Date: Mon, 25 Oct 2021 15:59:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libffi X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Oct 2021 15:59:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102923 --- Comment #5 from Jakub Jelinek --- (In reply to Segher Boessenkool from comment #4) > > At least in linux64_closure.S, perhaps guarding it with #ifdef __VEC__ = might > > be ok, because the C code will not use that code if __VEC__ isn't defin= ed: > > #elif !defined(__VEC__) > > /* If compiled without vector register support (used by assembly)... = */ > > if ((cif->abi & FFI_LINUX_LONG_DOUBLE_IEEE128) !=3D 0) > > return FFI_BAD_ABI; > > But not sure about linux64.S if it doesn't suffer from the same problem. >=20 > Note that __VEC__ does not mean the current CPU can execute those insns, > of course, so these #ifdefs are only good if you compile this file twice, > or similar? Sure. I think the expectation is that one gets the ieee128 long double sup= port in libffi only if libffi is built with -mcpu=3Dpower8 (or -mcpu=3Dpower7 or= -mvsx). And the assumption is that the *.S files are compiled with the same -mcpu=3D/-mvsx flags as the C files. So the only question is if all the lvx/stvx instructions are in code path t= hat will not be reached when __VEC__ support isn't seen on the C side. The whole inital patch is: https://github.com/libffi/libffi/commit/73dd43afc8a447ba98ea02e9aad4c6898dc= 77fb0=