opcodes: constify & localize z80 opcodes
authorMike Frysinger <vapier@gentoo.org>
Sun, 27 Jun 2021 05:58:18 +0000 (01:58 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 1 Jul 2021 21:56:24 +0000 (17:56 -0400)
These aren't used outside of this module, and are never modified.
Mark it static to avoid bad exported variable name issues.

opcodes/ChangeLog
opcodes/z80-dis.c

index 2b7022138102771f1a8fd4a74f7f5a46d0a2926c..66f9980a68fb09837d2534a8329e4545a71229f6 100644 (file)
@@ -1,3 +1,8 @@
+2021-07-01  Mike Frysinger  <vapier@gentoo.org>
+
+       * z80-dis.c (opc_ed): Make const.
+       (pref_ed): Make p const.
+
 2021-07-01  Mike Frysinger  <vapier@gentoo.org>
 
        * microblaze-dis.c (get_field_special): Make op const.
index 9b9f941276d7d3fa21833b24f37402a91d3dab0b..0e7a312ff8987e148e28e9877789cc87f022454a 100644 (file)
@@ -414,7 +414,7 @@ dump (struct buffer *buf, disassemble_info * info, const char *txt)
 }
 
 /* Table to disassemble machine codes with prefix 0xED.  */
-struct tab_elt opc_ed[] =
+static const struct tab_elt opc_ed[] =
 {
   { 0x30, 0xFF, prt, "mul d,e", INSS_Z80N },
   { 0x31, 0xFF, prt, "add hl,a", INSS_Z80N },
@@ -525,7 +525,7 @@ static int
 pref_ed (struct buffer *buf, disassemble_info *info,
          const char *txt ATTRIBUTE_UNUSED)
 {
-  struct tab_elt *p;
+  const struct tab_elt *p;
 
   if (fetch_data (buf, info, 1))
     {
This page took 0.026507 seconds and 4 git commands to generate.