]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
opcodes/aarch64: make aarch64_ext_ldst_reglist()'s data[] static const
authorJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2025 07:16:41 +0000 (09:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2025 07:16:41 +0000 (09:16 +0200)
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.

opcodes/aarch64-dis.c

index 75ff8717c648b86d10f661f7ff3d21cf283bd589..179addc5e9f5feddc042e5a00de55a1095b60e66 100644 (file)
@@ -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;