From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD1EC3858435; Mon, 4 Oct 2021 17:26:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD1EC3858435 From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102485] -Wa,-many no longer has any effect Date: Mon, 04 Oct 2021 17:26:39 +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: bergner at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: cc 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, 04 Oct 2021 17:26:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102485 Peter Bergner changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amodra at gcc dot gnu.org, | |bergner at gcc dot gnu.org, | |dje at gcc dot gnu.org, | |meissner at gcc dot gnu.or= g, | |segher at gcc dot gnu.org, | |wschmidt at gcc dot gnu.org --- Comment #1 from Peter Bergner --- I agree it is GCC's job to emit a ".machine CPU" directive that allows the assembler to correctly assemble the code GCC generates. Your test case how= ever uses inline asm and GCC does not know that you are using the mfppr32 mnemon= ic.=20 The assembler code you write in an inline asm is basically a black box to t= he compiler. It is therefor up to the programmer to ensure that either the -mcpu=3DCPU GCC option that is being used (which emits".machine CPU" direct= ive) is enough to assemble the mnemonics in the inline asm or you have to emit t= hem in your inline asm. For the later, you can fix your test case like: bergner@pike:~$ cat mfppr32.c=20 long f () { long ppr; asm volatile ("mfppr32 %0" : "=3Dr"(ppr)); return ppr; } bergner@pike:~$ cat mfppr32-2.c=20 long f () { long ppr; asm volatile (".machine push\n\ .machine power7\n\ mfppr32 %0\n\ .machine pop" : "=3Dr"(ppr)); return ppr; } bergner@pike:~$ gcc -c mfppr32.c=20 /tmp/ccSpp2V8.s: Assembler messages: /tmp/ccSpp2V8.s:19: Error: unrecognized opcode: `mfppr32' bergner@pike:~$ gcc -c mfppr32-2.c bergner@pike:~$ Therefore, I'm not sure there is anything for GCC to do here.=