Fix autoconf breakage + commit target.c, omitted in previous delta
[deliverable/binutils-gdb.git] / opcodes / mips-dis.c
index 61f67880e1536a0b382d9efdf09dd7754b3f8b33..4af8822df045b6607f1105bcd0f18f0d3f818bbd 100644 (file)
@@ -1,5 +1,6 @@
 /* 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).
 
@@ -137,7 +138,7 @@ print_insn_arg (d, l, pc, info)
 
     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;
@@ -164,7 +165,7 @@ print_insn_arg (d, l, pc, info)
       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)
@@ -263,7 +264,7 @@ print_insn_arg (d, l, pc, info)
       break;
 
     case 'H':
-      (*info->fprintf_func) (info->stream, "%d", 
+      (*info->fprintf_func) (info->stream, "%d",
                             (l >> OP_SH_SEL) & OP_MASK_SEL);
       break;
 
@@ -371,6 +372,10 @@ set_mips_isa_type (mach, isa, cputype)
       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;
@@ -426,9 +431,9 @@ _print_insn_mips (memaddr, word, info)
      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;
@@ -485,7 +490,7 @@ print_insn_big_mips (memaddr, info)
   /* 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
@@ -494,7 +499,7 @@ print_insn_big_mips (memaddr, info)
          && ((*(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)
@@ -519,7 +524,7 @@ print_insn_little_mips (memaddr, info)
 #if 1
   if (memaddr & 0x01)
     return print_insn_mips16 (memaddr, info);
-#endif  
+#endif
 
 #if SYMTAB_AVAILABLE
   if (info->mach == 16
@@ -528,7 +533,7 @@ print_insn_little_mips (memaddr, info)
          && ((*(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)
@@ -1034,9 +1039,9 @@ print_mips16_insn_arg (type, op, l, use_extend, extend, memaddr, info)
       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;
 
This page took 0.025223 seconds and 4 git commands to generate.