GCC Middle and Back End API Reference
hwint.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HOST_BITS_PER_CHAR   CHAR_BIT
#define HOST_BITS_PER_SHORT   (CHAR_BIT * SIZEOF_SHORT)
#define HOST_BITS_PER_INT   (CHAR_BIT * SIZEOF_INT)
#define HOST_BITS_PER_LONG   (CHAR_BIT * SIZEOF_LONG)
#define HOST_BITS_PER_PTR   (CHAR_BIT * SIZEOF_VOID_P)
#define HOST_LONG_FORMAT   "l"
#define HOST_LONG_LONG_FORMAT   "ll"
#define HOST_BITS_PER_WIDE_INT   64
#define HOST_WIDE_INT_UC(X)
#define HOST_WIDE_INT_0   HOST_WIDE_INT_C (0)
#define HOST_WIDE_INT_0U   HOST_WIDE_INT_UC (0)
#define HOST_WIDE_INT_1   HOST_WIDE_INT_C (1)
#define HOST_WIDE_INT_1U   HOST_WIDE_INT_UC (1)
#define HOST_WIDE_INT_M1   HOST_WIDE_INT_C (-1)
#define HOST_WIDE_INT_M1U   HOST_WIDE_INT_UC (-1)
#define GCC_PRI64   HOST_LONG_LONG_FORMAT
#define PRId64   GCC_PRI64 "d"
#define PRIi64   GCC_PRI64 "i"
#define PRIo64   GCC_PRI64 "o"
#define PRIu64   GCC_PRI64 "u"
#define PRIx64   GCC_PRI64 "x"
#define PRIX64   GCC_PRI64 "X"
#define HOST_WIDE_INT_PRINT   HOST_LONG_LONG_FORMAT
#define HOST_WIDE_INT_PRINT_C   "LL"
#define HOST_WIDE_INT_PRINT_DEC   "%" PRId64
#define HOST_WIDE_INT_PRINT_DEC_C   "%" PRId64 HOST_WIDE_INT_PRINT_C
#define HOST_WIDE_INT_PRINT_UNSIGNED   "%" PRIu64
#define HOST_WIDE_INT_PRINT_HEX   "%#" PRIx64
#define HOST_WIDE_INT_PRINT_HEX_PURE   "%" PRIx64
#define HOST_WIDE_INT_PRINT_DOUBLE_HEX   "0x%" PRIx64 "%016" PRIx64
#define HOST_WIDE_INT_PRINT_PADDED_HEX   "%016" PRIx64
#define GCC_PRISZ   ""
#define fmt_size_t   unsigned int
#define HOST_SIZE_T_PRINT_DEC   "%" GCC_PRISZ "d"
#define HOST_SIZE_T_PRINT_UNSIGNED   "%" GCC_PRISZ "u"
#define HOST_SIZE_T_PRINT_HEX   "%#" GCC_PRISZ "x"
#define HOST_SIZE_T_PRINT_HEX_PURE   "%" GCC_PRISZ "x"
#define HOST_WIDEST_FAST_INT   long
#define HOST_BITS_PER_WIDEST_FAST_INT   HOST_BITS_PER_LONG
#define HOST_WIDE_INT_MIN
#define HOST_WIDE_INT_MAX   (~(HOST_WIDE_INT_MIN))

Typedefs

typedef HOST_WIDE_INT __gcc_host_wide_int__

Functions

unsigned HOST_WIDE_INT least_bit_hwi (unsigned HOST_WIDE_INT x)
bool pow2_or_zerop (unsigned HOST_WIDE_INT x)
bool pow2p_hwi (unsigned HOST_WIDE_INT x)
int clz_hwi (unsigned HOST_WIDE_INT x)
int ctz_hwi (unsigned HOST_WIDE_INT x)
int ffs_hwi (unsigned HOST_WIDE_INT x)
int popcount_hwi (unsigned HOST_WIDE_INT x)
int exact_log2 (unsigned HOST_WIDE_INT)
int floor_log2 (unsigned HOST_WIDE_INT)
int ceil_log2 (unsigned HOST_WIDE_INT)
HOST_WIDE_INT abs_hwi (HOST_WIDE_INT)
unsigned HOST_WIDE_INT absu_hwi (HOST_WIDE_INT)
HOST_WIDE_INT gcd (HOST_WIDE_INT, HOST_WIDE_INT)
HOST_WIDE_INT pos_mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT)
HOST_WIDE_INT mul_hwi (HOST_WIDE_INT, HOST_WIDE_INT)
HOST_WIDE_INT least_common_multiple (HOST_WIDE_INT, HOST_WIDE_INT)
unsigned HOST_WIDE_INT reflect_hwi (unsigned HOST_WIDE_INT, unsigned)
int ctz_or_zero (unsigned HOST_WIDE_INT x)
HOST_WIDE_INT sext_hwi (HOST_WIDE_INT src, unsigned int prec)
unsigned HOST_WIDE_INT zext_hwi (unsigned HOST_WIDE_INT src, unsigned int prec)
HOST_WIDE_INT add_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b, bool *overflow)
HOST_WIDE_INT mul_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b, bool *overflow)
HOST_WIDE_INT add_sat_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b)
HOST_WIDE_INT mul_sat_hwi (HOST_WIDE_INT a, HOST_WIDE_INT b)

Macro Definition Documentation

◆ fmt_size_t

◆ GCC_PRI64

#define GCC_PRI64   HOST_LONG_LONG_FORMAT
Provide C99 <inttypes.h> style format definitions for 64bits.

◆ GCC_PRISZ

#define GCC_PRISZ   ""
Similarly format modifier for printing size_t. As not all hosts support z modifier in printf, use GCC_PRISZ and cast argument to fmt_size_t. So, instead of doing fprintf ("%zu\n", sizeof (x) * y); use fprintf (HOST_SIZE_T_PRINT_UNSIGNED "\n", (fmt_size_t) (sizeof (x) * y));

◆ HOST_BITS_PER_CHAR

#define HOST_BITS_PER_CHAR   CHAR_BIT
HOST_WIDE_INT definitions for the GNU compiler. Copyright (C) 1998-2025 Free Software Foundation, Inc. This file is part of GCC. Provide definitions for macros which depend on HOST_BITS_PER_INT and HOST_BITS_PER_LONG.
This describes the machine the compiler is hosted on.

Referenced by attr_checksum(), attr_checksum_ordered(), hash_loc_list(), output_die(), output_loc_operands(), size_of_die(), target_char_cast(), and target_char_cst_p().

◆ HOST_BITS_PER_INT

◆ HOST_BITS_PER_LONG

◆ HOST_BITS_PER_PTR

#define HOST_BITS_PER_PTR   (CHAR_BIT * SIZEOF_VOID_P)

Referenced by init_ggc().

◆ HOST_BITS_PER_SHORT

#define HOST_BITS_PER_SHORT   (CHAR_BIT * SIZEOF_SHORT)

◆ HOST_BITS_PER_WIDE_INT

#define HOST_BITS_PER_WIDE_INT   64
If HAVE_LONG_LONG and SIZEOF_LONG_LONG aren't defined, but GCC_VERSION >= 3000, assume this is the second or later stage of a bootstrap, we do have long long, and it's 64 bits. (This is required by C99; we do have some ports that violate that assumption but they're all cross-compile-only.) Just in case, force a constraint violation if that assumption is incorrect.
Set HOST_WIDE_INT, this should be always 64 bits. The underlying type is matched to that of int64_t and assumed to be either long or long long.

Referenced by acceptable_pow_call(), add_const_value_attribute(), add_hwi(), wi::add_large(), tree_switch_conversion::switch_conversion::array_value_type(), wi::arshift_large(), attr_checksum(), attr_checksum_ordered(), wi::bitreverse_large(), bp_unpack_var_len_int(), wi::bswap_large(), build_new_int_cst(), build_replicated_int_cst(), cache_integer_cst(), canonicalize_condition(), canonize(), canonize_uhwi(), carry_backpropagate(), choose_mult_variant(), choose_multiplier(), wi::clrsb(), wi::clz(), clz_hwi(), clz_loc_descriptor(), cmdline_handle_error(), wi::cmps_large(), wi::cmpu_large(), combine_instructions(), compare_debug_dump_opt_spec_function(), wide_int_storage::create(), cse_insn(), wi::ctz(), ctz_hwi(), decode_cmdline_option(), wi::int_traits< rtx_mode_t >::decompose(), wi::int_traits< wi::hwi_with_prec >::decompose(), wi::primitive_int_traits< T, signed_p >::decompose(), divmod_candidate_p(), wi::divmod_internal(), do_fixed_divide(), do_fixed_multiply(), do_fixed_shift(), do_jump(), do_tablejump(), generic_wide_int< storage >::dump(), dw2_asm_output_data(), emit_move_insn_1(), wi::eq_p_large(), wi::exact_log2(), expand_compound_operation(), expand_divmod(), expand_doubleword_mod(), expand_field_assignment(), expand_mult(), expand_vector_divmod(), ext_dce_process_sets(), ext_dce_process_uses(), wi::extract_uhwi(), floor_log2(), fold_rtx(), fold_unary_loc(), force_int_to_mode(), wi::force_to_size(), double_int::from_buffer(), wi::from_buffer(), gcov_type_to_wide_int(), gen_lowpart_common(), get_fixed_sign_bit(), get_full_len(), get_int_cst_ext_nunits(), get_mode_bounds(), get_stored_val(), gimple_divmod_fixed_value_transform(), gimple_fold_builtin_memset(), gimple_stringops_transform(), hash_loc_list(), highest_pow2_factor(), HWI_COMPUTABLE_MODE_P(), HWI_COMPUTABLE_MODE_P(), wi::hwi_with_prec::hwi_with_prec(), immed_double_const(), immed_wide_int_const_1(), implies_p(), insert_wide_int(), int_cst_value(), int_loc_descriptor(), inverse(), invert_mod2n(), iv_number_of_iterations(), lowpart_bitmask(), wi::lrshift_large(), double_int::lshift(), lshift_double(), wi::lshift_large(), wi::lts_p_large(), wi::ltu_p_large(), make_compound_operation_int(), make_extraction(), make_field_assignment(), make_tree(), double_int::mask(), wi::mask(), wi::mask(), maybe_swap_commutative_operands(), mem_loc_descriptor(), mode_signbit_p(), wi::mul_internal(), native_decode_rtx(), native_encode_rtx(), noce_try_bitop(), nonzero_bits1(), num_sign_bit_copies1(), wide_int_storage::operator=(), wide_int_storage::operator=(), output_addr_const(), output_constant(), output_constructor(), output_constructor_bitfield(), output_die(), output_loc_operands(), output_loc_operands_raw(), wi::popcount(), print_dec_buf_size(), print_decs(), print_decu(), print_hex(), print_hex_buf_size(), print_host_wide_int(), rtx_reader::read_rtx_code(), real_from_integer(), real_powi(), real_to_integer(), real_to_integer(), record_store(), rotate_loc_descriptor(), double_int::rshift(), rshift_double(), rshift_large_common(), rt_bb_visited::rt_bb_visited(), scompare_loc_descriptor_narrow(), double_int::set_bit(), wi::set_bit_large(), fixed_wide_int_storage< N >::set_len(), trailing_wide_int_storage::set_len(), wide_int_storage::set_len(), widest_int_storage< N >::set_len(), double_int::sext(), generic_wide_int< storage >::sext_elt(), sext_hwi(), wi::sext_large(), wi::shifted_mask(), wi::shifted_mask(), generic_wide_int< storage >::sign_mask(), simplify_context::simplify_binary_operation_1(), simplify_compare_const(), simplify_comparison(), simplify_const_relational_operation(), simplify_shift_const_1(), simplify_context::simplify_subreg(), simplify_context::simplify_ternary_operation(), simplify_context::simplify_unary_operation_1(), size_of_die(), size_of_int_loc_descriptor(), size_of_loc_descr(), split_double(), store_fixed_bit_field_1(), streamer_read_hwi(), wi::sub_large(), target_char_cast(), ten_to_ptwo(), wi::to_mpz(), generic_wide_int< storage >::to_shwi(), generic_wide_int< storage >::to_uhwi(), top_bit_of(), double_int::trailing_zeros(), trunc_int_for_mode(), uint_loc_descriptor(), val_signbit_known_clear_p(), val_signbit_known_set_p(), val_signbit_p(), value_format(), vect_recog_divmod_pattern(), WI_UNARY_RESULT(), wi_unpack(), wide_int_storage::wide_int_storage(), wide_int_storage::wide_int_storage(), WIDEST_INT(), zext_hwi(), and wi::zext_large().

◆ HOST_BITS_PER_WIDEST_FAST_INT

#define HOST_BITS_PER_WIDEST_FAST_INT   HOST_BITS_PER_LONG

Referenced by sbitmap_popcount().

◆ HOST_LONG_FORMAT

#define HOST_LONG_FORMAT   "l"
The string that should be inserted into a printf style format to indicate a "long" operand.

◆ HOST_LONG_LONG_FORMAT

#define HOST_LONG_LONG_FORMAT   "ll"
The string that should be inserted into a printf style format to indicate a "long long" operand.

◆ HOST_SIZE_T_PRINT_DEC

◆ HOST_SIZE_T_PRINT_HEX

#define HOST_SIZE_T_PRINT_HEX   "%#" GCC_PRISZ "x"

◆ HOST_SIZE_T_PRINT_HEX_PURE

#define HOST_SIZE_T_PRINT_HEX_PURE   "%" GCC_PRISZ "x"

◆ HOST_SIZE_T_PRINT_UNSIGNED

◆ HOST_WIDE_INT_0

#define HOST_WIDE_INT_0   HOST_WIDE_INT_C (0)

◆ HOST_WIDE_INT_0U

#define HOST_WIDE_INT_0U   HOST_WIDE_INT_UC (0)

◆ HOST_WIDE_INT_1

◆ HOST_WIDE_INT_1U

#define HOST_WIDE_INT_1U   HOST_WIDE_INT_UC (1)

Referenced by add_mask_else_and_len_args(), auto_flag< T >::auto_flag(), wi::bitreverse_large(), bp_unpack_var_len_int(), build_replicated_int_cst(), calculate_crc(), canonicalize_condition(), carry_backpropagate(), choose_mult_variant(), choose_multiplier(), clz_loc_descriptor(), cmdline_handle_error(), combine_simplify_rtx(), compile_file(), convert_mode_scalar(), decode_cmdline_option(), default_memtag_untagged_pointer(), divmod_internal_2(), do_compare_rtx_and_jump(), do_jump(), do_store_flag(), do_tablejump(), doloop_optimize(), emit_block_cmp_via_loop(), emit_block_move_via_oriented_loop(), emit_block_move_via_sized_loop(), expand_builtin_issignaling(), expand_compound_operation(), expand_divmod(), expand_doubleword_mod(), expand_field_assignment(), expand_fn_using_insn(), expand_mult_const(), expand_omp_for(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_vector_divmod(), extract_left_shift(), find_split_point(), floor_log2(), force_int_to_mode(), frame_offset_overflow(), get_mode_bounds(), get_section_anchor(), gf2n_poly_long_div_quotient(), strlen_pass::handle_builtin_memset(), handle_overloaded_gen(), handle_overloaded_gen(), highest_pow2_factor(), hwasan_truncate_to_tag_size(), implies_p(), invert_mod2n(), loc_list_from_tree_1(), make_extraction(), make_field_assignment(), wi::mask(), maybe_swap_commutative_operands(), mode_signbit_p(), noce_try_bitop(), nonzero_bits1(), num_sign_bit_copies1(), optimize_atomic_bit_test_and(), optimize_bitfield_assignment_op(), real_powi(), real_to_integer(), scan_store_can_perm_p(), double_int::set_bit(), wi::set_bit_large(), set_position_unneeded(), sext_hwi(), wi::shifted_mask(), simplify_context::simplify_binary_operation_1(), simplify_compare_const(), simplify_comparison(), simplify_const_relational_operation(), simplify_count_zeroes(), simplify_shift_const_1(), simplify_context::simplify_subreg(), simplify_context::simplify_ternary_operation(), store_constructor(), store_fixed_bit_field_1(), streamer_read_hwi(), synth_mult(), target_char_cast(), wi::to_mpz(), try_store_by_multiple_pieces(), TYPE_VECTOR_SUBPARTS(), val_signbit_known_clear_p(), val_signbit_known_set_p(), val_signbit_p(), vect_recog_divmod_pattern(), vectorizable_scan_store(), and zext_hwi().

◆ HOST_WIDE_INT_M1

#define HOST_WIDE_INT_M1   HOST_WIDE_INT_C (-1)

◆ HOST_WIDE_INT_M1U

◆ HOST_WIDE_INT_MAX

◆ HOST_WIDE_INT_MIN

◆ HOST_WIDE_INT_PRINT

#define HOST_WIDE_INT_PRINT   HOST_LONG_LONG_FORMAT
Various printf format strings for HOST_WIDE_INT.

Referenced by asm_fprintf(), diag_vfprintf(), dump_pointer(), format_phase_2(), and rtx_reader::read_rtx_code().

◆ HOST_WIDE_INT_PRINT_C

#define HOST_WIDE_INT_PRINT_C   "LL"

◆ HOST_WIDE_INT_PRINT_DEC

◆ HOST_WIDE_INT_PRINT_DEC_C

#define HOST_WIDE_INT_PRINT_DEC_C   "%" PRId64 HOST_WIDE_INT_PRINT_C

Referenced by print_host_wide_int().

◆ HOST_WIDE_INT_PRINT_DOUBLE_HEX

#define HOST_WIDE_INT_PRINT_DOUBLE_HEX   "0x%" PRIx64 "%016" PRIx64

Referenced by output_addr_const(), and pp_double_int().

◆ HOST_WIDE_INT_PRINT_HEX

◆ HOST_WIDE_INT_PRINT_HEX_PURE

#define HOST_WIDE_INT_PRINT_HEX_PURE   "%" PRIx64

Referenced by lto_get_section_name(), and print_hex().

◆ HOST_WIDE_INT_PRINT_PADDED_HEX

#define HOST_WIDE_INT_PRINT_PADDED_HEX   "%016" PRIx64

◆ HOST_WIDE_INT_PRINT_UNSIGNED

◆ HOST_WIDE_INT_UC

◆ HOST_WIDEST_FAST_INT

#define HOST_WIDEST_FAST_INT   long
Define HOST_WIDEST_FAST_INT to the widest integer type supported efficiently in hardware. (That is, the widest integer type that fits in a hardware register.) Normally this is "long" but on some hosts it should be "long long" or "__int64". This is no convenient way to autodetect this, so such systems must set a flag in config.host; see there for details.

◆ PRId64

◆ PRIi64

#define PRIi64   GCC_PRI64 "i"

Referenced by sreal::dump().

◆ PRIo64

#define PRIo64   GCC_PRI64 "o"

◆ PRIu64

◆ PRIX64

#define PRIX64   GCC_PRI64 "X"

◆ PRIx64

#define PRIx64   GCC_PRI64 "x"

Referenced by write_test_expr().

Typedef Documentation

◆ __gcc_host_wide_int__

typedef HOST_WIDE_INT __gcc_host_wide_int__
This is a magic identifier which allows GCC to figure out the type of HOST_WIDE_INT for %wd specifier checks. You must issue this typedef before using the __asm_fprintf__ format attribute.

Function Documentation

◆ abs_hwi()

◆ absu_hwi()

◆ add_hwi()

HOST_WIDE_INT add_hwi ( HOST_WIDE_INT a,
HOST_WIDE_INT b,
bool * overflow )
inline
Compute the sum of signed A and B and indicate in *OVERFLOW whether that operation overflowed.

References a, b, and HOST_BITS_PER_WIDE_INT.

Referenced by add_sat_hwi(), and lambda_matrix_row_add().

◆ add_sat_hwi()

HOST_WIDE_INT add_sat_hwi ( HOST_WIDE_INT a,
HOST_WIDE_INT b )
inline
Compute the saturated sum of signed A and B, i.e. upon overflow clamp the result to the corresponding extremum.

References a, add_hwi(), b, HOST_WIDE_INT_MAX, and HOST_WIDE_INT_MIN.

◆ ceil_log2()

◆ clz_hwi()

int clz_hwi ( unsigned HOST_WIDE_INT x)
extern

◆ ctz_hwi()

int ctz_hwi ( unsigned HOST_WIDE_INT x)
extern

◆ ctz_or_zero()

int ctz_or_zero ( unsigned HOST_WIDE_INT x)
inline
Like ctz_hwi, except 0 when x == 0.

References ffs_hwi().

Referenced by expand_divmod(), expand_vector_divmod(), nonzero_bits1(), synth_mult(), and vect_recog_divmod_pattern().

◆ exact_log2()

int exact_log2 ( unsigned HOST_WIDE_INT x)
extern
Return log2, or -1 if not exact.
Return the logarithm of X, base 2, considering X unsigned, if X is a power of 2. Otherwise, returns -1.

References floor_log2(), and pow2p_hwi().

Referenced by tree_vector_builder::build(), calculate_table_based_CRC(), canonicalize_reload_addr(), carry_backpropagate(), check_func(), combine_simplify_rtx(), debug_set_to_format(), dump_generic_node(), encode_lfs(), wi::exact_log2(), expand_ifn_atomic_compare_exchange_into_call(), expand_omp_atomic(), expand_vec_perm_var(), ext_dce_process_sets(), final_addr_vec_align(), final_scan_insn_1(), find_split_point(), force_int_to_mode(), get_misalign_in_elems(), get_pos_from_mask(), get_required_cycles(), get_shiftadd_cost(), get_ubsan_type_info_for_type(), group_limit(), hwasan_check_func(), init_ggc(), int_loc_descriptor(), interpret_rhs_expr(), loc_list_from_tree_1(), low_bitmask_len(), make_compound_operation_int(), make_extraction(), noce_try_store_flag_constants(), report_error_func(), scan_store_can_perm_p(), SET_TYPE_VECTOR_SUBPARTS(), simd_clone_adjust(), simplify_and_const_int_1(), simplify_context::simplify_binary_operation_1(), simplify_comparison(), simplify_if_then_else(), simplify_shift_const_1(), synth_mult(), try_combine(), vect_create_epilog_for_reduction(), vect_gen_vector_loop_niters(), vect_grouped_load_supported(), vect_grouped_store_supported(), vect_lower_load_permutations(), vect_model_reduction_cost(), vect_need_peeling_or_partial_vectors_p(), vect_permute_load_chain(), vect_permute_store_chain(), vect_shift_permute_load_chain(), and vectorizable_simd_clone_call().

◆ ffs_hwi()

int ffs_hwi ( unsigned HOST_WIDE_INT x)
extern
Similar to ctz_hwi, except that the least significant bit is numbered starting from 1, and X == 0 yields 0.

References floor_log2(), and least_bit_hwi().

Referenced by auto_flag< T >::auto_flag(), build_printable_array_type(), ctz_or_zero(), and layout_type().

◆ floor_log2()

int floor_log2 ( unsigned HOST_WIDE_INT x)
extern
Return floor of log2, with -1 for zero.
Operations on HOST_WIDE_INT. Copyright (C) 1987-2025 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
The functions clz_hwi, ctz_hwi, ffs_hwi, floor_log2, ceil_log2, and exact_log2 are defined as inline functions in hwint.h if GCC_VERSION >= 3004. The definitions here are used for older versions of GCC and non-GCC bootstrap compilers.
Given X, an unsigned number, return the largest int Y such that 2**Y <= X. If X is 0, return -1.

References HOST_BITS_PER_WIDE_INT, and HOST_WIDE_INT_1U.

Referenced by asan_emit_stack_protection(), assemble_align(), assemble_start_function(), assemble_trampoline_template(), assemble_variable(), bp_pack_int_in_range(), bp_unpack_int_in_range(), carry_backpropagate(), ceil_log2(), clz_hwi(), constant_size(), ctz_hwi(), estimate_num_insns(), exact_log2(), expand_divmod(), expand_mult(), expand_sdiv_pow2(), expand_smod_pow2(), expand_vector_divmod(), expand_widening_mult(), extended_count(), ffs_hwi(), force_int_to_mode(), get_required_cycles(), get_vectype_for_scalar_type(), nonzero_bits1(), sreal::normalize_down(), sreal::normalize_up(), num_sign_bit_copies1(), optimize_constant_pool(), output_call_frame_info(), output_constant_def_contents(), output_fde(), profile_function(), read_log_maxskip(), real_to_decimal_for_mode(), setup_allocno_priorities(), simplify_rotate(), switch_to_eh_frame_section(), synth_mult(), try_store_by_multiple_pieces(), vect_build_slp_instance(), vectorizable_bb_reduc_epilogue(), and vectorizable_simd_clone_call().

◆ gcd()

HOST_WIDE_INT gcd ( HOST_WIDE_INT a,
HOST_WIDE_INT b )
extern

◆ least_bit_hwi()

◆ least_common_multiple()

◆ mul_hwi() [1/2]

HOST_WIDE_INT mul_hwi ( HOST_WIDE_INT a,
HOST_WIDE_INT b,
bool * overflow )
inline
Compute the product of signed A and B and indicate in *OVERFLOW whether that operation overflowed.

References a, b, and HOST_WIDE_INT_MIN.

◆ mul_hwi() [2/2]

HOST_WIDE_INT mul_hwi ( HOST_WIDE_INT x,
HOST_WIDE_INT y )
extern
Return X multiplied by Y and check that the result does not overflow.

References gcc_checking_assert, HOST_WIDE_INT_MIN, pos_mul_hwi(), and y.

Referenced by lambda_matrix_row_add(), least_common_multiple(), and mul_sat_hwi().

◆ mul_sat_hwi()

HOST_WIDE_INT mul_sat_hwi ( HOST_WIDE_INT a,
HOST_WIDE_INT b )
inline
Compute the saturated product of signed A and B, i.e. upon overflow clamp the result to the corresponding extremum.

References a, b, HOST_WIDE_INT_MAX, HOST_WIDE_INT_MIN, and mul_hwi().

◆ popcount_hwi()

int popcount_hwi ( unsigned HOST_WIDE_INT x)
extern

◆ pos_mul_hwi()

HOST_WIDE_INT pos_mul_hwi ( HOST_WIDE_INT x,
HOST_WIDE_INT y )
extern
For X and Y positive integers, return X multiplied by Y and check that the result does not overflow.

References gcc_checking_assert, HOST_WIDE_INT_MAX, and y.

Referenced by mul_hwi().

◆ pow2_or_zerop()

bool pow2_or_zerop ( unsigned HOST_WIDE_INT x)
inline
True if X is zero or a power of two.

References least_bit_hwi().

Referenced by memrefs_conflict_p(), negative_power_of_two_p(), pow2p_hwi(), round_down_loc(), and round_up_loc().

◆ pow2p_hwi()

◆ reflect_hwi()

unsigned HOST_WIDE_INT reflect_hwi ( unsigned HOST_WIDE_INT value,
unsigned bitwidth )
extern
Reflect (reverse) the bits of a given VALUE within a specified BITWIDTH.

References i, and value.

◆ sext_hwi()

◆ zext_hwi()

unsigned HOST_WIDE_INT zext_hwi ( unsigned HOST_WIDE_INT src,
unsigned int prec )
inline