ia64 disas support
Taken from binutils SVN, using last GPLv2 version. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
45d679d643
commit
903ec55cc0
@ -231,6 +231,7 @@ libdis-$(CONFIG_ARM_DIS) += arm-dis.o
|
||||
libdis-$(CONFIG_CRIS_DIS) += cris-dis.o
|
||||
libdis-$(CONFIG_HPPA_DIS) += hppa-dis.o
|
||||
libdis-$(CONFIG_I386_DIS) += i386-dis.o
|
||||
libdis-$(CONFIG_IA64_DIS) += ia64-dis.o
|
||||
libdis-$(CONFIG_M68K_DIS) += m68k-dis.o
|
||||
libdis-$(CONFIG_MICROBLAZE_DIS) += microblaze-dis.o
|
||||
libdis-$(CONFIG_MIPS_DIS) += mips-dis.o
|
||||
|
4
configure
vendored
4
configure
vendored
@ -2658,6 +2658,10 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
|
||||
echo "CONFIG_I386_DIS=y" >> $config_target_mak
|
||||
echo "CONFIG_I386_DIS=y" >> $libdis_config_mak
|
||||
;;
|
||||
ia64*)
|
||||
echo "CONFIG_IA64_DIS=y" >> $config_target_mak
|
||||
echo "CONFIG_IA64_DIS=y" >> $libdis_config_mak
|
||||
;;
|
||||
m68k)
|
||||
echo "CONFIG_M68K_DIS=y" >> $config_target_mak
|
||||
echo "CONFIG_M68K_DIS=y" >> $libdis_config_mak
|
||||
|
@ -219,6 +219,9 @@ enum bfd_architecture
|
||||
#define bfd_mach_cris_v32 32
|
||||
#define bfd_mach_cris_v10_v32 1032
|
||||
bfd_arch_microblaze, /* Xilinx MicroBlaze. */
|
||||
bfd_arch_ia64, /* HP/Intel ia64 */
|
||||
#define bfd_mach_ia64_elf64 64
|
||||
#define bfd_mach_ia64_elf32 32
|
||||
bfd_arch_last
|
||||
};
|
||||
#define bfd_mach_s390_31 31
|
||||
@ -401,6 +404,7 @@ extern int print_insn_ppc (bfd_vma, disassemble_info*);
|
||||
extern int print_insn_s390 (bfd_vma, disassemble_info*);
|
||||
extern int print_insn_crisv32 (bfd_vma, disassemble_info*);
|
||||
extern int print_insn_microblaze (bfd_vma, disassemble_info*);
|
||||
extern int print_insn_ia64 (bfd_vma, disassemble_info*);
|
||||
|
||||
#if 0
|
||||
/* Fetch the disassembler for a given BFD, if that support is available. */
|
||||
@ -468,6 +472,7 @@ extern int generic_symbol_at_address (bfd_vma, struct disassemble_info *);
|
||||
|
||||
/* from libbfd */
|
||||
|
||||
bfd_vma bfd_getl64 (const bfd_byte *addr);
|
||||
bfd_vma bfd_getl32 (const bfd_byte *addr);
|
||||
bfd_vma bfd_getb32 (const bfd_byte *addr);
|
||||
bfd_vma bfd_getl16 (const bfd_byte *addr);
|
||||
|
17
disas.c
17
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);
|
||||
|
10598
ia64-dis.c
Normal file
10598
ia64-dis.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user