diff options
author | claziss <claziss@synopsys.com> | 2018-08-06 16:41:32 +0300 |
---|---|---|
committer | Claudiu Zissulescu <claziss@gmail.com> | 2018-08-06 16:41:32 +0300 |
commit | b6523c37fb52fc38da6e152328341caffd793749 (patch) | |
tree | d6cc3d850d873fa47a4962079343d98a30a7242d /gas/config | |
parent | 821a26825bdcb96358a51f5c2140475951429470 (diff) | |
download | gdb-b6523c37fb52fc38da6e152328341caffd793749.zip gdb-b6523c37fb52fc38da6e152328341caffd793749.tar.gz gdb-b6523c37fb52fc38da6e152328341caffd793749.tar.bz2 |
[ARC] Update handling AUX-registers.
Update aux-registers data-base, and accept aux-registers names with
upper/lowercase names.
opcode/
2017-07-18 Claudiu Zissulescu <claziss@synopsys.com>
* arc-regs.h: Update aux-registers.
gas/
2017-07-18 Claudiu Zissulescu <claziss@synopsys.com>
* config/tc-arc.c (find_opcode_match): Accept uppercase aux-regs
names.
* testsuite/gas/arc/ld2.d: Update test.
* testsuite/gas/arc/taux.d: Likewise.
* testsuite/gas/arc/taux.s: Likewise.
include/
2017-07-18 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (ARC_OPCODE_ARCV1): Define.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-arc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index a1ce34d..3fc907a 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -1882,13 +1882,20 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry, case O_symbol: { const char *p; + char *tmpp, *pp; const struct arc_aux_reg *auxr; if (opcode->insn_class != AUXREG) goto de_fault; p = S_GET_NAME (tok[tokidx].X_add_symbol); - auxr = hash_find (arc_aux_hash, p); + /* For compatibility reasons, an aux register can + be spelled with upper or lower case + letters. */ + tmpp = strdup (p); + for (pp = tmpp; *pp; ++pp) *pp = TOLOWER (*pp); + + auxr = hash_find (arc_aux_hash, tmpp); if (auxr) { /* We modify the token array here, safe in the @@ -1899,6 +1906,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry, tok[tokidx].X_add_number = auxr->address; ARC_SET_FLAG (tok[tokidx].X_add_symbol, ARC_FLAG_AUX); } + free (tmpp); if (tok[tokidx].X_op != O_constant) goto de_fault; |