aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-12-16 09:57:49 +0000
committerAlan Modra <amodra@gmail.com>2002-12-16 09:57:49 +0000
commit30cdfbed0247ee03f38db0daa4e211c4517fe3db (patch)
treee2b01de66cf3ab4cea994b12b1e9de39988e5f95 /gas
parent3f2a9fb79d4443d59c1566e646a1cbb57e475b2b (diff)
downloadgdb-30cdfbed0247ee03f38db0daa4e211c4517fe3db.zip
gdb-30cdfbed0247ee03f38db0daa4e211c4517fe3db.tar.gz
gdb-30cdfbed0247ee03f38db0daa4e211c4517fe3db.tar.bz2
* 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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-d30v.c17
-rw-r--r--gas/config/tc-i960.c1
-rw-r--r--gas/config/tc-mcore.c6
4 files changed, 18 insertions, 12 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a3741af..c04d5f9 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2002-12-16 Alan Modra <amodra@bigpond.net.au>
+ * 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.
+
* config/tc-ns32k.c (encode_operand): Constify operandsP and suffixP.
(parse): Constify line and lineptr.
(md_begin): Calculate endop here.
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c
index d1ab8f4..ff15eb8 100644
--- a/gas/config/tc-d30v.c
+++ b/gas/config/tc-d30v.c
@@ -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;
}
}
diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c
index 0bbbfa6..dab0504 100644
--- a/gas/config/tc-i960.c
+++ b/gas/config/tc-i960.c
@@ -1120,6 +1120,7 @@ md_estimate_size_before_relax (fragP, segment_type)
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)
diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c
index 569c32d..9b59166 100644
--- a/gas/config/tc-mcore.c
+++ b/gas/config/tc-mcore.c
@@ -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;