[binutils-gdb] opcodes/aarch64: make aarch64_ext_ldst_reglist()'s data[] static const

Jan Beulich jbeulich@sourceware.org
Fri Aug 1 07:19:20 GMT 2025


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

commit f79d7a8b4c93374fa8506c59b47f0dca57df8dc4
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Aug 1 09:16:41 2025 +0200

    opcodes/aarch64: make aarch64_ext_ldst_reglist()'s data[] static const
    
    There's no reason to have the compiler materialize such an object onto the
    stack. And there's also no reason to allow the array to be modifiable.

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

diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index 75ff8717c64..179addc5e9f 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -501,7 +501,7 @@ aarch64_ext_ldst_reglist (const aarch64_operand *self ATTRIBUTE_UNUSED,
   /* Number of elements in each structure to be loaded/stored.  */
   unsigned expected_num = get_opcode_dependent_value (inst->opcode);
 
-  struct
+  static const struct
     {
       unsigned is_reserved;
       unsigned num_regs;


More information about the Binutils-cvs mailing list