]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove bfd_boolean from sim
authorAlan Modra <amodra@gmail.com>
Thu, 5 Mar 2026 22:34:01 +0000 (09:04 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 7 Mar 2026 21:12:41 +0000 (07:42 +1030)
Replace a few vestiges of bfd_boolean in sim with bool, and FALSE/TRUE
with false/true where the type is clearly bool.

sim/aarch64/simulator.c
sim/cris/sim-if.c
sim/pru/interp.c
sim/v850/simops.c
sim/v850/v850.igen

index abf6dcd075930e1d35b6a6eaf0fb460e0c15dfb8..a7ade8266bf86a02c0e07cb3d5b45d7adb8e9470 100644 (file)
@@ -14322,13 +14322,13 @@ aarch64_decode_and_execute (sim_cpu *cpu, uint64_t pc)
     }
 }
 
-static bfd_boolean
+static bool
 aarch64_step (sim_cpu *cpu)
 {
   uint64_t pc = aarch64_get_PC (cpu);
 
   if (pc == TOP_LEVEL_RETURN_PC)
-    return FALSE;
+    return false;
 
   aarch64_set_next_PC (cpu, pc + 4);
 
@@ -14343,7 +14343,7 @@ aarch64_step (sim_cpu *cpu)
 
   aarch64_decode_and_execute (cpu, pc);
 
-  return TRUE;
+  return true;
 }
 
 void
index 960c636e66e8e1814a53f3cc128c7439d3e2cc57..12c8098320879160469b2b787a1e28312b01b849 100644 (file)
@@ -231,13 +231,13 @@ cris_option_handler (SIM_DESC sd, sim_cpu *cpu ATTRIBUTE_UNUSED, int opt,
    the program headers themeselves are also loaded.  The caller is
    responsible for asserting that ABFD is an ELF file.  */
 
-static bfd_boolean
+static bool
 cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write)
 {
   Elf_Internal_Phdr *phdr;
   int n_hdrs;
   int i;
-  bfd_boolean verbose = STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG;
+  bool verbose = STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG;
 
   phdr = elf_tdata (abfd)->phdr;
   n_hdrs = elf_elfheader (abfd)->e_phnum;
@@ -270,7 +270,7 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write)
                          STATE_MY_NAME (sd), (uint64_t) lma,
                          (uint64_t) phdr[i].p_filesz);
          free (buf);
-         return FALSE;
+         return false;
        }
 
       if (do_write (sd, lma, buf, phdr[i].p_filesz) != phdr[i].p_filesz)
@@ -281,13 +281,13 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write)
                          STATE_MY_NAME (sd), (uint64_t) lma,
                          (uint64_t) phdr[i].p_filesz);
          free (buf);
-         return FALSE;
+         return false;
        }
 
       free (buf);
     }
 
-  return TRUE;
+  return true;
 }
 
 /* Cover function of sim_state_free to free the cpu buffers as well.  */
@@ -494,17 +494,17 @@ cris_write_interp (SIM_DESC sd, uint64_t mem, const void *buf, uint64_t length)
    everything went fine, including an interpreter being absent and
    the program being in a non-ELF format.  */
 
-static bfd_boolean
+static bool
 cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd)
 {
   int i, n_hdrs;
   char *interp = NULL;
   struct bfd *ibfd;
-  bfd_boolean ok = FALSE;
+  bool ok = false;
   Elf_Internal_Phdr *phdr;
 
   if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
-    return TRUE;
+    return true;
 
   phdr = elf_tdata (abfd)->phdr;
   n_hdrs = aux_ent_phnum (abfd);
@@ -593,10 +593,10 @@ cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd)
 
   /* Register R10 should hold 0 at static start (no finifunc), but
      that's the default, so don't bother.  */
-  return TRUE;
+  return true;
 
  all_done:
-  ok = TRUE;
+  ok = true;
 
  interp_failed:
   bfd_close (ibfd);
index 045d417c93f9dbc2461535861a1f2754799daf7f..2913f7f79ba6ce0947bc7dd6f88fb152c1fffd03 100644 (file)
@@ -37,7 +37,7 @@
 
 /* DMEM zero address is perfectly valid.  But if CRT leaves the first word
    alone, we can use it as a trap to catch NULL pointer access.  */
-static bfd_boolean abort_on_dmem_zero_access;
+static bool abort_on_dmem_zero_access;
 
 enum {
   OPTION_ERROR_NULL_DEREF = OPTION_START,
@@ -740,7 +740,7 @@ pru_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, char *arg,
   switch (opt)
     {
     case OPTION_ERROR_NULL_DEREF:
-      abort_on_dmem_zero_access = TRUE;
+      abort_on_dmem_zero_access = true;
       return SIM_RC_OK;
 
     default:
index e2799af80e1aa1909b303266c415f9e5d8d40ce8..64a3916ad3b5526ea10af113c38c5ee31def193d 100644 (file)
@@ -3131,7 +3131,7 @@ v850_div (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p, u
   signed long int remainder;
   signed long int divide_by;
   signed long int divide_this;
-  bfd_boolean     overflow = FALSE;
+  bool overflow = false;
   
   /* Compute the result.  */
   divide_by   = (int32_t)op0;
@@ -3139,7 +3139,7 @@ v850_div (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p, u
 
   if (divide_by == 0 || (divide_by == -1 && divide_this == (1 << 31)))
     {
-      overflow  = TRUE;
+      overflow  = true;
       divide_by = 1;
     }
   
@@ -3164,7 +3164,7 @@ v850_divu (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p,
   unsigned long int remainder;
   unsigned long int divide_by;
   unsigned long int divide_this;
-  bfd_boolean       overflow = FALSE;
+  bool overflow = false;
   
   /* Compute the result.  */
   
@@ -3173,7 +3173,7 @@ v850_divu (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p,
   
   if (divide_by == 0)
     {
-      overflow = TRUE;
+      overflow = true;
       divide_by  = 1;
     }
   
index ef0f559bf94f367950c8432d4d62e4e4459688b6..cd07700ae47302961e82819edc5560c91b082f91 100644 (file)
@@ -1124,7 +1124,7 @@ rrrrr,111111,RRRRR + wwww,0011110,mmmm,0:XI:::mac
   unsigned long RdLo;
   unsigned long RdHi;
   int           carry;
-  bfd_boolean sign;
+  bool sign;
 
   op0 = GR[reg1];
   op1 = GR[reg2];