aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-mt.c')
-rw-r--r--gas/config/tc-mt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gas/config/tc-mt.c b/gas/config/tc-mt.c
index 0cfc82d..a795bdc 100644
--- a/gas/config/tc-mt.c
+++ b/gas/config/tc-mt.c
@@ -335,7 +335,7 @@ md_section_align (segT segment, valueT size)
{
int align = bfd_section_alignment (segment);
- return ((size + (1 << align) - 1) & -(1 << align));
+ return (size + ((valueT) 1 << align) - 1) & -((valueT) 1 << align);
}
symbolS *
@@ -372,7 +372,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED,
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))
/* The symbol is undefined (or is defined but not in this section).
@@ -461,10 +461,10 @@ mt_apply_fix (fixS *fixP, valueT *valueP, segT seg)
bool
mt_fix_adjustable (fixS * fixP)
{
- if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ if (fixP->fx_r_type >= BFD_RELOC_UNUSED)
{
const CGEN_INSN *insn = NULL;
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ int opindex = fixP->fx_r_type - BFD_RELOC_UNUSED;
const CGEN_OPERAND *operand;
operand = cgen_operand_lookup_by_num(gas_cgen_cpu_desc, opindex);