summaryrefslogtreecommitdiff
path: root/gas
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 /gas
parent1b8d1f5f3861c04070bd5d249855b575e431f56b (diff)
downloadbinutils-gdb-6c2ede018c51895a3ce7902c86698b90a086e6e0.tar.gz
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 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-aarch64.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1b318559212..9ad388e5a52 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2021-07-01 Mike Frysinger <vapier@gentoo.org>
+
+ * config/tc-aarch64.c (struct templates): Make opcode const.
+ (md_assemble): Likewise.
+ (fill_instruction_hash_table): Likewise.
+
2021-06-24 Clément Chigot <clement.chigot@atos.net>
* config/tc-ppc.c (md_assemble): Update ppc_current_csect
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 9ff2d6803dd..2eaad63a9fa 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -5214,7 +5214,7 @@ output_inst (struct aarch64_inst *new_inst)
struct templates
{
- aarch64_opcode *opcode;
+ const aarch64_opcode *opcode;
struct templates *next;
};
@@ -7272,7 +7272,7 @@ md_assemble (char *str)
{
char *p = str;
templates *template;
- aarch64_opcode *opcode;
+ const aarch64_opcode *opcode;
aarch64_inst *inst_base;
unsigned saved_cond;
@@ -8768,7 +8768,7 @@ sysreg_hash_insert (htab_t table, const char *key, void *value)
static void
fill_instruction_hash_table (void)
{
- aarch64_opcode *opcode = aarch64_opcode_table;
+ const aarch64_opcode *opcode = aarch64_opcode_table;
while (opcode->name != NULL)
{