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.
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.
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;
}
}
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)
{ "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 },
{
unsigned int i;
struct literal * p;
- symbolS * brarsym;
+ symbolS * brarsym = NULL;
if (poolsize == 0)
return;
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;