aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-lm32.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-lm32.c')
-rw-r--r--gas/config/tc-lm32.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gas/config/tc-lm32.c b/gas/config/tc-lm32.c
index c101d71..2a4bbd3 100644
--- a/gas/config/tc-lm32.c
+++ b/gas/config/tc-lm32.c
@@ -80,7 +80,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "hword", cons, 2 },
{ "word", cons, 4 },
{ "dword", cons, 8 },
- {(char *)0 , (void(*)(int))0, 0}
+ { NULL, NULL, 0 }
};
/* Target specific command line options. */
@@ -246,8 +246,7 @@ md_atof (int type, char *litP, int *sizeP)
{
for (i = 0; i < prec; i++)
{
- md_number_to_chars (litP, (valueT) words[i],
- sizeof (LITTLENUM_TYPE));
+ md_number_to_chars (litP, words[i], sizeof (LITTLENUM_TYPE));
litP += sizeof (LITTLENUM_TYPE);
}
}
@@ -255,8 +254,7 @@ md_atof (int type, char *litP, int *sizeP)
{
for (i = prec - 1; i >= 0; i--)
{
- md_number_to_chars (litP, (valueT) words[i],
- sizeof (LITTLENUM_TYPE));
+ md_number_to_chars (litP, words[i], sizeof (LITTLENUM_TYPE));
litP += sizeof (LITTLENUM_TYPE);
}
}
@@ -278,7 +276,7 @@ valueT
md_section_align (asection *seg, valueT addr)
{
int align = bfd_section_alignment (seg);
- return ((addr + (1 << align) - 1) & -(1 << align));
+ return (addr + ((valueT) 1 << align) - 1) & -((valueT) 1 << align);
}
/* This function assembles the instructions. It emits the frags/bytes to the
@@ -357,7 +355,7 @@ md_pcrel_from (fixS *fixP)
long
md_pcrel_from_section (fixS * fixP, segT sec)
{
- if ((fixP->fx_addsy != (symbolS *) NULL)
+ if ((fixP->fx_addsy != NULL)
&& (! S_IS_DEFINED (fixP->fx_addsy)
|| (S_GET_SEGMENT (fixP->fx_addsy) != sec)))
{
@@ -368,7 +366,7 @@ md_pcrel_from_section (fixS * fixP, segT sec)
/*fprintf(stderr, "%s extern %d local %d\n", S_GET_NAME (fixP->fx_addsy), S_IS_EXTERN (fixP->fx_addsy), S_IS_LOCAL (fixP->fx_addsy));*/
/* FIXME: Weak problem? */
- if ((fixP->fx_addsy != (symbolS *) NULL)
+ if ((fixP->fx_addsy != NULL)
&& S_IS_EXTERNAL (fixP->fx_addsy))
{
/* If the symbol is external, let the linker handle it. */