Don't compare boolean values against TRUE or FALSE

bfd/
	* arc-got.h: Don't compare boolean values against TRUE or FALSE.
	* elf-m10300.c: Likewise.
	* elf.c: Likewise.
	* elf32-arc.c: Likewise.
	* elf32-bfin.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-nds32.c: Likewise.
	* elf32-tilepro.c: Likewise.
	* elflink.c: Likewise.
	* elfnn-aarch64.c: Likewise.
	* elfnn-riscv.c: Likewise.
	* elfxx-tilegx.c: Likewise.
	* mach-o.c: Likewise.
	* peXXigen.c: Likewise.
	* vms-alpha.c: Likewise.
	* vms-lib.c: Likewise.
opcodes/
	* aarch64-asm.c: Don't compare boolean values against TRUE or FALSE.
	* aarch64-dis.c: Likewise.
	* aarch64-gen.c: Likewise.
	* aarch64-opc.c: Likewise.
binutils/
	* strings.c: Don't compare boolean values against TRUE or FALSE.
gas/
	* config/tc-aarch64.c: Don't compare booleans against TRUE or FALSE.
	* config/tc-hppa.c: Likewise.
	* config/tc-mips.c: Likewise.
	* config/tc-score7.c: Likewise.
ld/
	* emultempl/elf32.em: Don't compare boolean values against TRUE or FALSE.
	* emultempl/pe.em: Likewise.
	* emultempl/pep.em: Likewise.
	* emultempl/xtensaelf.em: Likewise.
This commit is contained in:
Alan Modra 2017-05-18 14:47:40 +09:30
parent 087ea22225
commit 535b785fb0
34 changed files with 139 additions and 96 deletions

View File

@ -1,3 +1,22 @@
2017-05-18 Alan Modra <amodra@gmail.com>
* arc-got.h: Don't compare boolean values against TRUE or FALSE.
* elf-m10300.c: Likewise.
* elf.c: Likewise.
* elf32-arc.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-nds32.c: Likewise.
* elf32-tilepro.c: Likewise.
* elflink.c: Likewise.
* elfnn-aarch64.c: Likewise.
* elfnn-riscv.c: Likewise.
* elfxx-tilegx.c: Likewise.
* mach-o.c: Likewise.
* peXXigen.c: Likewise.
* vms-alpha.c: Likewise.
* vms-lib.c: Likewise.
2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
PR ld/20882

View File

@ -318,7 +318,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p,
}
if (entry && entry->processed == FALSE)
if (entry && !entry->processed)
{
switch (entry->type)
{
@ -427,7 +427,7 @@ create_got_dynrelocs_for_single_entry (struct got_entry *list,
bfd_vma got_offset = list->offset;
if (list->type == GOT_NORMAL
&& list->created_dyn_relocation == FALSE)
&& !list->created_dyn_relocation)
{
if (bfd_link_pic (info)
&& h != NULL
@ -446,7 +446,7 @@ create_got_dynrelocs_for_single_entry (struct got_entry *list,
list->created_dyn_relocation = TRUE;
}
else if (list->existing_entries != TLS_GOT_NONE
&& list->created_dyn_relocation == FALSE)
&& !list->created_dyn_relocation)
{
/* TODO TLS: This is not called for local symbols.
In order to correctly implement TLS, this should also

View File

@ -1520,7 +1520,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto,
/* Do not generate relocs when an R_MN10300_32 has been used
with an R_MN10300_SYM_DIFF to compute a difference of two
symbols. */
&& is_sym_diff_reloc == FALSE
&& !is_sym_diff_reloc
/* Also, do not generate a reloc when the symbol associated
with the R_MN10300_32 reloc is absolute - there is no
need for a run time computation in this case. */

View File

@ -7358,7 +7358,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
for (section = obfd->sections; section != NULL;
section = section->next)
{
if (section->segment_mark == FALSE)
if (!section->segment_mark)
goto rewrite;
else
section->segment_mark = FALSE;

View File

@ -1259,7 +1259,7 @@ arc_do_relocation (bfd_byte * contents,
struct elf_link_hash_table *htab ATTRIBUTE_UNUSED = elf_hash_table (info);
bfd_reloc_status_type flag;
if (reloc_data.should_relocate == FALSE)
if (!reloc_data.should_relocate)
return bfd_reloc_ok;
switch (reloc_data.howto->size)
@ -1464,9 +1464,9 @@ elf_arc_relocate_section (bfd * output_bfd,
h2 = elf_link_hash_lookup (elf_hash_table (info), "__SDATA_BEGIN__",
FALSE, FALSE, TRUE);
if (reloc_data.sdata_begin_symbol_vma_set == FALSE
&& h2 != NULL && h2->root.type != bfd_link_hash_undefined
&& h2->root.u.def.section->output_section != NULL)
if (!reloc_data.sdata_begin_symbol_vma_set
&& h2 != NULL && h2->root.type != bfd_link_hash_undefined
&& h2->root.u.def.section->output_section != NULL)
/* TODO: Verify this condition. */
{
reloc_data.sdata_begin_symbol_vma =
@ -1784,7 +1784,7 @@ elf_arc_relocate_section (bfd * output_bfd,
bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc);
if (relocate == FALSE)
if (!relocate)
continue;
}
break;
@ -1793,7 +1793,7 @@ elf_arc_relocate_section (bfd * output_bfd,
}
if (is_reloc_SDA_relative (howto)
&& (reloc_data.sdata_begin_symbol_vma_set == FALSE))
&& !reloc_data.sdata_begin_symbol_vma_set)
{
_bfd_error_handler
("Error: Linker symbol __SDATA_BEGIN__ not found");
@ -1907,8 +1907,8 @@ elf_arc_check_relocs (bfd * abfd,
howto = arc_elf_howto (r_type);
if (dynobj == NULL
&& (is_reloc_for_GOT (howto) == TRUE
|| is_reloc_for_TLS (howto) == TRUE))
&& (is_reloc_for_GOT (howto)
|| is_reloc_for_TLS (howto)))
{
dynobj = elf_hash_table (info)->dynobj = abfd;
if (! _bfd_elf_create_got_section (abfd, info))
@ -1985,7 +1985,7 @@ elf_arc_check_relocs (bfd * abfd,
break;
}
if (is_reloc_for_PLT (howto) == TRUE)
if (is_reloc_for_PLT (howto))
{
if (h == NULL)
continue;
@ -1994,8 +1994,8 @@ elf_arc_check_relocs (bfd * abfd,
}
/* Add info to the symbol got_entry_list. */
if (is_reloc_for_GOT (howto) == TRUE
|| is_reloc_for_TLS (howto) == TRUE)
if (is_reloc_for_GOT (howto)
|| is_reloc_for_TLS (howto))
{
arc_fill_got_info_for_reloc (
arc_got_entry_type_for_reloc (howto),

View File

@ -329,11 +329,11 @@ bfin_bfd_reloc (bfd *abfd,
/* Here the variable relocation holds the final address of the
symbol we are relocating against, plus any addend. */
if (howto->pc_relative == TRUE)
if (howto->pc_relative)
{
relocation -= input_section->output_section->vma + input_section->output_offset;
if (howto->pcrel_offset == TRUE)
if (howto->pcrel_offset)
relocation -= reloc_entry->address;
}

View File

@ -2353,7 +2353,7 @@ elf_m68k_partition_multi_got_1 (void **_entry, void *_arg)
if (diff != NULL)
elf_m68k_clear_got (diff);
return arg->error_p == FALSE ? 1 : 0;
return !arg->error_p;
}
/* Helper function to build symndx2h mapping. */

View File

@ -3295,7 +3295,7 @@ nds32_elf_final_sda_base (bfd *output_bfd, struct bfd_link_info *info,
}
}
if (add_symbol == TRUE)
if (add_symbol)
{
if (h)
{
@ -12246,7 +12246,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec,
irelend, isymbuf))
goto error_return;
if (*again == FALSE)
if (!*again)
{
if (!nds32_fag_remove_unused_fpbase (abfd, sec, internal_relocs,
irelend))
@ -12256,7 +12256,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec,
nds32_elf_pick_relax (FALSE, sec, again, table, link_info);
if (*again == FALSE)
if (!*again)
{
if (!nds32_relax_adjust_label (abfd, sec, internal_relocs, contents,
&relax_blank_list, optimize, opt_size))
@ -12273,7 +12273,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec,
relax_blank_list = NULL;
}
if (*again == FALSE)
if (!*again)
{
/* Closing the section, so we don't relax it anymore. */
bfd_vma sec_size_align;

View File

@ -3896,7 +3896,7 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd,
ret = tilepro_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
if (ret != TRUE)
if (!ret)
return ret;
/* Fill in the first entry in the procedure linkage table. */

View File

@ -8825,7 +8825,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
else
{
/* Section size is only divisible by rela. */
if (use_rela_initialised && (use_rela == FALSE))
if (use_rela_initialised && !use_rela)
{
_bfd_error_handler (_("%B: Unable to sort relocs - "
"they are in more than one size"),
@ -8843,7 +8843,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
else if ((o->size % bed->s->sizeof_rel) == 0)
{
/* Section size is only divisible by rel. */
if (use_rela_initialised && (use_rela == TRUE))
if (use_rela_initialised && use_rela)
{
_bfd_error_handler (_("%B: Unable to sort relocs - "
"they are in more than one size"),
@ -8882,7 +8882,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
else
{
/* Section size is only divisible by rela. */
if (use_rela_initialised && (use_rela == FALSE))
if (use_rela_initialised && !use_rela)
{
_bfd_error_handler (_("%B: Unable to sort relocs - "
"they are in more than one size"),
@ -8900,7 +8900,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
else if ((o->size % bed->s->sizeof_rel) == 0)
{
/* Section size is only divisible by rel. */
if (use_rela_initialised && (use_rela == TRUE))
if (use_rela_initialised && use_rela)
{
_bfd_error_handler (_("%B: Unable to sort relocs - "
"they are in more than one size"),
@ -12964,7 +12964,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info,
else if (isec->gc_mark)
some_kept = TRUE;
if (debug_frag_seen == FALSE
if (!debug_frag_seen
&& (isec->flags & SEC_DEBUGGING)
&& CONST_STRNEQ (isec->name, ".debug_line."))
debug_frag_seen = TRUE;

View File

@ -1870,7 +1870,7 @@ elfNN_aarch64_bfd_reloc_from_type (unsigned int r_type)
/* Indexed by R_TYPE, values are offsets in the howto_table. */
static unsigned int offsets[R_AARCH64_end];
if (initialized_p == FALSE)
if (!initialized_p)
{
unsigned int i;
@ -5169,7 +5169,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
/* When generating a shared object or relocatable executable, these
relocations are copied into the output file to be resolved at
run time. */
if (((bfd_link_pic (info) == TRUE)
if ((bfd_link_pic (info)
|| globals->root.is_relocatable_executable)
&& (input_section->flags & SEC_ALLOC)
&& (h == NULL

View File

@ -2489,7 +2489,7 @@ riscv_elf_finish_dynamic_sections (bfd *output_bfd,
ret = riscv_finish_dyn (output_bfd, info, dynobj, sdyn);
if (ret != TRUE)
if (!ret)
return ret;
/* Fill in the head and tail entries in the procedure linkage table. */

View File

@ -4293,7 +4293,7 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd,
ret = tilegx_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
if (ret != TRUE)
if (!ret)
return ret;
/* Fill in the head and tail entries in the procedure linkage table. */

View File

@ -1898,7 +1898,7 @@ bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym)
if (bfd_seek (abfd, sym->stroff, SEEK_SET) != 0)
goto err;
if (_bfd_stringtab_emit (abfd, strtab) != TRUE)
if (!_bfd_stringtab_emit (abfd, strtab))
goto err;
/* Pad string table. */

View File

@ -3831,7 +3831,7 @@ rsrc_merge_string_entries (rsrc_entry * a ATTRIBUTE_UNUSED,
{
if (a->parent != NULL
&& a->parent->entry != NULL
&& a->parent->entry->is_name == FALSE)
&& !a->parent->entry->is_name)
_bfd_error_handler (_(".rsrc merge failure: duplicate string resource: %d"),
((a->parent->entry->name_id.id - 1) << 4) + i);
return FALSE;
@ -3939,22 +3939,22 @@ rsrc_sort_entries (rsrc_dir_chain * chain,
There should only ever be one non-zero lang manifest -
if there are more it is an error. A non-zero lang
manifest takes precedence over a default manifest. */
if (entry->is_name == FALSE
if (!entry->is_name
&& entry->name_id.id == 1
&& dir != NULL
&& dir->entry != NULL
&& dir->entry->is_name == FALSE
&& !dir->entry->is_name
&& dir->entry->name_id.id == 0x18)
{
if (next->value.directory->names.num_entries == 0
&& next->value.directory->ids.num_entries == 1
&& next->value.directory->ids.first_entry->is_name == FALSE
&& !next->value.directory->ids.first_entry->is_name
&& next->value.directory->ids.first_entry->name_id.id == 0)
/* Fall through so that NEXT is dropped. */
;
else if (entry->value.directory->names.num_entries == 0
&& entry->value.directory->ids.num_entries == 1
&& entry->value.directory->ids.first_entry->is_name == FALSE
&& !entry->value.directory->ids.first_entry->is_name
&& entry->value.directory->ids.first_entry->name_id.id == 0)
{
/* Swap ENTRY and NEXT. Then fall through so that the old ENTRY is dropped. */
@ -3995,22 +3995,22 @@ rsrc_sort_entries (rsrc_dir_chain * chain,
message - because there should never be duplicates.
The exception is Type 18/Name 1/Lang 0 which is the
defaul manifest - this can just be dropped. */
if (entry->is_name == FALSE
if (!entry->is_name
&& entry->name_id.id == 0
&& dir != NULL
&& dir->entry != NULL
&& dir->entry->is_name == FALSE
&& !dir->entry->is_name
&& dir->entry->name_id.id == 1
&& dir->entry->parent != NULL
&& dir->entry->parent->entry != NULL
&& dir->entry->parent->entry->is_name == FALSE
&& !dir->entry->parent->entry->is_name
&& dir->entry->parent->entry->name_id.id == 0x18 /* RT_MANIFEST */)
;
else if (dir != NULL
&& dir->entry != NULL
&& dir->entry->parent != NULL
&& dir->entry->parent->entry != NULL
&& dir->entry->parent->entry->is_name == FALSE
&& !dir->entry->parent->entry->is_name
&& dir->entry->parent->entry->name_id.id == 0x6 /* RT_STRING */)
{
/* Strings need special handling. */

View File

@ -677,7 +677,7 @@ _bfd_vms_slurp_eihs (bfd *abfd, unsigned int offset)
return FALSE;
}
if (_bfd_vms_slurp_object_records (abfd) != TRUE)
if (!_bfd_vms_slurp_object_records (abfd))
return FALSE;
abfd->flags |= HAS_SYMS;
@ -2411,7 +2411,7 @@ _bfd_vms_slurp_object_records (bfd * abfd)
default:
err = FALSE;
}
if (err != TRUE)
if (!err)
{
vms_debug2 ((2, "slurp type %d failed\n", type));
return FALSE;
@ -2551,14 +2551,14 @@ alpha_vms_object_p (bfd *abfd)
goto error_ret;
vms_debug2 ((2, "file type is image\n"));
if (_bfd_vms_slurp_eihd (abfd, &eisd_offset, &eihs_offset) != TRUE)
if (!_bfd_vms_slurp_eihd (abfd, &eisd_offset, &eihs_offset))
goto err_wrong_format;
if (_bfd_vms_slurp_eisd (abfd, eisd_offset) != TRUE)
if (!_bfd_vms_slurp_eisd (abfd, eisd_offset))
goto err_wrong_format;
/* EIHS is optional. */
if (eihs_offset != 0 && _bfd_vms_slurp_eihs (abfd, eihs_offset) != TRUE)
if (eihs_offset != 0 && !_bfd_vms_slurp_eihs (abfd, eihs_offset))
goto err_wrong_format;
}
else
@ -2578,10 +2578,10 @@ alpha_vms_object_p (bfd *abfd)
vms_debug2 ((2, "file type is module\n"));
type = bfd_getl16 (PRIV (recrd.rec));
if (type != EOBJ__C_EMH || _bfd_vms_slurp_ehdr (abfd) != TRUE)
if (type != EOBJ__C_EMH || !_bfd_vms_slurp_ehdr (abfd))
goto err_wrong_format;
if (_bfd_vms_slurp_object_records (abfd) != TRUE)
if (!_bfd_vms_slurp_object_records (abfd))
goto err_wrong_format;
}
else
@ -3976,13 +3976,13 @@ alpha_vms_write_object_contents (bfd *abfd)
{
if (abfd->section_count > 0) /* we have sections */
{
if (_bfd_vms_write_ehdr (abfd) != TRUE)
if (!_bfd_vms_write_ehdr (abfd))
return FALSE;
if (_bfd_vms_write_egsd (abfd) != TRUE)
if (!_bfd_vms_write_egsd (abfd))
return FALSE;
if (_bfd_vms_write_etir (abfd, EOBJ__C_ETIR) != TRUE)
if (!_bfd_vms_write_etir (abfd, EOBJ__C_ETIR))
return FALSE;
if (_bfd_vms_write_eeom (abfd) != TRUE)
if (!_bfd_vms_write_eeom (abfd))
return FALSE;
}
}
@ -8162,9 +8162,9 @@ alpha_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
h = NULL;
h_root = (struct bfd_link_hash_entry *) h;
if (_bfd_generic_link_add_one_symbol
(info, abfd, sym.name, sym.flags, sym.section, sym.value,
NULL, FALSE, FALSE, &h_root) == FALSE)
if (!_bfd_generic_link_add_one_symbol (info, abfd, sym.name, sym.flags,
sym.section, sym.value, NULL,
FALSE, FALSE, &h_root))
return FALSE;
h = (struct alpha_vms_link_hash_entry *) h_root;
@ -9077,9 +9077,9 @@ vms_close_and_cleanup (bfd * abfd)
{
/* Last step on VMS is to convert the file to variable record length
format. */
if (bfd_cache_close (abfd) != TRUE)
if (!bfd_cache_close (abfd))
return FALSE;
if (_bfd_vms_convert_to_var_unix_filename (abfd->filename) != TRUE)
if (!_bfd_vms_convert_to_var_unix_filename (abfd->filename))
return FALSE;
}
#endif

View File

@ -1662,7 +1662,7 @@ vms_write_index (bfd *abfd,
/* Write it to the disk (if there is one). */
if (kbn_vbn != 0)
{
if (vms_write_block (abfd, kbn_vbn, kbn_blk) != TRUE)
if (!vms_write_block (abfd, kbn_vbn, kbn_blk))
return FALSE;
}
else
@ -1780,7 +1780,7 @@ vms_write_index (bfd *abfd,
if (abfd != NULL)
{
bfd_putl16 (blk[j].len + blk[j].lastlen, rblk[j]->used);
if (vms_write_block (abfd, blk[j].vbn, rblk[j]) != TRUE)
if (!vms_write_block (abfd, blk[j].vbn, rblk[j]))
return FALSE;
}
@ -1873,7 +1873,7 @@ vms_write_index (bfd *abfd,
{
/* Write this block on the disk. */
bfd_putl16 (blk[j].len + blk[j].lastlen, rblk[j]->used);
if (vms_write_block (abfd, blk[j].vbn, rblk[j]) != TRUE)
if (!vms_write_block (abfd, blk[j].vbn, rblk[j]))
return FALSE;
free (rblk[j]);
@ -1882,7 +1882,7 @@ vms_write_index (bfd *abfd,
/* Write the last kbn (if any). */
if (kbn_vbn != 0)
{
if (vms_write_block (abfd, kbn_vbn, kbn_blk) != TRUE)
if (!vms_write_block (abfd, kbn_vbn, kbn_blk))
return FALSE;
free (kbn_blk);
}
@ -2223,11 +2223,11 @@ _bfd_vms_lib_write_archive_contents (bfd *arch)
/* Write the indexes. */
vbn = 2;
if (vms_write_index (arch, modules, nbr_modules, &vbn, &mod_idx_vbn,
is_elfidx) != TRUE)
if (!vms_write_index (arch, modules, nbr_modules, &vbn, &mod_idx_vbn,
is_elfidx))
return FALSE;
if (vms_write_index (arch, symbols, nbr_symbols, &vbn, &sym_idx_vbn,
is_elfidx) != TRUE)
if (!vms_write_index (arch, symbols, nbr_symbols, &vbn, &sym_idx_vbn,
is_elfidx))
return FALSE;
/* Write libary header. */
@ -2298,7 +2298,7 @@ _bfd_vms_lib_write_archive_contents (bfd *arch)
bfd_putl16 (sym_idx_vbn, idd->vbn);
idd++;
if (vms_write_block (arch, 1, blk) != TRUE)
if (!vms_write_block (arch, 1, blk))
return FALSE;
}

View File

@ -1,3 +1,7 @@
2017-05-18 Alan Modra <amodra@gmail.com>
* strings.c: Don't compare boolean values against TRUE or FALSE.
2017-05-15 Jeff Law <law@redhat.com>
* readelf.c (display_arc_attribute): Avoid implicit fallthru.

View File

@ -80,7 +80,7 @@
( (c) >= 0 \
&& (c) <= 255 \
&& ((c) == '\t' || ISPRINT (c) || (encoding == 'S' && (c) > 127) \
|| (include_all_whitespace == TRUE && ISSPACE (c))) \
|| (include_all_whitespace && ISSPACE (c))) \
)
#ifndef errno
@ -318,7 +318,7 @@ main (int argc, char **argv)
else
{
files_given = TRUE;
exit_status |= strings_file (argv[optind]) == FALSE;
exit_status |= !strings_file (argv[optind]);
}
}
}

View File

@ -1,3 +1,10 @@
2017-05-18 Alan Modra <amodra@gmail.com>
* config/tc-aarch64.c: Don't compare booleans against TRUE or FALSE.
* config/tc-hppa.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-score7.c: Likewise.
2017-05-16 Alan Modra <amodra@gmail.com>
* write.c (GENERIC_FORCE_RELOCATION_LOCAL): Define.

View File

@ -992,7 +992,7 @@ parse_typed_reg (char **ccp, aarch64_reg_type type, aarch64_reg_type *rtype,
return PARSE_FAIL;
}
if (in_reg_list == TRUE)
if (in_reg_list)
{
first_error (_("index not allowed inside register list"));
return PARSE_FAIL;
@ -3001,7 +3001,7 @@ parse_shift (char **str, aarch64_opnd_info *operand, enum parse_shift_mode mode)
switch (mode)
{
case SHIFTED_LOGIC_IMM:
if (aarch64_extend_operator_p (kind) == TRUE)
if (aarch64_extend_operator_p (kind))
{
set_syntax_error (_("extending shift is not permitted"));
return FALSE;
@ -3092,7 +3092,7 @@ parse_shift (char **str, aarch64_opnd_info *operand, enum parse_shift_mode mode)
operand->shifter.amount = 1;
else if (exp.X_op == O_absent)
{
if (aarch64_extend_operator_p (kind) == FALSE || exp_has_prefix)
if (!aarch64_extend_operator_p (kind) || exp_has_prefix)
{
set_syntax_error (_("missing shift amount"));
return FALSE;
@ -4413,7 +4413,7 @@ find_best_match (const aarch64_inst *instr,
const aarch64_opnd_qualifier_t *qualifiers = *qualifiers_list;
/* Most opcodes has much fewer patterns in the list. */
if (empty_qualifier_sequence_p (qualifiers) == TRUE)
if (empty_qualifier_sequence_p (qualifiers))
{
DEBUG_TRACE_IF (i == 0, "empty list of qualifier sequence");
break;
@ -4621,7 +4621,7 @@ output_operand_error_record (const operand_error_record *record, char *str)
{
/* Most opcodes has much fewer patterns in the list.
First NIL qualifier indicates the end in the list. */
if (empty_qualifier_sequence_p (*qualifiers_list) == TRUE)
if (empty_qualifier_sequence_p (*qualifiers_list))
break;
if (i != qlf_idx)

View File

@ -5687,7 +5687,7 @@ pa_ip (char *str)
/* If this instruction is specific to a particular architecture,
then set a new architecture. This automatic promotion crud is
for compatibility with HP's old assemblers only. */
if (match == TRUE
if (match
&& bfd_get_mach (stdoutput) < insn->arch
&& !bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
{

View File

@ -6911,7 +6911,7 @@ can_swap_branch_p (struct mips_cl_insn *ip, expressionS *address_expr,
break;
}
}
if (rv == FALSE)
if (!rv)
{
/* Insert nop after branch to fix short loop. */
return FALSE;

View File

@ -6500,7 +6500,7 @@ s7_relax_frag (asection * sec ATTRIBUTE_UNUSED,
else
{
/* Here, try best to do relax regardless fragp->fr_next->fr_type. */
if (word_align_p == FALSE)
if (!word_align_p)
{
if (insn_size % 4 == 0)
{

View File

@ -1,3 +1,10 @@
2017-05-18 Alan Modra <amodra@gmail.com>
* emultempl/elf32.em: Don't compare boolean values against TRUE or FALSE.
* emultempl/pe.em: Likewise.
* emultempl/pep.em: Likewise.
* emultempl/xtensaelf.em: Likewise.
2017-05-18 Alan Modra <amodra@gmail.com>
PR ld/20882

View File

@ -1538,7 +1538,7 @@ fragment <<EOF
}
if (link_info.eh_frame_hdr_type == COMPACT_EH_HDR)
if (bfd_elf_parse_eh_frame_entries (NULL, &link_info) == FALSE)
if (!bfd_elf_parse_eh_frame_entries (NULL, &link_info))
einfo (_("%P%F: Failed to parse EH frame entries.\n"));
}

View File

@ -379,7 +379,7 @@ typedef struct
underscore. */
#define GET_INIT_SYMBOL_NAME(IDX) \
(init[(IDX)].symbol \
+ ((init[(IDX)].is_c_symbol == FALSE || (is_underscoring () != 0)) ? 0 : 1))
+ ((!init[(IDX)].is_c_symbol || is_underscoring () != 0) ? 0 : 1))
/* Decorates the C visible symbol by underscore, if target requires. */
#define U(CSTR) \

View File

@ -350,7 +350,7 @@ typedef struct
#define GET_INIT_SYMBOL_NAME(IDX) \
(init[(IDX)].symbol \
+ ((init[(IDX)].is_c_symbol == FALSE || (is_underscoring () == 1)) ? 0 : 1))
+ ((!init[(IDX)].is_c_symbol || is_underscoring () == 1) ? 0 : 1))
/* Decorates the C visible symbol by underscore, if target requires. */
#define U(CSTR) \

View File

@ -1432,7 +1432,7 @@ xtensa_wild_group_interleave_callback (lang_statement_union_type *statement)
struct wildcard_list *l;
for (l = w->section_list; l != NULL; l = l->next)
{
if (l->spec.sorted == TRUE)
if (l->spec.sorted != none)
{
no_reorder = TRUE;
break;

View File

@ -1,3 +1,10 @@
2017-05-18 Alan Modra <amodra@gmail.com>
* aarch64-asm.c: Don't compare boolean values against TRUE or FALSE.
* aarch64-dis.c: Likewise.
* aarch64-gen.c: Likewise.
* aarch64-opc.c: Likewise.
2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
Matthew Fortune <matthew.fortune@imgtec.com>

View File

@ -498,9 +498,8 @@ aarch64_ins_limm_1 (const aarch64_operand *self,
if (invert_p)
imm = ~imm;
if (aarch64_logical_immediate_p (imm, esize, &value) == FALSE)
/* The constraint check should have guaranteed this wouldn't happen. */
assert (0);
/* The constraint check should have guaranteed this wouldn't happen. */
assert (aarch64_logical_immediate_p (imm, esize, &value));
insert_fields (code, value, 0, 3, self->fields[2], self->fields[1],
self->fields[0]);

View File

@ -2339,7 +2339,7 @@ convert_movewide_to_mov (aarch64_inst *inst)
int is32 = inst->operands[0].qualifier == AARCH64_OPND_QLF_W;
value = ~value;
/* A MOVN has an immediate that could be encoded by MOVZ. */
if (aarch64_wide_constant_p (value, is32, NULL) == TRUE)
if (aarch64_wide_constant_p (value, is32, NULL))
return 0;
}
inst->operands[1].imm.value = value;
@ -2372,8 +2372,8 @@ convert_movebitmask_to_mov (aarch64_inst *inst)
/* ORR has an immediate that could be generated by a MOVZ or MOVN
instruction. */
if (inst->operands[0].reg.regno != 0x1f
&& (aarch64_wide_constant_p (value, is32, NULL) == TRUE
|| aarch64_wide_constant_p (~value, is32, NULL) == TRUE))
&& (aarch64_wide_constant_p (value, is32, NULL)
|| aarch64_wide_constant_p (~value, is32, NULL)))
return 0;
inst->operands[2].type = AARCH64_OPND_NIL;
@ -2494,7 +2494,7 @@ determine_disassembling_preference (struct aarch64_inst *inst)
opcode = inst->opcode;
/* This opcode does not have an alias, so use itself. */
if (opcode_has_alias (opcode) == FALSE)
if (!opcode_has_alias (opcode))
return;
alias = aarch64_find_alias_opcode (opcode);

View File

@ -143,9 +143,9 @@ read_table (const struct aarch64_opcode* table)
/* F_PSEUDO needs to be used together with F_ALIAS to indicate an alias
opcode is a programmer friendly pseudo instruction available only in
the assembly code (thus will not show up in the disassembly). */
assert (pseudo_opcode_p (ent) == FALSE || alias_opcode_p (ent) == TRUE);
assert (!pseudo_opcode_p (ent) || alias_opcode_p (ent));
/* Skip alias (inc. pseudo) opcode. */
if (alias_opcode_p (ent) == TRUE)
if (alias_opcode_p (ent))
{
index++;
continue;
@ -704,7 +704,7 @@ find_alias_opcode (const aarch64_opcode *opcode)
/* The mask of an alias opcode must be equal to or a super-set (i.e.
more constrained) of that of the aliased opcode; so is the base
opcode value. */
if (alias_opcode_p (ent) == TRUE
if (alias_opcode_p (ent)
&& (ent->mask & opcode->mask) == opcode->mask
&& (opcode->mask & ent->opcode) == (opcode->mask & opcode->opcode))
{

View File

@ -1207,7 +1207,7 @@ aarch64_logical_immediate_p (uint64_t value, int esize, aarch64_insn *encoding)
DEBUG_TRACE ("enter with 0x%" PRIx64 "(%" PRIi64 "), esize: %d", value,
value, esize);
if (initialized == FALSE)
if (!initialized)
{
build_immediate_table ();
initialized = TRUE;
@ -2113,7 +2113,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
uint64_t uimm = opnd->imm.value;
if (opcode->op == OP_BIC)
uimm = ~uimm;
if (aarch64_logical_immediate_p (uimm, esize, NULL) == FALSE)
if (!aarch64_logical_immediate_p (uimm, esize, NULL))
{
set_other_error (mismatch_detail, idx,
_("immediate out of range"));
@ -2521,7 +2521,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
switch (type)
{
case AARCH64_OPND_Rm_EXT:
if (aarch64_extend_operator_p (opnd->shifter.kind) == FALSE
if (!aarch64_extend_operator_p (opnd->shifter.kind)
&& opnd->shifter.kind != AARCH64_MOD_LSL)
{
set_other_error (mismatch_detail, idx,
@ -2573,7 +2573,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
case AARCH64_OPND_Rm_SFT:
/* ROR is not available to the shifted register operand in
arithmetic instructions. */
if (aarch64_shift_operator_p (opnd->shifter.kind) == FALSE)
if (!aarch64_shift_operator_p (opnd->shifter.kind))
{
set_other_error (mismatch_detail, idx,
_("shift operator expected"));