diff options
author | Alan Modra <amodra@gmail.com> | 2017-10-25 21:59:14 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-10-25 22:14:58 +1030 |
commit | e5d70d6b5a5c2832ad199ac1b91f68324b4a12c9 (patch) | |
tree | 1d81154693c5ac8086c05b89a519a6ae5807e490 /gas | |
parent | cc628f3dbb12c720dbc9ab714feeb197dc739944 (diff) | |
download | gdb-e5d70d6b5a5c2832ad199ac1b91f68324b4a12c9.zip gdb-e5d70d6b5a5c2832ad199ac1b91f68324b4a12c9.tar.gz gdb-e5d70d6b5a5c2832ad199ac1b91f68324b4a12c9.tar.bz2 |
PR22348, conflicting global vars in crx and cr16
include/
PR 22348
* opcode/cr16.h (instruction): Delete.
(cr16_words, cr16_allWords, cr16_currInsn): Delete.
* opcode/crx.h (crx_cst4_map): Rename from cst4_map.
(crx_cst4_maps): Rename from cst4_maps.
(crx_no_op_insn): Rename from no_op_insn.
(instruction): Delete.
opcodes/
PR 22348
* cr16-dis.c (cr16_cinvs, instruction, cr16_currInsn): Make static.
(cr16_words, cr16_allWords, processing_argument_number): Likewise.
(imm4flag, size_changed): Likewise.
* crx-dis.c (crx_cinvs, NUMCINVS, instruction, currInsn): Likewise.
(words, allWords, processing_argument_number): Likewise.
(cst4flag, size_changed): Likewise.
* crx-opc.c (crx_cst4_map): Rename from cst4_map.
(crx_cst4_maps): Rename from cst4_maps.
(crx_no_op_insn): Rename from no_op_insn.
gas/
PR 22348
* config/tc-crx.c (instruction, output_opcode): Make static.
(relocatable, ins_parse, cur_arg_num): Likewise.
(parse_insn): Adjust for renamed opcodes globals.
(check_range): Likewise
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-crx.c | 20 |
2 files changed, 18 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 4d7dcce..de32555 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,13 @@ 2017-10-25 Alan Modra <amodra@gmail.com> + PR 22348 + * config/tc-crx.c (instruction, output_opcode): Make static. + (relocatable, ins_parse, cur_arg_num): Likewise. + (parse_insn): Adjust for renamed opcodes globals. + (check_range): Likewise + +2017-10-25 Alan Modra <amodra@gmail.com> + * testsuite/gas/all/fill-1.d: Exclude tic4x and tic54x. * testsuite/gas/all/fill-1.s: Use L1 rather than .L1. diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c index be0d455..c5a2144 100644 --- a/gas/config/tc-crx.c +++ b/gas/config/tc-crx.c @@ -69,21 +69,21 @@ static struct hash_control *reg_hash; /* CRX coprocessor registers hash table. */ static struct hash_control *copreg_hash; /* Current instruction we're assembling. */ -const inst *instruction; +static const inst *instruction; /* Global variables. */ /* Array to hold an instruction encoding. */ -long output_opcode[2]; +static long output_opcode[2]; /* Nonzero means a relocatable symbol. */ -int relocatable; +static int relocatable; /* A copy of the original instruction (used in error messages). */ -char ins_parse[MAX_INST_LEN]; +static char ins_parse[MAX_INST_LEN]; /* The current processed argument number. */ -int cur_arg_num; +static int cur_arg_num; /* Generic assembler global variables which must be defined by all targets. */ @@ -1043,9 +1043,9 @@ parse_insn (ins *insn, char *operands) int i; /* Handle instructions with no operands. */ - for (i = 0; no_op_insn[i] != NULL; i++) + for (i = 0; crx_no_op_insn[i] != NULL; i++) { - if (streq (no_op_insn[i], instruction->mnemonic)) + if (streq (crx_no_op_insn[i], instruction->mnemonic)) { insn->nargs = 0; return; @@ -1387,7 +1387,7 @@ check_range (long *num, int bits, int unsigned flags, int update) : instruction->flags & DISPUD4 ? 4 : 0); - for (bin = 0; bin < cst4_maps; bin++) + for (bin = 0; bin < crx_cst4_maps; bin++) { if (value == mul * bin) { @@ -1404,9 +1404,9 @@ check_range (long *num, int bits, int unsigned flags, int update) { int is_cst4 = 0; - for (bin = 0; bin < cst4_maps; bin++) + for (bin = 0; bin < crx_cst4_maps; bin++) { - if (value == (uint32_t) cst4_map[bin]) + if (value == (uint32_t) crx_cst4_map[bin]) { is_cst4 = 1; if (update) |