X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=opcodes%2Fvisium-dis.c;h=5f706c81322a31e92750520bb58e5790c31df905;hb=1e05b5c489289e60aac4e5cb73dd4b73ddfaaa32;hp=eb2930b74a6d07b0cedb5538764411241620634d;hpb=88c1242dc0a1e1ab582a65ea8bd05eb5f244c59b;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/visium-dis.c b/opcodes/visium-dis.c index eb2930b74a..5f706c8132 100644 --- a/opcodes/visium-dis.c +++ b/opcodes/visium-dis.c @@ -1,6 +1,6 @@ /* Single instruction disassembler for the Visium. - Copyright (C) 2002-2017 Free Software Foundation, Inc. + Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU opcodes library. @@ -94,7 +94,7 @@ disassem_class0 (disassemble_info *info, unsigned int ins) /* BRR instruction. */ { unsigned cbf = (ins >> 27) & 0x000f; - int displacement = ((int) (ins << 16)) >> 16; + int displacement = ((ins & 0xffff) ^ 0x8000) - 0x8000; if (ins == 0) (*info->fprintf_func) (info->stream, "nop"); @@ -189,7 +189,7 @@ disassem_class1 (disassemble_info *info, unsigned int ins) { case 0: /* Stop. */ - (*info->fprintf_func) (info->stream, "stop"); + (*info->fprintf_func) (info->stream, "stop %d,r%d", indx, source_a); break; case 1: /* BMI - Block Move Indirect. */ @@ -789,7 +789,7 @@ print_insn_visium (bfd_vma addr, disassemble_info *info) /* Get 32-bit instruction word. */ FETCH_DATA (info, buffer + 4); - ins = buffer[0] << 24; + ins = (unsigned) buffer[0] << 24; ins |= buffer[1] << 16; ins |= buffer[2] << 8; ins |= buffer[3];