Patch for disassembly of j/jal

Ulf Carlsson ulfc@calypso.engr.sgi.com
Sun Apr 9 00:56:00 GMT 2000


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;
 



More information about the Binutils mailing list