[PATCH] opcodes: Fix branch displacement mask in M*Core disassembler
Alan Modra
amodra@gmail.com
Sat Jan 24 03:32:29 GMT 2026
On Fri, Jan 23, 2026 at 02:38:28PM +0100, Michal Sobon wrote:
> --- a/opcodes/mcore-dis.c
> +++ b/opcodes/mcore-dis.c
> @@ -199,7 +199,7 @@ print_insn_mcore (bfd_vma memaddr,
>
> case BR:
> {
> - uint32_t val = ((inst & 0x3FF) ^ 0x400) - 0x400;
> + uint32_t val = ((inst & 0x7FF) ^ 0x400) - 0x400;
>
> val = memaddr + 2 + (val << 1);
> (*print_func) (stream, "\t0x%x", val);
Thanks for fixing an error I introduced. Applied.
--
Alan Modra
More information about the Binutils
mailing list