aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opcodes/ChangeLog24
-rw-r--r--opcodes/a29k-dis.c26
-rw-r--r--opcodes/i960-dis.c101
-rw-r--r--opcodes/mips-dis.c4
-rw-r--r--opcodes/s390-dis.c6
5 files changed, 100 insertions, 61 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index add1029..87af331 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,19 @@
+2001-08-21 Andreas Jaeger <aj@suse.de>
+
+ * i960-dis.c: Add parameters for prototypes
+ (ctrl): Add unused attributes.
+ (cobr): Likewise.
+ (put_abs): Likewise.
+
+ * mips-dis.c: Add missing prototypes.
+ * a29k-dis.c: Likewise.
+ * arc-dis.c: Likewise.
+ * ia64-opc.c: Likewise.
+
+ * s390-dis.c: Add missing prototypes.
+ (init_disasm): Remove unused attribute since the parameter is
+ used.
+
2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* mips-opc.c (M1): Define. Reformatted Code.
@@ -72,8 +88,8 @@
2001-07-28 Matthias Kramm <kramm@quiss.org>
- * i386-dis.c: Change formatting conventions for architecture
- i386:intel to better match the format of various intel i386
+ * i386-dis.c: Change formatting conventions for architecture
+ i386:intel to better match the format of various intel i386
assemblers, like nasm, tasm or masm.
2001-07-24 Alan Modra <amodra@bigpond.net.au>
@@ -116,9 +132,9 @@
* cgen-asm.in: Include "xregex.h" always to enable the libiberty
regex support.
(@arch@_cgen_build_insn_regex): New routine from Graydon.
- (@arch@_cgen_assemble_insn): Add Graydon's code to use regex
+ (@arch@_cgen_assemble_insn): Add Graydon's code to use regex
to verify if it is worth parsing the insn as insn "x". Also update
- error message when insn is not a recognized format of the insn vs
+ error message when insn is not a recognized format of the insn vs
when the insn is completely unrecognized.
2001-07-11 Frank Ch. Eigler <fche@redhat.com>
diff --git a/opcodes/a29k-dis.c b/opcodes/a29k-dis.c
index 3c86167..0e937ba 100644
--- a/opcodes/a29k-dis.c
+++ b/opcodes/a29k-dis.c
@@ -1,5 +1,5 @@
/* Instruction printing code for the AMD 29000
- Copyright 1990, 1993, 1994, 1995, 1998, 2000
+ Copyright 1990, 1993, 1994, 1995, 1998, 2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Jim Kingdon.
@@ -23,6 +23,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "dis-asm.h"
#include "opcode/a29k.h"
+static void print_general PARAMS ((int, struct disassemble_info *));
+static void print_special PARAMS ((unsigned int, struct disassemble_info *));
+static int is_delayed_branch PARAMS ((int));
+static void find_bytes_little
+ PARAMS ((char *, unsigned char *, unsigned char *, unsigned char *,
+ unsigned char *));
+static void find_bytes_big
+ PARAMS ((char *, unsigned char *, unsigned char *, unsigned char *,
+ unsigned char *));
+static int print_insn PARAMS ((bfd_vma, struct disassemble_info *));
+
+
/* Print a symbolic representation of a general-purpose
register number NUM on STREAM.
NUM is a number as found in the instruction, not as found in
@@ -39,7 +51,7 @@ print_general (num, info)
}
/* Like print_general but a special-purpose register.
-
+
The mnemonics used by the AMD assembler are not quite the same
as the ones in the User's Manual. We use the ones that the
assembler uses. */
@@ -171,7 +183,7 @@ print_insn (memaddr, info)
if (((unsigned long) insn24 << 24) == opcode->opcode)
{
char *s;
-
+
(*info->fprintf_func) (info->stream, "%s ", opcode->name);
for (s = opcode->args; *s != '\0'; ++s)
{
@@ -180,7 +192,7 @@ print_insn (memaddr, info)
case 'a':
print_general (insn8, info);
break;
-
+
case 'b':
print_general (insn0, info);
break;
@@ -281,7 +293,7 @@ print_insn (memaddr, info)
int errcode;
char prev_insn[4];
unsigned char prev_insn0, prev_insn8, prev_insn16, prev_insn24;
-
+
errcode = (*info->read_memory_func) (memaddr - 4,
(bfd_byte *) &prev_insn[0],
4,
@@ -291,7 +303,7 @@ print_insn (memaddr, info)
/* If it is a delayed branch, we need to look at the
instruction before the delayed brach to handle
things like
-
+
const _foo
call _printf
consth _foo
@@ -306,7 +318,7 @@ print_insn (memaddr, info)
&prev_insn16, &prev_insn24);
}
}
-
+
/* If there was a problem reading memory, then assume
the previous instruction was not const. */
if (errcode == 0)
diff --git a/opcodes/i960-dis.c b/opcodes/i960-dis.c
index 90b170a..b2a8378 100644
--- a/opcodes/i960-dis.c
+++ b/opcodes/i960-dis.c
@@ -1,5 +1,5 @@
/* Disassemble i80960 instructions.
- Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -21,27 +21,27 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "dis-asm.h"
static const char *const reg_names[] = {
-/* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7",
+/* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7",
/* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
-/* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
-/* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp",
-/* 32 */ "pc", "ac", "ip", "tc", "fp0", "fp1", "fp2", "fp3"
+/* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
+/* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp",
+/* 32 */ "pc", "ac", "ip", "tc", "fp0", "fp1", "fp2", "fp3"
};
static FILE *stream; /* Output goes here */
static struct disassemble_info *info;
-static void print_addr();
-static void ctrl();
-static void cobr();
-static void reg();
-static int mem();
-static void ea();
-static void dstop();
-static void regop();
-static void invalid();
-static int pinsn();
-static void put_abs();
+static void print_addr PARAMS ((bfd_vma));
+static void ctrl PARAMS ((bfd_vma, unsigned long, unsigned long));
+static void cobr PARAMS ((bfd_vma, unsigned long, unsigned long));
+static void reg PARAMS ((unsigned long));
+static int mem PARAMS ((bfd_vma, unsigned long, unsigned long, int));
+static void ea PARAMS ((bfd_vma, int, char *, char *, int, unsigned int));
+static void dstop PARAMS ((int, int, int));
+static void regop PARAMS ((int, int, int, int));
+static void invalid PARAMS ((int));
+static int pinsn PARAMS ((bfd_vma, unsigned long, unsigned long));
+static void put_abs PARAMS ((unsigned long, unsigned long));
/* Print the i960 instruction at address 'memaddr' in debugged memory,
@@ -150,7 +150,7 @@ pinsn( memaddr, word1, word2 )
instr_len = mem( memaddr, word1, word2, 0 );
break;
default:
- /* invalid instruction, print as data word */
+ /* invalid instruction, print as data word */
invalid( word1 );
break;
}
@@ -163,7 +163,8 @@ pinsn( memaddr, word1, word2 )
static void
ctrl( memaddr, word1, word2 )
bfd_vma memaddr;
- unsigned long word1, word2;
+ unsigned long word1;
+ unsigned long word2 ATTRIBUTE_UNUSED;
{
int i;
static const struct tabent ctrl_tab[] = {
@@ -229,7 +230,8 @@ ctrl( memaddr, word1, word2 )
static void
cobr( memaddr, word1, word2 )
bfd_vma memaddr;
- unsigned long word1, word2;
+ unsigned long word1;
+ unsigned long word2 ATTRIBUTE_UNUSED;
{
int src1;
int src2;
@@ -493,33 +495,33 @@ reg( word1 )
{ 0x58d, "notor", 3 },
{ 0x58e, "nand", 3 },
{ 0x58f, "alterbit", 3 },
- { 0x590, "addo", 3 },
- { 0x591, "addi", 3 },
- { 0x592, "subo", 3 },
- { 0x593, "subi", 3 },
+ { 0x590, "addo", 3 },
+ { 0x591, "addi", 3 },
+ { 0x592, "subo", 3 },
+ { 0x593, "subi", 3 },
{ 0x594, "cmpob", 2 },
{ 0x595, "cmpib", 2 },
{ 0x596, "cmpos", 2 },
{ 0x597, "cmpis", 2 },
- { 0x598, "shro", 3 },
- { 0x59a, "shrdi", 3 },
- { 0x59b, "shri", 3 },
- { 0x59c, "shlo", 3 },
- { 0x59d, "rotate", 3 },
- { 0x59e, "shli", 3 },
- { 0x5a0, "cmpo", 2 },
- { 0x5a1, "cmpi", 2 },
- { 0x5a2, "concmpo", 2 },
- { 0x5a3, "concmpi", 2 },
- { 0x5a4, "cmpinco", 3 },
- { 0x5a5, "cmpinci", 3 },
- { 0x5a6, "cmpdeco", 3 },
- { 0x5a7, "cmpdeci", 3 },
- { 0x5ac, "scanbyte", 2 },
+ { 0x598, "shro", 3 },
+ { 0x59a, "shrdi", 3 },
+ { 0x59b, "shri", 3 },
+ { 0x59c, "shlo", 3 },
+ { 0x59d, "rotate", 3 },
+ { 0x59e, "shli", 3 },
+ { 0x5a0, "cmpo", 2 },
+ { 0x5a1, "cmpi", 2 },
+ { 0x5a2, "concmpo", 2 },
+ { 0x5a3, "concmpi", 2 },
+ { 0x5a4, "cmpinco", 3 },
+ { 0x5a5, "cmpinci", 3 },
+ { 0x5a6, "cmpdeco", 3 },
+ { 0x5a7, "cmpdeci", 3 },
+ { 0x5ac, "scanbyte", 2 },
{ 0x5ad, "bswap", -2 },
- { 0x5ae, "chkbit", 2 },
- { 0x5b0, "addc", 3 },
- { 0x5b2, "subc", 3 },
+ { 0x5ae, "chkbit", 2 },
+ { 0x5b0, "addc", 3 },
+ { 0x5b2, "subc", 3 },
{ 0x5b4, "intdis", 0 },
{ 0x5b5, "inten", 0 },
{ 0x5cc, "mov", -2 },
@@ -573,7 +575,7 @@ reg( word1 )
{ 0x66f, "syncf", 0 },
{ 0x670, "emul", 3 },
{ 0x671, "ediv", 3 },
- { 0x673, "ldtime", -1 },
+ { 0x673, "ldtime", -1 },
{ 0x674, "Fcvtir", -2 },
{ 0x675, "Fcvtilr", -2 },
{ 0x676, "Fscalerl", 3 },
@@ -612,9 +614,9 @@ reg( word1 )
{ 0x6c3, "Fcvtzril", -2 },
{ 0x6c9, "Fmovr", -2 },
{ 0x6d9, "Fmovrl", -2 },
- { 0x6e1, "Fmovre", -2 },
- { 0x6e2, "Fcpysre", 3 },
- { 0x6e3, "Fcpyrsre", 3 },
+ { 0x6e1, "Fmovre", -2 },
+ { 0x6e2, "Fcpysre", 3 },
+ { 0x6e3, "Fcpyrsre", 3 },
{ 0x701, "mulo", 3 },
{ 0x708, "remo", 3 },
{ 0x70b, "divo", 3 },
@@ -765,7 +767,7 @@ ea( memaddr, mode, reg2, reg3, word1, word2 )
scale = scale_tab[scale];
switch (mode) {
- case 4: /* (reg) */
+ case 4: /* (reg) */
(*info->fprintf_func)( stream, "(%s)", reg2 );
break;
case 5: /* displ+8(ip) */
@@ -809,7 +811,7 @@ ea( memaddr, mode, reg2, reg3, word1, word2 )
/************************************************/
-/* Register Instruction Operand */
+/* Register Instruction Operand */
/************************************************/
static void
regop( mode, spec, reg, fp )
@@ -873,7 +875,7 @@ invalid( word1 )
int word1;
{
(*info->fprintf_func)( stream, ".word\t0x%08x", (unsigned) word1 );
-}
+}
static void
print_addr(a)
@@ -884,7 +886,8 @@ bfd_vma a;
static void
put_abs( word1, word2 )
- unsigned long word1, word2;
+ unsigned long word1 ATTRIBUTE_UNUSED;
+ unsigned long word2 ATTRIBUTE_UNUSED;
{
#ifdef IN_GDB
return;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 36d80ae..58b7dcd 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -45,8 +45,12 @@ static int print_insn_mips
PARAMS ((bfd_vma, unsigned long int, struct disassemble_info *));
static void print_insn_arg
PARAMS ((const char *, unsigned long, bfd_vma, struct disassemble_info *));
+static void mips_isa_type
+ PARAMS ((int, int *, int *));
static int print_insn_mips16
PARAMS ((bfd_vma, struct disassemble_info *));
+static int is_newabi
+ PARAMS ((Elf_Internal_Ehdr *));
static void print_mips16_insn_arg
PARAMS ((int, const struct mips_opcode *, int, boolean, int, bfd_vma,
struct disassemble_info *));
diff --git a/opcodes/s390-dis.c b/opcodes/s390-dis.c
index f2ab407..0ddaaf1 100644
--- a/opcodes/s390-dis.c
+++ b/opcodes/s390-dis.c
@@ -29,11 +29,15 @@ static int init_flag = 0;
static int opc_index[256];
static int current_arch_mask = 0;
+static void init_disasm PARAMS ((struct disassemble_info *));
+static unsigned int s390_extract_operand
+ PARAMS ((unsigned char *, const struct s390_operand *));
+
/* Set up index table for first opcode byte. */
static void
init_disasm (info)
- struct disassemble_info *info ATTRIBUTE_UNUSED;
+ struct disassemble_info *info;
{
const struct s390_opcode *opcode;
const struct s390_opcode *opcode_end;