This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] FT32: Fix disassembly of 10-bit literals
- From: James Bowman <james dot bowman at ftdichip dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 25 Sep 2015 01:16:21 +0000
- Subject: [PATCH] FT32: Fix disassembly of 10-bit literals
- Authentication-results: sourceware.org; auth=none
The FT32's disassembly of 10-bit literals has the incorrect mask.
OK to apply?
diff --git a/opcodes/ft32-dis.c b/opcodes/ft32-dis.c
index 877a7ee..1e01da2 100644
--- a/opcodes/ft32-dis.c
+++ b/opcodes/ft32-dis.c
@@ -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;