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
This commit is contained in:
Alan Modra
2017-10-25 21:59:14 +10:30
parent cc628f3dbb
commit e5d70d6b5a
9 changed files with 64 additions and 44 deletions

View File

@@ -54,7 +54,7 @@ typedef struct
cinv_entry;
/* CR16 'cinv' options mapping. */
const cinv_entry cr16_cinvs[] =
static const cinv_entry cr16_cinvs[] =
{
{"cinv[i]", "cinv [i]"},
{"cinv[i,u]", "cinv [i,u]"},
@@ -78,20 +78,20 @@ typedef enum REG_ARG_TYPE
REG_ARG_TYPE;
/* Current opcode table entry we're disassembling. */
const inst *instruction;
static const inst *instruction;
/* Current instruction we're disassembling. */
ins cr16_currInsn;
static ins cr16_currInsn;
/* The current instruction is read into 3 consecutive words. */
wordU cr16_words[3];
static wordU cr16_words[3];
/* Contains all words in appropriate order. */
ULONGLONG cr16_allWords;
static ULONGLONG cr16_allWords;
/* Holds the current processed argument number. */
int processing_argument_number;
static int processing_argument_number;
/* Nonzero means a IMM4 instruction. */
int imm4flag;
static int imm4flag;
/* Nonzero means the instruction's original size is
incremented (escape sequence is used). */
int size_changed;
static int size_changed;
/* Print the constant expression length. */