public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] aarch64: Make indexed_za use 64-bit immediates
@ 2023-03-30 10:11 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2023-03-30 10:11 UTC (permalink / raw)
  To: bfd-cvs

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

commit c888354c611953575d7d6734779f7dfd7bc77e5f
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Mar 30 11:09:04 2023 +0100

    aarch64: Make indexed_za use 64-bit immediates
    
    A later patch moves the range checking for ZA vector select
    offsets from gas to libopcodes.  That in turn requires the
    immediate field to be big enough to support all parsed values.
    
    This shouldn't be a particularly size-sensitive structure,
    so there should be no memory problems with doing this.

Diff:
---
 include/opcode/aarch64.h | 2 +-
 opcodes/aarch64-opc.c    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 4a554df2b36..aeb3d9a9721 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -1115,7 +1115,7 @@ struct aarch64_indexed_za
   struct
   {
     int regno;    /* <Wv>  */
-    int imm;      /* <imm>  */
+    int64_t imm;  /* <imm>  */
   } index;
   unsigned v : 1;	/* <HV> horizontal or vertical vector indicator.  */
 };
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index bbbac418f91..c92b4e80e35 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -3560,7 +3560,7 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
 			   opnd->indexed_za.v == 1 ? 'v' : 'h',
 			   aarch64_get_qualifier_name (opnd->qualifier)),
 		style_reg (styler, "w%d", opnd->indexed_za.index.regno),
-		style_imm (styler, "%d", opnd->indexed_za.index.imm),
+		style_imm (styler, "%" PRIi64, opnd->indexed_za.index.imm),
 		opnd->type == AARCH64_OPND_SME_ZA_HV_idx_ldstr ? "}" : "");
       break;
 
@@ -3572,7 +3572,7 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
       snprintf (buf, size, "%s[%s, %s]",
 		style_reg (styler, "za"),
 		style_reg (styler, "w%d", opnd->indexed_za.index.regno),
-		style_imm (styler, "%d", opnd->indexed_za.index.imm));
+		style_imm (styler, "%" PRIi64, opnd->indexed_za.index.imm));
       break;
 
     case AARCH64_OPND_SME_SM_ZA:
@@ -3585,7 +3585,7 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
 		style_reg (styler, "p%d.%s", opnd->indexed_za.regno,
 			   aarch64_get_qualifier_name (opnd->qualifier)),
 		style_reg (styler, "w%d", opnd->indexed_za.index.regno),
-		style_imm (styler, "%d", opnd->indexed_za.index.imm));
+		style_imm (styler, "%" PRIi64, opnd->indexed_za.index.imm));
       break;
 
     case AARCH64_OPND_CRn:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-30 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 10:11 [binutils-gdb] aarch64: Make indexed_za use 64-bit immediates Richard Sandiford

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).