X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fv850-dis.c;h=cf0d3860d3688bc4ab6777501689bc0c5c078150;hb=bbc40cf228fff7b7e0c3d0856d8887949cdde54b;hp=c3624b21f4be92934709788980aab351220c5cd7;hpb=1cd986c58543909402a33d84b7821d0d7be17005;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/v850-dis.c b/opcodes/v850-dis.c index c3624b21f4..cf0d3860d3 100644 --- a/opcodes/v850-dis.c +++ b/opcodes/v850-dis.c @@ -283,6 +283,7 @@ disassemble (bfd_vma memaddr, struct disassemble_info *info, int bytes_read, uns *opindex_ptr != 0; opindex_ptr++, opnum++) { + bfd_boolean square = FALSE; long value; int flag; char *prefix; @@ -323,11 +324,17 @@ disassemble (bfd_vma memaddr, struct disassemble_info *info, int bytes_read, uns } if (opnum == 1 && opnum == memop) - info->fprintf_func (info->stream, "%s[", prefix); + { + info->fprintf_func (info->stream, "%s[", prefix); + square = TRUE; + } else if (opnum > 1 && (v850_operands[*(opindex_ptr - 1)].flags & V850_OPERAND_DISP) != 0 && opnum == memop) - info->fprintf_func (info->stream, "%s[", prefix); + { + info->fprintf_func (info->stream, "%s[", prefix); + square = TRUE; + } else if (opnum > 1) info->fprintf_func (info->stream, ", %s", prefix); @@ -431,7 +438,7 @@ disassemble (bfd_vma memaddr, struct disassemble_info *info, int bytes_read, uns break; } - if (opnum == 2 && opnum == memop) + if (square) (*info->fprintf_func) (info->stream, "]"); }