Bring two last users of K&R definitions to ANSI c89
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
86178a576b
commit
668a38fcbd
76
alpha-dis.c
76
alpha-dis.c
@ -434,18 +434,13 @@ const unsigned alpha_num_operands = sizeof(alpha_operands)/sizeof(*alpha_operand
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_rba(insn, value, errmsg)
|
insert_rba(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int value ATTRIBUTE_UNUSED;
|
|
||||||
const char **errmsg ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return insn | (((insn >> 21) & 0x1f) << 16);
|
return insn | (((insn >> 21) & 0x1f) << 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extract_rba(insn, invalid)
|
extract_rba(unsigned insn, int *invalid)
|
||||||
unsigned insn;
|
|
||||||
int *invalid;
|
|
||||||
{
|
{
|
||||||
if (invalid != (int *) NULL
|
if (invalid != (int *) NULL
|
||||||
&& ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
|
&& ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
|
||||||
@ -458,18 +453,13 @@ extract_rba(insn, invalid)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_rca(insn, value, errmsg)
|
insert_rca(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int value ATTRIBUTE_UNUSED;
|
|
||||||
const char **errmsg ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return insn | ((insn >> 21) & 0x1f);
|
return insn | ((insn >> 21) & 0x1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extract_rca(insn, invalid)
|
extract_rca(unsigned insn, int *invalid)
|
||||||
unsigned insn;
|
|
||||||
int *invalid;
|
|
||||||
{
|
{
|
||||||
if (invalid != (int *) NULL
|
if (invalid != (int *) NULL
|
||||||
&& ((insn >> 21) & 0x1f) != (insn & 0x1f))
|
&& ((insn >> 21) & 0x1f) != (insn & 0x1f))
|
||||||
@ -482,18 +472,13 @@ extract_rca(insn, invalid)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_za(insn, value, errmsg)
|
insert_za(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int value ATTRIBUTE_UNUSED;
|
|
||||||
const char **errmsg ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return insn | (31 << 21);
|
return insn | (31 << 21);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extract_za(insn, invalid)
|
extract_za(unsigned insn, int *invalid)
|
||||||
unsigned insn;
|
|
||||||
int *invalid;
|
|
||||||
{
|
{
|
||||||
if (invalid != (int *) NULL && ((insn >> 21) & 0x1f) != 31)
|
if (invalid != (int *) NULL && ((insn >> 21) & 0x1f) != 31)
|
||||||
*invalid = 1;
|
*invalid = 1;
|
||||||
@ -502,18 +487,13 @@ extract_za(insn, invalid)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_zb(insn, value, errmsg)
|
insert_zb(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int value ATTRIBUTE_UNUSED;
|
|
||||||
const char **errmsg ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return insn | (31 << 16);
|
return insn | (31 << 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extract_zb(insn, invalid)
|
extract_zb(unsigned insn, int *invalid)
|
||||||
unsigned insn;
|
|
||||||
int *invalid;
|
|
||||||
{
|
{
|
||||||
if (invalid != (int *) NULL && ((insn >> 16) & 0x1f) != 31)
|
if (invalid != (int *) NULL && ((insn >> 16) & 0x1f) != 31)
|
||||||
*invalid = 1;
|
*invalid = 1;
|
||||||
@ -522,18 +502,13 @@ extract_zb(insn, invalid)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_zc(insn, value, errmsg)
|
insert_zc(unsigned insn, int value ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int value ATTRIBUTE_UNUSED;
|
|
||||||
const char **errmsg ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return insn | 31;
|
return insn | 31;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
extract_zc(insn, invalid)
|
extract_zc(unsigned insn, int *invalid)
|
||||||
unsigned insn;
|
|
||||||
int *invalid;
|
|
||||||
{
|
{
|
||||||
if (invalid != (int *) NULL && (insn & 0x1f) != 31)
|
if (invalid != (int *) NULL && (insn & 0x1f) != 31)
|
||||||
*invalid = 1;
|
*invalid = 1;
|
||||||
@ -544,10 +519,7 @@ extract_zc(insn, invalid)
|
|||||||
/* The displacement field of a Branch format insn. */
|
/* The displacement field of a Branch format insn. */
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_bdisp(insn, value, errmsg)
|
insert_bdisp(unsigned insn, int value, const char **errmsg)
|
||||||
unsigned insn;
|
|
||||||
int value;
|
|
||||||
const char **errmsg;
|
|
||||||
{
|
{
|
||||||
if (errmsg != (const char **)NULL && (value & 3))
|
if (errmsg != (const char **)NULL && (value & 3))
|
||||||
*errmsg = _("branch operand unaligned");
|
*errmsg = _("branch operand unaligned");
|
||||||
@ -556,9 +528,7 @@ insert_bdisp(insn, value, errmsg)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
extract_bdisp(insn, invalid)
|
extract_bdisp(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int *invalid ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);
|
return 4 * (((insn & 0x1FFFFF) ^ 0x100000) - 0x100000);
|
||||||
}
|
}
|
||||||
@ -567,10 +537,7 @@ extract_bdisp(insn, invalid)
|
|||||||
/* The hint field of a JMP/JSR insn. */
|
/* The hint field of a JMP/JSR insn. */
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_jhint(insn, value, errmsg)
|
insert_jhint(unsigned insn, int value, const char **errmsg)
|
||||||
unsigned insn;
|
|
||||||
int value;
|
|
||||||
const char **errmsg;
|
|
||||||
{
|
{
|
||||||
if (errmsg != (const char **)NULL && (value & 3))
|
if (errmsg != (const char **)NULL && (value & 3))
|
||||||
*errmsg = _("jump hint unaligned");
|
*errmsg = _("jump hint unaligned");
|
||||||
@ -579,9 +546,7 @@ insert_jhint(insn, value, errmsg)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
extract_jhint(insn, invalid)
|
extract_jhint(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int *invalid ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);
|
return 4 * (((insn & 0x3FFF) ^ 0x2000) - 0x2000);
|
||||||
}
|
}
|
||||||
@ -589,10 +554,7 @@ extract_jhint(insn, invalid)
|
|||||||
/* The hint field of an EV6 HW_JMP/JSR insn. */
|
/* The hint field of an EV6 HW_JMP/JSR insn. */
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
insert_ev6hwjhint(insn, value, errmsg)
|
insert_ev6hwjhint(unsigned insn, int value, const char **errmsg)
|
||||||
unsigned insn;
|
|
||||||
int value;
|
|
||||||
const char **errmsg;
|
|
||||||
{
|
{
|
||||||
if (errmsg != (const char **)NULL && (value & 3))
|
if (errmsg != (const char **)NULL && (value & 3))
|
||||||
*errmsg = _("jump hint unaligned");
|
*errmsg = _("jump hint unaligned");
|
||||||
@ -601,9 +563,7 @@ insert_ev6hwjhint(insn, value, errmsg)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
extract_ev6hwjhint(insn, invalid)
|
extract_ev6hwjhint(unsigned insn, int *invalid ATTRIBUTE_UNUSED)
|
||||||
unsigned insn;
|
|
||||||
int *invalid ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);
|
return 4 * (((insn & 0x1FFF) ^ 0x1000) - 0x1000);
|
||||||
}
|
}
|
||||||
@ -1804,9 +1764,7 @@ static const char * const vms_regnames[64] = {
|
|||||||
/* Disassemble Alpha instructions. */
|
/* Disassemble Alpha instructions. */
|
||||||
|
|
||||||
int
|
int
|
||||||
print_insn_alpha (memaddr, info)
|
print_insn_alpha (bfd_vma memaddr, struct disassemble_info *info)
|
||||||
bfd_vma memaddr;
|
|
||||||
struct disassemble_info *info;
|
|
||||||
{
|
{
|
||||||
static const struct alpha_opcode *opcode_index[AXP_NOPS+1];
|
static const struct alpha_opcode *opcode_index[AXP_NOPS+1];
|
||||||
const char * const * regnames;
|
const char * const * regnames;
|
||||||
|
24
sh4-dis.c
24
sh4-dis.c
@ -1170,11 +1170,8 @@ static void print_dsp_reg PARAMS ((int, fprintf_ftype, void *));
|
|||||||
static void print_insn_ppi PARAMS ((int, struct disassemble_info *));
|
static void print_insn_ppi PARAMS ((int, struct disassemble_info *));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_movxy (op, rn, rm, fprintf_fn, stream)
|
print_movxy (const sh_opcode_info *op, int rn, int rm,
|
||||||
const sh_opcode_info *op;
|
fprintf_ftype fprintf_fn, void *stream)
|
||||||
int rn, rm;
|
|
||||||
fprintf_ftype fprintf_fn;
|
|
||||||
void *stream;
|
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
@ -1248,9 +1245,7 @@ print_movxy (op, rn, rm, fprintf_fn, stream)
|
|||||||
Return nonzero if a field b of a parallel processing insns follows. */
|
Return nonzero if a field b of a parallel processing insns follows. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_insn_ddt (insn, info)
|
print_insn_ddt (int insn, struct disassemble_info *info)
|
||||||
int insn;
|
|
||||||
struct disassemble_info *info;
|
|
||||||
{
|
{
|
||||||
fprintf_ftype fprintf_fn = info->fprintf_func;
|
fprintf_ftype fprintf_fn = info->fprintf_func;
|
||||||
void *stream = info->stream;
|
void *stream = info->stream;
|
||||||
@ -1337,10 +1332,7 @@ print_insn_ddt (insn, info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_dsp_reg (rm, fprintf_fn, stream)
|
print_dsp_reg (int rm, fprintf_ftype fprintf_fn, void *stream)
|
||||||
int rm;
|
|
||||||
fprintf_ftype fprintf_fn;
|
|
||||||
void *stream;
|
|
||||||
{
|
{
|
||||||
switch (rm)
|
switch (rm)
|
||||||
{
|
{
|
||||||
@ -1381,9 +1373,7 @@ print_dsp_reg (rm, fprintf_fn, stream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_insn_ppi (field_b, info)
|
print_insn_ppi (int field_b, struct disassemble_info *info)
|
||||||
int field_b;
|
|
||||||
struct disassemble_info *info;
|
|
||||||
{
|
{
|
||||||
static const char *sx_tab[] = { "x0", "x1", "a0", "a1" };
|
static const char *sx_tab[] = { "x0", "x1", "a0", "a1" };
|
||||||
static const char *sy_tab[] = { "y0", "y1", "m0", "m1" };
|
static const char *sy_tab[] = { "y0", "y1", "m0", "m1" };
|
||||||
@ -1528,9 +1518,7 @@ print_insn_ppi (field_b, info)
|
|||||||
/* FIXME mvs: movx insns print as ".word 0x%03x", insn & 0xfff
|
/* FIXME mvs: movx insns print as ".word 0x%03x", insn & 0xfff
|
||||||
(ie. the upper nibble is missing). */
|
(ie. the upper nibble is missing). */
|
||||||
int
|
int
|
||||||
print_insn_sh (memaddr, info)
|
print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
|
||||||
bfd_vma memaddr;
|
|
||||||
struct disassemble_info *info;
|
|
||||||
{
|
{
|
||||||
fprintf_ftype fprintf_fn = info->fprintf_func;
|
fprintf_ftype fprintf_fn = info->fprintf_func;
|
||||||
void *stream = info->stream;
|
void *stream = info->stream;
|
||||||
|
Loading…
Reference in New Issue
Block a user