This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

[PATCH]: Fix HC12 disassembling 9/16-bit PC-relative addressing modes


Hi!

I've committed this patch to fix the PC-relative address reported for 9 and 16-bit
PC-relative addressing modes (the additional offset bytes were not taken into account
to compute the end-address).

	Stephane

2002-12-08  Stephane Carrez  <stcarrez@nerim.fr>

	* m68hc11-dis.c (print_indexed_operand): Fix PC-relative address
	for 9 and 16-bit PC-relative addressing mode.

Index: m68hc11-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/m68hc11-dis.c,v
retrieving revision 1.7
diff -u -p -r1.7 m68hc11-dis.c
--- m68hc11-dis.c	1 Dec 2002 09:53:21 -0000	1.7
+++ m68hc11-dis.c	8 Dec 2002 20:50:42 -0000
@@ -183,6 +183,7 @@ print_indexed_operand (memaddr, info, in
 	  sval = ((buffer[1] << 8) | (buffer[2] & 0x0FF));
 	  sval &= 0x0FFFF;
 	  pos += 2;
+          endaddr += 2;
 	}
       else
 	{
@@ -190,6 +191,7 @@ print_indexed_operand (memaddr, info, in
 	  if (buffer[0] & 0x01)
 	    sval |= 0xff00;
 	  pos++;
+          endaddr++;
 	}
       (*info->fprintf_func) (info->stream, "%d,%s",
 			     (int) sval, reg_name[reg]);

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