X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fvisium-dis.c;h=851c5460c97eca10f5df9ccf41dace96884388b5;hb=3af96c0d99dedab49d2b82b730c74c27ce99bba4;hp=e72172f908d481dd9cae85904686df5b5ba44a13;hpb=219d1afa89d0d53ca93a684cac341f16470f3ca0;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/visium-dis.c b/opcodes/visium-dis.c index e72172f908..851c5460c9 100644 --- a/opcodes/visium-dis.c +++ b/opcodes/visium-dis.c @@ -1,6 +1,6 @@ /* Single instruction disassembler for the Visium. - Copyright (C) 2002-2018 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"); @@ -166,7 +166,7 @@ disassem_class0 (disassemble_info *info, unsigned int ins) } return 0; -illegal_opcode: + illegal_opcode: return -1; } @@ -421,7 +421,7 @@ disassem_class1 (disassemble_info *info, unsigned int ins) return 0; -illegal_opcode: + illegal_opcode: return -1; } @@ -518,7 +518,7 @@ disassem_class2 (disassemble_info *info, unsigned int ins) return 0; -illegal_opcode: + illegal_opcode: return -1; } @@ -747,7 +747,7 @@ disassem_class3 (disassemble_info *info, unsigned int ins) return 0; -illegal_opcode: + illegal_opcode: return -1; } @@ -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];