aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-16 01:00:45 -0500
committerMike Frysinger <vapier@gentoo.org>2021-02-08 18:26:08 -0500
commitbfd428bc12af433831a4c7e9a0e692f21a9adf5e (patch)
tree6643cfec9aea9190d6d52a4832b37400ca2fc126 /opcodes
parent3d4aae4860c41aeaab7a8d3daefe0fb50b40f4c6 (diff)
downloadfsf-binutils-gdb-bfd428bc12af433831a4c7e9a0e692f21a9adf5e.zip
fsf-binutils-gdb-bfd428bc12af433831a4c7e9a0e692f21a9adf5e.tar.gz
fsf-binutils-gdb-bfd428bc12af433831a4c7e9a0e692f21a9adf5e.tar.bz2
opcodes: tic54x: namespace exported variables
The tic54x exports some fairly generic variable names that can conflict with programs that use them, so put proper tic54x_ prefixes on all of them.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog18
-rw-r--r--opcodes/tic54x-dis.c2
-rw-r--r--opcodes/tic54x-opc.c14
3 files changed, 26 insertions, 8 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 95ec071..24d063a 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,21 @@
+2021-02-08 Mike Frysinger <vapier@gentoo.org>
+
+ * tic54x-dis.c (sprint_mmr): Change to tic54x_mmregs.
+ * tic54x-opc.c (regs): Rename to ...
+ (tic54x_regs): ... this.
+ (mmregs): Rename to ...
+ (tic54x_mmregs): ... this.
+ (condition_codes): Rename to ...
+ (tic54x_condition_codes): ... this.
+ (cc2_codes): Rename to ...
+ (tic54x_cc2_codes): ... this.
+ (cc3_codes): Rename to ...
+ (tic54x_cc3_codes): ... this.
+ (status_bits): Rename to ...
+ (tic54x_status_bits): ... this.
+ (misc_symbols): Rename to ...
+ (tic54x_misc_symbols): ... this.
+
2021-02-04 Nelson Chu <nelson.chu@sifive.com>
* riscv-opc.c (MASK_RVB_IMM): Removed.
diff --git a/opcodes/tic54x-dis.c b/opcodes/tic54x-dis.c
index 85309ea..5bf9a58 100644
--- a/opcodes/tic54x-dis.c
+++ b/opcodes/tic54x-dis.c
@@ -529,7 +529,7 @@ sprint_mmr (disassemble_info *info ATTRIBUTE_UNUSED,
char buf[],
int mmr)
{
- tic54x_symbol *reg = (tic54x_symbol *) mmregs;
+ const tic54x_symbol *reg = tic54x_mmregs;
while (reg->name != NULL)
{
if (mmr == reg->value)
diff --git a/opcodes/tic54x-opc.c b/opcodes/tic54x-opc.c
index 6ed2cb8..411460c 100644
--- a/opcodes/tic54x-opc.c
+++ b/opcodes/tic54x-opc.c
@@ -24,7 +24,7 @@
#include "opcode/tic54x.h"
/* these are the only register names not found in mmregs */
-const tic54x_symbol regs[] = {
+const tic54x_symbol tic54x_regs[] = {
{ "AR0", 16 }, { "ar0", 16 },
{ "AR1", 17 }, { "ar1", 17 },
{ "AR2", 18 }, { "ar2", 18 },
@@ -38,7 +38,7 @@ const tic54x_symbol regs[] = {
/* status bits, MM registers, condition codes, etc */
/* some symbols are only valid for certain chips... */
-const tic54x_symbol mmregs[] = {
+const tic54x_symbol tic54x_mmregs[] = {
{ "IMR", 0 }, { "imr", 0 },
{ "IFR", 1 }, { "ifr", 1 },
{ "ST0", 6 }, { "st0", 6 },
@@ -111,7 +111,7 @@ const tic54x_symbol mmregs[] = {
{ NULL, 0},
};
-const tic54x_symbol condition_codes[] = {
+const tic54x_symbol tic54x_condition_codes[] = {
/* condition codes */
{ "UNC", 0 }, { "unc", 0 },
#define CC1 0x40
@@ -155,7 +155,7 @@ const tic54x_symbol condition_codes[] = {
{ NULL, 0 }
};
-const tic54x_symbol cc2_codes[] = {
+const tic54x_symbol tic54x_cc2_codes[] = {
{ "UNC", 0 }, { "unc", 0 },
{ "AEQ", 5 }, { "aeq", 5 },
{ "ANEQ", 4 }, { "aneq", 4 },
@@ -172,7 +172,7 @@ const tic54x_symbol cc2_codes[] = {
{ NULL, 0 },
};
-const tic54x_symbol cc3_codes[] = {
+const tic54x_symbol tic54x_cc3_codes[] = {
{ "EQ", 0x0000 }, { "eq", 0x0000 },
{ "LT", 0x0100 }, { "lt", 0x0100 },
{ "GT", 0x0200 }, { "gt", 0x0200 },
@@ -189,7 +189,7 @@ const tic54x_symbol cc3_codes[] = {
};
/* FIXME -- also allow decimal digits */
-const tic54x_symbol status_bits[] = {
+const tic54x_symbol tic54x_status_bits[] = {
/* status register 0 */
{ "TC", 12 }, { "tc", 12 },
{ "C", 11 }, { "c", 11 },
@@ -209,7 +209,7 @@ const tic54x_symbol status_bits[] = {
{ NULL, 0 },
};
-const char *misc_symbols[] = {
+const char *tic54x_misc_symbols[] = {
"ARP", "arp",
"DP", "dp",
"ASM", "asm",