aboutsummaryrefslogtreecommitdiff
path: root/opcodes/microblaze-dis.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-12-11 13:42:17 +0000
committerNick Clifton <nickc@redhat.com>2009-12-11 13:42:17 +0000
commit91d6fa6a035cc7d0b7be5c99c194a64cb80924b0 (patch)
tree214507c313b77d619b52afcae2af0b02c9fa700b /opcodes/microblaze-dis.c
parent01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff)
downloadgdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.zip
gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.gz
gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.bz2
Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
Diffstat (limited to 'opcodes/microblaze-dis.c')
-rw-r--r--opcodes/microblaze-dis.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c
index b4723c2..1bbeead 100644
--- a/opcodes/microblaze-dis.c
+++ b/opcodes/microblaze-dis.c
@@ -186,7 +186,7 @@ read_insn_microblaze (bfd_vma memaddr,
int
print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
{
- fprintf_ftype fprintf = info->fprintf_func;
+ fprintf_ftype print_func = info->fprintf_func;
void * stream = info->stream;
unsigned long inst, prev_inst;
struct op_code_struct * op, *pop;
@@ -227,19 +227,19 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
prev_insn_vma = curr_insn_vma;
if (op->name == NULL)
- fprintf (stream, ".short 0x%04x", inst);
+ print_func (stream, ".short 0x%04x", inst);
else
{
- fprintf (stream, "%s", op->name);
+ print_func (stream, "%s", op->name);
switch (op->inst_type)
{
case INST_TYPE_RD_R1_R2:
- fprintf (stream, "\t%s, %s, %s", get_field_rd (inst),
+ print_func (stream, "\t%s, %s, %s", get_field_rd (inst),
get_field_r1(inst), get_field_r2 (inst));
break;
case INST_TYPE_RD_R1_IMM:
- fprintf (stream, "\t%s, %s, %s", get_field_rd (inst),
+ print_func (stream, "\t%s, %s, %s", get_field_rd (inst),
get_field_r1(inst), get_field_imm (inst));
if (info->print_address_func && get_int_field_r1 (inst) == 0
&& info->symbol_at_address_func)
@@ -254,37 +254,37 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
}
if (immval > 0 && info->symbol_at_address_func (immval, info))
{
- fprintf (stream, "\t// ");
+ print_func (stream, "\t// ");
info->print_address_func (immval, info);
}
}
break;
case INST_TYPE_RD_R1_IMM5:
- fprintf (stream, "\t%s, %s, %s", get_field_rd (inst),
+ print_func (stream, "\t%s, %s, %s", get_field_rd (inst),
get_field_r1(inst), get_field_imm5 (inst));
break;
case INST_TYPE_RD_RFSL:
- fprintf (stream, "\t%s, %s", get_field_rd (inst), get_field_rfsl (inst));
+ print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_rfsl (inst));
break;
case INST_TYPE_R1_RFSL:
- fprintf (stream, "\t%s, %s", get_field_r1 (inst), get_field_rfsl (inst));
+ print_func (stream, "\t%s, %s", get_field_r1 (inst), get_field_rfsl (inst));
break;
case INST_TYPE_RD_SPECIAL:
- fprintf (stream, "\t%s, %s", get_field_rd (inst),
+ print_func (stream, "\t%s, %s", get_field_rd (inst),
get_field_special (inst, op));
break;
case INST_TYPE_SPECIAL_R1:
- fprintf (stream, "\t%s, %s", get_field_special (inst, op),
+ print_func (stream, "\t%s, %s", get_field_special (inst, op),
get_field_r1(inst));
break;
case INST_TYPE_RD_R1:
- fprintf (stream, "\t%s, %s", get_field_rd (inst), get_field_r1 (inst));
+ print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_r1 (inst));
break;
case INST_TYPE_R1_R2:
- fprintf (stream, "\t%s, %s", get_field_r1 (inst), get_field_r2 (inst));
+ print_func (stream, "\t%s, %s", get_field_r1 (inst), get_field_r2 (inst));
break;
case INST_TYPE_R1_IMM:
- fprintf (stream, "\t%s, %s", get_field_r1 (inst), get_field_imm (inst));
+ print_func (stream, "\t%s, %s", get_field_r1 (inst), get_field_imm (inst));
/* The non-pc relative instructions are returns, which shouldn't
have a label printed. */
if (info->print_address_func && op->inst_offset_type == INST_PC_OFFSET
@@ -301,18 +301,18 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
immval += memaddr;
if (immval > 0 && info->symbol_at_address_func (immval, info))
{
- fprintf (stream, "\t// ");
+ print_func (stream, "\t// ");
info->print_address_func (immval, info);
}
else
{
- fprintf (stream, "\t\t// ");
- fprintf (stream, "%x", immval);
+ print_func (stream, "\t\t// ");
+ print_func (stream, "%x", immval);
}
}
break;
case INST_TYPE_RD_IMM:
- fprintf (stream, "\t%s, %s", get_field_rd (inst), get_field_imm (inst));
+ print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_imm (inst));
if (info->print_address_func && info->symbol_at_address_func)
{
if (immfound)
@@ -327,13 +327,13 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
immval += (int) memaddr;
if (info->symbol_at_address_func (immval, info))
{
- fprintf (stream, "\t// ");
+ print_func (stream, "\t// ");
info->print_address_func (immval, info);
}
}
break;
case INST_TYPE_IMM:
- fprintf (stream, "\t%s", get_field_imm (inst));
+ print_func (stream, "\t%s", get_field_imm (inst));
if (info->print_address_func && info->symbol_at_address_func
&& op->instr != imm)
{
@@ -349,41 +349,41 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
immval += (int) memaddr;
if (immval > 0 && info->symbol_at_address_func (immval, info))
{
- fprintf (stream, "\t// ");
+ print_func (stream, "\t// ");
info->print_address_func (immval, info);
}
else if (op->inst_offset_type == INST_PC_OFFSET)
{
- fprintf (stream, "\t\t// ");
- fprintf (stream, "%x", immval);
+ print_func (stream, "\t\t// ");
+ print_func (stream, "%x", immval);
}
}
break;
case INST_TYPE_RD_R2:
- fprintf (stream, "\t%s, %s", get_field_rd (inst), get_field_r2 (inst));
+ print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_r2 (inst));
break;
case INST_TYPE_R2:
- fprintf (stream, "\t%s", get_field_r2 (inst));
+ print_func (stream, "\t%s", get_field_r2 (inst));
break;
case INST_TYPE_R1:
- fprintf (stream, "\t%s", get_field_r1 (inst));
+ print_func (stream, "\t%s", get_field_r1 (inst));
break;
case INST_TYPE_RD_R1_SPECIAL:
- fprintf (stream, "\t%s, %s", get_field_rd (inst), get_field_r2 (inst));
+ print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_r2 (inst));
break;
case INST_TYPE_RD_IMM15:
- fprintf (stream, "\t%s, %s", get_field_rd (inst), get_field_imm15 (inst));
+ print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_imm15 (inst));
break;
/* For tuqula instruction */
case INST_TYPE_RD:
- fprintf (stream, "\t%s", get_field_rd (inst));
+ print_func (stream, "\t%s", get_field_rd (inst));
break;
case INST_TYPE_RFSL:
- fprintf (stream, "\t%s", get_field_rfsl (inst));
+ print_func (stream, "\t%s", get_field_rfsl (inst));
break;
default:
/* If the disassembler lags the instruction set. */
- fprintf (stream, "\tundecoded operands, inst is 0x%04x", inst);
+ print_func (stream, "\tundecoded operands, inst is 0x%04x", inst);
break;
}
}
@@ -418,7 +418,7 @@ get_insn_microblaze (long inst,
}
enum microblaze_instr
-microblaze_decode_insn (long insn, int *rd, int *ra, int *rb, int *imm)
+microblaze_decode_insn (long insn, int *rd, int *ra, int *rb, int *immed)
{
enum microblaze_instr op;
bfd_boolean t1;
@@ -430,7 +430,7 @@ microblaze_decode_insn (long insn, int *rd, int *ra, int *rb, int *imm)
*ra = (insn & RA_MASK) >> RA_LOW;
*rb = (insn & RB_MASK) >> RB_LOW;
t3 = (insn & IMM_MASK) >> IMM_LOW;
- *imm = (int) t3;
+ *immed = (int) t3;
return (op);
}