* bfin-dis.c (print_insn_bfin): Do proper endian transform when
authorJie Zhang <jie.zhang@analog.com>
Tue, 18 Oct 2005 16:39:41 +0000 (16:39 +0000)
committerJie Zhang <jie.zhang@analog.com>
Tue, 18 Oct 2005 16:39:41 +0000 (16:39 +0000)
reading instruction from memory.

opcodes/ChangeLog
opcodes/bfin-dis.c

index 6bfdb7ceb75005c8ab51218ca96b2520541cd2ce..7f878692ff712ffc1e2cc90d05983877bb0d14c4 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-18  Jie Zhang  <jie.zhang@analog.com>
+
+       * bfin-dis.c (print_insn_bfin): Do proper endian transform when
+       reading instruction from memory.
+
 2005-10-18  Nick Clifton  <nickc@redhat.com>
 
        * m32r-asm.c: Regenerate after updating m32r.opc.
index 2714e9094727446d5fc86b77568b21e354dc98f2..08f9d23c5b8ce9f81d626d438bffecaff67491c0 100644 (file)
@@ -5765,13 +5765,18 @@ illegal_instruction:
 int
 print_insn_bfin (bfd_vma pc, disassemble_info *outf)
 {
-  short iw0 = 0;
-  int status = 0;
+  bfd_byte buf[2];
+  unsigned short iw0;
+  int status;
   int count = 0;
-  status = (*outf->read_memory_func) (pc & ~0x01, (bfd_byte *) & iw0, 2, outf);
+
+  status = (*outf->read_memory_func) (pc & ~0x01, buf, 2, outf);
+  iw0 = bfd_getl16 (buf);
 
   count += _print_insn_bfin (pc, outf);
+
   /* Proper display of multiple issue instructions.  */
+
   if ((iw0 & 0xc000) == 0xc000 && (iw0 & BIT_MULTI_INS)
       && ((iw0 & 0xe800) != 0xe800 /* not Linkage */ ))
     {
This page took 0.044921 seconds and 4 git commands to generate.