From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0000C385840A; Sat, 13 Apr 2024 04:39:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0000C385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712983154; bh=x9ig1+H7YbYONAy8zc3w6HmwyXG8KigLtyop0FfgdzI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mHQWEU6ebuVEPTeDzfJ7l0WXBsU2wAv8hdQ/nHqt99DyeqKUi4PZSGhp/gOLwiUb0 sVVbii6m55hOzinut1PVwt8FK/wdnZAxTfYTn0rI7F70ZLtWWYoIg/3QL4tNIUhOrq tKEWx5v93lX1yMj8zNfKJsXlLahZqLCVHavdmnkU= From: "meissner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113652] [14 regression] Failed bootstrap on ppc unrecognized opcode: `lfiwzx' with -mcpu=7450 Date: Sat, 13 Apr 2024 04:39:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: assemble-failure, build X-Bugzilla-Severity: normal X-Bugzilla-Who: meissner at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: segher at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113652 --- Comment #23 from Michael Meissner --- This is one of those things where there is no right answer in part because = we need other things to flesh out the support. The reason -mvsx was used is we need the VSX registers to build the IEEE 128-bit support in libgcc (KFmode values are passed in vector registers 32.= .63, i.e. the traditional Altivec registers). In theory, we need only Altivec, but I felt at the time when I implemented = this that it opened up the door for lots of other things breaking due to the go= ofy nature of Altivec addresses omitting the bottom bits and no direct move support) and that VSX was the minimum ISA needed. Now, from a practical matter, it should have been power8 as a minimum (due = to direct move) but at the time I did the initial work, we were still actively supporting power7. Then we have the issue that while the compiler can generate code on BE syst= ems for IEEE 128-bit (either with software emulation or with the power9 hardware support) glibc only supports IEEE 128-bit on 64-bit LE. So for a user it is useless to have IEEE 128-bit on BE systems. But if somebody wanted to go through and do the work to enable the GLIBC support a= nd other parts of the compiler/libraries that provide IEEE 128-bit. But it is= not a windmill I want to charge and tilt at. But hey, if somebody wants to do = the work to fix all of the support for this, go ahead. I am not that person. Note this is the classic catch 22 that we faced in the early days. GCC has= to support the stuff to a minimal amount even though users can't use it. But = you need that ability to generate the code to get glibc to do the support. In terms of the immediate problem, you have several choices: 1) Ignore it and say to the users don't do that. 2) Prevent the IEEE 128-bit libgcc bits from being built on a BE or 32-bit = LE system unless some configure switch is used. Or just kick the can down the road, and don't provide a configure option in GCC 14, and if people are interested do it in GCC 15. 3) Only build the IEEE 128-bit libgcc bits if the user configured the compi= ler with --with-cpu=3Dpower7, --with-cpu=3Dpower8, --with-cpu=3Dpower9, --with-cpu=3Dpower10 (and in the future --with-cpu=3Dpower11 or --with-cpu= =3Dfuture). This could be code that if __VSX__ is not defined, the libgcc support functions won't get built. We would then remove the -mvsx option from the library support functions. Though note, there is an issue in that if you don't use a --with-cpu=3D con= figure option, it won't build the bits. Thus for the brave person trying to enable IEEE 128-bit for BE, they would have to configure with one of the IBM server platforms, while the majority of users would be using the old Apple boards, embedded platforms, or even AIX, etc. Note, I will be on vacation from April 16th through the 23rd, and I probably won't bring a work laptop, which will mean I won't be able to answer email = in that period.=