* 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.
This commit is contained in:
Alan Modra 2002-12-16 09:57:49 +00:00
parent 3f2a9fb79d
commit 30cdfbed02
4 changed files with 18 additions and 12 deletions

View File

@ -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.

View File

@ -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;
}
}

View File

@ -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)

View File

@ -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;