diff options
author | Nick Clifton <nickc@redhat.com> | 2015-11-02 14:14:22 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-11-02 14:14:22 +0000 |
commit | e292aa7a9529771c04e9578a2307b8c95bb5591c (patch) | |
tree | ab52096b7ce3007ec7b2744e0f90ce6075b9a844 /opcodes/rx-dis.c | |
parent | a62e59897771e2f04fad908fc891714b9bd75d7b (diff) | |
download | fsf-binutils-gdb-e292aa7a9529771c04e9578a2307b8c95bb5591c.zip fsf-binutils-gdb-e292aa7a9529771c04e9578a2307b8c95bb5591c.tar.gz fsf-binutils-gdb-e292aa7a9529771c04e9578a2307b8c95bb5591c.tar.bz2 |
Fix disassembly of RX zero-offset register indirect instructions.
opcode * rx.h (enum RX_Operand_Type): Add RX_Operand_Zero_Indirect.
opcodes * rx-decode.opc (rx_disp): If the displacement is zero, set the
type to RX_Operand_Zero_Indirect.
* rx-decode.c: Regenerate.
* rx-dis (print_insn): Handle RX_Operand_Zero_Indirect.
gas * config/rx-parse.y: Allow zero value for 5-bit displacements.
tests * gas/rx/mov.sm: Add tests for zero offset indirect moves.
* gas/rx/mov.d: Update expected output.
Diffstat (limited to 'opcodes/rx-dis.c')
-rw-r--r-- | opcodes/rx-dis.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/opcodes/rx-dis.c b/opcodes/rx-dis.c index cab0385..6d4c41a 100644 --- a/opcodes/rx-dis.c +++ b/opcodes/rx-dis.c @@ -168,7 +168,7 @@ print_insn_rx (bfd_vma addr, disassemble_info * dis) oper = opcode.op + *s - '0'; if (do_size) { - if (oper->type == RX_Operand_Indirect) + if (oper->type == RX_Operand_Indirect || oper->type == RX_Operand_Zero_Indirect) PR (PS, "%s", size_names[oper->size]); } else @@ -189,10 +189,10 @@ print_insn_rx (bfd_vma addr, disassemble_info * dis) PR (PS, "%s", register_names[oper->reg]); break; case RX_Operand_Indirect: - if (oper->addend) - PR (PS, "%d[%s]", oper->addend, register_names[oper->reg]); - else - PR (PS, "[%s]", register_names[oper->reg]); + PR (PS, "%d[%s]", oper->addend, register_names[oper->reg]); + break; + case RX_Operand_Zero_Indirect: + PR (PS, "[%s]", register_names[oper->reg]); break; case RX_Operand_Postinc: PR (PS, "[%s+]", register_names[oper->reg]); |