This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips warning
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Fri, 18 Feb 2005 10:42:38 +1030
- Subject: Re: mips warning
- References: <20050218000111.GD10128@bubble.modra.org>
On Fri, Feb 18, 2005 at 10:31:11AM +1030, Alan Modra wrote:
> gas/config/tc-mips.c:4171: warning: 'tempreg' may be used uninitialized in this function
> * config/tc-mips.c (macro <ld>): Always set tempreg.
Ug. The same is needed for st.
* config/tc-mips.c (macro <ld, st>): Always set tempreg.
Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.283
diff -u -p -r1.283 tc-mips.c
--- gas/config/tc-mips.c 17 Feb 2005 13:46:04 -0000 1.283
+++ gas/config/tc-mips.c 18 Feb 2005 00:11:58 -0000
@@ -5765,15 +5765,14 @@ macro (struct mips_cl_insn *ip)
tempreg = AT;
used_at = 1;
}
- else if (breg == treg
- && (offset_expr.X_op != O_constant
- || (offset_expr.X_add_number > 0x7fff
- || offset_expr.X_add_number < -0x8000)))
- {
- as_bad(_("load expansion needs $at register"));
- }
else
{
+ if (breg == treg
+ && (offset_expr.X_op != O_constant
+ || (offset_expr.X_add_number > 0x7fff
+ || offset_expr.X_add_number < -0x8000)))
+ as_bad(_("load expansion needs $at register"));
+
tempreg = treg;
used_at = 0;
}
@@ -5850,15 +5849,14 @@ macro (struct mips_cl_insn *ip)
tempreg = AT;
used_at = 1;
}
- else if (breg == treg
- && (offset_expr.X_op != O_constant
- || (offset_expr.X_add_number > 0x7fff
- || offset_expr.X_add_number < -0x8000)))
- {
- as_bad(_("store expansion needs $at register"));
- }
else
{
+ if (breg == treg
+ && (offset_expr.X_op != O_constant
+ || (offset_expr.X_add_number > 0x7fff
+ || offset_expr.X_add_number < -0x8000)))
+ as_bad(_("store expansion needs $at register"));
+
tempreg = treg;
used_at = 0;
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre