Fix potentially uninitialised variables in the Windows tools
[binutils-gdb.git] / opcodes / tic6x-dis.c
index 45a1e98f2a26cb6d57e32e98c5177978beb9d0be..36ee8d48a056cf20add34c180f6ce3e7d0d3f658 100644 (file)
@@ -1,5 +1,5 @@
 /* TI C6X disassembler.
-   Copyright (C) 2010-2019 Free Software Foundation, Inc.
+   Copyright (C) 2010-2022 Free Software Foundation, Inc.
    Contributed by Joseph Myers <joseph@codesourcery.com>
                  Bernd Schmidt  <bernds@codesourcery.com>
 
@@ -189,7 +189,7 @@ tic6x_extract_16 (unsigned char *p, tic6x_fetch_packet_header *header,
 /* FP points to a fetch packet.  Return whether it is header-based; if
    it is, fill in HEADER.  */
 
-static bfd_boolean
+static bool
 tic6x_check_fetch_packet_header (unsigned char *fp,
                                 tic6x_fetch_packet_header *header,
                                 struct disassemble_info *info)
@@ -206,27 +206,26 @@ tic6x_check_fetch_packet_header (unsigned char *fp,
       header->br = 0;
       header->sat = 0;
       for (i = 0; i < 7; i++)
-       header->word_compact[i] = FALSE;
+       header->word_compact[i] = false;
       for (i = 0; i < 14; i++)
-       header->p_bits[i] = FALSE;
-      return FALSE;
+       header->p_bits[i] = false;
+      return false;
     }
 
   for (i = 0; i < 7; i++)
     header->word_compact[i]
-      = (header->header & (1u << (21 + i))) ? TRUE : FALSE;
+      = (header->header & (1u << (21 + i))) != 0;
 
-  header->prot = (header->header & (1u << 20)) ? TRUE : FALSE;
-  header->rs = (header->header & (1u << 19)) ? TRUE : FALSE;
+  header->prot = (header->header & (1u << 20)) != 0;
+  header->rs = (header->header & (1u << 19)) != 0;
   header->dsz = (header->header >> 16) & 0x7;
-  header->br = (header->header & (1u << 15)) ? TRUE : FALSE;
-  header->sat = (header->header & (1u << 14)) ? TRUE : FALSE;
+  header->br = (header->header & (1u << 15)) != 0;
+  header->sat = (header->header & (1u << 14)) != 0;
 
   for (i = 0; i < 14; i++)
-    header->p_bits[i]
-      = (header->header & (1u << i)) ? TRUE : FALSE;
+    header->p_bits[i] = (header->header & (1u << i)) != 0;
 
-  return TRUE;
+  return true;
 }
 
 /* Disassemble the instruction at ADDR and print it using
@@ -242,10 +241,10 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
   unsigned char fp[32];
   unsigned int opcode;
   tic6x_opcode_id opcode_id;
-  bfd_boolean fetch_packet_header_based;
+  bool fetch_packet_header_based;
   tic6x_fetch_packet_header header;
   unsigned int num_bits;
-  bfd_boolean bad_offset = FALSE;
+  bool bad_offset = false;
 
   fp_offset = addr & 0x1f;
   fp_addr = addr - fp_offset;
@@ -264,10 +263,10 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
   if (fetch_packet_header_based)
     {
       if (fp_offset & 0x1)
-       bad_offset = TRUE;
+       bad_offset = true;
       if ((fp_offset & 0x3) && (fp_offset >= 28
                                || !header.word_compact[fp_offset >> 2]))
-       bad_offset = TRUE;
+       bad_offset = true;
       if (fp_offset == 28)
        {
          info->bytes_per_chunk = 4;
@@ -281,7 +280,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
     {
       num_bits = 32;
       if (fp_offset & 0x3)
-       bad_offset = TRUE;
+       bad_offset = true;
     }
 
   if (bad_offset)
@@ -312,7 +311,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
       const tic6x_insn_format *const fmt
        = &tic6x_insn_format_table[opc->format];
       const tic6x_insn_field *creg_field;
-      bfd_boolean p_bit;
+      bool p_bit;
       const char *parallel;
       const char *cond = "";
       const char *func_unit;
@@ -326,14 +325,14 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
         separating commas and trailing NUL).  */
       char operands[TIC6X_MAX_OPERANDS][24] = { { 0 } };
       bfd_vma operands_addresses[TIC6X_MAX_OPERANDS] = { 0 };
-      bfd_boolean operands_text[TIC6X_MAX_OPERANDS] = { FALSE };
-      bfd_boolean operands_pcrel[TIC6X_MAX_OPERANDS] = { FALSE };
+      bool operands_text[TIC6X_MAX_OPERANDS] = { false };
+      bool operands_pcrel[TIC6X_MAX_OPERANDS] = { false };
       unsigned int fix;
       unsigned int num_operands;
       unsigned int op_num;
-      bfd_boolean fixed_ok;
-      bfd_boolean operands_ok;
-      bfd_boolean have_t = FALSE;
+      bool fixed_ok;
+      bool operands_ok;
+      bool have_t = false;
 
       if (opc->flags & TIC6X_FLAG_MACRO)
        continue;
@@ -385,7 +384,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
          const tic6x_insn_field *cc_field;
           unsigned int s_value = 0;
           unsigned int z_value = 0;
-          bfd_boolean cond_known = FALSE;
+          bool cond_known = false;
           static const char *const conds[2][2] =
             {
               { "[a0] ", "[!a0] " },
@@ -401,7 +400,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
              cc_value = tic6x_field_bits (opcode, cc_field);
              s_value = (cc_value & 0x2) >> 1;
              z_value = (cc_value & 0x1);
-             cond_known = TRUE;
+             cond_known = true;
            }
          else
            {
@@ -425,7 +424,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                }
 
              z_value = tic6x_field_bits (opcode, z_field);
-             cond_known = TRUE;
+             cond_known = true;
            }
 
           if (!cond_known)
@@ -438,7 +437,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
 
       /* All fixed fields must have matching values; all fields with
         restricted ranges must have values within those ranges.  */
-      fixed_ok = TRUE;
+      fixed_ok = true;
       for (fix = 0; fix < opc->num_fixed_fields; fix++)
        {
          unsigned int field_bits;
@@ -456,7 +455,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
          if (field_bits < opc->fixed_fields[fix].min_val
              || field_bits > opc->fixed_fields[fix].max_val)
            {
-             fixed_ok = FALSE;
+             fixed_ok = false;
              break;
            }
        }
@@ -490,7 +489,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
            {
              unsigned int prev_opcode
                = tic6x_extract_32 (fp + (fp_offset & 0x1c) - 4, info);
-             p_bit = (prev_opcode & 0x1) ? TRUE : FALSE;
+             p_bit = (prev_opcode & 0x1) != 0;
            }
        }
       else
@@ -502,10 +501,10 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
          status = info->read_memory_func (fp_addr - 32, fp_prev, 32, info);
          if (status)
            /* No previous instruction to be parallel with.  */
-           p_bit = FALSE;
+           p_bit = false;
          else
            {
-             bfd_boolean prev_header_based;
+             bool prev_header_based;
              tic6x_fetch_packet_header prev_header;
 
              prev_header_based
@@ -518,14 +517,14 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                    {
                      unsigned int prev_opcode = tic6x_extract_32 (fp_prev + 24,
                                                                   info);
-                     p_bit = (prev_opcode & 0x1) ? TRUE : FALSE;
+                     p_bit = (prev_opcode & 0x1) != 0;
                    }
                }
              else
                {
                  unsigned int prev_opcode = tic6x_extract_32 (fp_prev + 28,
                                                               info);
-                 p_bit = (prev_opcode & 0x1) ? TRUE : FALSE;
+                 p_bit = (prev_opcode & 0x1) != 0;
                }
            }
        }
@@ -538,8 +537,8 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
          unsigned int fld_num;
          char func_unit_char;
          const char *data_str;
-         bfd_boolean have_areg = FALSE;
-         bfd_boolean have_cross = FALSE;
+         bool have_areg = false;
+         bool have_cross = false;
 
          func_unit_side = (opc->flags & TIC6X_FLAG_SIDE_B_ONLY) ? 2 : 0;
          func_unit_cross = 0;
@@ -595,19 +594,19 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                              opcode, fld_num);
                      abort ();
                    }
-                 have_cross = TRUE;
+                 have_cross = true;
                  func_unit_cross = fld_val;
                  break;
 
                 case tic6x_coding_rside:
                   /* If the format has a t field, use it for src/dst register side.  */
-                  have_t = TRUE;
+                  have_t = true;
                   t_val = fld_val;
                   func_unit_data_side = (t_val ? 2 : 1);
                   break;
 
                case tic6x_coding_areg:
-                 have_areg = TRUE;
+                 have_areg = true;
                  break;
 
                default:
@@ -654,7 +653,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                  printf ("opcode %x: illegal cross path specifier in adda opcode!\n", opcode);
                  abort ();
                }
-             func_unit_cross = (func_unit_side == 1 ? TRUE : FALSE);
+             func_unit_cross = func_unit_side == 1;
            }
 
          switch (opc->func_unit)
@@ -712,98 +711,98 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
       /* For each operand there must be one or more fields set based
         on that operand, that can together be used to derive the
         operand value.  */
-      operands_ok = TRUE;
+      operands_ok = true;
       num_operands = opc->num_operands;
       for (op_num = 0; op_num < num_operands; op_num++)
        {
          unsigned int fld_num;
          unsigned int mem_base_reg = 0;
-         bfd_boolean mem_base_reg_known = FALSE;
-         bfd_boolean mem_base_reg_known_long = FALSE;
+         bool mem_base_reg_known = false;
+         bool mem_base_reg_known_long = false;
          unsigned int mem_offset = 0;
-         bfd_boolean mem_offset_known = FALSE;
-         bfd_boolean mem_offset_known_long = FALSE;
+         bool mem_offset_known = false;
+         bool mem_offset_known_long = false;
          unsigned int mem_mode = 0;
-         bfd_boolean mem_mode_known = FALSE;
+         bool mem_mode_known = false;
          unsigned int mem_scaled = 0;
-         bfd_boolean mem_scaled_known = FALSE;
+         bool mem_scaled_known = false;
          unsigned int crlo = 0;
-         bfd_boolean crlo_known = FALSE;
+         bool crlo_known = false;
          unsigned int crhi = 0;
-         bfd_boolean crhi_known = FALSE;
-         bfd_boolean spmask_skip_operand = FALSE;
+         bool crhi_known = false;
+         bool spmask_skip_operand = false;
          unsigned int fcyc_bits = 0;
-         bfd_boolean prev_sploop_found = FALSE;
+         bool prev_sploop_found = false;
 
          switch (opc->operand_info[op_num].form)
            {
            case tic6x_operand_b15reg:
              /* Fully determined by the functional unit.  */
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "b15");
              continue;
 
            case tic6x_operand_zreg:
              /* Fully determined by the functional unit.  */
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "%c0",
                        (func_unit_side == 2 ? 'b' : 'a'));
              continue;
 
            case tic6x_operand_retreg:
              /* Fully determined by the functional unit.  */
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "%c3",
                        (func_unit_side == 2 ? 'b' : 'a'));
              continue;
 
            case tic6x_operand_irp:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "irp");
              continue;
 
            case tic6x_operand_nrp:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "nrp");
              continue;
 
            case tic6x_operand_ilc:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "ilc");
              continue;
 
            case tic6x_operand_hw_const_minus_1:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "-1");
              continue;
 
            case tic6x_operand_hw_const_0:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "0");
              continue;
 
            case tic6x_operand_hw_const_1:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "1");
              continue;
 
            case tic6x_operand_hw_const_5:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "5");
              continue;
 
            case tic6x_operand_hw_const_16:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "16");
              continue;
 
            case tic6x_operand_hw_const_24:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "24");
              continue;
 
            case tic6x_operand_hw_const_31:
-             operands_text[op_num] = TRUE;
+             operands_text[op_num] = true;
              snprintf (operands[op_num], 24, "31");
              continue;
 
@@ -845,13 +844,13 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                    {
                    case tic6x_operand_asm_const:
                    case tic6x_operand_link_const:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      snprintf (operands[op_num], 24, "%u", fld_val);
                      break;
 
                    case tic6x_operand_mem_long:
                      mem_offset = fld_val;
-                     mem_offset_known_long = TRUE;
+                     mem_offset_known_long = true;
                      break;
 
                    default:
@@ -861,12 +860,12 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                  break;
 
                case tic6x_coding_lcst_high16:
-                 operands_text[op_num] = TRUE;
+                 operands_text[op_num] = true;
                  snprintf (operands[op_num], 24, "%u", fld_val << 16);
                  break;
 
                 case tic6x_coding_scst_l3i:
-                 operands_text[op_num] = TRUE;
+                 operands_text[op_num] = true;
                   if (fld_val == 0)
                    {
                      signed_fld_val = 8;
@@ -881,7 +880,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                  break;
 
                case tic6x_coding_scst:
-                 operands_text[op_num] = TRUE;
+                 operands_text[op_num] = true;
                  signed_fld_val = (signed int) fld_val;
                  signed_fld_val ^= (1 << (tic6x_field_width (field) - 1));
                  signed_fld_val -= (1 << (tic6x_field_width (field) - 1));
@@ -889,7 +888,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                  break;
 
                case tic6x_coding_ucst_minus_one:
-                 operands_text[op_num] = TRUE;
+                 operands_text[op_num] = true;
                  snprintf (operands[op_num], 24, "%u", fld_val + 1);
                  break;
 
@@ -903,21 +902,21 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                    signed_fld_val *= 2;
                  else
                    signed_fld_val *= 4;
-                 operands_pcrel[op_num] = TRUE;
+                 operands_pcrel[op_num] = true;
                  operands_addresses[op_num] = fp_addr + signed_fld_val;
                  break;
 
                case tic6x_coding_regpair_msb:
                  if (opc->operand_info[op_num].form != tic6x_operand_regpair)
                    abort ();
-                 operands_text[op_num] = TRUE;
+                 operands_text[op_num] = true;
                  snprintf (operands[op_num], 24, "%c%u:%c%u",
                            (func_unit_side == 2 ? 'b' : 'a'), (fld_val | 0x1),
                            (func_unit_side == 2 ? 'b' : 'a'), (fld_val | 0x1) - 1);
                  break;
 
                case tic6x_coding_pcrel_half_unsigned:
-                 operands_pcrel[op_num] = TRUE;
+                 operands_pcrel[op_num] = true;
                  operands_addresses[op_num] = fp_addr + 2 * fld_val;
                  break;
 
@@ -937,49 +936,49 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                          printf ("opcode %x: operand treg but missing t field\n", opcode);
                          abort ();
                        }
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                       reg_side = t_val ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u", reg_side, reg_base + fld_val);
                      break;
 
                    case tic6x_operand_reg:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                       reg_side = (func_unit_side == 2) ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u", reg_side,  reg_base + fld_val);
                      break;
 
                    case tic6x_operand_reg_nors:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                       reg_side = (func_unit_side == 2) ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u", reg_side, fld_val);
                      break;
 
                    case tic6x_operand_reg_bside:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      snprintf (operands[op_num], 24, "b%u", reg_base + fld_val);
                      break;
 
                    case tic6x_operand_reg_bside_nors:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      snprintf (operands[op_num], 24, "b%u", fld_val);
                      break;
 
                    case tic6x_operand_xreg:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                       reg_side = ((func_unit_side == 2) ^ func_unit_cross) ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u", reg_side,  reg_base + fld_val);
                      break;
 
                    case tic6x_operand_dreg:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                       reg_side = (func_unit_data_side == 2) ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u", reg_side,  reg_base + fld_val);
                      break;
 
                    case tic6x_operand_regpair:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      if (fld_val & 1)
-                       operands_ok = FALSE;
+                       operands_ok = false;
                       reg_side = (func_unit_side == 2) ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u:%c%u",
                                 reg_side, reg_base + fld_val + 1,
@@ -987,9 +986,9 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                      break;
 
                    case tic6x_operand_xregpair:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      if (fld_val & 1)
-                       operands_ok = FALSE;
+                       operands_ok = false;
                       reg_side = ((func_unit_side == 2) ^ func_unit_cross) ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u:%c%u",
                                reg_side, reg_base + fld_val + 1,
@@ -1002,9 +1001,9 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                          printf ("opcode %x: operand tregpair but missing t field\n", opcode);
                          abort ();
                        }
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      if (fld_val & 1)
-                       operands_ok = FALSE;
+                       operands_ok = false;
                       reg_side = t_val ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u:%c%u",
                                reg_side, reg_base + fld_val + 1,
@@ -1012,9 +1011,9 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                      break;
 
                    case tic6x_operand_dregpair:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      if (fld_val & 1)
-                       operands_ok = FALSE;
+                       operands_ok = false;
                       reg_side = (func_unit_data_side) == 2 ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "%c%u:%c%u",
                                reg_side, reg_base + fld_val + 1,
@@ -1022,7 +1021,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                      break;
 
                    case tic6x_operand_mem_deref:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                       reg_side = func_unit_side == 2 ? 'b' : 'a';
                      snprintf (operands[op_num], 24, "*%c%u", reg_side, reg_base + fld_val);
                      break;
@@ -1030,7 +1029,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                    case tic6x_operand_mem_short:
                    case tic6x_operand_mem_ndw:
                      mem_base_reg = fld_val;
-                     mem_base_reg_known = TRUE;
+                     mem_base_reg_known = true;
                      break;
 
                    default:
@@ -1052,7 +1051,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                          abort ();
                        }
                      mem_base_reg = 0x4 | fld_val;
-                     mem_base_reg_known = TRUE;
+                     mem_base_reg_known = true;
                      break;
 
                    default:
@@ -1066,14 +1065,14 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                  switch (opc->operand_info[op_num].form)
                    {
                    case tic6x_operand_areg:
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      snprintf (operands[op_num], 24, "b%u",
                                fld_val ? 15u : 14u);
                      break;
 
                    case tic6x_operand_mem_long:
                      mem_base_reg = fld_val ? 15u : 14u;
-                     mem_base_reg_known_long = TRUE;
+                     mem_base_reg_known_long = true;
                      break;
 
                    default:
@@ -1089,42 +1088,42 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                case tic6x_coding_mem_offset_noscale:
                case tic6x_coding_mem_offset:
                  mem_offset = fld_val;
-                 mem_offset_known = TRUE;
+                 mem_offset_known = true;
                  if (num_bits == 16)
                    {
-                     mem_mode_known = TRUE;
+                     mem_mode_known = true;
                      mem_mode = TIC6X_INSN16_MEM_MODE_VAL (opc->flags);
-                     mem_scaled_known = TRUE;
-                     mem_scaled = TRUE;
+                     mem_scaled_known = true;
+                     mem_scaled = true;
                      if (opc->flags & TIC6X_FLAG_INSN16_B15PTR)
                        {
-                         mem_base_reg_known = TRUE;
+                         mem_base_reg_known = true;
                          mem_base_reg = 15;
                        }
                      if ( enc->coding_method == tic6x_coding_mem_offset_noscale
                           || enc->coding_method == tic6x_coding_mem_offset_noscale )
-                       mem_scaled = FALSE;
+                       mem_scaled = false;
                    }
                  break;
 
                case tic6x_coding_mem_mode:
                  mem_mode = fld_val;
-                 mem_mode_known = TRUE;
+                 mem_mode_known = true;
                  break;
 
                case tic6x_coding_scaled:
                  mem_scaled = fld_val;
-                 mem_scaled_known = TRUE;
+                 mem_scaled_known = true;
                  break;
 
                case tic6x_coding_crlo:
                  crlo = fld_val;
-                 crlo_known = TRUE;
+                 crlo_known = true;
                  break;
 
                case tic6x_coding_crhi:
                  crhi = fld_val;
-                 crhi_known = TRUE;
+                 crhi_known = true;
                  break;
 
                case tic6x_coding_fstg:
@@ -1133,7 +1132,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                    {
                      bfd_vma search_fp_addr = fp_addr;
                      bfd_vma search_fp_offset = fp_offset;
-                     bfd_boolean search_fp_header_based
+                     bool search_fp_header_based
                        = fetch_packet_header_based;
                      tic6x_fetch_packet_header search_fp_header = header;
                      unsigned char search_fp[32];
@@ -1215,13 +1214,13 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                                  || ((search_opcode & 0x003ffffe)
                                      == 0x0003e000)))
                            {
-                             prev_sploop_found = TRUE;
+                             prev_sploop_found = true;
                              sploop_ii = ((search_opcode >> 23) & 0x1f) + 1;
                            }
                          else if (search_num_bits == 16
                                   && (search_opcode & 0x3c7e) == 0x0c66)
                            {
-                             prev_sploop_found = TRUE;
+                             prev_sploop_found = true;
                              sploop_ii
                                = (((search_opcode >> 7) & 0x7)
                                   | ((search_opcode >> 11) & 0x8)) + 1;
@@ -1244,7 +1243,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                              else if (sploop_ii <= 14)
                                fcyc_bits = 4;
                              else
-                               prev_sploop_found = FALSE;
+                               prev_sploop_found = false;
                            }
                          if (prev_sploop_found)
                            break;
@@ -1252,8 +1251,8 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                    }
                  if (!prev_sploop_found)
                    {
-                     operands_ok = FALSE;
-                     operands_text[op_num] = TRUE;
+                     operands_ok = false;
+                     operands_text[op_num] = true;
                      break;
                    }
                  if (fcyc_bits > tic6x_field_width(field))
@@ -1266,12 +1265,12 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                      int i, t;
                      for (t = 0, i = fcyc_bits; i < 6; i++)
                        t = (t << 1) | ((fld_val >> i) & 1);
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      snprintf (operands[op_num], 24, "%u", t);
                    }
                  else
                    {
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      snprintf (operands[op_num], 24, "%u",
                                fld_val & ((1 << fcyc_bits) - 1));
                    }
@@ -1279,13 +1278,13 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
 
                case tic6x_coding_spmask:
                  if (fld_val == 0)
-                   spmask_skip_operand = TRUE;
+                   spmask_skip_operand = true;
                  else
                    {
                      char *p;
                      unsigned int i;
 
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      p = operands[op_num];
                      for (i = 0; i < 8; i++)
                        if (fld_val & (1 << i))
@@ -1318,7 +1317,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                      printf ("opcode %x: long access but operands already known ?\n", opcode);
                      abort ();
                    }
-                 operands_text[op_num] = TRUE;
+                 operands_text[op_num] = true;
                  snprintf (operands[op_num], 24, "*+b%u(%u)", mem_base_reg,
                            mem_offset * opc->operand_info[op_num].size);
                }
@@ -1330,8 +1329,8 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                {
                  char side;
                  char base[4];
-                 bfd_boolean offset_is_reg;
-                 bfd_boolean offset_scaled;
+                 bool offset_is_reg;
+                 bool offset_scaled;
                  char offset[4];
                  char offsetp[6];
 
@@ -1344,7 +1343,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                  side = func_unit_side == 2 ? 'b' : 'a';
                  snprintf (base, 4, "%c%u", side, mem_base_reg);
 
-                 offset_is_reg = ((mem_mode & 4) ? TRUE : FALSE);
+                 offset_is_reg = (mem_mode & 4) != 0;
                  if (offset_is_reg)
                    {
 
@@ -1355,21 +1354,21 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                      snprintf (offset, 4, "%c%u", side, reg_base + mem_offset);
                      if (opc->operand_info[op_num].form
                          == tic6x_operand_mem_ndw)
-                       offset_scaled = mem_scaled ? TRUE : FALSE;
+                       offset_scaled = mem_scaled != 0;
                      else
-                       offset_scaled = TRUE;
+                       offset_scaled = true;
                    }
                  else
                    {
                      if (opc->operand_info[op_num].form
                          == tic6x_operand_mem_ndw)
                        {
-                         offset_scaled = mem_scaled ? TRUE : FALSE;
+                         offset_scaled = mem_scaled != 0;
                          snprintf (offset, 4, "%u", mem_offset);
                        }
                      else
                        {
-                         offset_scaled = FALSE;
+                         offset_scaled = false;
                          snprintf (offset, 4, "%u",
                                    (mem_offset
                                     * opc->operand_info[op_num].size));
@@ -1381,7 +1380,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                  else
                    snprintf (offsetp, 6, "(%s)", offset);
 
-                 operands_text[op_num] = TRUE;
+                 operands_text[op_num] = true;
                  switch (mem_mode & ~4u)
                    {
                    case 0:
@@ -1394,7 +1393,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
 
                    case 2:
                    case 3:
-                     operands_ok = FALSE;
+                     operands_ok = false;
                      break;
 
                    case 8:
@@ -1457,12 +1456,12 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
                    }
                  if (crid == tic6x_ctrl_max)
                    {
-                     operands_text[op_num] = TRUE;
-                     operands_ok = FALSE;
+                     operands_text[op_num] = true;
+                     operands_ok = false;
                    }
                  else
                    {
-                     operands_text[op_num] = TRUE;
+                     operands_text[op_num] = true;
                      snprintf (operands[op_num], 24, "%s",
                                tic6x_ctrl_table[crid].name);
                    }