aboutsummaryrefslogtreecommitdiffstats
path: root/disas.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-03-29 02:12:51 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-04-01 21:51:59 +0200
commit903ec55cc00d0bf65573ae0b185e9b8c3593f930 (patch)
treee65463698854a5c6a6ce2437dafa3b98e5efd5ae /disas.c
parent45d679d64350c44df93d918ddacd6ae0c6da9dbb (diff)
ia64 disas support
Taken from binutils SVN, using last GPLv2 version. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'disas.c')
-rw-r--r--disas.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/disas.c b/disas.c
index f7bcce748..79a98ded8 100644
--- a/disas.c
+++ b/disas.c
@@ -73,6 +73,21 @@ generic_symbol_at_address (bfd_vma addr, struct disassemble_info *info)
return 1;
}
+bfd_vma bfd_getl64 (const bfd_byte *addr)
+{
+ unsigned long long v;
+
+ v = (unsigned long long) addr[0];
+ v |= (unsigned long long) addr[1] << 8;
+ v |= (unsigned long long) addr[2] << 16;
+ v |= (unsigned long long) addr[3] << 24;
+ v |= (unsigned long long) addr[4] << 32;
+ v |= (unsigned long long) addr[5] << 40;
+ v |= (unsigned long long) addr[6] << 48;
+ v |= (unsigned long long) addr[7] << 56;
+ return (bfd_vma) v;
+}
+
bfd_vma bfd_getl32 (const bfd_byte *addr)
{
unsigned long v;
@@ -278,6 +293,8 @@ void disas(FILE *out, void *code, unsigned long size)
print_insn = print_insn_s390;
#elif defined(__hppa__)
print_insn = print_insn_hppa;
+#elif defined(__ia64__)
+ print_insn = print_insn_ia64;
#else
fprintf(out, "0x%lx: Asm output not supported on this arch\n",
(long) code);