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]

Re: AM33 disassembler: fix for long-standing bug


On Apr 14, 2000, Alexandre Oliva <aoliva@cygnus.com> wrote:

> Here's a patch.

Oops, old patch file.  Here's the right one (the only difference is
that it doesn't needlessly check whether info->mach == 0)

> Ok to install?  Binutils release branch?  GDB release branch?

Index: opcodes/ChangeLog
by  Alexandre Oliva  <aoliva@cygnus.com>

	* m10300-dis.c (HAVE_AM30, HAVE_AM33): Define.
	(disassemble): Use them.

Index: opcodes/m10300-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/m10300-dis.c,v
retrieving revision 1.2
diff -u -r1.2 m10300-dis.c
--- opcodes/m10300-dis.c	1999/12/01 10:36:22	1.2
+++ opcodes/m10300-dis.c	2000/04/12 20:45:49
@@ -26,6 +26,9 @@
 static void disassemble PARAMS ((bfd_vma, struct disassemble_info *,
 				 unsigned long insn, unsigned int));
 
+#define HAVE_AM33 (info->mach == AM33)
+#define HAVE_AM30 (info->mach == AM30 || HAVE_AM33)
+
 int 
 print_insn_mn10300 (memaddr, info)
      bfd_vma memaddr;
@@ -250,7 +253,8 @@
       if ((op->mask & insn) == op->opcode
 	  && size == (unsigned int) mysize
 	  && (op->machine == 0
-	      || op->machine == info->mach))
+	      || (op->machine == AM33 && HAVE_AM33)
+	      || (op->machine == AM30 && HAVE_AM30)))
 	{
 	  const unsigned char *opindex_ptr;
 	  unsigned int nocomma;

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

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