+2016-11-03 Graham Markall <graham.markall@embecosm.com>
+
+ * arc-dis.c (print_insn_arc): Swap highbyte and lowbyte.
+
2016-11-03 Graham Markall <graham.markall@embecosm.com>
* arc-dis.c (find_format_from_table): Replace use of ARC_SHORT
}
memset (&iter, 0, sizeof (iter));
- lowbyte = ((info->endian == BFD_ENDIAN_LITTLE) ? 1 : 0);
- highbyte = ((info->endian == BFD_ENDIAN_LITTLE) ? 0 : 1);
+ highbyte = ((info->endian == BFD_ENDIAN_LITTLE) ? 1 : 0);
+ lowbyte = ((info->endian == BFD_ENDIAN_LITTLE) ? 0 : 1);
if (info->section && info->section->owner)
header = elf_elfheader (info->section->owner);
return size;
}
- insn_len = arc_insn_length (buffer[lowbyte], buffer[highbyte], info);
+ insn_len = arc_insn_length (buffer[highbyte], buffer[lowbyte], info);
pr_debug ("instruction length = %d bytes\n", insn_len);
switch (insn_len)
{
case 2:
- insn[0] = (buffer[lowbyte] << 8) | buffer[highbyte];
+ insn[0] = (buffer[highbyte] << 8) | buffer[lowbyte];
break;
default: