}
}
-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);
aarch64_decode_and_execute (cpu, pc);
- return TRUE;
+ return true;
}
void
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;
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)
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. */
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);
/* 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);
/* 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,
switch (opt)
{
case OPTION_ERROR_NULL_DEREF:
- abort_on_dmem_zero_access = TRUE;
+ abort_on_dmem_zero_access = true;
return SIM_RC_OK;
default:
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;
if (divide_by == 0 || (divide_by == -1 && divide_this == (1 << 31)))
{
- overflow = TRUE;
+ overflow = true;
divide_by = 1;
}
unsigned long int remainder;
unsigned long int divide_by;
unsigned long int divide_this;
- bfd_boolean overflow = FALSE;
+ bool overflow = false;
/* Compute the result. */
if (divide_by == 0)
{
- overflow = TRUE;
+ overflow = true;
divide_by = 1;
}