From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id B6EE33858433; Thu, 23 Sep 2021 06:38:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6EE33858433 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/maskray/unnest] powerpc: Fix unrecognized instruction errors with recent GCC X-Act-Checkin: glibc X-Git-Author: Paul A. Clarke X-Git-Refname: refs/heads/maskray/unnest X-Git-Oldrev: 7e84ac3a3ac9e7c4dc10de2ce65db971b9650e4d X-Git-Newrev: 064b475a2e5662b6b3973fabf505eade86e61510 Message-Id: <20210923063801.B6EE33858433@sourceware.org> Date: Thu, 23 Sep 2021 06:38:01 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2021 06:38:01 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=064b475a2e5662b6b3973fabf505eade86e61510 commit 064b475a2e5662b6b3973fabf505eade86e61510 Author: Paul A. Clarke Date: Tue Sep 14 13:13:33 2021 -0500 powerpc: Fix unrecognized instruction errors with recent GCC Recent binutils commit b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a changes the behavior of `.machine` directives to override, rather than augment, the base CPU. This can result in _reduced_ functionality when, for example, compiling for default machine "power8", but explicitly asking for ".machine power5", which loses Altivec instructions. In tst-ucontext-ppc64-vscr.c, while the instructions provoking the new error messages are bracketed by ".machine power5", which is ostensibly Power ISA 2.03 (POWER5), the POWER5 processor did not support the VSX subset, so these instructions are not recognized as "power5". Error: unrecognized opcode: `vspltisb' Error: unrecognized opcode: `vpkuwus' Error: unrecognized opcode: `mfvscr' Error: unrecognized opcode: `stvx' Manually adding the VSX subset via ".machine altivec" is sufficient. Reviewed-by: Tulio Magno Quites Machado Filho Diff: --- sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c b/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c index 28c87fcef7..d3fc4ab589 100644 --- a/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c +++ b/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c @@ -50,6 +50,7 @@ do_test (void) /* Set SAT bit in VSCR register. */ asm volatile (".machine push;\n" ".machine \"power5\";\n" + ".machine altivec;\n" "vspltisb %0,0;\n" "vspltisb %1,-1;\n" "vpkuwus %0,%0,%1;\n"