108 |
return (bfd_vma) v; |
return (bfd_vma) v; |
109 |
} |
} |
110 |
|
|
111 |
|
bfd_vma bfd_getl16 (const bfd_byte *addr) |
112 |
|
{ |
113 |
|
unsigned long v; |
114 |
|
|
115 |
|
v = (unsigned long) addr[0]; |
116 |
|
v |= (unsigned long) addr[1] << 8; |
117 |
|
return (bfd_vma) v; |
118 |
|
} |
119 |
|
|
120 |
|
bfd_vma bfd_getb16 (const bfd_byte *addr) |
121 |
|
{ |
122 |
|
unsigned long v; |
123 |
|
|
124 |
|
v = (unsigned long) addr[0] << 24; |
125 |
|
v |= (unsigned long) addr[1] << 16; |
126 |
|
return (bfd_vma) v; |
127 |
|
} |
128 |
|
|
129 |
#ifdef TARGET_ARM |
#ifdef TARGET_ARM |
130 |
static int |
static int |
131 |
print_insn_thumb1(bfd_vma pc, disassemble_info *info) |
print_insn_thumb1(bfd_vma pc, disassemble_info *info) |
180 |
if (cpu_single_env->msr[MSR_LE]) |
if (cpu_single_env->msr[MSR_LE]) |
181 |
disasm_info.endian = BFD_ENDIAN_LITTLE; |
disasm_info.endian = BFD_ENDIAN_LITTLE; |
182 |
print_insn = print_insn_ppc; |
print_insn = print_insn_ppc; |
183 |
|
#elif defined(TARGET_MIPS) |
184 |
|
print_insn = print_insn_big_mips; |
185 |
#else |
#else |
186 |
fprintf(out, "0x" TARGET_FMT_lx |
fprintf(out, "0x" TARGET_FMT_lx |
187 |
": Asm output not supported on this arch\n", code); |
": Asm output not supported on this arch\n", code); |
242 |
print_insn = print_insn_sparc; |
print_insn = print_insn_sparc; |
243 |
#elif defined(__arm__) |
#elif defined(__arm__) |
244 |
print_insn = print_insn_arm; |
print_insn = print_insn_arm; |
245 |
|
#elif defined(__MIPSEB__) |
246 |
|
print_insn = print_insn_big_mips; |
247 |
|
#elif defined(__MIPSEL__) |
248 |
|
print_insn = print_insn_little_mips; |
249 |
#else |
#else |
250 |
fprintf(out, "0x%lx: Asm output not supported on this arch\n", |
fprintf(out, "0x%lx: Asm output not supported on this arch\n", |
251 |
(long) code); |
(long) code); |
356 |
print_insn = print_insn_sparc; |
print_insn = print_insn_sparc; |
357 |
#elif defined(TARGET_PPC) |
#elif defined(TARGET_PPC) |
358 |
print_insn = print_insn_ppc; |
print_insn = print_insn_ppc; |
359 |
|
#elif defined(TARGET_MIPS) |
360 |
|
print_insn = print_insn_big_mips; |
361 |
#else |
#else |
362 |
term_printf("0x" TARGET_FMT_lx |
term_printf("0x" TARGET_FMT_lx |
363 |
": Asm output not supported on this arch\n", pc); |
": Asm output not supported on this arch\n", pc); |