diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-27 01:55:50 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-07-01 17:55:26 -0400 |
commit | 52b8387412e32380013a46dd00959e65ecef71fb (patch) | |
tree | 58c187ee90d65e0ab2b3e055dec6f02cca0ae114 /gas | |
parent | 6c2ede018c51895a3ce7902c86698b90a086e6e0 (diff) | |
download | binutils-52b8387412e32380013a46dd00959e65ecef71fb.zip binutils-52b8387412e32380013a46dd00959e65ecef71fb.tar.gz binutils-52b8387412e32380013a46dd00959e65ecef71fb.tar.bz2 |
opcodes: constify & scope microblaze opcodes
This is exporting the variable "opcodes" as a large writable blob.
This is not a namespace friendly name, so add a "microblaze" prefix,
and then sprinkle const over its definition & use.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-microblaze.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9ad388e..0d830d6 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2021-07-01 Mike Frysinger <vapier@gentoo.org> + * config/tc-microblaze.c (md_begin): Make opcode const. Rename + opcodes to microblaze_opcodes. + +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. diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c index 9893bc4..881172d 100644 --- a/gas/config/tc-microblaze.c +++ b/gas/config/tc-microblaze.c @@ -411,12 +411,12 @@ const pseudo_typeS md_pseudo_table[] = void md_begin (void) { - struct op_code_struct * opcode; + const struct op_code_struct * opcode; opcode_hash_control = str_htab_create (); /* Insert unique names into hash table. */ - for (opcode = opcodes; opcode->name; opcode ++) + for (opcode = microblaze_opcodes; opcode->name; opcode ++) str_hash_insert (opcode_hash_control, opcode->name, opcode, 0); } |