diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-01-16 01:00:45 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-02-08 18:26:08 -0500 |
commit | bfd428bc12af433831a4c7e9a0e692f21a9adf5e (patch) | |
tree | 6643cfec9aea9190d6d52a4832b37400ca2fc126 /gas | |
parent | 3d4aae4860c41aeaab7a8d3daefe0fb50b40f4c6 (diff) | |
download | gdb-bfd428bc12af433831a4c7e9a0e692f21a9adf5e.zip gdb-bfd428bc12af433831a4c7e9a0e692f21a9adf5e.tar.gz 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 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-tic54x.c | 28 |
2 files changed, 22 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 83b2721..ed343af 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2021-02-08 Mike Frysinger <vapier@gentoo.org> + + * config/tc-tic54x (tic54x_mmregs): Rename to ... + (tic54x_register_mmregs): ... this. Change mmregs to tic54x_mmregs. + (md_pseudo_table): Change tic54x_mmregs to tic54x_register_mmregs. + (md_begin): Add tic54x_ prefix to regs, mmregs, condition_codes, + cc2_codes, cc3_codes, status_bits, and misc_symbols. + 2021-02-08 Nick Clifton <nickc@redhat.com> PR 27355 diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c index 5a6bc8a..da2c755 100644 --- a/gas/config/tc-tic54x.c +++ b/gas/config/tc-tic54x.c @@ -2007,13 +2007,13 @@ tic54x_label (int ignored ATTRIBUTE_UNUSED) absolute local symbols. */ static void -tic54x_mmregs (int ignored ATTRIBUTE_UNUSED) +tic54x_register_mmregs (int ignored ATTRIBUTE_UNUSED) { - tic54x_symbol *sym; + const tic54x_symbol *sym; ILLEGAL_WITHIN_STRUCT (); - for (sym = (tic54x_symbol *) mmregs; sym->name; sym++) + for (sym = tic54x_mmregs; sym->name; sym++) { symbolS *symbolP = symbol_new (sym->name, absolute_section, &zero_address_frag, sym->value); @@ -2421,7 +2421,7 @@ const pseudo_typeS md_pseudo_table[] = { "mlib" , tic54x_mlib , 0 }, { "mlist" , s_ignore , 0 }, { "mnolist" , s_ignore , 0 }, - { "mmregs" , tic54x_mmregs , 0 }, + { "mmregs" , tic54x_register_mmregs , 0 }, { "newblock" , tic54x_clear_local_labels, 0 }, { "option" , s_ignore , 0 }, { "p2align" , tic54x_p2align , 0 }, @@ -2965,10 +2965,10 @@ void md_begin (void) { insn_template *tm; - tic54x_symbol *sym; + const tic54x_symbol *sym; const subsym_proc_entry *subsym_proc; const math_proc_entry *math_proc; - char **symname; + const char **symname; char *TIC54X_DIR = getenv ("TIC54X_DIR"); char *A_DIR = TIC54X_DIR ? TIC54X_DIR : getenv ("A_DIR"); @@ -3000,7 +3000,7 @@ md_begin (void) str_hash_insert (parop_hash, tm->name, tm, 0); reg_hash = str_htab_create (); - for (sym = (tic54x_symbol *) regs; sym->name; sym++) + for (sym = tic54x_regs; sym->name; sym++) { /* Add basic registers to the symbol table. */ symbolS *symbolP = symbol_new (sym->name, absolute_section, @@ -3009,30 +3009,30 @@ md_begin (void) symbol_table_insert (symbolP); str_hash_insert (reg_hash, sym->name, sym, 0); } - for (sym = (tic54x_symbol *) mmregs; sym->name; sym++) + for (sym = tic54x_mmregs; sym->name; sym++) str_hash_insert (reg_hash, sym->name, sym, 0); mmreg_hash = str_htab_create (); - for (sym = (tic54x_symbol *) mmregs; sym->name; sym++) + for (sym = tic54x_mmregs; sym->name; sym++) str_hash_insert (mmreg_hash, sym->name, sym, 0); cc_hash = str_htab_create (); - for (sym = (tic54x_symbol *) condition_codes; sym->name; sym++) + for (sym = tic54x_condition_codes; sym->name; sym++) str_hash_insert (cc_hash, sym->name, sym, 0); cc2_hash = str_htab_create (); - for (sym = (tic54x_symbol *) cc2_codes; sym->name; sym++) + for (sym = tic54x_cc2_codes; sym->name; sym++) str_hash_insert (cc2_hash, sym->name, sym, 0); cc3_hash = str_htab_create (); - for (sym = (tic54x_symbol *) cc3_codes; sym->name; sym++) + for (sym = tic54x_cc3_codes; sym->name; sym++) str_hash_insert (cc3_hash, sym->name, sym, 0); sbit_hash = str_htab_create (); - for (sym = (tic54x_symbol *) status_bits; sym->name; sym++) + for (sym = tic54x_status_bits; sym->name; sym++) str_hash_insert (sbit_hash, sym->name, sym, 0); misc_symbol_hash = str_htab_create (); - for (symname = (char **) misc_symbols; *symname; symname++) + for (symname = tic54x_misc_symbols; *symname; symname++) str_hash_insert (misc_symbol_hash, *symname, *symname, 0); /* Only the base substitution table and local label table are initialized; |