From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7955) id CC469385842C; Tue, 9 Apr 2024 15:22:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC469385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712676136; bh=Iltm8HYMy+jvr+Yd+/j9tSQNE7EiWQRR0syDW8XjXM0=; h=From:To:Subject:Date:From; b=QZSMzGaugOyUjLtP0oQ4cZtZRrGEkK4VWDj8D2K1/zPW1/J6vNjSIT5ynHGIDVpw3 8i+a8eJcSG0A3iK4uNEPDCxVRwncnkphxa5t8GwubK6QpF1MAV2NyjBXHOV91EjfUo pjrtAr4ORlVbRRurq7hSFgmN7LEj9v5EKmtjU918= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jens Remus To: binutils-cvs@sourceware.org Subject: [binutils-gdb] aarch64: Treat operand "SME list of ZA tiles" as immediate (PR 31561) X-Act-Checkin: binutils-gdb X-Git-Author: Jens Remus X-Git-Refname: refs/heads/master X-Git-Oldrev: 676b98078f9f42cfdaaaec6605f31c5be694dffb X-Git-Newrev: 6f3cf71845e68409724aef1cfef3b5a44beecf53 Message-Id: <20240409152216.CC469385842C@sourceware.org> Date: Tue, 9 Apr 2024 15:22:15 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D6f3cf71845e6= 8409724aef1cfef3b5a44beecf53 commit 6f3cf71845e68409724aef1cfef3b5a44beecf53 Author: Jens Remus Date: Tue Apr 9 17:21:53 2024 +0200 aarch64: Treat operand "SME list of ZA tiles" as immediate (PR 31561) =20 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. =20 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. =20 opcodes/ PR binutils/31561 * aarch64-opc.c: Treat operand "SME list of ZA tiles" as immediate. =20 Bug: https://sourceware.org/PR31561 Signed-off-by: Jens Remus Acked-by: Nick Clifton 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_vm= a pc, break; =20 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; =20 case AARCH64_OPND_SME_ZA_array_off1x4: