Use bool in include

* bfdlink.h: Replace bfd_boolean with bool throughout.
	* coff/ecoff.h: Likewise.
	* coff/xcoff.h: Likewise.
	* dis-asm.h: Likewise.
	* elf/mmix.h: Likewise.
	* elf/xtensa.h: Likewise.
	* opcode/aarch64.h: Likewise, and FALSE with false, TRUE with true.
	* opcode/arc.h: Likewise.
	* opcode/mips.h: Likewise.
	* opcode/tic6x-opcode-table.h: Likewise.
	* opcode/tic6x.h: Likewise.
This commit is contained in:
Alan Modra
2021-03-31 10:20:10 +10:30
parent ad9e24ad11
commit 9193bc4285
12 changed files with 89 additions and 77 deletions

View File

@ -1,3 +1,17 @@
2021-03-31 Alan Modra <amodra@gmail.com>
* bfdlink.h: Replace bfd_boolean with bool throughout.
* coff/ecoff.h: Likewise.
* coff/xcoff.h: Likewise.
* dis-asm.h: Likewise.
* elf/mmix.h: Likewise.
* elf/xtensa.h: Likewise.
* opcode/aarch64.h: Likewise, and FALSE with false, TRUE with true.
* opcode/arc.h: Likewise.
* opcode/mips.h: Likewise.
* opcode/tic6x-opcode-table.h: Likewise.
* opcode/tic6x.h: Likewise.
2021-03-31 Alan Modra <amodra@gmail.com> 2021-03-31 Alan Modra <amodra@gmail.com>
* cgen/basic-modes.h: Include stdint.h in place of bfd_stdint.h. * cgen/basic-modes.h: Include stdint.h in place of bfd_stdint.h.

View File

@ -216,16 +216,15 @@ struct bfd_link_hash_table
follows bfd_link_hash_indirect and bfd_link_hash_warning links to follows bfd_link_hash_indirect and bfd_link_hash_warning links to
the real symbol. */ the real symbol. */
extern struct bfd_link_hash_entry *bfd_link_hash_lookup extern struct bfd_link_hash_entry *bfd_link_hash_lookup
(struct bfd_link_hash_table *, const char *, bfd_boolean create, (struct bfd_link_hash_table *, const char *, bool create,
bfd_boolean copy, bfd_boolean follow); bool copy, bool follow);
/* Look up an entry in the main linker hash table if the symbol might /* Look up an entry in the main linker hash table if the symbol might
be wrapped. This should only be used for references to an be wrapped. This should only be used for references to an
undefined symbol, not for definitions of a symbol. */ undefined symbol, not for definitions of a symbol. */
extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
(bfd *, struct bfd_link_info *, const char *, bfd_boolean, (bfd *, struct bfd_link_info *, const char *, bool, bool, bool);
bfd_boolean, bfd_boolean);
/* If H is a wrapped symbol, ie. the symbol name starts with "__wrap_" /* If H is a wrapped symbol, ie. the symbol name starts with "__wrap_"
and the remainder is found in wrap_hash, return the real symbol. */ and the remainder is found in wrap_hash, return the real symbol. */
@ -236,7 +235,7 @@ extern struct bfd_link_hash_entry *unwrap_hash_lookup
/* Traverse a link hash table. */ /* Traverse a link hash table. */
extern void bfd_link_hash_traverse extern void bfd_link_hash_traverse
(struct bfd_link_hash_table *, (struct bfd_link_hash_table *,
bfd_boolean (*) (struct bfd_link_hash_entry *, void *), bool (*) (struct bfd_link_hash_entry *, void *),
void *); void *);
/* Add an entry to the undefs list. */ /* Add an entry to the undefs list. */
@ -248,12 +247,12 @@ extern void bfd_link_repair_undef_list
(struct bfd_link_hash_table *table); (struct bfd_link_hash_table *table);
/* Read symbols and cache symbol pointer array in outsymbols. */ /* Read symbols and cache symbol pointer array in outsymbols. */
extern bfd_boolean bfd_generic_link_read_symbols (bfd *); extern bool bfd_generic_link_read_symbols (bfd *);
/* Check the relocs in the BFD. Called after all the input /* Check the relocs in the BFD. Called after all the input
files have been loaded, and garbage collection has tagged files have been loaded, and garbage collection has tagged
any unneeded sections. */ any unneeded sections. */
extern bfd_boolean bfd_link_check_relocs (bfd *,struct bfd_link_info *); extern bool bfd_link_check_relocs (bfd *,struct bfd_link_info *);
struct bfd_sym_chain struct bfd_sym_chain
{ {
@ -292,7 +291,7 @@ struct flag_info_list
{ {
flag_type with; flag_type with;
const char *name; const char *name;
bfd_boolean valid; bool valid;
struct flag_info_list *next; struct flag_info_list *next;
}; };
@ -302,7 +301,7 @@ struct flag_info
flagword only_with_flags; flagword only_with_flags;
flagword not_with_flags; flagword not_with_flags;
struct flag_info_list *flag_list; struct flag_info_list *flag_list;
bfd_boolean flags_initialized; bool flags_initialized;
}; };
struct bfd_elf_dynamic_list; struct bfd_elf_dynamic_list;
@ -702,7 +701,7 @@ struct bfd_link_callbacks
BFD from which symbols should in fact be added in place of the BFD from which symbols should in fact be added in place of the
original BFD's symbols. Returns TRUE if the object should be original BFD's symbols. Returns TRUE if the object should be
added, FALSE if it should be skipped. */ added, FALSE if it should be skipped. */
bfd_boolean (*add_archive_element) bool (*add_archive_element)
(struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd); (struct bfd_link_info *, bfd *abfd, const char *name, bfd **subsbfd);
/* A function which is called when a symbol is found with multiple /* A function which is called when a symbol is found with multiple
definitions. H is the symbol which is defined multiple times. definitions. H is the symbol which is defined multiple times.
@ -736,7 +735,7 @@ struct bfd_link_callbacks
relocatable file. NAME is the name of the symbol found. ABFD, relocatable file. NAME is the name of the symbol found. ABFD,
SECTION and VALUE are the value of the symbol. */ SECTION and VALUE are the value of the symbol. */
void (*constructor) void (*constructor)
(struct bfd_link_info *, bfd_boolean constructor, const char *name, (struct bfd_link_info *, bool constructor, const char *name,
bfd *abfd, asection *sec, bfd_vma value); bfd *abfd, asection *sec, bfd_vma value);
/* A function which is called to issue a linker warning. For /* A function which is called to issue a linker warning. For
example, this is called when there is a reference to a warning example, this is called when there is a reference to a warning
@ -755,7 +754,7 @@ struct bfd_link_callbacks
a fatal error or not. In some cases SECTION may be NULL. */ a fatal error or not. In some cases SECTION may be NULL. */
void (*undefined_symbol) void (*undefined_symbol)
(struct bfd_link_info *, const char *name, bfd *abfd, (struct bfd_link_info *, const char *name, bfd *abfd,
asection *section, bfd_vma address, bfd_boolean is_fatal); asection *section, bfd_vma address, bool is_fatal);
/* A function which is called when a reloc overflow occurs. ENTRY is /* A function which is called when a reloc overflow occurs. ENTRY is
the link hash table entry for the symbol the reloc is against. the link hash table entry for the symbol the reloc is against.
NAME is the name of the local symbol or section the reloc is NAME is the name of the local symbol or section the reloc is
@ -791,7 +790,7 @@ struct bfd_link_callbacks
if applicable. ABFD, SECTION and ADDRESS are the (new) value of if applicable. ABFD, SECTION and ADDRESS are the (new) value of
the symbol. If SECTION is bfd_und_section, this is a reference. the symbol. If SECTION is bfd_und_section, this is a reference.
FLAGS are the symbol BSF_* flags. */ FLAGS are the symbol BSF_* flags. */
bfd_boolean (*notice) bool (*notice)
(struct bfd_link_info *, struct bfd_link_hash_entry *h, (struct bfd_link_info *, struct bfd_link_hash_entry *h,
struct bfd_link_hash_entry *inh, struct bfd_link_hash_entry *inh,
bfd *abfd, asection *section, bfd_vma address, flagword flags); bfd *abfd, asection *section, bfd_vma address, flagword flags);
@ -807,10 +806,10 @@ struct bfd_link_callbacks
/* This callback provides a chance for users of the BFD library to /* This callback provides a chance for users of the BFD library to
override its decision about whether to place two adjacent sections override its decision about whether to place two adjacent sections
into the same segment. */ into the same segment. */
bfd_boolean (*override_segment_assignment) bool (*override_segment_assignment)
(struct bfd_link_info *, bfd * abfd, (struct bfd_link_info *, bfd * abfd,
asection * current_section, asection * previous_section, asection * current_section, asection * previous_section,
bfd_boolean new_segment); bool new_segment);
/* This callback provides a chance for callers of the BFD to examine the /* This callback provides a chance for callers of the BFD to examine the
ELF (dynamic) string table once it is complete. */ ELF (dynamic) string table once it is complete. */
void (*examine_strtab) void (*examine_strtab)
@ -930,9 +929,9 @@ extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
struct bfd_section_already_linked; struct bfd_section_already_linked;
extern bfd_boolean bfd_section_already_linked_table_init (void); extern bool bfd_section_already_linked_table_init (void);
extern void bfd_section_already_linked_table_free (void); extern void bfd_section_already_linked_table_free (void);
extern bfd_boolean _bfd_handle_already_linked extern bool _bfd_handle_already_linked
(struct bfd_section *, struct bfd_section_already_linked *, (struct bfd_section *, struct bfd_section_already_linked *,
struct bfd_link_info *); struct bfd_link_info *);

View File

@ -407,7 +407,7 @@ struct ecoff_debug_swap
/* Function to read symbol data and set up pointers in /* Function to read symbol data and set up pointers in
ecoff_debug_info structure. The section argument is used for ecoff_debug_info structure. The section argument is used for
ELF, not straight ECOFF. */ ELF, not straight ECOFF. */
bfd_boolean (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *); bool (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *);
}; };
#endif /* ! defined (ECOFF_H) */ #endif /* ! defined (ECOFF_H) */

View File

@ -406,7 +406,7 @@ struct xcoff_link_hash_entry
struct xcoff_loader_info struct xcoff_loader_info
{ {
/* Set if a problem occurred. */ /* Set if a problem occurred. */
bfd_boolean failed; bool failed;
/* Output BFD. */ /* Output BFD. */
bfd *output_bfd; bfd *output_bfd;

View File

@ -150,7 +150,7 @@ typedef struct disassemble_info
/* Function called to check if a SYMBOL is can be displayed to the user. /* Function called to check if a SYMBOL is can be displayed to the user.
This is used by some ports that want to hide special symbols when This is used by some ports that want to hide special symbols when
displaying debugging outout. */ displaying debugging outout. */
bfd_boolean (* symbol_is_valid) bool (* symbol_is_valid)
(asymbol *, struct disassemble_info *dinfo); (asymbol *, struct disassemble_info *dinfo);
/* These are for buffer_read_memory. */ /* These are for buffer_read_memory. */
@ -189,7 +189,7 @@ typedef struct disassemble_info
unsigned int skip_zeroes_at_end; unsigned int skip_zeroes_at_end;
/* Whether the disassembler always needs the relocations. */ /* Whether the disassembler always needs the relocations. */
bfd_boolean disassembler_needs_relocs; bool disassembler_needs_relocs;
/* Results from instruction decoders. Not all decoders yet support /* Results from instruction decoders. Not all decoders yet support
this information. This info is set each time an instruction is this information. This info is set each time an instruction is
@ -303,10 +303,10 @@ extern void print_arm_disassembler_options (FILE *);
extern void print_arc_disassembler_options (FILE *); extern void print_arc_disassembler_options (FILE *);
extern void print_s390_disassembler_options (FILE *); extern void print_s390_disassembler_options (FILE *);
extern void print_wasm32_disassembler_options (FILE *); extern void print_wasm32_disassembler_options (FILE *);
extern bfd_boolean aarch64_symbol_is_valid (asymbol *, struct disassemble_info *); extern bool aarch64_symbol_is_valid (asymbol *, struct disassemble_info *);
extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *); extern bool arm_symbol_is_valid (asymbol *, struct disassemble_info *);
extern bfd_boolean csky_symbol_is_valid (asymbol *, struct disassemble_info *); extern bool csky_symbol_is_valid (asymbol *, struct disassemble_info *);
extern bfd_boolean riscv_symbol_is_valid (asymbol *, struct disassemble_info *); extern bool riscv_symbol_is_valid (asymbol *, struct disassemble_info *);
extern void disassemble_init_powerpc (struct disassemble_info *); extern void disassemble_init_powerpc (struct disassemble_info *);
extern void disassemble_init_s390 (struct disassemble_info *); extern void disassemble_init_s390 (struct disassemble_info *);
extern void disassemble_init_wasm32 (struct disassemble_info *); extern void disassemble_init_wasm32 (struct disassemble_info *);
@ -320,7 +320,7 @@ extern const disasm_options_and_args_t *disassembler_options_s390 (void);
endian if BIG is true), bfd_mach value MACH, and ABFD, if that support endian if BIG is true), bfd_mach value MACH, and ABFD, if that support
is available. ABFD may be NULL. */ is available. ABFD may be NULL. */
extern disassembler_ftype disassembler (enum bfd_architecture arc, extern disassembler_ftype disassembler (enum bfd_architecture arc,
bfd_boolean big, unsigned long mach, bool big, unsigned long mach,
bfd *abfd); bfd *abfd);
/* Amend the disassemble_info structure as necessary for the target architecture. /* Amend the disassemble_info structure as necessary for the target architecture.
@ -381,7 +381,7 @@ extern int generic_symbol_at_address
(bfd_vma, struct disassemble_info *); (bfd_vma, struct disassemble_info *);
/* Also always true. */ /* Also always true. */
extern bfd_boolean generic_symbol_is_valid extern bool generic_symbol_is_valid
(asymbol *, struct disassemble_info *); (asymbol *, struct disassemble_info *);
/* Method to initialize a disassemble_info struct. This should be /* Method to initialize a disassemble_info struct. This should be

View File

@ -162,11 +162,11 @@ END_RELOC_NUMBERS (R_MMIX_max)
#define MMO_SEC_DEBUGGING 0x10000 #define MMO_SEC_DEBUGGING 0x10000
#ifdef BFD_ARCH_SIZE #ifdef BFD_ARCH_SIZE
extern bfd_boolean _bfd_mmix_before_linker_allocation extern bool _bfd_mmix_before_linker_allocation
(bfd *, struct bfd_link_info *); (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mmix_after_linker_allocation extern bool _bfd_mmix_after_linker_allocation
(bfd *, struct bfd_link_info *); (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mmix_check_all_relocs extern bool _bfd_mmix_check_all_relocs
(bfd *, struct bfd_link_info *); (bfd *, struct bfd_link_info *);
#endif #endif

View File

@ -221,7 +221,7 @@ xtensa_read_table_entries (bfd *abfd,
asection *section, asection *section,
property_table_entry **table_p, property_table_entry **table_p,
const char *sec_name, const char *sec_name,
bfd_boolean output_addr); bool output_addr);
extern int extern int
xtensa_compute_fill_extra_space (property_table_entry *entry); xtensa_compute_fill_extra_space (property_table_entry *entry);

View File

@ -753,14 +753,14 @@ typedef aarch64_opnd_qualifier_t \
aarch64_opnd_qualifier_seq_t [AARCH64_MAX_OPND_NUM]; aarch64_opnd_qualifier_seq_t [AARCH64_MAX_OPND_NUM];
/* FIXME: improve the efficiency. */ /* FIXME: improve the efficiency. */
static inline bfd_boolean static inline bool
empty_qualifier_sequence_p (const aarch64_opnd_qualifier_t *qualifiers) empty_qualifier_sequence_p (const aarch64_opnd_qualifier_t *qualifiers)
{ {
int i; int i;
for (i = 0; i < AARCH64_MAX_OPND_NUM; ++i) for (i = 0; i < AARCH64_MAX_OPND_NUM; ++i)
if (qualifiers[i] != AARCH64_OPND_QLF_NIL) if (qualifiers[i] != AARCH64_OPND_QLF_NIL)
return FALSE; return false;
return TRUE; return true;
} }
/* Forward declare error reporting type. */ /* Forward declare error reporting type. */
@ -819,7 +819,7 @@ struct aarch64_opcode
/* If non-NULL, a function to verify that a given instruction is valid. */ /* If non-NULL, a function to verify that a given instruction is valid. */
enum err_type (* verifier) (const struct aarch64_inst *, const aarch64_insn, enum err_type (* verifier) (const struct aarch64_inst *, const aarch64_insn,
bfd_vma, bfd_boolean, aarch64_operand_error *, bfd_vma, bool, aarch64_operand_error *,
struct aarch64_instr_sequence *); struct aarch64_instr_sequence *);
}; };
@ -897,13 +897,13 @@ extern aarch64_opcode aarch64_opcode_table[];
#define C_MAX_ELEM (1U << 1) #define C_MAX_ELEM (1U << 1)
/* Next bit is 2. */ /* Next bit is 2. */
static inline bfd_boolean static inline bool
alias_opcode_p (const aarch64_opcode *opcode) alias_opcode_p (const aarch64_opcode *opcode)
{ {
return (opcode->flags & F_ALIAS) != 0; return (opcode->flags & F_ALIAS) != 0;
} }
static inline bfd_boolean static inline bool
opcode_has_alias (const aarch64_opcode *opcode) opcode_has_alias (const aarch64_opcode *opcode)
{ {
return (opcode->flags & F_HAS_ALIAS) != 0; return (opcode->flags & F_HAS_ALIAS) != 0;
@ -916,13 +916,13 @@ opcode_priority (const aarch64_opcode *opcode)
return (opcode->flags >> 2) & 0x3; return (opcode->flags >> 2) & 0x3;
} }
static inline bfd_boolean static inline bool
pseudo_opcode_p (const aarch64_opcode *opcode) pseudo_opcode_p (const aarch64_opcode *opcode)
{ {
return (opcode->flags & F_PSEUDO) != 0lu; return (opcode->flags & F_PSEUDO) != 0lu;
} }
static inline bfd_boolean static inline bool
optional_operand_p (const aarch64_opcode *opcode, unsigned int idx) optional_operand_p (const aarch64_opcode *opcode, unsigned int idx)
{ {
return ((opcode->flags >> 12) & 0x7) == idx + 1; return ((opcode->flags >> 12) & 0x7) == idx + 1;
@ -940,7 +940,7 @@ get_opcode_dependent_value (const aarch64_opcode *opcode)
return (opcode->flags >> 24) & 0x7; return (opcode->flags >> 24) & 0x7;
} }
static inline bfd_boolean static inline bool
opcode_has_special_coder (const aarch64_opcode *opcode) opcode_has_special_coder (const aarch64_opcode *opcode)
{ {
return (opcode->flags & (F_SF | F_LSE_SZ | F_SIZEQ | F_FPTYPE | F_SSIZE | F_T return (opcode->flags & (F_SF | F_LSE_SZ | F_SIZEQ | F_FPTYPE | F_SSIZE | F_T
@ -974,9 +974,9 @@ typedef struct
extern const aarch64_sys_reg aarch64_sys_regs []; extern const aarch64_sys_reg aarch64_sys_regs [];
extern const aarch64_sys_reg aarch64_pstatefields []; extern const aarch64_sys_reg aarch64_pstatefields [];
extern bfd_boolean aarch64_sys_reg_deprecated_p (const uint32_t); extern bool aarch64_sys_reg_deprecated_p (const uint32_t);
extern bfd_boolean aarch64_pstatefield_supported_p (const aarch64_feature_set, extern bool aarch64_pstatefield_supported_p (const aarch64_feature_set,
const aarch64_sys_reg *); const aarch64_sys_reg *);
typedef struct typedef struct
{ {
@ -985,8 +985,8 @@ typedef struct
uint32_t flags ; uint32_t flags ;
} aarch64_sys_ins_reg; } aarch64_sys_ins_reg;
extern bfd_boolean aarch64_sys_ins_reg_has_xt (const aarch64_sys_ins_reg *); extern bool aarch64_sys_ins_reg_has_xt (const aarch64_sys_ins_reg *);
extern bfd_boolean extern bool
aarch64_sys_ins_reg_supported_p (const aarch64_feature_set, aarch64_sys_ins_reg_supported_p (const aarch64_feature_set,
const char *reg_name, aarch64_insn, const char *reg_name, aarch64_insn,
uint32_t, aarch64_feature_set); uint32_t, aarch64_feature_set);
@ -1019,7 +1019,7 @@ enum aarch64_modifier_kind
AARCH64_MOD_MUL_VL, AARCH64_MOD_MUL_VL,
}; };
bfd_boolean bool
aarch64_extend_operator_p (enum aarch64_modifier_kind); aarch64_extend_operator_p (enum aarch64_modifier_kind);
enum aarch64_modifier_kind enum aarch64_modifier_kind
@ -1242,7 +1242,7 @@ struct aarch64_operand_error
int index; int index;
const char *error; const char *error;
int data[3]; /* Some data for extra information. */ int data[3]; /* Some data for extra information. */
bfd_boolean non_fatal; bool non_fatal;
}; };
/* AArch64 sequence structure used to track instructions with F_SCAN /* AArch64 sequence structure used to track instructions with F_SCAN
@ -1262,7 +1262,7 @@ struct aarch64_instr_sequence
/* Encoding entrypoint. */ /* Encoding entrypoint. */
extern bfd_boolean extern bool
aarch64_opcode_encode (const aarch64_opcode *, const aarch64_inst *, aarch64_opcode_encode (const aarch64_opcode *, const aarch64_inst *,
aarch64_insn *, aarch64_opnd_qualifier_t *, aarch64_insn *, aarch64_opnd_qualifier_t *,
aarch64_operand_error *, aarch64_instr_sequence *); aarch64_operand_error *, aarch64_instr_sequence *);
@ -1293,7 +1293,7 @@ extern aarch64_opnd_qualifier_t
aarch64_get_expected_qualifier (const aarch64_opnd_qualifier_seq_t *, int, aarch64_get_expected_qualifier (const aarch64_opnd_qualifier_seq_t *, int,
const aarch64_opnd_qualifier_t, int); const aarch64_opnd_qualifier_t, int);
extern bfd_boolean extern bool
aarch64_is_destructive_by_operands (const aarch64_opcode *); aarch64_is_destructive_by_operands (const aarch64_opcode *);
extern int extern int
@ -1306,7 +1306,7 @@ extern int
aarch64_zero_register_p (const aarch64_opnd_info *); aarch64_zero_register_p (const aarch64_opnd_info *);
extern enum err_type extern enum err_type
aarch64_decode_insn (aarch64_insn, aarch64_inst *, bfd_boolean, aarch64_decode_insn (aarch64_insn, aarch64_inst *, bool,
aarch64_operand_error *); aarch64_operand_error *);
extern void extern void
@ -1326,7 +1326,7 @@ aarch64_get_operand_name (enum aarch64_opnd);
extern const char * extern const char *
aarch64_get_operand_desc (enum aarch64_opnd); aarch64_get_operand_desc (enum aarch64_opnd);
extern bfd_boolean extern bool
aarch64_sve_dupm_mov_immediate_p (uint64_t, int); aarch64_sve_dupm_mov_immediate_p (uint64_t, int);
#ifdef DEBUG_AARCH64 #ifdef DEBUG_AARCH64

View File

@ -260,8 +260,7 @@ struct arc_operand
TRUE if this operand type can not actually be extracted from TRUE if this operand type can not actually be extracted from
this operand (i.e., the instruction does not match). If the this operand (i.e., the instruction does not match). If the
operand is valid, *INVALID will not be changed. */ operand is valid, *INVALID will not be changed. */
long long int (*extract) (unsigned long long instruction, long long int (*extract) (unsigned long long instruction, bool *invalid);
bfd_boolean *invalid);
}; };
/* Elements in the table are retrieved by indexing with values from /* Elements in the table are retrieved by indexing with values from

View File

@ -519,7 +519,7 @@ struct mips_int_operand
unsigned int shift; unsigned int shift;
/* True if the operand should be printed as hex rather than decimal. */ /* True if the operand should be printed as hex rather than decimal. */
bfd_boolean print_hex; bool print_hex;
}; };
/* Uses a lookup table to describe a small integer operand. */ /* Uses a lookup table to describe a small integer operand. */
@ -531,7 +531,7 @@ struct mips_mapped_int_operand
const int *int_map; const int *int_map;
/* True if the operand should be printed as hex rather than decimal. */ /* True if the operand should be printed as hex rather than decimal. */
bfd_boolean print_hex; bool print_hex;
}; };
/* An operand that encodes the most significant bit position of a bitfield. /* An operand that encodes the most significant bit position of a bitfield.
@ -551,7 +551,7 @@ struct mips_msb_operand
/* True if the operand encodes MSB directly, false if it encodes /* True if the operand encodes MSB directly, false if it encodes
MSB - LSB. */ MSB - LSB. */
bfd_boolean add_lsb; bool add_lsb;
/* The maximum value of MSB + 1. */ /* The maximum value of MSB + 1. */
unsigned int opsize; unsigned int opsize;
@ -576,10 +576,10 @@ struct mips_check_prev_operand
{ {
struct mips_operand root; struct mips_operand root;
bfd_boolean greater_than_ok; bool greater_than_ok;
bfd_boolean less_than_ok; bool less_than_ok;
bfd_boolean equal_ok; bool equal_ok;
bfd_boolean zero_ok; bool zero_ok;
}; };
/* Describes an operand that encodes a pair of registers. */ /* Describes an operand that encodes a pair of registers. */
@ -619,7 +619,7 @@ struct mips_pcrel_operand
/* Return true if the assembly syntax allows OPERAND to be omitted. */ /* Return true if the assembly syntax allows OPERAND to be omitted. */
static inline bfd_boolean static inline bool
mips_optional_operand_p (const struct mips_operand *operand) mips_optional_operand_p (const struct mips_operand *operand)
{ {
return (operand->type == OP_OPTIONAL_REG return (operand->type == OP_OPTIONAL_REG
@ -758,7 +758,7 @@ struct mips_opcode
/* Return true if MO is an instruction that requires 32-bit encoding. */ /* Return true if MO is an instruction that requires 32-bit encoding. */
static inline bfd_boolean static inline bool
mips_opcode_32bit_p (const struct mips_opcode *mo) mips_opcode_32bit_p (const struct mips_opcode *mo)
{ {
return mo->mask >> 16 != 0; return mo->mask >> 16 != 0;
@ -1387,7 +1387,7 @@ static const unsigned int mips_isa_table[] = {
/* Return true if the given CPU is included in INSN_* mask MASK. */ /* Return true if the given CPU is included in INSN_* mask MASK. */
static inline bfd_boolean static inline bool
cpu_is_member (int cpu, unsigned int mask) cpu_is_member (int cpu, unsigned int mask)
{ {
switch (cpu) switch (cpu)
@ -1462,7 +1462,7 @@ cpu_is_member (int cpu, unsigned int mask)
|| ((mask & INSN_ISA_MASK) == INSN_ISA64R6); || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
default: default:
return FALSE; return false;
} }
} }
@ -1472,7 +1472,7 @@ cpu_is_member (int cpu, unsigned int mask)
test, or zero if no CPU specific ISA test is desired. Return true test, or zero if no CPU specific ISA test is desired. Return true
if instruction INSN is available to the given ISA and CPU. */ if instruction INSN is available to the given ISA and CPU. */
static inline bfd_boolean static inline bool
opcode_is_member (const struct mips_opcode *insn, int isa, int ase, int cpu) opcode_is_member (const struct mips_opcode *insn, int isa, int ase, int cpu)
{ {
if (!cpu_is_member (cpu, insn->exclusions)) if (!cpu_is_member (cpu, insn->exclusions))
@ -1482,17 +1482,17 @@ opcode_is_member (const struct mips_opcode *insn, int isa, int ase, int cpu)
&& (insn->membership & INSN_ISA_MASK) != 0 && (insn->membership & INSN_ISA_MASK) != 0
&& ((mips_isa_table[(isa & INSN_ISA_MASK) - 1] && ((mips_isa_table[(isa & INSN_ISA_MASK) - 1]
>> ((insn->membership & INSN_ISA_MASK) - 1)) & 1) != 0) >> ((insn->membership & INSN_ISA_MASK) - 1)) & 1) != 0)
return TRUE; return true;
/* Test for ASE compatibility. */ /* Test for ASE compatibility. */
if ((ase & insn->ase) != 0) if ((ase & insn->ase) != 0)
return TRUE; return true;
/* Test for processor-specific extensions. */ /* Test for processor-specific extensions. */
if (cpu_is_member (cpu, insn->membership)) if (cpu_is_member (cpu, insn->membership))
return TRUE; return true;
} }
return FALSE; return false;
} }
/* This is a list of macro expanded instructions. /* This is a list of macro expanded instructions.
@ -1941,7 +1941,7 @@ extern int bfd_mips_num_opcodes;
FP_D (never used) FP_D (never used)
*/ */
extern const struct mips_operand *decode_mips16_operand (char, bfd_boolean); extern const struct mips_operand *decode_mips16_operand (char, bool);
extern const struct mips_opcode mips16_opcodes[]; extern const struct mips_opcode mips16_opcodes[];
extern const int bfd_mips16_num_opcodes; extern const int bfd_mips16_num_opcodes;

View File

@ -38,7 +38,7 @@
#define FIX2(a, b) 2, { a, b } #define FIX2(a, b) 2, { a, b }
#define FIX3(a, b, c) 3, { a, b, c } #define FIX3(a, b, c) 3, { a, b, c }
#define FIX4(a, b, c, d) 4, { a, b, c, d } #define FIX4(a, b, c, d) 4, { a, b, c, d }
#define OP0() 0, { { 0, 0, FALSE, 0, 0, 0, 0 } } #define OP0() 0, { { 0, 0, false, 0, 0, 0, 0 } }
#define OP1(a) 1, { a } #define OP1(a) 1, { a }
#define OP2(a, b) 2, { a, b } #define OP2(a, b) 2, { a, b }
#define OP3(a, b, c) 3, { a, b, c } #define OP3(a, b, c) 3, { a, b, c }

View File

@ -697,26 +697,26 @@ typedef struct
unsigned int header; unsigned int header;
/* Whether each word uses compact instructions. */ /* Whether each word uses compact instructions. */
bfd_boolean word_compact[7]; bool word_compact[7];
/* Whether loads are protected. */ /* Whether loads are protected. */
bfd_boolean prot; bool prot;
/* Whether instructions use the high register set. */ /* Whether instructions use the high register set. */
bfd_boolean rs; bool rs;
/* Data size. */ /* Data size. */
unsigned int dsz; unsigned int dsz;
/* Whether compact instructions in the S unit are decoded as /* Whether compact instructions in the S unit are decoded as
branches. */ branches. */
bfd_boolean br; bool br;
/* Whether compact instructions saturate. */ /* Whether compact instructions saturate. */
bfd_boolean sat; bool sat;
/* P-bits. */ /* P-bits. */
bfd_boolean p_bits[14]; bool p_bits[14];
} tic6x_fetch_packet_header; } tic6x_fetch_packet_header;
#ifdef __cplusplus #ifdef __cplusplus