/* tc-ft32.c -- Assemble code for ft32
- Copyright (C) 2008-2020 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
unsigned int b;
int f;
expressionS arg;
- bfd_boolean fixed = FALSE;
+ bool fixed = false;
unsigned int sc;
- bfd_boolean can_sc;
+ bool can_sc;
/* Drop leading whitespace. */
while (*str == ' ')
{
b |= 0x400 << FT32_FLD_RIMM_BIT;
op_end = parse_exp_save_ilp (op_end, &arg);
- fixed = TRUE;
+ fixed = true;
fix_new_exp (frag_now,
(output - frag_now->fr_literal),
2,
break;
case FT32_FLD_K20:
op_end = parse_exp_save_ilp (op_end, &arg);
- fixed = TRUE;
+ fixed = true;
fix_new_exp (frag_now,
(output - frag_now->fr_literal),
3,
break;
case FT32_FLD_PA:
op_end = parse_exp_save_ilp (op_end, &arg);
- fixed = TRUE;
+ fixed = true;
fix_new_exp (frag_now,
(output - frag_now->fr_literal),
3,
break;
case FT32_FLD_AA:
op_end = parse_exp_save_ilp (op_end, &arg);
- fixed = TRUE;
+ fixed = true;
fix_new_exp (frag_now,
(output - frag_now->fr_literal),
3,
break;
case FT32_FLD_K16:
op_end = parse_exp_save_ilp (op_end, &arg);
- fixed = TRUE;
+ fixed = true;
fix_new_exp (frag_now,
(output - frag_now->fr_literal),
2,
op_end = parse_exp_save_ilp (op_end, &arg);
if (arg.X_add_number & 0x80)
arg.X_add_number ^= 0x7f00;
- fixed = TRUE;
+ fixed = true;
fix_new_exp (frag_now,
(output - frag_now->fr_literal),
2,
fixP->fx_r_type = BFD_RELOC_FT32_DIFF32;
break;
default:
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("expression too complex"));
+ as_bad_subtract (fixP);
break;
}
/* We don't actually support subtracting a symbol. */
if (fixP->fx_subsy != (symbolS *) NULL)
- as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
+ as_bad_subtract (fixP);
switch (fixP->fx_r_type)
{
/* TC_FORCE_RELOCATION hook */
-static bfd_boolean
+static bool
relaxable_section (asection *sec)
{
return ((sec->flags & SEC_DEBUGGING) == 0
return generic_force_reloc (fix);
}
-bfd_boolean
+bool
ft32_allow_local_subtract (expressionS * left,
expressionS * right,
segT section)
{
/* If we are not in relaxation mode, subtraction is OK. */
if (!linkrelax)
- return TRUE;
+ return true;
/* If the symbols are not in a code section then they are OK. */
if ((section->flags & SEC_CODE) == 0)
- return TRUE;
+ return true;
if (left->X_add_symbol == right->X_add_symbol)
- return TRUE;
+ return true;
/* We have to assume that there may be instructions between the
two symbols and that relaxation may increase the distance between
them. */
- return FALSE;
+ return false;
}