Support Intel FRED LKGS
[binutils-gdb.git] / gas / config / tc-ft32.c
index 7db56836a940fabe4d0dac8988caf1848170f409..b633790c9da5222fdf1f1703d0c894999b57c6b5 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -207,9 +207,9 @@ md_assemble (char *str)
   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 == ' ')
@@ -313,7 +313,7 @@ md_assemble (char *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,
@@ -327,7 +327,7 @@ md_assemble (char *str)
              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,
@@ -337,7 +337,7 @@ md_assemble (char *str)
              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,
@@ -347,7 +347,7 @@ md_assemble (char *str)
              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,
@@ -357,7 +357,7 @@ md_assemble (char *str)
              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,
@@ -369,7 +369,7 @@ md_assemble (char *str)
              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,
@@ -570,8 +570,7 @@ md_apply_fix (fixS *fixP ATTRIBUTE_UNUSED,
              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;
          }
 
@@ -584,7 +583,7 @@ md_apply_fix (fixS *fixP ATTRIBUTE_UNUSED,
 
   /* 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)
     {
@@ -716,7 +715,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixP)
 
 /* TC_FORCE_RELOCATION hook */
 
-static bfd_boolean
+static bool
 relaxable_section (asection *sec)
 {
   return ((sec->flags & SEC_DEBUGGING) == 0
@@ -769,24 +768,24 @@ ft32_force_relocation (fixS *fix)
   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;
 }