/* Print mips instructions for GDB, the GNU debugger, or for objdump.
- Copyright (c) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp).
case 'a':
(*info->print_address_func)
- (((pc & ~ (bfd_vma) 0x0fffffff)
+ ((((pc + 4) & ~ (bfd_vma) 0x0fffffff)
| (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)),
info);
break;
if (reg == ((l >> OP_SH_RT) & OP_MASK_RT))
(*info->fprintf_func) (info->stream, "$%s",
reg_names[reg]);
- else
+ else
{
/* If one is zero use the other. */
if (reg == 0)
break;
case 'H':
- (*info->fprintf_func) (info->stream, "%d",
+ (*info->fprintf_func) (info->stream, "%d",
(l >> OP_SH_SEL) & OP_MASK_SEL);
break;
target_processor = CPU_MIPS64;
mips_isa = ISA_MIPS64;
break;
+ case bfd_mach_mips_sb1:
+ target_processor = CPU_SB1;
+ mips_isa = ISA_MIPS64;
+ break;
default:
target_processor = CPU_R3000;
mips_isa = ISA_MIPS3;
FIXME: Where does mips_target_info come from? */
target_processor = mips_target_info.processor;
mips_isa = mips_target_info.isa;
-#else
+#else
set_mips_isa_type (info->mach, &mips_isa, &target_processor);
-#endif
+#endif
info->bytes_per_chunk = 4;
info->display_endian = info->endian;
/* Only a few tools will work this way. */
if (memaddr & 0x01)
return print_insn_mips16 (memaddr, info);
-#endif
+#endif
#if SYMTAB_AVAILABLE
if (info->mach == 16
&& ((*(elf_symbol_type **) info->symbols)->internal_elf_sym.st_other
== STO_MIPS16)))
return print_insn_mips16 (memaddr, info);
-#endif
+#endif
status = (*info->read_memory_func) (memaddr, buffer, 4, info);
if (status == 0)
#if 1
if (memaddr & 0x01)
return print_insn_mips16 (memaddr, info);
-#endif
+#endif
#if SYMTAB_AVAILABLE
if (info->mach == 16
&& ((*(elf_symbol_type **) info->symbols)->internal_elf_sym.st_other
== STO_MIPS16)))
return print_insn_mips16 (memaddr, info);
-#endif
+#endif
status = (*info->read_memory_func) (memaddr, buffer, 4, info);
if (status == 0)
if (! use_extend)
extend = 0;
l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (extend << 2);
- (*info->print_address_func) ((memaddr & 0xf0000000) | l, info);
+ (*info->print_address_func) (((memaddr + 4) & 0xf0000000) | l, info);
info->insn_type = dis_jsr;
- info->target = (memaddr & 0xf0000000) | l;
+ info->target = ((memaddr + 4) & 0xf0000000) | l;
info->branch_delay_insns = 1;
break;