This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
a few more gas warning fixes 2
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Mon, 16 Dec 2002 20:26:16 +1030
- Subject: a few more gas warning fixes 2
Assorted small fixes.
include/opcode/ChangeLog
* hppa.h (completer_chars): #if 0 out.
gas/ChangeLog
* config/tc-d30v.c (check_range): Warning fixes, formatting.
Simplify sign extension. Remove redundant unsigned < 0 test.
* config/tc-i960.c (md_ri_to_chars): Prototype.
* config/tc-mcore.c (md_pseudo_table): Fix typo.
(dump_literals): Init brarsym, and test later instead of isforce.
Index: gas/config/tc-d30v.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-d30v.c,v
retrieving revision 1.21
diff -u -p -r1.21 tc-d30v.c
--- gas/config/tc-d30v.c 12 Dec 2002 22:41:25 -0000 1.21
+++ gas/config/tc-d30v.c 13 Dec 2002 03:03:48 -0000
@@ -252,32 +252,31 @@ check_range (num, bits, flags)
Allow either. */
min = -((unsigned long) 1 << (bits - 1));
max = ((unsigned long) 1 << bits) - 1;
- return (long)num < min || (long)num > max;
+ return (long) num < min || (long) num > max;
}
if (flags & OPERAND_SHIFT)
{
/* We know that all shifts are right by three bits. */
+ num >>= 3;
if (flags & OPERAND_SIGNED)
- num = (unsigned long) ((long) num >= 0)
- ? (((long) num) >> 3)
- : ((num >> 3) | ~(~(unsigned long) 0 >> 3));
- else
- num >>= 3;
+ {
+ unsigned long sign_bit = ((unsigned long) -1L >> 4) + 1;
+ num = (num ^ sign_bit) - sign_bit;
+ }
}
if (flags & OPERAND_SIGNED)
{
max = ((unsigned long) 1 << (bits - 1)) - 1;
min = - ((unsigned long) 1 << (bits - 1));
- return (long)num > max || (long)num < min;
+ return (long) num > max || (long) num < min;
}
else
{
max = ((unsigned long) 1 << bits) - 1;
- min = 0;
- return num > max || num < min;
+ return num > (unsigned long) max;
}
}
Index: gas/config/tc-i960.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i960.c,v
retrieving revision 1.15
diff -u -p -r1.15 tc-i960.c
--- gas/config/tc-i960.c 12 Dec 2002 22:25:00 -0000 1.15
+++ gas/config/tc-i960.c 13 Dec 2002 03:03:54 -0000
@@ -1120,6 +1120,7 @@ md_estimate_size_before_relax (fragP, se
does do the reordering (Ian Taylor 28 Aug 92).
*************************************************************************** */
+static void md_ri_to_chars PARAMS ((char *, struct relocation_info *));
static void
md_ri_to_chars (where, ri)
Index: gas/config/tc-mcore.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mcore.c,v
retrieving revision 1.31
diff -u -p -r1.31 tc-mcore.c
--- gas/config/tc-mcore.c 12 Dec 2002 22:11:31 -0000 1.31
+++ gas/config/tc-mcore.c 13 Dec 2002 03:03:56 -0000
@@ -210,7 +210,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "text", mcore_s_text, 0 },
{ "data", mcore_s_data, 0 },
{ "bss", mcore_s_bss, 1 },
-#ifdef OBJ_EF
+#ifdef OBJ_ELF
{ "comm", mcore_s_comm, 0 },
#endif
{ "section", mcore_s_section, 0 },
@@ -639,7 +639,7 @@ dump_literals (isforce)
{
unsigned int i;
struct literal * p;
- symbolS * brarsym;
+ symbolS * brarsym = NULL;
if (poolsize == 0)
return;
@@ -674,7 +674,7 @@ dump_literals (isforce)
for (i = 0, p = litpool; i < poolsize; i++, p++)
emit_expr (& p->e, 4);
- if (isforce)
+ if (brarsym != NULL)
colon (S_GET_NAME (brarsym));
poolsize = 0;
Index: include/opcode/hppa.h
===================================================================
RCS file: /cvs/src/src/include/opcode/hppa.h,v
retrieving revision 1.48
diff -u -p -r1.48 hppa.h
--- include/opcode/hppa.h 31 Dec 2001 23:43:03 -0000 1.48
+++ include/opcode/hppa.h 13 Dec 2002 03:04:11 -0000
@@ -1,6 +1,6 @@
/* Table of opcodes for the PA-RISC.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001
+ 2001, 2002
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
@@ -271,10 +271,12 @@ Float registers for fmpyadd and fmpysub:
*/
+#if 0
/* List of characters not to put a space after. Note that
"," is included, as the "spopN" operations use literal
commas in their completer sections. */
static const char *const completer_chars = ",CcY<>?!@+&U~FfGHINnOoZMadu|/=0123%e$m}";
+#endif
/* The order of the opcodes in this table is significant:
--
Alan Modra
IBM OzLabs - Linux Technology Centre