The Blackfin ISA is very exact with regards to address truncation when
under/over flowing its 32bit range. On a 32bit system, things work the
same and so addresses are decoded properly. On a 64bit system though,
the decoded addresses may include the bits that are supposed to have
been truncated. So force a 32bit truncation after the address has been
calculated.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+2010-09-22 Robin Getz <robin.getz@analog.com>
+
+ * bfin-dis.c (fmtconst): Cast address to 32bits.
+
2010-09-22 Mike Frysinger <vapier@gentoo.org>
* bfin-dis.c (decode_REGMV_0): Rewrite valid combo checks.
if (constant_formats[cf].pcrel)
ea += pc;
+ /* truncate to 32-bits for proper symbol lookup/matching */
+ ea = (bu32)ea;
+
if (outf->symbol_at_address_func (ea, outf) || !constant_formats[cf].exact)
{
outf->print_address_func (ea, outf);