2003-10-03 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / opcodes / mips-dis.c
index 927b02181b3af2ec72d148f0c5e34a0774e5e0d6..43fcb3ca79a2b5cd957b82a8db30e66399c9a0ec 100644 (file)
@@ -89,7 +89,7 @@ static const char * const mips_gpr_names_oldabi[32] = {
 
 static const char * const mips_gpr_names_newabi[32] = {
   "zero", "at",   "v0",   "v1",   "a0",   "a1",   "a2",   "a3",
-  "a4",   "a5",   "a6",   "a7",   "t4",   "t5",   "t6",   "t7",
+  "a4",   "a5",   "a6",   "a7",   "t0",   "t1",   "t2",   "t3",
   "s0",   "s1",   "s2",   "s3",   "s4",   "s5",   "s6",   "s7",
   "t8",   "t9",   "k0",   "k1",   "gp",   "sp",   "s8",   "ra"
 };
@@ -347,6 +347,10 @@ const struct mips_arch_choice mips_arch_choices[] = {
     mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
   { "r6000",   1, bfd_mach_mips6000, CPU_R6000, ISA_MIPS2,
     mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+  { "rm7000",  1, bfd_mach_mips7000, CPU_RM7000, ISA_MIPS4,
+    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+  { "rm9000",  1, bfd_mach_mips7000, CPU_RM7000, ISA_MIPS4,
+    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
   { "r8000",   1, bfd_mach_mips8000, CPU_R8000, ISA_MIPS4,
     mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
   { "r10000",  1, bfd_mach_mips10000, CPU_R10000, ISA_MIPS4,
@@ -380,6 +384,12 @@ const struct mips_arch_choice mips_arch_choices[] = {
     mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
     mips_hwr_names_numeric },
 
+  { "mips64r2",        1, bfd_mach_mipsisa64r2, CPU_MIPS64R2,
+    ISA_MIPS64R2 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX,
+    mips_cp0_names_mips3264r2,
+    mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
+    mips_hwr_names_mips3264r2 },
+
   { "sb1",     1, bfd_mach_mips_sb1, CPU_SB1,
     ISA_MIPS64 | INSN_MIPS3D | INSN_SB1,
     mips_cp0_names_sb1,
@@ -495,11 +505,11 @@ set_default_mips_dis_options (info)
   mips_hwr_names = mips_hwr_names_numeric;
 
   /* If an ELF "newabi" binary, use the n32/(n)64 GPR names.  */
-  if (info->flavour == bfd_target_elf_flavour && info->symbols != NULL)
+  if (info->flavour == bfd_target_elf_flavour && info->section != NULL)
     {
       Elf_Internal_Ehdr *header;
 
-      header = elf_elfheader (bfd_asymbol_bfd (*(info->symbols)));
+      header = elf_elfheader (info->section->owner);
       if (is_newabi (header))
        mips_gpr_names = mips_gpr_names_newabi;
     }
@@ -710,6 +720,7 @@ print_insn_args (d, l, pc, info)
              break;
 
            case 'C':
+           case 'H':
              msbd = (l >> OP_SH_EXTMSBD) & OP_MASK_EXTMSBD;
              (*info->fprintf_func) (info->stream, "0x%x", msbd + 1);
              break;
@@ -736,6 +747,21 @@ print_insn_args (d, l, pc, info)
                break;
              }
 
+           case 'E':
+             lsb = ((l >> OP_SH_SHAMT) & OP_MASK_SHAMT) + 32;
+             (*info->fprintf_func) (info->stream, "0x%x", lsb);
+             break;
+       
+           case 'F':
+             msb = ((l >> OP_SH_INSMSB) & OP_MASK_INSMSB) + 32;
+             (*info->fprintf_func) (info->stream, "0x%x", msb - lsb + 1);
+             break;
+
+           case 'G':
+             msbd = ((l >> OP_SH_EXTMSBD) & OP_MASK_EXTMSBD) + 32;
+             (*info->fprintf_func) (info->stream, "0x%x", msbd + 1);
+             break;
+
            default:
              /* xgettext:c-format */
              (*info->fprintf_func) (info->stream,
This page took 0.02369 seconds and 4 git commands to generate.