Use bool in gas
[binutils-gdb.git] / gas / config / tc-frv.c
index f49096db5005f570f518982585acefd3a05bd417..7b31263ec4c5502148c4a0abf4f904dff25a6d5d 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-frv.c -- Assembler for the Fujitsu FRV.
-   Copyright (C) 2002-2016 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -65,8 +65,8 @@ enum vliw_insn_type
 #define NOP_KEEP 1             /* Keep these NOPS.  */
 #define NOP_DELETE 2           /* Delete these NOPS.  */
 
-#define DO_COUNT    TRUE
-#define DONT_COUNT  FALSE
+#define DO_COUNT    true
+#define DONT_COUNT  false
 
 /* A list of insns within a VLIW insn.  */
 struct vliw_insn_list
@@ -168,7 +168,7 @@ static FRV_VLIW vliw;
 #endif
 
 static unsigned long frv_mach = bfd_mach_frv;
-static bfd_boolean fr400_audio;
+static bool fr400_audio;
 
 /* Flags to set in the elf header */
 static flagword frv_flags = DEFAULT_FLAGS | DEFAULT_FDPIC;
@@ -369,14 +369,14 @@ md_parse_option (int c, const char *arg)
          {
            cpu_flags = EF_FRV_CPU_FR405;
            frv_mach = bfd_mach_fr400;
-           fr400_audio = TRUE;
+           fr400_audio = true;
          }
 
        else if (strcmp (p, "fr400") == 0)
          {
            cpu_flags = EF_FRV_CPU_FR400;
            frv_mach = bfd_mach_fr400;
-           fr400_audio = FALSE;
+           fr400_audio = false;
          }
 
        else if (strcmp (p, "fr300") == 0)
@@ -469,7 +469,7 @@ md_show_usage (FILE * stream)
   fprintf (stream, _("-mno-pack       Do not allow instructions to be packed\n"));
   fprintf (stream, _("-mpic           Mark generated file as using small position independent code\n"));
   fprintf (stream, _("-mPIC           Mark generated file as using large position independent code\n"));
-  fprintf (stream, _("-mlibrary-pic   Mark generated file as using position indepedent code for libraries\n"));
+  fprintf (stream, _("-mlibrary-pic   Mark generated file as using position independent code for libraries\n"));
   fprintf (stream, _("-mfdpic         Assemble for the FDPIC ABI\n"));
   fprintf (stream, _("-mnopic         Disable -mpic, -mPIC, -mlibrary-pic and -mfdpic\n"));
   fprintf (stream, _("-mcpu={fr500|fr550|fr400|fr405|fr450|fr300|frv|simple|tomcat}\n"));
@@ -507,7 +507,7 @@ md_begin (void)
   frv_vliw_reset (& vliw, frv_mach, frv_flags);
 }
 
-bfd_boolean
+bool
 frv_md_fdpic_enabled (void)
 {
   return (frv_flags & EF_FRV_FDPIC) != 0;
@@ -516,7 +516,7 @@ frv_md_fdpic_enabled (void)
 int chain_num = 0;
 
 static struct vliw_insn_list *
-frv_insert_vliw_insn (bfd_boolean count)
+frv_insert_vliw_insn (bool count)
 {
   struct vliw_insn_list *vliw_insn_list_entry;
   struct vliw_chain     *vliw_chain_entry;
@@ -672,7 +672,7 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type,
                    struct vliw_insn_list *insert_before_insn)
 {
 
-  bfd_boolean pack_prev = FALSE;
+  bool pack_prev = false;
   struct vliw_chain *return_me = NULL;
   struct vliw_insn_list *prev_insn = NULL;
   struct vliw_insn_list *curr_insn = vliw_to_split->insn_list;
@@ -693,7 +693,7 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type,
        Then don't set pack bit later.  */
 
       if (curr_insn->type != VLIW_LABEL_TYPE)
-       pack_prev = TRUE;
+       pack_prev = true;
       prev_insn = curr_insn;
       curr_insn = curr_insn->next;
     }
@@ -727,7 +727,7 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type,
              buffer[0] |= 0x80;
            }
          /* The branch is in the middle.  Split this vliw insn into first
-            and second parts.  Insert the NOP inbetween.  */
+            and second parts.  Insert the NOP between.  */
 
           second_part->insn_list = insert_before_insn;
          second_part->insn_list->type = VLIW_BRANCH_HAS_NOPS;
@@ -767,7 +767,7 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type,
            }
 
        /* The branch is in the middle.  Split this vliw insn into first
-          and second parts.  Insert the NOP inbetween.  */
+          and second parts.  Insert the NOP in between.  */
           second_part->insn_list = insert_before_insn;
          second_part->insn_list->type = VLIW_BRANCH_HAS_NOPS;
           second_part->next      = vliw_to_split->next;
@@ -858,7 +858,7 @@ frv_tomcat_analyze_vliw_chains (void)
 
   vliw1 = vliw_chain_top;
 
-workaround_top:
+ workaround_top:
 
   FRV_SET_VLIW_WINDOW (vliw1, vliw2, vliw3);
 
@@ -1055,14 +1055,14 @@ fr550_check_acc_range (FRV_VLIW *vlw, frv_insn *insn)
 
 /* Return true if the target implements instruction INSN.  */
 
-static bfd_boolean
+static bool
 target_implements_insn_p (const CGEN_INSN *insn)
 {
   switch (frv_mach)
     {
     default:
       /* bfd_mach_frv or generic.  */
-      return TRUE;
+      return true;
 
     case bfd_mach_fr300:
     case bfd_mach_frvsimple:
@@ -1225,7 +1225,7 @@ md_operand (expressionS *expressionP)
 valueT
 md_section_align (segT segment, valueT size)
 {
-  int align = bfd_get_section_alignment (stdoutput, segment);
+  int align = bfd_section_alignment (segment);
   return ((size + (1 << align) - 1) & -(1 << align));
 }
 
@@ -1336,11 +1336,11 @@ md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED,
   switch (operand->type)
     {
     case FRV_OPERAND_LABEL16:
-      fixP->fx_pcrel = TRUE;
+      fixP->fx_pcrel = true;
       return BFD_RELOC_FRV_LABEL16;
 
     case FRV_OPERAND_LABEL24:
-      fixP->fx_pcrel = TRUE;
+      fixP->fx_pcrel = true;
 
       if (fixP->fx_cgen.opinfo != 0)
        return fixP->fx_cgen.opinfo;
@@ -1515,10 +1515,10 @@ frv_md_number_to_chars (char *buf, valueT val, int n)
 const char *
 md_atof (int type, char *litP, int *sizeP)
 {
-  return ieee_md_atof (type, litP, sizeP, TRUE);
+  return ieee_md_atof (type, litP, sizeP, true);
 }
 
-bfd_boolean
+bool
 frv_fix_adjustable (fixS *fixP)
 {
   bfd_reloc_code_real_type reloc_type;
@@ -1651,7 +1651,7 @@ frv_frob_file_section (bfd *abfd, asection *sec, void *ptr ATTRIBUTE_UNUSED)
   segment_info_type *seginfo = seg_info (sec);
   fixS *fixp;
   CGEN_CPU_DESC cd = gas_cgen_cpu_desc;
-  flagword flags = bfd_get_section_flags (abfd, sec);
+  flagword flags = bfd_section_flags (sec);
 
   /* Skip relocations in known sections (.ctors, .dtors, and .gcc_except_table)
      since we can fix those up by hand.  */