summaryrefslogtreecommitdiff
path: root/opcodes/v850-dis.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-10-04 10:30:02 +0000
committerNick Clifton <nickc@redhat.com>2012-10-04 10:30:02 +0000
commit227a95c1501f1435a05bad8e9e62e0a609acaad0 (patch)
treeab68d6f092485ac20c481d7cd063e37ef62962a9 /opcodes/v850-dis.c
parenta58ee29a03f963c1d79c3ba43f3d9911d6097ebd (diff)
downloadbinutils-redhat-227a95c1501f1435a05bad8e9e62e0a609acaad0.tar.gz
* v850-dis.c (disassemble): Place square parentheses around second
register operand of clr1, not1, set1 and tst1 instructions. * config/tc-v850.c (v850_insert_operand): Use a static buffer for the error message. * gas/v850/v850e1.d: Fix expected disassembly of clr1, not1, set1 and tst1 insns.
Diffstat (limited to 'opcodes/v850-dis.c')
-rw-r--r--opcodes/v850-dis.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/opcodes/v850-dis.c b/opcodes/v850-dis.c
index 60b452bf79..5f9d87b8f8 100644
--- a/opcodes/v850-dis.c
+++ b/opcodes/v850-dis.c
@@ -309,9 +309,11 @@ disassemble (bfd_vma memaddr, struct disassemble_info *info, int bytes_read, uns
We may need to output a trailing ']' if the last operand
in an instruction is the register for a memory address.
- The exception (and there's always an exception) is the
+ The exception (and there's always an exception) are the
"jmp" insn which needs square brackets around it's only
- register argument. */
+ register argument, and the clr1/not1/set1/tst1 insns
+ which [...] around their second register argument. */
+
prefix = "";
if (operand->flags & V850_OPERAND_BANG)
{
@@ -334,6 +336,16 @@ disassemble (bfd_vma memaddr, struct disassemble_info *info, int bytes_read, uns
info->fprintf_func (info->stream, "%s[", prefix);
square = TRUE;
}
+ else if (opnum == 2
+ && ( op->opcode == 0x00e407e0 /* clr1 */
+ || op->opcode == 0x00e207e0 /* not1 */
+ || op->opcode == 0x00e007e0 /* set1 */
+ || op->opcode == 0x00e607e0 /* tst1 */
+ ))
+ {
+ info->fprintf_func (info->stream, ", %s[", prefix);
+ square = TRUE;
+ }
else if (opnum > 1)
info->fprintf_func (info->stream, ", %s", prefix);