{
/* Whether to print something less confusing if we find something
matching a switch-construct. */
- bfd_boolean trace_case;
+ bool trace_case;
/* Whether this code is flagged as crisv32. FIXME: Should be an enum
that includes "compatible". */
/* Parse disassembler options and store state in info. FIXME: For the
time being, we abuse static variables. */
-static bfd_boolean
+static bool
cris_parse_disassembler_options (disassemble_info *info,
enum cris_disass_family distype)
{
info->private_data = calloc (1, sizeof (struct cris_disasm_data));
disdata = (struct cris_disasm_data *) info->private_data;
if (disdata == NULL)
- return FALSE;
+ return false;
/* Default true. */
disdata->trace_case
|| (strcmp (info->disassembler_options, "nocase") != 0));
disdata->distype = distype;
- return TRUE;
+ return true;
}
static const struct cris_spec_reg *
format_reg (struct cris_disasm_data *disdata,
int regno,
char *outbuffer_start,
- bfd_boolean with_reg_prefix)
+ bool with_reg_prefix)
{
char *outbuffer = outbuffer_start;
static char *
format_sup_reg (unsigned int regno,
char *outbuffer_start,
- bfd_boolean with_reg_prefix)
+ bool with_reg_prefix)
{
char *outbuffer = outbuffer_start;
int i;
const struct cris_opcode *prefix_opcodep,
unsigned int prefix_insn,
unsigned char *prefix_buffer,
- bfd_boolean with_reg_prefix)
+ bool with_reg_prefix)
{
/* Get a buffer of somewhat reasonable size where we store
intermediate parts of the insn. */
better way). */
if (opcodep->name[0] == 'j')
{
- if (CONST_STRNEQ (opcodep->name, "jsr"))
+ if (startswith (opcodep->name, "jsr"))
/* It's "jsr" or "jsrc". */
info->insn_type = dis_jsr;
else
itself or in a "move.d const,rN, sub.d rN,rM"-like sequence. */
if (TRACE_CASE && case_offset_counter == 0)
{
- if (CONST_STRNEQ (opcodep->name, "sub"))
+ if (startswith (opcodep->name, "sub"))
case_offset = last_immediate;
/* It could also be an "add", if there are negative case-values. */
- else if (CONST_STRNEQ (opcodep->name, "add"))
+ else if (startswith (opcodep->name, "add"))
/* The first case is the negated operand to the add. */
case_offset = -last_immediate;
/* A bound insn will tell us the number of cases. */
- else if (CONST_STRNEQ (opcodep->name, "bound"))
+ else if (startswith (opcodep->name, "bound"))
no_of_case_offsets = last_immediate + 1;
/* A jump or jsr or branch breaks the chain of insns for a
static int
print_insn_cris_generic (bfd_vma memaddr,
disassemble_info *info,
- bfd_boolean with_reg_prefix)
+ bool with_reg_prefix)
{
int nbytes;
unsigned int insn;
if (info->private_data == NULL
&& !cris_parse_disassembler_options (info, cris_dis_v0_v10))
return -1;
- return print_insn_cris_generic (vma, info, TRUE);
+ return print_insn_cris_generic (vma, info, true);
}
/* Disassemble, prefixing register names with `$'. CRIS v32. */
if (info->private_data == NULL
&& !cris_parse_disassembler_options (info, cris_dis_v32))
return -1;
- return print_insn_cris_generic (vma, info, TRUE);
+ return print_insn_cris_generic (vma, info, true);
}
/* Disassemble, prefixing register names with `$'.
if (info->private_data == NULL
&& !cris_parse_disassembler_options (info, cris_dis_common_v10_v32))
return -1;
- return print_insn_cris_generic (vma, info, TRUE);
+ return print_insn_cris_generic (vma, info, true);
}
/* Disassemble, no prefixes on register names. CRIS v0..v10. */
if (info->private_data == NULL
&& !cris_parse_disassembler_options (info, cris_dis_v0_v10))
return -1;
- return print_insn_cris_generic (vma, info, FALSE);
+ return print_insn_cris_generic (vma, info, false);
}
/* Disassemble, no prefixes on register names. CRIS v32. */
if (info->private_data == NULL
&& !cris_parse_disassembler_options (info, cris_dis_v32))
return -1;
- return print_insn_cris_generic (vma, info, FALSE);
+ return print_insn_cris_generic (vma, info, false);
}
/* Disassemble, no prefixes on register names.
if (info->private_data == NULL
&& !cris_parse_disassembler_options (info, cris_dis_common_v10_v32))
return -1;
- return print_insn_cris_generic (vma, info, FALSE);
+ return print_insn_cris_generic (vma, info, false);
}
/* Return a disassembler-function that prints registers with a `$' prefix,