objdump shows wrong address vor loopt opcode Address is 1-extended, see mcore reference. Patch: diff -Naur binutils-2.16/opcodes/mcore-dis.c binutils-2.16.new/opcodes/mcore-dis.c --- binutils-2.16/opcodes/mcore-dis.c 2005-08-15 17:44:46.000000000 +0200 +++ binutils-2.16.new/opcodes/mcore-dis.c 2005-08-16 14:32:02.000000000 +0200 @@ -190,7 +190,7 @@ long val; val = (inst & 0x000F); fprintf (stream, "\t%s, 0x%x", - grname[(inst >> 4) & 0xF], memaddr - (val << 1)); + grname[(inst >> 4) & 0xF], memaddr + 2 + ((~ (unsigned long) 0x1f) | (val << 1)) ); } break;
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a38d139645fe557563c3c513b9175e07ceb5f5f8 commit a38d139645fe557563c3c513b9175e07ceb5f5f8 Author: Alan Modra <amodra@gmail.com> Date: Thu Jun 3 12:03:09 2021 +0930 PR1202, mcore disassembler: wrong address loopt Fixes a 16 year old bug report, which even came with a patch. opcodes/ PR 1202 * mcore-dis.c (print_insn_mcore): Correct loopt disassembly. Use unsigned int for inst. gas/ PR 1202 * testsuite/gas/mcore/allinsn.d: Correct loopt expected output.
Fixed, finally. We need more target maintainers.