unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Paul A. Clarke via Libc-alpha" <libc-alpha@sourceware.org>
To: libc-alpha@sourceware.org
Cc: tuliom@linux.vnet.ibm.com
Subject: [PATCH] powerpc: Fix unrecognized instruction errors with recent GCC
Date: Tue, 14 Sep 2021 13:19:58 -0500	[thread overview]
Message-ID: <20210914181958.749314-1-pc@us.ibm.com> (raw)

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(+)

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"
-- 
2.27.0


             reply	other threads:[~2021-09-14 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 18:19 Paul A. Clarke via Libc-alpha [this message]
2021-09-20 12:56 ` [PATCH] powerpc: Fix unrecognized instruction errors with recent GCC Tulio Magno Quites Machado Filho via Libc-alpha
2021-09-22 11:48   ` Joseph Myers
2021-09-25 15:09     ` Paul A. Clarke via Libc-alpha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210914181958.749314-1-pc@us.ibm.com \
    --to=libc-alpha@sourceware.org \
    --cc=pc@us.ibm.com \
    --cc=tuliom@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).