Message ID | 20210914181958.749314-1-pc@us.ibm.com |
---|---|
State | Committed |
Commit | 064b475a2e5662b6b3973fabf505eade86e61510 |
Delegated to: | Tulio Magno Quites Machado Filho |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 20FC73857C6B for <patchwork@sourceware.org>; Tue, 14 Sep 2021 18:20:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20FC73857C6B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631643626; bh=fIbJQpMViXGgc5dMwTIhPkC80/Csk3nm8GkaoQkfiCw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Yf+mY7wGuPf8+Jr97pKuhUHn0RtN2JeBcjqbTYB1NQygy+DWvS3p8ozZnEyOIObG5 5J5RDXALE7tiyPqmdeazacQ5TZImYVs+PAWW2Im0tpDRtt6/dpdWzwJ0pSA2EMLG5F uAaD3e+fCIaAV0EnTJ5QjKihrqjQGifEpgLZrsIQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id EF5E73858402 for <libc-alpha@sourceware.org>; Tue, 14 Sep 2021 18:20:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EF5E73858402 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 18EGUT3b008608 for <libc-alpha@sourceware.org>; Tue, 14 Sep 2021 14:20:04 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 3b2yarave5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <libc-alpha@sourceware.org>; Tue, 14 Sep 2021 14:20:03 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 18EIHnjC027716 for <libc-alpha@sourceware.org>; Tue, 14 Sep 2021 18:20:03 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03dal.us.ibm.com with ESMTP id 3b0m3b6st9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <libc-alpha@sourceware.org>; Tue, 14 Sep 2021 18:20:03 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 18EIK1xi34210122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Sep 2021 18:20:02 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E340E136079; Tue, 14 Sep 2021 18:20:01 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A1A52136083; Tue, 14 Sep 2021 18:20:01 +0000 (GMT) Received: from localhost (unknown [9.160.13.44]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 14 Sep 2021 18:20:01 +0000 (GMT) To: libc-alpha@sourceware.org Subject: [PATCH] powerpc: Fix unrecognized instruction errors with recent GCC Date: Tue, 14 Sep 2021 13:19:58 -0500 Message-Id: <20210914181958.749314-1-pc@us.ibm.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 2uZMANL9wTkZbl7Yo5QmM97wi80cxldC X-Proofpoint-ORIG-GUID: 2uZMANL9wTkZbl7Yo5QmM97wi80cxldC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 clxscore=1011 priorityscore=1501 impostorscore=0 mlxscore=0 suspectscore=0 malwarescore=0 adultscore=0 mlxlogscore=830 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109030001 definitions=main-2109140091 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: "Paul A. Clarke via Libc-alpha" <libc-alpha@sourceware.org> Reply-To: "Paul A. Clarke" <pc@us.ibm.com> Cc: tuliom@linux.vnet.ibm.com Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
powerpc: Fix unrecognized instruction errors with recent GCC
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
dj/TryBot-32bit | success | Build for i686 |
Commit Message
Paul A. Clarke
Sept. 14, 2021, 6:19 p.m. UTC
Recent versions of GCC stopped passing "-many" to the assembler, so some instructions which were under older, more stringent "machine" directives no longer compile with unrecognized instructions in that context. 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. --- sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c | 1 + 1 file changed, 1 insertion(+)
Comments
"Paul A. Clarke via Libc-alpha" <libc-alpha@sourceware.org> writes: > Recent versions of GCC stopped passing "-many" to the assembler, > so some instructions which were under older, more stringent > "machine" directives no longer compile with unrecognized instructions > in that context. I think the most recent change causing this is binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a It's worth mentioning it in the commit message too. LGTM with this inclusion in the commit message. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Even with this commit included, I'm still seeing such errors with build-many-glibcs.py for powerpc-linux-gnu, powerpc-linux-gnu-power4, powerpc-linux-gnu-soft and powerpc64-linux-gnu, which I expect have the same underlying cause. https://sourceware.org/pipermail/libc-testresults/2021q3/008589.html These are all errors building tst-set_ppr: /tmp/ccyn2EoO.s: Assembler messages: /tmp/ccyn2EoO.s:73: Error: unrecognized opcode: `mfppr32' /tmp/ccyn2EoO.s:130: Error: unrecognized opcode: `mfppr32' /tmp/ccyn2EoO.s:197: Error: unrecognized opcode: `mfppr32' /tmp/ccyn2EoO.s:288: Error: unrecognized opcode: `mfppr32' /tmp/ccyn2EoO.s:340: Error: unrecognized opcode: `mfppr32' /tmp/ccyn2EoO.s:420: Error: unrecognized opcode: `mfppr32' /scratch/jmyers/glibc-bot/build/glibcs/powerpc-linux-gnu/glibc/sysd-rules:723: recipe for target '/scratch/jmyers/glibc-bot/build/glibcs/powerpc-linux-gnu/glibc/misc/tst-set_ppr.o' failed
On Wed, Sep 22, 2021 at 11:48:32AM +0000, Joseph Myers wrote: > Even with this commit included, I'm still seeing such errors with > build-many-glibcs.py for powerpc-linux-gnu, powerpc-linux-gnu-power4, > powerpc-linux-gnu-soft and powerpc64-linux-gnu, which I expect have the > same underlying cause. > > https://sourceware.org/pipermail/libc-testresults/2021q3/008589.html > > These are all errors building tst-set_ppr: > > /tmp/ccyn2EoO.s: Assembler messages: > /tmp/ccyn2EoO.s:73: Error: unrecognized opcode: `mfppr32' > /tmp/ccyn2EoO.s:130: Error: unrecognized opcode: `mfppr32' > /tmp/ccyn2EoO.s:197: Error: unrecognized opcode: `mfppr32' > /tmp/ccyn2EoO.s:288: Error: unrecognized opcode: `mfppr32' > /tmp/ccyn2EoO.s:340: Error: unrecognized opcode: `mfppr32' > /tmp/ccyn2EoO.s:420: Error: unrecognized opcode: `mfppr32' > /scratch/jmyers/glibc-bot/build/glibcs/powerpc-linux-gnu/glibc/sysd-rules:723: recipe for target '/scratch/jmyers/glibc-bot/build/glibcs/powerpc-linux-gnu/glibc/misc/tst-set_ppr.o' failed Thanks for the report, Joseph! This manifests only with a very recent version of binutils (not even the current release, 2.37). It is likely provoked by commit b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a "PowerPC: ignore sticky options for .machine". (I think there is a fair amount of fallout from that change.) Interestingly, there was a change (9250e6610fdb0f3a6f238d2813e319a41fb7a810 "powerpc: Fix build failures with current GCC") back in 2019 to that test's Makefile to add `-many` to the compile options for exactly this problem when `-many` stopped being passed by GCC to the assembler. Now, even passing `-many` on the command line doesn't work. I'll post a fix to include the required `.machine` directives for that test shortly. PC
diff --git a/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c b/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c index 28c87fcef72b..d3fc4ab589f4 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"