From 9117d2197e67b24a86d8a48e489e4463a6151220 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Sun, 11 Feb 2001 23:11:41 +0000 Subject: Apply several patches from Maciej W. Rozycki --- opcodes/ChangeLog | 7 +++++++ opcodes/mips-dis.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 6c93aa7..dfca2e9 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2001-02-11 Maciej W. Rozycki + + * mips-dis.c (print_insn_arg): Use top four bits of the address of + the following instruction not of the jump itself for the jump + target. + (print_mips16_insn_arg): Likewise. + 2001-02-11 Michael Sokolov * Makefile.am (stamp-lib): ranlib the libopcodes.a in the build diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c index a75dc89..849f9f2 100644 --- a/opcodes/mips-dis.c +++ b/opcodes/mips-dis.c @@ -137,7 +137,7 @@ print_insn_arg (d, l, pc, info) case 'a': (*info->print_address_func) - (((pc & ~ (bfd_vma) 0x0fffffff) + ((((pc + 4) & ~ (bfd_vma) 0x0fffffff) | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)), info); break; @@ -1038,9 +1038,9 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info) if (! use_extend) extend = 0; l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (extend << 2); - (*info->print_address_func) ((memaddr & 0xf0000000) | l, info); + (*info->print_address_func) (((memaddr + 4) & 0xf0000000) | l, info); info->insn_type = dis_jsr; - info->target = (memaddr & 0xf0000000) | l; + info->target = ((memaddr + 4) & 0xf0000000) | l; info->branch_delay_insns = 1; break; -- cgit v1.1