public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Jens Remus <jremus@sourceware.org>
To: binutils-cvs@sourceware.org
Subject: [binutils-gdb] aarch64: Treat operand "SME list of ZA tiles" as immediate (PR 31561)
Date: Tue,  9 Apr 2024 15:22:15 +0000 (GMT)	[thread overview]
Message-ID: <20240409152216.CC469385842C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6f3cf71845e68409724aef1cfef3b5a44beecf53

commit 6f3cf71845e68409724aef1cfef3b5a44beecf53
Author: Jens Remus <jremus@linux.ibm.com>
Date:   Tue Apr 9 17:21:53 2024 +0200

    aarch64: Treat operand "SME list of ZA tiles" as immediate (PR 31561)
    
    The AArch64 instruction table (aarch64-tbl.h) defines the operand
    "SME list of ZA tiles" (SME_list_of_64bit_tiles) as immediate. During
    assembly it is correctly encoded as immediate value (imm.value) in
    parse_operands. During disassembly it is first correctly decoded as
    immediate value (imm.value) in aarch64_ext_imm called by
    aarch64_extract_operand, but then erroneously treated as register
    number (reg.regno) in aarch64_print_operand.
    
    This resolves the assembler test case "SME extension (ZERO)" to
    erroneously fail on s390. On AArch64 - being little-endian - the struct
    aarch64_opnd_info union fields reg.regno and imm.value share their
    least-significant bits. On s390 - being big-endian - they do not.
    
    opcodes/
            PR binutils/31561
            * aarch64-opc.c: Treat operand "SME list of ZA tiles" as
            immediate.
    
    Bug: https://sourceware.org/PR31561
    Signed-off-by: Jens Remus <jremus@linux.ibm.com>
    Acked-by: Nick Clifton <nickc@redhat.com>

Diff:
---
 opcodes/aarch64-opc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index e88c616f4a9..4a7a6ae784b 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -4236,7 +4236,7 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
       break;
 
     case AARCH64_OPND_SME_list_of_64bit_tiles:
-      print_sme_za_list (buf, size, opnd->reg.regno, styler);
+      print_sme_za_list (buf, size, opnd->imm.value, styler);
       break;
 
     case AARCH64_OPND_SME_ZA_array_off1x4:

                 reply	other threads:[~2024-04-09 15:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=20240409152216.CC469385842C@sourceware.org \
    --to=jremus@sourceware.org \
    --cc=binutils-cvs@sourceware.org \
    /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).