aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arc.c
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2016-03-31 12:40:13 +0200
committerClaudiu Zissulescu <claziss@synopsys.com>2016-04-12 09:57:03 +0200
commit37ab977937f89c6601e616085ff9702d6e727ec8 (patch)
tree0101fe3c002d30fa37f70f43f6680dd203dc8c29 /gas/config/tc-arc.c
parent2df3368d851b653880c2e3312c99eb8adf89f3db (diff)
downloadgdb-37ab977937f89c6601e616085ff9702d6e727ec8.zip
gdb-37ab977937f89c6601e616085ff9702d6e727ec8.tar.gz
gdb-37ab977937f89c6601e616085ff9702d6e727ec8.tar.bz2
Remove unneeded AUX register symbols.
gas/ 2016-03-31 Claudiu Zissulescu <claziss@synopsys.com> * config/tc-arc.c (preprocess_operands): Mark AUX symbol. (arc_adjust_symtab): New function. * config/tc-arc.h (ARC_FLAG_AUX): Define. (obj_adjust_symtab): Likewise. * testsuite/gas/arc/taux.d: New file. * testsuite/gas/arc/taux.s: Likewise. Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
Diffstat (limited to 'gas/config/tc-arc.c')
-rw-r--r--gas/config/tc-arc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 1b70e03..98cac6a 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -1611,6 +1611,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry,
from BKTOK. */
tok[tokidx].X_op = O_constant;
tok[tokidx].X_add_number = auxr->address;
+ ARC_SET_FLAG (tok[i].X_add_symbol, ARC_FLAG_AUX);
break;
}
@@ -3857,3 +3858,22 @@ tc_arc_regname_to_dw2regnum (char *regname)
return -1;
}
+
+/* Adjust the symbol table. Delete found AUX register symbols. */
+
+void
+arc_adjust_symtab (void)
+{
+ symbolS * sym;
+
+ for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym))
+ {
+ /* I've created a symbol during parsing process. Now, remove
+ the symbol as it is found to be an AUX register. */
+ if (ARC_GET_FLAG (sym) & ARC_FLAG_AUX)
+ symbol_remove (sym, &symbol_rootP, &symbol_lastP);
+ }
+
+ /* Now do generic ELF adjustments. */
+ elf_adjust_symtab ();
+}