aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-27 01:37:24 -0400
committerMike Frysinger <vapier@gentoo.org>2021-07-01 17:51:00 -0400
commit6c2ede018c51895a3ce7902c86698b90a086e6e0 (patch)
tree0d19df4fc59e3793cfde0b30a8959d4dbbd9e2d1 /opcodes
parent1b8d1f5f3861c04070bd5d249855b575e431f56b (diff)
downloadgdb-6c2ede018c51895a3ce7902c86698b90a086e6e0.zip
gdb-6c2ede018c51895a3ce7902c86698b90a086e6e0.tar.gz
gdb-6c2ede018c51895a3ce7902c86698b90a086e6e0.tar.bz2
opcodes: constify aarch64_opcode_tables
This table is huge (~350k), so stop putting it into writable .data since it's only const data.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog7
-rw-r--r--opcodes/aarch64-gen.c2
-rw-r--r--opcodes/aarch64-tbl.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 20e0524..de90ac5 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-01 Mike Frysinger <vapier@gentoo.org>
+
+ * aarch64-gen.c (aarch64_opcode_table): Add const.
+ * aarch64-tbl.h (aarch64_opcode_table): Likewise.
+
2021-06-22 Andrew Burgess <andrew.burgess@embecosm.com>
* cgen-dis.c (count_decodable_bits): Use __builtin_popcount when
@@ -367,7 +372,7 @@
2021-03-29 Jan Beulich <jbeulich@suse.com>
* i386-gen.c (process_i386_opcode_modifier): New parameter
- "space".
+ "space".
(output_i386_opcode): New local variable "space". Adjust
process_i386_opcode_modifier() invocation.
(process_i386_opcodes): Adjust process_i386_opcode_modifier()
diff --git a/opcodes/aarch64-gen.c b/opcodes/aarch64-gen.c
index 356c5ef..d0581bc 100644
--- a/opcodes/aarch64-gen.c
+++ b/opcodes/aarch64-gen.c
@@ -84,7 +84,7 @@ new_opcode_node (void)
'aarch64_opcode_table' hard-coded in, e.g. print_find_next_opcode;
therefore some amount of work needs to be done if the full support
for multiple tables needs to be enabled. */
-static const struct aarch64_opcode *aarch64_opcode_tables[] =
+static const struct aarch64_opcode * const aarch64_opcode_tables[] =
{aarch64_opcode_table};
/* Use top 2 bits to indiate which table. */
diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h
index 4192e54..17ea851 100644
--- a/opcodes/aarch64-tbl.h
+++ b/opcodes/aarch64-tbl.h
@@ -2584,7 +2584,7 @@ static const aarch64_feature_set aarch64_feature_flagm =
#define FLAGM_INSN(NAME,OPCODE,MASK,CLASS,OPS,QUALS,FLAGS) \
{ NAME, OPCODE, MASK, CLASS, 0, FLAGM, OPS, QUALS, FLAGS, 0, 0, NULL }
-struct aarch64_opcode aarch64_opcode_table[] =
+const struct aarch64_opcode aarch64_opcode_table[] =
{
/* Add/subtract (with carry). */
CORE_INSN ("adc", 0x1a000000, 0x7fe0fc00, addsub_carry, 0, OP3 (Rd, Rn, Rm), QL_I3SAMER, F_SF),