This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch for disassembly of j/jal


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;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]