This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Fixes to MicroBlaze opcodes files
- From: Michael Eager <eager at eagercon dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Mon, 05 Oct 2009 18:47:19 -0700
- Subject: [PATCH] Fixes to MicroBlaze opcodes files
Here's a patch to the MicroBlaze opcode/disassembler
files which is needed by GDB.
2009-10-05 Michael Eager <eager@eagercon.com>
* opcodes/microblaze-dis.c: Add include for microblaze-dis.h,
eliminate local extern decls.
* opcodes/microblaze-dis.h: New.
This builds for xilinx-microblaze-elf.
I'll check this in tomorrow unless I hear objections.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
diff -urNp --exclude '*.swp' --exclude DEV-PHASE --exclude .svn --exclude CVS gdb/opcodes/microblaze-dis.c mb-gdb/opcodes/microblaze-dis.c
--- gdb/opcodes/microblaze-dis.c 2009-09-25 12:59:51.000000000 -0700
+++ mb-gdb/opcodes/microblaze-dis.c 2009-10-05 14:18:58.000000000 -0700
@@ -24,9 +24,10 @@
#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)
@@ -35,11 +36,6 @@
#define get_int_field_r1(instr) ((instr & RA_MASK) >> RA_LOW)
-enum microblaze_instr get_insn_microblaze (long, bfd_boolean *,
- enum microblaze_instr_type *, short *);
-unsigned long microblaze_get_target_address (long, bfd_boolean, int, long, long,
- long, bfd_boolean *, bfd_boolean *);
-enum microblaze_instr microblaze_decode_insn (long insn, int *rd, int *ra, int *rb, int *imm);
static char *
get_field (long instr, long mask, unsigned short low)
diff -urNp --exclude '*.swp' --exclude DEV-PHASE --exclude .svn --exclude CVS gdb/opcodes/microblaze-dis.h mb-gdb/opcodes/microblaze-dis.h
--- gdb/opcodes/microblaze-dis.h 1969-12-31 16:00:00.000000000 -0800
+++ mb-gdb/opcodes/microblaze-dis.h 2009-10-05 14:11:15.000000000 -0700
@@ -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 */