summaryrefslogtreecommitdiff
path: root/opcodes/arc-dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/arc-dis.c')
-rw-r--r--opcodes/arc-dis.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
index 4beca689c39..6fb030e5dbe 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);