* Makefile.in: Regenerate.
[deliverable/binutils-gdb.git] / opcodes / sh-dis.c
index 7f403806dd4cf8f540e80a4773ee23e3b60f9bcc..966a10eb712af1b8fb019d3dcc37c19c3570fdcc 100644 (file)
@@ -1,5 +1,5 @@
 /* Disassemble SH instructions.
-   Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001
+   Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
@@ -24,15 +24,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "sh-opc.h"
 #include "dis-asm.h"
 
+#ifdef ARCH_all
+#define INCLUDE_SHMEDIA
+#endif
+
 static void print_movxy
-  PARAMS ((sh_opcode_info *, int, int, fprintf_ftype, void *));
+  PARAMS ((const sh_opcode_info *, int, int, fprintf_ftype, void *));
 static void print_insn_ddt PARAMS ((int, struct disassemble_info *));
 static void print_dsp_reg PARAMS ((int, fprintf_ftype, void *));
 static void print_insn_ppi PARAMS ((int, struct disassemble_info *));
 
 static void
 print_movxy (op, rn, rm, fprintf_fn, stream)
-     sh_opcode_info *op;
+     const sh_opcode_info *op;
      int rn, rm;
      fprintf_ftype fprintf_fn;
      void *stream;
@@ -101,8 +105,8 @@ print_insn_ddt (insn, info)
     fprintf_fn (stream, ".word 0x%x", insn);
   else
     {
-      static sh_opcode_info *first_movx, *first_movy;
-      sh_opcode_info *opx, *opy;
+      static const sh_opcode_info *first_movx, *first_movy;
+      const sh_opcode_info *opx, *opy;
       unsigned int insn_x, insn_y;
 
       if (! first_movx)
@@ -188,7 +192,7 @@ print_insn_ppi (field_b, info)
   void *stream = info->stream;
   unsigned int nib1, nib2, nib3;
   char *dc = NULL;
-  sh_opcode_info *op;
+  const sh_opcode_info *op;
 
   if ((field_b & 0xe800) == 0)
     {
@@ -294,7 +298,7 @@ print_insn_sh (memaddr, info)
   unsigned char nibs[4];
   int status;
   bfd_vma relmask = ~(bfd_vma) 0;
-  sh_opcode_info *op;
+  const sh_opcode_info *op;
   int target_arch;
 
   switch (info->mach)
@@ -304,7 +308,8 @@ print_insn_sh (memaddr, info)
       /* SH coff object files lack information about the machine type, so
          we end up with bfd_mach_sh unless it was set explicitly (which
         could have happended if this is a call from gdb or the simulator.)  */
-      if (bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
+      if (info->symbols
+         && bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
        target_arch = arch_sh4;
       break;
     case bfd_mach_sh2:
This page took 0.026645 seconds and 4 git commands to generate.