Revision 6af0bf9c disas.c
b/disas.c | ||
---|---|---|
108 | 108 |
return (bfd_vma) v; |
109 | 109 |
} |
110 | 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 |
|
|
111 | 129 |
#ifdef TARGET_ARM |
112 | 130 |
static int |
113 | 131 |
print_insn_thumb1(bfd_vma pc, disassemble_info *info) |
... | ... | |
162 | 180 |
if (cpu_single_env->msr[MSR_LE]) |
163 | 181 |
disasm_info.endian = BFD_ENDIAN_LITTLE; |
164 | 182 |
print_insn = print_insn_ppc; |
183 |
#elif defined(TARGET_MIPS) |
|
184 |
print_insn = print_insn_big_mips; |
|
165 | 185 |
#else |
166 | 186 |
fprintf(out, "0x" TARGET_FMT_lx |
167 | 187 |
": Asm output not supported on this arch\n", code); |
... | ... | |
222 | 242 |
print_insn = print_insn_sparc; |
223 | 243 |
#elif defined(__arm__) |
224 | 244 |
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; |
|
225 | 249 |
#else |
226 | 250 |
fprintf(out, "0x%lx: Asm output not supported on this arch\n", |
227 | 251 |
(long) code); |
... | ... | |
332 | 356 |
print_insn = print_insn_sparc; |
333 | 357 |
#elif defined(TARGET_PPC) |
334 | 358 |
print_insn = print_insn_ppc; |
359 |
#elif defined(TARGET_MIPS) |
|
360 |
print_insn = print_insn_big_mips; |
|
335 | 361 |
#else |
336 | 362 |
term_printf("0x" TARGET_FMT_lx |
337 | 363 |
": Asm output not supported on this arch\n", pc); |
Also available in: Unified diff