OSDN Git Service

* opcodes/microblaze-dis.c: Add include for microblaze-dis.h,
authoreager <eager>
Wed, 7 Oct 2009 15:40:17 +0000 (15:40 +0000)
committereager <eager>
Wed, 7 Oct 2009 15:40:17 +0000 (15:40 +0000)
eliminate local extern decls.
* opcodes/microblaze-dis.h: New.

opcodes/ChangeLog
opcodes/microblaze-dis.c
opcodes/microblaze-dis.h [new file with mode: 0644]

index ec598ef..1761067 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-07  Michael Eager  <eager@eagercon.com>
+
+       * opcodes/microblaze-dis.c: Add include for microblaze-dis.h,
+       eliminate local extern decls.
+       * opcodes/microblaze-dis.h: New.
+
 2009-10-06  Nick Clifton  <nickc@redhat.com>
 
        * po/fi.po: Updated Finnish translation.
index 178415e..b4723c2 100644 (file)
 #define STATIC_TABLE
 #define DEFINE_TABLE
 
-#include "microblaze-opc.h"
 #include "dis-asm.h"
 #include <strings.h>
+#include "microblaze-opc.h"
+#include "microblaze-dis.h"
 
 #define get_field_rd(instr)        get_field (instr, RD_MASK, RD_LOW)
 #define get_field_r1(instr)        get_field (instr, RA_MASK, RA_LOW)
@@ -34,6 +35,8 @@
 #define get_int_field_imm(instr)   ((instr & IMM_MASK) >> IMM_LOW)
 #define get_int_field_r1(instr)    ((instr & RA_MASK) >> RA_LOW)
 
+
+
 static char *
 get_field (long instr, long mask, unsigned short low)
 {
@@ -388,8 +391,8 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
   /* Say how many bytes we consumed.  */
   return 4;
 }
-#if 0
-static enum microblaze_instr
+
+enum microblaze_instr
 get_insn_microblaze (long inst,
                     bfd_boolean *isunsignedimm,
                     enum microblaze_instr_type *insn_type,
@@ -414,21 +417,6 @@ get_insn_microblaze (long inst,
     }
 }
 
-short
-get_delay_slots_microblaze (long inst)
-{
-  bfd_boolean isunsignedimm;
-  enum microblaze_instr_type insn_type;
-  enum microblaze_instr op;
-  short delay_slots;
-
-  op = get_insn_microblaze (inst, &isunsignedimm, &insn_type, &delay_slots);
-  if (op == invalid_inst)
-    return 0;
-  else
-    return delay_slots;
-}
-
 enum microblaze_instr
 microblaze_decode_insn (long insn, int *rd, int *ra, int *rb, int *imm)
 {
@@ -524,4 +512,3 @@ microblaze_get_target_address (long inst, bfd_boolean immfound, int immval,
     *targetvalid = FALSE;
   return targetaddr;
 }
-#endif
diff --git a/opcodes/microblaze-dis.h b/opcodes/microblaze-dis.h
new file mode 100644 (file)
index 0000000..4742bbc
--- /dev/null
@@ -0,0 +1,34 @@
+/* Disassemble Xilinx microblaze instructions.
+
+   Copyright 2009 Free Software Foundation, Inc.
+
+   This file is part of the GNU opcodes library.
+
+   This library is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   It is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this file; see the file COPYING.  If not, write to the
+   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+#ifndef MICROBLAZE_DIS_H
+#define MICROBLAZE_DIS_H 1
+
+extern enum microblaze_instr microblaze_decode_insn (long, int *, int *, 
+                                                    int *, int *);
+extern unsigned long microblaze_get_target_address (long, bfd_boolean, int,
+                              long, long, long, bfd_boolean *, bfd_boolean *);
+
+extern enum microblaze_instr get_insn_microblaze (long, bfd_boolean *, 
+                                                 enum microblaze_instr_type *,
+                                                 short *);
+
+#endif /* microblaze-dis.h */