This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Patch for disassembly of j/jal
- To: binutils at sourceware dot cygnus dot com
- Subject: Patch for disassembly of j/jal
- From: Ulf Carlsson <ulfc at calypso dot engr dot sgi dot com>
- Date: Sat, 8 Apr 2000 23:53:03 -0700 (PDT)
Hi,
If the target address for 'j' or 'jal' are 64-bit, they will get truncated in
a disassembly. I have attached a simple fix for this.
2000-04-09 Ulf Carlsson <ulfc@engr.sgi.com>
* mips-dis.c (print_insn_arg): Print 64-bit target addresses for
'jal' and 'j' correcly.
diff -u binutils-current.orig/opcodes/mips-dis.c binutils-current/opcodes/mips-dis.c
--- binutils-current.orig/opcodes/mips-dis.c Tue Feb 22 09:41:46 2000
+++ binutils-current/opcodes/mips-dis.c Tue Apr 4 19:29:31 2000
@@ -133,7 +133,7 @@
case 'a':
(*info->print_address_func)
- (((pc & 0xF0000000) | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)),
+ (((pc & ~0x0fffffff) | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)),
info);
break;