The FT32's disassembly of 10-bit literals has the incorrect mask.
authorjamesbowman <jamesb@excamera.com>
Fri, 25 Sep 2015 19:33:30 +0000 (12:33 -0700)
committerjamesbowman <jamesb@excamera.com>
Fri, 25 Sep 2015 19:33:30 +0000 (12:33 -0700)
[opcodes]
* ft32-dis.c (print_insn_ft32): Fix incorrect data field mask.

binutils/ChangeLog
opcodes/ft32-dis.c

index be987ec0101b0409de73c62cd36e250790675bd5..8dd62161fded364b369d14c0a1492f7ad805af89 100644 (file)
@@ -1,3 +1,7 @@
+2015-09-25  James Bowman  <james.bowman@ftdichip.com>
+
+       * ft32-dis.c (print_insn_ft32): Fix incorrect data field mask.
+
 2015-09-23  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/15835
index 877a7eeece420dd27b5d87ab81b0da312d67a06e..1e01da26020f1e46a9b1b932065eb3c55a443eb0 100644 (file)
@@ -118,7 +118,7 @@ print_insn_ft32 (bfd_vma addr, struct disassemble_info *info)
               case  FT32_FLD_RIMM:
                 imm = (iword >> FT32_FLD_RIMM_BIT) & ((1 << FT32_FLD_RIMM_SIZ) - 1);
                 if (imm & 0x400)
-                  info->print_address_func ((bfd_vma) imm & 0x1ff, info);
+                  info->print_address_func ((bfd_vma) imm & 0x3ff, info);
                 else
                   fpr(stream, "$r%d", imm & 0x1f);
                 break;