From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F39BF3858C74; Wed, 23 Feb 2022 17:38:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F39BF3858C74 From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102485] -Wa,-many no longer has any effect Date: Wed, 23 Feb 2022 17:38:25 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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 resolution 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: Wed, 23 Feb 2022 17:38:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102485 Segher Boessenkool changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #7 from Segher Boessenkool --- > GCC already passes -m to the assembler though. That mostly is historic. > The justification for emitting the .machine directive is given as fixing a > build breakage due to a build system that passes an incorrect -m to = the > assembler. Not really, no. That is just one tiny part of the problem. It is impossib= le to know what instruction sets we need ahead of time, and -many cannot work = (and *does not* work: there are quite a few mnemonics that encode to different i= nsns on different architecture versions (or for different CPUs), and we cannot k= now which is wanted, or which is preferred, ahead of time. > *That* is the broken code (if any) that should have been fixed. But inste= ad > that is hacked around in a way that breaks working code that passes down > -Wa,-many option as specified. There is no working code that uses -many (accept by accident, if no problem has hit you yet). > The kernel builds with a base compatibility (say -mcpu=3Dpower4) and then= has > certain code paths that are dynamically taken if running on newer CPUs wh= ich > use newer instructions with inline asm. >=20 > This is an important usage and it's pervasive, it seems unreasonable to > break it. Adding .machine directives throughout inline asm for every > instruction not in the base compatibility class is pretty horrible. It is the only correct thing to do.=