diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2017-04-25 17:07:00 +0200 |
---|---|---|
committer | claziss <claziss@synopsys.com> | 2017-04-25 17:07:00 +0200 |
commit | 126124cc0f3f0417913bfd84d83e4e525b6facf9 (patch) | |
tree | 3b25064e723e5cc5c9a7d5053333f31413570795 /opcodes/arc-dis.c | |
parent | be6a24d8eabdbeef32a9d79e81307af4491fcf56 (diff) | |
download | gdb-126124cc0f3f0417913bfd84d83e4e525b6facf9.zip gdb-126124cc0f3f0417913bfd84d83e4e525b6facf9.tar.gz gdb-126124cc0f3f0417913bfd84d83e4e525b6facf9.tar.bz2 |
[ARC] Enhance enter/leave mnemonics.
enter/leave mnemonics are enhanced to not only accept register ranges
but also single register (i.e., r13) or even no GPR register at all.
gas/
2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/leave_enter.d: Update test.
* testsuite/gas/arc/leave_enter.s: Likewise.
opcodes/
2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
* arc-dis.c (print_insn_arc): Smartly print enter/leave mnemonics.
* arc-opc.c (insert_r13el): New function.
(R13_EL): Define.
* arc-tbl.h: Add new enter/leave variants.
Diffstat (limited to 'opcodes/arc-dis.c')
-rw-r--r-- | opcodes/arc-dis.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c index 4beca68..6fb030e 100644 --- a/opcodes/arc-dis.c +++ b/opcodes/arc-dis.c @@ -1208,9 +1208,22 @@ print_insn_arc (bfd_vma memaddr, if (operand->flags & ARC_OPERAND_TRUNCATE && !(operand->flags & ARC_OPERAND_ALIGNED32) && !(operand->flags & ARC_OPERAND_ALIGNED16) - && value > 0 && value <= 14) - (*info->fprintf_func) (info->stream, "r13-%s", - regnames[13 + value - 1]); + && value >= 0 && value <= 14) + { + switch (value) + { + case 0: + need_comma = FALSE; + break; + case 1: + (*info->fprintf_func) (info->stream, "r13"); + break; + default: + (*info->fprintf_func) (info->stream, "r13-%s", + regnames[13 + value - 1]); + break; + } + } else { const char *rname = get_auxreg (opcode, value, isa_mask); |