|
GCC Middle and Back End API Reference
|
#include "config.h"#include "system.h"#include "coretypes.h"#include "bitmap.h"#include "function.h"#include "tm.h"#include "rtl.h"#include "tree.h"#include "value-range.h"#include "vr-values.h"#include "realmpfr.h"#include "dfp.h"
Macros | |
| #define | CLASS2(A, B) |
| #define | M_LOG10_2 0.30102999566398119521 |
| #define | CACHED_FRACTION(NAME, N) |
Returns a cached REAL_VALUE_TYPE corresponding to 1/n, for various n.
| #define CLASS2 | ( | A, | |
| B ) |
real.cc - software floating point emulation. Copyright (C) 1993-2026 Free Software Foundation, Inc. Contributed by Stephen L. Moshier (moshier@world.std.com). Re-written by Richard Henderson <rth@redhat.com> 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 floating point model used internally is not exactly IEEE 754
compliant, and close to the description in the ISO C99 standard,
section 5.2.4.2.2 Characteristics of floating types.
Specifically
x = s * b^e * \sum_{k=1}^p f_k * b^{-k}
where
s = sign (+- 1)
b = base or radix, here always 2
e = exponent
p = precision (the number of base-b digits in the significand)
f_k = the digits of the significand.
We differ from typical IEEE 754 encodings in that the entire
significand is fractional. Normalized significands are in the
range [0.5, 1.0).
A requirement of the model is that P be larger than the largest
supported target floating-point type by at least 2 bits. This gives
us proper rounding when we truncate to the target type. In addition,
E must be large enough to hold the smallest supported denormal number
in a normalized form.
Both of these requirements are easily satisfied. The largest target
significand is 113 bits; we store at least 160. The smallest
denormal number fits in 17 exponent bits; we store 26. Used to classify two numbers simultaneously.
Referenced by do_add(), do_compare(), do_divide(), and do_multiply().
| #define M_LOG10_2 0.30102999566398119521 |
Render R as a decimal floating point constant. Emit DIGITS significant digits in the result, bounded by BUF_SIZE. If DIGITS is 0, choose the maximum for the representation. If CROP_TRAILING_ZEROS, strip trailing zeros. If MODE is VOIDmode, round to nearest value. Otherwise, round to a string that, when parsed back in mode MODE, yields the same value.
Referenced by decimal_integer_string(), and real_to_decimal_for_mode().
|
inlinestatic |
Add the significands of A and B, placing the result in R. Return true if there was carry out of the most significant word.
References a, add_significands(), b, i, r, REAL_VALUE_TYPE, and SIGSZ.
Referenced by add_significands(), do_add(), real_nan(), real_nextafter(), and round_for_format().
| void build_sinatan_real | ( | REAL_VALUE_TYPE * | r, |
| tree | type ) |
Fills r with the largest value such that 1 + r*r won't overflow. This is used in both sin (atan (x)) and cos (atan(x)) optimizations.
References build_sinatan_real(), dconst1, mpfr_from_real(), NULL, r, real_from_mpfr(), real_maxval(), REAL_MODE_FORMAT, REAL_VALUE_TYPE, and TYPE_MODE.
Referenced by build_sinatan_real(), and dconst_ninth_ptr().
|
static |
Clear bits 0..N-1 of the significand of R.
References clear_significand_below(), gcc_checking_assert, HOST_BITS_PER_LONG, i, r, REAL_VALUE_TYPE, and SIGNIFICAND_BITS.
Referenced by clear_significand_below(), do_fix_trunc(), real_maxval(), real_nextafter(), real_roundeven(), and round_for_format().
|
inlinestatic |
Clear bit N of the significand of R.
References clear_significand_bit(), gcc_checking_assert, HOST_BITS_PER_LONG, r, REAL_VALUE_TYPE, and SIGNIFICAND_BITS.
Referenced by clear_significand_bit(), real_maxval(), and real_nextafter().
|
inlinestatic |
Return true if A is nonzero.
References a, cmp_significand_0(), i, REAL_VALUE_TYPE, and SIGSZ.
Referenced by cmp_significand_0(), real_from_string(), and real_to_decimal_for_mode().
|
inlinestatic |
Compare significands. Return tri-state vs zero.
References a, b, cmp_significands(), i, REAL_VALUE_TYPE, and SIGSZ.
Referenced by cmp_significands(), div_significands(), do_compare(), real_to_decimal_for_mode(), and rtd_divmod().
| const REAL_VALUE_TYPE * dconst_e_ptr | ( | void | ) |
Returns the special REAL_VALUE_TYPE corresponding to 'e'.
Function to return the real value special constant 'e'.
References dconst_e_ptr(), NULL_TREE, real_from_mpfr(), REAL_VALUE_TYPE, rvc_zero, and SIGNIFICAND_BITS.
Referenced by dconst_e_ptr().
| const REAL_VALUE_TYPE * dconst_pi_ptr | ( | void | ) |
Returns the special REAL_VALUE_TYPE corresponding to 'pi'.
Function to return the real value special constant 'pi'.
References dconst_pi_ptr(), NULL_TREE, real_from_mpfr(), REAL_VALUE_TYPE, rvc_zero, and SIGNIFICAND_BITS.
Referenced by dconst_pi_ptr().
| const REAL_VALUE_TYPE * dconst_sqrt2_ptr | ( | void | ) |
Returns the special REAL_VALUE_TYPE corresponding to sqrt(2).
References dconst_sqrt2_ptr(), REAL_VALUE_TYPE, and rvc_zero.
Referenced by dconst_ninth_ptr(), and dconst_sqrt2_ptr().
| DEBUG_FUNCTION void debug | ( | const REAL_VALUE_TYPE & | r | ) |
References debug, r, real_to_hexadecimal(), and REAL_VALUE_TYPE.
|
static |
Convert a real with an integral value to decimal float.
References decimal_from_integer(), decimal_integer_string(), decimal_real_from_string(), r, and REAL_VALUE_TYPE.
Referenced by decimal_from_integer(), and real_from_integer().
|
static |
Render R, an integral value, as a floating point constant with no specified exponent.
References decimal_integer_string(), gcc_assert, M_LOG10_2, real_format::p, r, real_digit(), REAL_EXP, REAL_VALUE_TYPE, rtd_divmod(), rvc_zero, and times_pten().
Referenced by decimal_from_integer(), and decimal_integer_string().
|
static |
Decode arm_bfloat types.
References decode_arm_bfloat_half(), exp(), real_format::has_denorm, real_format::has_inf, real_format::has_nans, real_format::has_signed_zero, HOST_BITS_PER_LONG, normalize(), real_format::qnan_msb_set, r, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by decode_arm_bfloat_half().
|
static |
Decode a double precision DFP value in BUF into a real R.
References decode_decimal64(), decode_decimal_double(), r, and REAL_VALUE_TYPE.
Referenced by decode_decimal_double().
|
static |
Decode a quad precision DFP value in BUF into a real R.
References decode_decimal128(), decode_decimal_quad(), r, and REAL_VALUE_TYPE.
Referenced by decode_decimal_quad().
|
static |
Decode a single precision DFP value in BUF into a real R.
References decode_decimal32(), decode_decimal_single(), r, and REAL_VALUE_TYPE.
Referenced by decode_decimal_single().
|
static |
References decode_ibm_extended(), decode_ieee_double(), do_add(), ieee_double_format, mips_double_format, real_format::qnan_msb_set, r, REAL_VALUE_TYPE, rvc_inf, rvc_nan, and rvc_zero.
Referenced by decode_ibm_extended().
|
static |
References decode_ieee_double(), exp(), FLOAT_WORDS_BIG_ENDIAN, real_format::has_denorm, real_format::has_inf, real_format::has_nans, real_format::has_signed_zero, HOST_BITS_PER_LONG, normalize(), real_format::qnan_msb_set, r, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by decode_ibm_extended(), and decode_ieee_double().
|
static |
As above, we have a helper function which converts from 12-byte little-endian Intel format to internal format. Functions below adjust for the other possible formats.
References decode_ieee_extended(), real_format::emin, exp(), real_format::has_denorm, real_format::has_inf, real_format::has_nans, real_format::has_signed_zero, HOST_BITS_PER_LONG, normalize(), real_format::qnan_msb_set, r, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, SET_REAL_EXP, and SIGSZ.
Referenced by decode_ieee_extended(), decode_ieee_extended_intel_96(), and decode_ieee_extended_motorola().
|
static |
Convert from the internal format to the 16-byte Intel format for an IEEE extended real.
References decode_ieee_extended_intel_128(), decode_ieee_extended_intel_96(), r, and REAL_VALUE_TYPE.
Referenced by decode_ieee_extended_intel_128().
|
static |
Convert from the internal format to the 12-byte Intel format for an IEEE extended real.
References decode_ieee_extended(), decode_ieee_extended_intel_96(), FLOAT_WORDS_BIG_ENDIAN, r, and REAL_VALUE_TYPE.
Referenced by decode_ieee_extended_intel_128(), and decode_ieee_extended_intel_96().
|
static |
Convert from the internal format to the 12-byte Motorola format for an IEEE extended real.
References decode_ieee_extended(), decode_ieee_extended_motorola(), r, and REAL_VALUE_TYPE.
Referenced by decode_ieee_extended_motorola().
|
static |
Decode half-precision floats. This routine is used both for the IEEE ARM alternative encodings.
References decode_ieee_half(), exp(), real_format::has_denorm, real_format::has_inf, real_format::has_nans, real_format::has_signed_zero, HOST_BITS_PER_LONG, normalize(), real_format::qnan_msb_set, r, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by decode_ieee_half().
|
static |
References decode_ieee_quad(), exp(), FLOAT_WORDS_BIG_ENDIAN, real_format::has_denorm, real_format::has_inf, real_format::has_nans, real_format::has_signed_zero, HOST_BITS_PER_LONG, lshift_significand(), normalize(), real_format::qnan_msb_set, r, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, SET_REAL_EXP, SIG_MSB, SIGNIFICAND_BITS, and SIGSZ.
Referenced by decode_ieee_quad().
|
static |
References decode_ieee_single(), exp(), real_format::has_denorm, real_format::has_inf, real_format::has_nans, real_format::has_signed_zero, HOST_BITS_PER_LONG, normalize(), real_format::qnan_msb_set, r, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by decode_ieee_single().
|
static |
References decode_internal(), r, and REAL_VALUE_TYPE.
Referenced by decode_internal().
|
static |
References decode_vax_d(), exp(), FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, lshift_significand(), r, REAL_VALUE_TYPE, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by decode_vax_d().
|
static |
References decode_vax_f(), exp(), HOST_BITS_PER_LONG, r, REAL_VALUE_TYPE, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by decode_vax_f().
|
static |
References decode_vax_g(), exp(), FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, lshift_significand(), r, REAL_VALUE_TYPE, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by decode_vax_g().
|
inlinestatic |
Divide the significands of A and B, placing the result in R. Return true if the division was inexact.
References a, b, cmp_significands(), div_significands(), i, lshift_significand_1(), r, REAL_VALUE_TYPE, set_significand_bit(), SIG_MSB, SIGNIFICAND_BITS, SIGSZ, and sub_significands().
Referenced by div_significands(), and do_divide().
|
static |
Calculate R = A + (SUBTRACT_P ? -B : B). Return true if the result may be inexact due to a loss of precision.
References a, add_significands(), b, CLASS2, do_add(), exp(), gcc_unreachable, get_canonical_qnan(), get_inf(), get_zero(), MAX_EXP, neg_significand(), normalize(), r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SET_REAL_EXP, SIG_MSB, SIGNIFICAND_BITS, SIGSZ, sticky_rshift_significand(), and sub_significands().
Referenced by decode_ibm_extended(), do_add(), do_multiply(), encode_ibm_extended(), real_arithmetic(), real_ceil(), real_floor(), real_round(), and real_roundeven().
|
static |
Return a tri-state comparison of A vs B. Return NAN_RESULT if one of the two operands is a NaN.
References a, b, CLASS2, cmp_significands(), decimal_do_compare(), do_compare(), gcc_unreachable, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, and rvc_zero.
Referenced by do_compare(), real_arithmetic(), real_compare(), real_equal(), real_less(), real_nextafter(), and real_to_decimal_for_mode().
|
static |
Calculate R = A / B. Return true if the result may be inexact.
References a, b, CLASS2, div_significands(), do_divide(), exp(), gcc_unreachable, get_canonical_qnan(), get_inf(), get_zero(), MAX_EXP, normalize(), r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SET_REAL_EXP.
Referenced by do_divide(), exact_real_inverse(), real_arithmetic(), real_powi(), real_to_decimal_for_mode(), ten_to_mptwo(), and times_pten().
|
static |
Return A truncated to an integral value toward zero.
References a, clear_significand_below(), decimal_do_fix_trunc(), do_fix_trunc(), gcc_unreachable, get_zero(), r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGNIFICAND_BITS.
Referenced by do_fix_trunc(), real_arithmetic(), real_ceil(), real_floor(), real_round(), real_to_decimal_for_mode(), and real_trunc().
|
static |
Calculate R = A * B. Return true if the result may be inexact.
References a, b, CLASS2, do_add(), do_multiply(), exp(), gcc_unreachable, get_canonical_qnan(), get_inf(), get_zero(), HOST_BITS_PER_LONG, i, MAX_EXP, normalize(), r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SET_REAL_EXP, and SIGSZ.
Referenced by do_multiply(), real_arithmetic(), real_powi(), real_to_decimal_for_mode(), ten_to_ptwo(), and times_pten().
|
static |
Encode arm_bfloat types.
References real_format::canonical_nan_lsbs_set, encode_arm_bfloat_half(), exp(), gcc_unreachable, real_format::has_inf, real_format::has_nans, HOST_BITS_PER_LONG, real_format::qnan_msb_set, r, REAL_EXP, real_isdenormal(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_arm_bfloat_half().
|
static |
Encode real R into a double precision DFP value in BUF.
References encode_decimal64(), encode_decimal_double(), r, and REAL_VALUE_TYPE.
Referenced by encode_decimal_double().
|
static |
Encode real R into a quad precision DFP value in BUF.
References encode_decimal128(), encode_decimal_quad(), r, and REAL_VALUE_TYPE.
Referenced by encode_decimal_quad().
|
static |
Encode real R into a single precision DFP value in BUF.
References encode_decimal32(), encode_decimal_single(), r, and REAL_VALUE_TYPE.
Referenced by encode_decimal_single().
|
static |
IBM 128-bit extended precision format: a pair of IEEE double precision numbers whose sum is equal to the extended precision value. The number with greater magnitude is first. This format has the same magnitude range as an IEEE double precision value, but effectively 106 bits of significand precision. Infinity and NaN are represented by their IEEE double precision value stored in the first number, the second number is +0.0 or -0.0 for Infinity and don't-care for NaN.
References do_add(), encode_ibm_extended(), encode_ieee_double(), ieee_double_format, mips_double_format, normalize(), real_format::qnan_msb_set, r, REAL_VALUE_TYPE, round_for_format(), and rvc_normal.
Referenced by encode_ibm_extended().
|
static |
IEEE double-precision format.
References real_format::canonical_nan_lsbs_set, encode_ieee_double(), exp(), FLOAT_WORDS_BIG_ENDIAN, gcc_unreachable, real_format::has_inf, real_format::has_nans, HOST_BITS_PER_LONG, real_format::qnan_msb_set, r, REAL_EXP, real_isdenormal(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_ibm_extended(), and encode_ieee_double().
|
static |
IEEE extended real format. This comes in three flavors: Intel's as a 12 byte image, Intel's as a 16 byte image, and Motorola's. Intel 12- and 16-byte images may be big- or little endian; Motorola's is always big endian.
Helper subroutine which converts from the internal format to the 12-byte little-endian Intel format. Functions below adjust this for the other possible formats.
References real_format::canonical_nan_lsbs_set, encode_ieee_extended(), exp(), gcc_assert, gcc_unreachable, real_format::has_inf, real_format::has_nans, HOST_BITS_PER_LONG, real_format::qnan_msb_set, r, REAL_EXP, real_isdenormal(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_ieee_extended(), encode_ieee_extended_intel_96(), and encode_ieee_extended_motorola().
|
static |
Convert from the internal format to the 16-byte Intel format for an IEEE extended real.
References encode_ieee_extended_intel_128(), encode_ieee_extended_intel_96(), r, and REAL_VALUE_TYPE.
Referenced by encode_ieee_extended_intel_128().
|
static |
Convert from the internal format to the 12-byte Intel format for an IEEE extended real.
References encode_ieee_extended(), encode_ieee_extended_intel_96(), FLOAT_WORDS_BIG_ENDIAN, r, and REAL_VALUE_TYPE.
Referenced by encode_ieee_extended_intel_128(), and encode_ieee_extended_intel_96().
|
static |
Convert from the internal format to the 12-byte Motorola format for an IEEE extended real.
References encode_ieee_extended(), encode_ieee_extended_motorola(), r, REAL_VALUE_TYPE, and rvc_inf.
Referenced by encode_ieee_extended_motorola().
|
static |
Encode half-precision floats. This routine is used both for the IEEE ARM alternative encodings.
References real_format::canonical_nan_lsbs_set, encode_ieee_half(), exp(), gcc_unreachable, real_format::has_inf, real_format::has_nans, HOST_BITS_PER_LONG, real_format::qnan_msb_set, r, REAL_EXP, real_isdenormal(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_ieee_half().
|
static |
IEEE quad precision format.
References real_format::canonical_nan_lsbs_set, encode_ieee_quad(), exp(), FLOAT_WORDS_BIG_ENDIAN, gcc_unreachable, real_format::has_inf, real_format::has_nans, HOST_BITS_PER_LONG, real_format::qnan_msb_set, r, REAL_EXP, real_isdenormal(), REAL_VALUE_TYPE, rshift_significand(), rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGNIFICAND_BITS.
Referenced by encode_ieee_quad().
|
static |
IEEE single-precision format.
References real_format::canonical_nan_lsbs_set, encode_ieee_single(), exp(), gcc_unreachable, real_format::has_inf, real_format::has_nans, HOST_BITS_PER_LONG, real_format::qnan_msb_set, r, REAL_EXP, real_isdenormal(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_ieee_single().
|
static |
A synthetic "format" for internal arithmetic. It's the size of the internal significand minus the two bits needed for proper rounding. The encode and decode routines exist only to satisfy our paranoia harness.
References encode_internal(), r, and REAL_VALUE_TYPE.
Referenced by encode_internal().
|
static |
References encode_vax_d(), FLOAT_WORDS_BIG_ENDIAN, gcc_unreachable, HOST_BITS_PER_LONG, r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_vax_d().
|
static |
Descriptions of VAX floating point formats can be found beginning at http://h71000.www7.hp.com/doc/73FINAL/4515/4515pro_013.html#f_floating_point_format The thing to remember is that they're almost IEEE, except for word order, exponent bias, and the lack of infinities, nans, and denormals. We don't implement the H_floating format here, simply because neither the VAX or Alpha ports use it.
References encode_vax_f(), exp(), gcc_unreachable, HOST_BITS_PER_LONG, r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_vax_f().
|
static |
References encode_vax_g(), FLOAT_WORDS_BIG_ENDIAN, gcc_unreachable, HOST_BITS_PER_LONG, r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by encode_vax_g().
| bool exact_real_inverse | ( | format_helper | fmt, |
| REAL_VALUE_TYPE * | r ) |
Try to change R into its exact multiplicative inverse in format FMT. Return true if successful.
Replace R by 1/R in the given format, if the result is exact.
References do_divide(), exact_real_inverse(), i, r, real_convert(), real_digit(), REAL_VALUE_TYPE, rvc_normal, SIG_MSB, and SIGSZ.
Referenced by dconst_ninth_ptr(), exact_inverse(), and exact_real_inverse().
| bool exact_real_truncate | ( | format_helper | fmt, |
| const REAL_VALUE_TYPE * | a ) |
Return true if truncating to FMT is exact.
Return true if truncating to NEW is exact.
References a, real_format::emin, exact_real_truncate(), real_convert(), REAL_EXP, real_identical(), and REAL_VALUE_TYPE.
Referenced by compress_float_constant(), exact_real_truncate(), fold_convert_const_real_from_real(), simplify_const_unary_operation(), and strip_float_extensions().
|
inlinestatic |
Initialize R with the canonical quiet NaN.
References get_canonical_qnan(), r, REAL_VALUE_TYPE, and rvc_nan.
Referenced by do_add(), do_divide(), do_multiply(), get_canonical_qnan(), real_from_string(), real_nan(), and real_nextafter().
|
inlinestatic |
References get_canonical_snan(), r, REAL_VALUE_TYPE, and rvc_nan.
Referenced by get_canonical_snan(), real_from_string(), and real_nan().
|
inlinestatic |
References get_inf(), r, REAL_VALUE_TYPE, and rvc_inf.
Referenced by do_add(), do_divide(), do_multiply(), get_inf(), normalize(), real_from_string(), real_inf(), real_ldexp(), real_nextafter(), and round_for_format().
| void get_max_float | ( | const struct real_format * | fmt, |
| char * | buf, | ||
| size_t | len, | ||
| bool | norm_max ) |
Write into BUF the maximum representable finite floating-point number, (1 - b**-p) * b**emax for a given FP format FMT as a hex float string. LEN is the size of BUF, and the buffer must be large enough to contain the resulting string. If NORM_MAX, instead write the maximum representable finite normalized floating-point number, defined to be such that all choices of digits for that exponent are representable in the format (this only makes a difference for IBM long double).
Write into BUF the maximum representable finite floating-point number, (1 - b**-p) * b**emax for a given FP format FMT as a hex float string. BUF must be large enough to contain the result.
References real_format::b, real_format::emax, gcc_assert, get_max_float(), i, real_format::p, and real_format::pnan.
Referenced by dconst_ninth_ptr(), fold_builtin_interclass_mathfn(), get_max_float(), and real_max_representable().
|
inlinestatic |
Initialize R with a positive zero.
References get_zero(), r, and REAL_VALUE_TYPE.
Referenced by do_add(), do_divide(), do_fix_trunc(), do_multiply(), get_zero(), normalize(), real_from_integer(), real_from_string(), real_ldexp(), real_nan(), real_nextafter(), and round_for_format().
References GET_MODE, and HONOR_INFINITIES().
| bool HONOR_INFINITIES | ( | const_tree | t | ) |
References element_mode(), and HONOR_INFINITIES().
| bool HONOR_INFINITIES | ( | machine_mode | m | ) |
As for HONOR_NANS, but true if the mode can represent infinity and the treatment of infinite values is important.
References HONOR_INFINITIES(), and MODE_HAS_INFINITIES.
Referenced by frange_val_max(), frange_val_min(), HONOR_INFINITIES(), HONOR_INFINITIES(), HONOR_INFINITIES(), omp_reduction_init_op(), frange::set(), tree_expr_finite_p(), tree_expr_infinite_p(), and tree_expr_maybe_infinite_p().
References GET_MODE, and HONOR_NANS().
| bool HONOR_NANS | ( | const_tree | t | ) |
References element_mode(), and HONOR_NANS().
| bool HONOR_NANS | ( | machine_mode | m | ) |
True if mode M has a NaN representation and the treatment of NaN operands is important.
Declare functions in real.cc.
True if the given mode has a NaN representation and the treatment of NaN operands is important. Certain optimizations, such as folding x * 0 into 0, are not correct for NaN operands, and are normally disabled for modes with NaNs. The user can ask for them to be done anyway using the -funsafe-math-optimizations switch.
References HONOR_NANS(), and MODE_HAS_NANS.
Referenced by ipa_predicate::add_clause(), bitwise_inverted_equal_p(), build_gt(), build_lt(), combine_comparisons(), comparison_combine(), cond_stmts_equal_p(), convert_mode_scalar(), do_compare_rtx_and_jump(), eliminate_using_constants(), emit_store_flag(), emit_store_flag_force(), expand_builtin_issignaling(), expand_complex_multiplication(), expand_vec_cond_mask_optab_fn(), fold_binary_loc(), fold_cond_expr_with_comparison(), fold_ternary_loc(), fold_truth_not_expr(), gen_one_condition(), frange_storage::get_frange(), gimple_bitwise_inverted_equal_p(), gimple_equal_p(), gimple_expand_builtin_pow(), gimple_simplify_phiopt(), HONOR_NANS(), HONOR_NANS(), HONOR_NANS(), HONOR_SNANS(), ifcombine_ifandif(), insert_predicates_for_cond(), frange::internal_singleton_p(), inverse_conditions_p(), match_simplify_replacement(), may_trap_p_1(), merge_truthop_with_opposite_arm(), minmax_from_comparison(), noce_try_minmax(), noce_try_move(), frange::normalize_kind(), optimize_spaceship(), parloops_is_simple_reduction(), parse_predicate(), fold_using_range::relation_fold_and_or(), reversed_comparison_code_parts(), frange::set(), set_cond_stmt_execution_predicate(), frange::set_excluding(), frange::set_nan(), frange::set_varying(), avail_exprs_stack::simplify_binary_operation(), simplify_context::simplify_binary_operation_1(), simplify_const_binary_operation(), simplify_const_relational_operation(), simplify_if_then_else(), simplify_context::simplify_logical_relational_operation(), simplify_context::simplify_ternary_operation(), spaceship_replacement(), split_comparison(), tree_expr_finite_p(), tree_expr_maybe_nan_p(), tree_expr_nan_p(), ubsan_instrument_float_cast(), frange::update_nan(), valid_lattice_transition(), vect_build_slp_tree_3(), vectorizable_condition(), and frange::verify_range().
References GET_MODE, and HONOR_SIGN_DEPENDENT_ROUNDING().
| bool HONOR_SIGN_DEPENDENT_ROUNDING | ( | const_tree | t | ) |
References element_mode(), and HONOR_SIGN_DEPENDENT_ROUNDING().
| bool HONOR_SIGN_DEPENDENT_ROUNDING | ( | machine_mode | m | ) |
Like HONOR_NANS, but true if given mode supports sign-dependent rounding, and the rounding mode is important.
References HONOR_SIGN_DEPENDENT_ROUNDING(), and MODE_HAS_SIGN_DEPENDENT_ROUNDING.
Referenced by fold_convert_const(), fold_convert_const_real_from_real(), fold_negate_expr_1(), fold_real_zero_addition_p(), HONOR_SIGN_DEPENDENT_ROUNDING(), HONOR_SIGN_DEPENDENT_ROUNDING(), HONOR_SIGN_DEPENDENT_ROUNDING(), negate_expr_p(), simplify_context::simplify_binary_operation_1(), simplify_const_unary_operation(), simplify_context::simplify_unary_operation_1(), vect_reduction_update_partial_vector_usage(), vectorize_fold_left_reduction(), and visit_nary_op().
References GET_MODE, and HONOR_SIGNED_ZEROS().
| bool HONOR_SIGNED_ZEROS | ( | const_tree | t | ) |
References element_mode(), and HONOR_SIGNED_ZEROS().
| bool HONOR_SIGNED_ZEROS | ( | machine_mode | m | ) |
Like HONOR_NANS, but true if the given mode distinguishes between positive and negative zero, and the sign of zero is important.
References HONOR_SIGNED_ZEROS(), and MODE_HAS_SIGNED_ZEROS.
Referenced by loop_cand::analyze_induction_var(), associate_equivalences_with_edges(), frange::canonicalize_zeros(), eliminate_using_constants(), expand_abs_nojump(), expand_builtin_signbit(), expand_unop(), fold_binary_loc(), fold_cond_expr_with_comparison(), fold_negate_expr_1(), fold_real_zero_addition_p(), fold_ternary_loc(), frange_add_zeros(), gimple_expand_builtin_pow(), operand_compare::hash_operand(), HONOR_SIGNED_ZEROS(), HONOR_SIGNED_ZEROS(), HONOR_SIGNED_ZEROS(), implicit_set_cond_p(), match_simplify_replacement(), minmax_from_comparison(), negate_expr_p(), neutral_op_for_reduction(), noce_try_abs(), noce_try_minmax(), noce_try_move(), operand_compare::operand_equal_p(), reassociate_bb(), record_edge_info(), record_equality(), frange::set_zero(), simplify_context::simplify_binary_operation_1(), simplify_if_then_else(), simplify_context::simplify_ternary_operation(), simplify_context::simplify_unary_operation_1(), tree_call_nonnegative_p(), tree_expr_maybe_real_minus_zero_p(), try_special_add_to_ops(), value_replacement(), vectorize_fold_left_reduction(), and frange::verify_range().
References GET_MODE, and HONOR_SNANS().
| bool HONOR_SNANS | ( | const_tree | t | ) |
References element_mode(), and HONOR_SNANS().
| bool HONOR_SNANS | ( | machine_mode | m | ) |
Like HONOR_NANs, but true if we honor signaling NaNs (or sNaNs).
References HONOR_NANS(), and HONOR_SNANS().
Referenced by loop_cand::analyze_induction_var(), const_binop(), const_unop(), convert_expand_mult_copysign(), do_compare_rtx_and_jump(), eliminate_using_constants(), emit_store_flag(), emit_store_flag_force(), fold_binary_loc(), fold_convert_const_real_from_real(), fold_real_zero_addition_p(), gimple_expand_builtin_pow(), HONOR_SNANS(), HONOR_SNANS(), HONOR_SNANS(), may_trap_p_1(), reassociate_bb(), simplify_context::simplify_binary_operation_1(), simplify_const_binary_operation(), simplify_const_relational_operation(), simplify_const_unary_operation(), tree_expr_maybe_signaling_nan_p(), tree_expr_signaling_nan_p(), and try_special_add_to_ops().
|
static |
Return true (including 0) if integer part of R is even, else return false. The function is not valid for rvc_inf and rvc_nan classes.
References gcc_assert, HOST_BITS_PER_LONG, is_even(), r, REAL_EXP, REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_zero, and SIGNIFICAND_BITS.
Referenced by is_even(), and real_roundeven().
|
static |
Return true if R is halfway between two integers, else return false.
References HOST_BITS_PER_LONG, i, is_halfway_below(), r, REAL_EXP, REAL_VALUE_TYPE, rvc_normal, and SIGNIFICAND_BITS.
Referenced by is_halfway_below(), and real_roundeven().
|
static |
Left-shift the significand of A by N bits; put the result in the significand of R.
References a, HOST_BITS_PER_LONG, i, lshift_significand(), r, REAL_VALUE_TYPE, and SIGSZ.
Referenced by decode_ieee_quad(), decode_vax_d(), decode_vax_g(), lshift_significand(), normalize(), and real_nan().
|
inlinestatic |
Likewise, but N is specialized to 1.
References a, HOST_BITS_PER_LONG, i, lshift_significand_1(), r, REAL_VALUE_TYPE, and SIGSZ.
Referenced by div_significands(), lshift_significand_1(), real_nan(), and rtd_divmod().
|
inlinestatic |
Negate the significand A, placing the result in R.
References a, i, neg_significand(), r, REAL_VALUE_TYPE, and SIGSZ.
Referenced by do_add(), and neg_significand().
|
static |
Adjust the exponent and significand of R such that the most significant bit is set. We underflow to zero and overflow to infinity here, without denormals. (The intermediate representation exponent is large enough to handle target denormals normalized.)
References exp(), get_inf(), get_zero(), HOST_BITS_PER_LONG, i, lshift_significand(), MAX_EXP, normalize(), r, REAL_EXP, REAL_VALUE_TYPE, rvc_zero, SET_REAL_EXP, and SIGSZ.
Referenced by decode_arm_bfloat_half(), decode_ieee_double(), decode_ieee_extended(), decode_ieee_half(), decode_ieee_quad(), decode_ieee_single(), do_add(), do_divide(), do_multiply(), encode_ibm_extended(), normalize(), real_convert(), real_from_integer(), real_from_string(), real_nextafter(), and rtd_divmod().
| void real_2expN | ( | REAL_VALUE_TYPE * | r, |
| int | n, | ||
| format_helper | fmt ) |
Fills R with 2**N.
References format_helper::decimal_p(), decimal_real_convert(), MAX_EXP, r, real_2expN(), REAL_VALUE_TYPE, rvc_inf, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.
Referenced by check_real_for_fixed_mode(), expand_fix(), expand_float(), fixed_convert_from_real(), fixed_from_string(), fixed_to_decimal(), real_2expN(), and real_convert_from_fixed().
| bool real_arithmetic | ( | REAL_VALUE_TYPE * | r, |
| int | icode, | ||
| const REAL_VALUE_TYPE * | op0, | ||
| const REAL_VALUE_TYPE * | op1 ) |
Perform the binary or unary operation described by CODE. For a unary operation, leave OP1 NULL. This function returns true if the result may be inexact due to loss of precision.
Binary or unary arithmetic on tree_code.
References decimal_real_arithmetic(), do_add(), do_compare(), do_divide(), do_fix_trunc(), do_multiply(), gcc_unreachable, r, real_arithmetic(), REAL_VALUE_TYPE, and rvc_nan.
Referenced by check_real_for_fixed_mode(), const_binop(), expand_pow_as_sqrts(), fixed_convert_from_real(), fixed_from_string(), fixed_to_decimal(), float_widen_bound(), fold_builtin_modf(), cfn_sincos::fold_range(), frange_arithmetic(), gimple_expand_builtin_pow(), omp_reduction_init_op(), operator_cast::op1_range(), real_arithmetic(), real_convert_from_fixed(), real_value_abs(), real_value_negate(), representable_as_half_series_p(), simplify_context::simplify_binary_operation_1(), simplify_const_binary_operation(), simplify_const_unary_operation(), and ubsan_instrument_float_cast().
| bool real_can_shorten_arithmetic | ( | machine_mode | imode, |
| machine_mode | tmode ) |
Return true if arithmetic on values in IMODE that were promoted from values in TMODE is equivalent to direct arithmetic on values in TMODE.
References real_format::b, real_format::emax, real_format::emin, real_format::has_inf, real_format::has_nans, real_format::has_sign_dependent_rounding, real_format::has_signed_zero, MODE_COMPOSITE_P, real_format::p, real_can_shorten_arithmetic(), REAL_MODE_FORMAT, and real_format::round_towards_zero.
Referenced by dconst_ninth_ptr(), and real_can_shorten_arithmetic().
| void real_ceil | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | x ) |
Round X to the smallest integer not less then argument, i.e. round up, placing the result in R in format FMT.
References dconst1, do_add(), do_fix_trunc(), r, real_ceil(), real_convert(), real_identical(), and REAL_VALUE_TYPE.
Referenced by dconst_ninth_ptr(), expand_pow_as_sqrts(), fold_const_call_ss(), fold_const_call_ss(), operator_cast::op1_range(), and real_ceil().
| bool real_compare | ( | int | icode, |
| const REAL_VALUE_TYPE * | op0, | ||
| const REAL_VALUE_TYPE * | op1 ) |
Compare reals by tree_code.
References do_compare(), gcc_unreachable, real_compare(), real_equal(), real_less(), REAL_VALUE_TYPE, and rvc_nan.
Referenced by check_real_for_fixed_mode(), contains_zero_p(), decimal_real_arithmetic(), fold_const_call_ss(), fold_const_call_sss(), operator_abs::fold_range(), operator_ge::fold_range(), operator_gt::fold_range(), operator_le::fold_range(), fold_relational_const(), real_compare(), frange::set(), and ubsan_instrument_float_cast().
| void real_convert | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | a ) |
Extend or truncate to a new format.
References a, real_format::b, decimal_real_convert(), normalize(), r, real_convert(), REAL_VALUE_TYPE, round_for_format(), rvc_nan, and rvc_normal.
Referenced by const_binop(), do_mpc_ckconv(), do_mpc_ckconv(), do_mpfr_ckconv(), do_mpfr_ckconv(), exact_real_inverse(), exact_real_truncate(), fold_cmp_float_cst_p(), fold_const_nextafter(), fold_convert_const_real_from_real(), operator_cast::fold_range(), operator_cast::fold_range(), frange_arithmetic(), frange_mpfr_arg1(), frange_nextafter(), gimple_expand_builtin_pow(), frange::internal_singleton_p(), operator_cast::op1_range(), real_ceil(), real_convert(), real_convert_from_fixed(), real_floor(), real_from_integer(), real_from_string2(), real_from_string3(), real_nextafter(), real_powi(), real_round(), real_roundeven(), real_to_decimal_for_mode(), real_trunc(), real_value_truncate(), simplify_context::simplify_binary_operation_1(), simplify_const_binary_operation(), simplify_const_unary_operation(), and ubsan_instrument_float_cast().
| void real_copysign | ( | REAL_VALUE_TYPE * | r, |
| const REAL_VALUE_TYPE * | x ) |
Set the sign of R to the sign of X.
References r, real_copysign(), and REAL_VALUE_TYPE.
Referenced by dconst_ninth_ptr(), fold_const_call_sss(), real_copysign(), and simplify_const_binary_operation().
|
static |
Returns N.
References gcc_assert, real_digit(), real_from_integer(), REAL_VALUE_TYPE, rvc_zero, and UNSIGNED.
Referenced by decimal_integer_string(), exact_real_inverse(), real_digit(), real_to_decimal_for_mode(), ten_to_mptwo(), and times_pten().
| bool real_equal | ( | const REAL_VALUE_TYPE * | op0, |
| const REAL_VALUE_TYPE * | op1 ) |
Return whether OP0 == OP1.
References do_compare(), real_equal(), and REAL_VALUE_TYPE.
Referenced by associate_equivalences_with_edges(), check_pow(), const_binop(), estimate_num_insns(), expand_mult(), fold_const_builtin_load_exponent(), frange_arithmetic(), gen_conditions_for_pow_cst_base(), gimple_expand_builtin_pow(), implicit_set_cond_p(), optimize_recip_sqrt(), real_compare(), real_equal(), real_maybe_zerop(), real_minus_onep(), real_onep(), real_zerop(), record_equality(), representable_as_half_series_p(), operator_mult::rv_fold(), simplify_context::simplify_binary_operation_1(), simplify_const_binary_operation(), simplify_const_relational_operation(), and vect_recog_pow_pattern().
| int real_exponent | ( | const REAL_VALUE_TYPE * | r | ) |
Return floor log2(R).
??? These were added for Paranoia support.
Return floor log2(R).
References gcc_unreachable, r, REAL_EXP, real_exponent(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, and rvc_zero.
Referenced by real_exponent().
| void real_floor | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | x ) |
Round X to the largest integer not greater in value, i.e. round down, placing the result in R in format FMT.
References dconstm1, do_add(), do_fix_trunc(), r, real_convert(), real_floor(), real_identical(), and REAL_VALUE_TYPE.
Referenced by dconst_ninth_ptr(), expand_pow_as_sqrts(), fold_const_call_ss(), fold_const_call_ss(), operator_cast::op1_range(), and real_floor().
| void real_from_integer | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const wide_int_ref & | val_in, | ||
| signop | sgn ) |
Initialize R from the wide_int VAL_IN. Round it to format FMT if FMT is nonnull.
References wi::clz(), decimal_from_integer(), format_helper::decimal_p(), generic_wide_int< storage >::elt(), wide_int_storage::from(), gcc_assert, wi::storage_ref::get_precision(), get_zero(), HOST_BITS_PER_LONG, HOST_BITS_PER_WIDE_INT, i, wi::lrshift(), wi::neg_p(), normalize(), r, real_convert(), real_from_integer(), REAL_VALUE_TYPE, rvc_normal, wi::set_bit(), SET_REAL_EXP, SIGNIFICAND_BITS, SIGSZ, and UNSIGNED.
Referenced by acceptable_pow_call(), build_real_from_wide(), check_pow(), dconst_ninth_ptr(), decrement_power(), expand_pow_as_sqrts(), fixed_to_decimal(), fold_cmp_float_cst_p(), fold_const_logb(), operator_cast::fold_range(), gen_conditions_for_pow_cst_base(), gimple_expand_builtin_pow(), init_emit_once(), operator_cast::op1_range(), real_convert_from_fixed(), real_digit(), real_from_integer(), real_isinteger(), real_value_from_int_cst(), simplify_const_unary_operation(), ten_to_ptwo(), and tree_call_nonnegative_p().
| int real_from_string | ( | REAL_VALUE_TYPE * | r, |
| const char * | str ) |
Initialize R from a decimal or hexadecimal string. The string is assumed to have been syntax checked already. Return -1 if the value underflows, +1 if overflows, and 0 otherwise.
Initialize R from a decimal or hexadecimal string. Return -1 if the value underflows, +1 if overflows, and 0 otherwise.
References cmp_significand_0(), exp(), gcc_assert, get_canonical_qnan(), get_canonical_snan(), get_inf(), get_zero(), HOST_BITS_PER_LONG, MAX_EXP, normalize(), NULL, NULL_TREE, r, real_from_mpfr(), real_from_string(), REAL_VALUE_TYPE, rvc_normal, SET_REAL_EXP, SIGNIFICAND_BITS, and startswith().
Referenced by check_real_for_fixed_mode(), decimal_real_to_integer(), decimal_real_to_integer(), fixed_from_string(), real_from_mpfr(), real_from_string(), real_from_string2(), real_from_string3(), real_max_representable(), and real_to_decimal_for_mode().
| REAL_VALUE_TYPE real_from_string2 | ( | const char * | s, |
| format_helper | fmt ) |
Legacy. Similar, but return the result directly.
References r, real_convert(), real_from_string(), real_from_string2(), and REAL_VALUE_TYPE.
Referenced by real_from_string2().
| void real_from_string3 | ( | REAL_VALUE_TYPE * | r, |
| const char * | s, | ||
| format_helper | fmt ) |
Initialize R from string S and desired format FMT.
Wrapper to allow different internal representation for decimal floats.
References format_helper::decimal_p(), decimal_real_from_string(), r, real_convert(), real_from_string(), real_from_string3(), and REAL_VALUE_TYPE.
Referenced by decimal_to_binary(), fold_builtin_fpclassify(), fold_builtin_interclass_mathfn(), and real_from_string3().
| void real_from_target | ( | REAL_VALUE_TYPE * | r, |
| const long * | buf, | ||
| format_helper | fmt ) |
Read R from the given target format. Read the words of the result in target word order in BUF. There are always 32 bits in each long, no matter the size of the host long.
References real_format::decode, r, real_from_target(), and REAL_VALUE_TYPE.
Referenced by native_decode_rtx(), native_interpret_real(), real_from_target(), simplify_const_binary_operation(), simplify_const_unary_operation(), vect_build_all_ones_mask(), and vect_build_zero_merge_argument().
| unsigned int real_hash | ( | const REAL_VALUE_TYPE * | r | ) |
Return a hash value for the given real value.
??? The "unsigned int" return value is intended to be hashval_t, but I didn't want to pull hashtab.h into real.h.
References gcc_unreachable, HOST_BITS_PER_LONG, i, r, REAL_EXP, real_hash(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by const_hash_1(), const_rtx_hash_1(), cselib_hash_rtx(), const_double_hasher::hash(), operand_compare::hash_operand(), hash_rtx(), and real_hash().
| bool real_identical | ( | const REAL_VALUE_TYPE * | a, |
| const REAL_VALUE_TYPE * | b ) |
Compare two floating-point objects for bitwise identity.
Test relationships between reals.
References a, b, gcc_unreachable, i, REAL_EXP, real_identical(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by acceptable_pow_call(), compare_constant(), const_binop(), do_mpc_ckconv(), do_mpc_ckconv(), do_mpfr_ckconv(), do_mpfr_ckconv(), const_double_hasher::equal(), ipa_icf::sem_variable::equals(), exact_real_truncate(), expand_complex_multiplication(), expand_pow_as_sqrts(), fold_cmp_float_cst_p(), frange_arithmetic(), frange_mpfr_arg1(), frange_val_is_max(), frange_val_is_min(), gimple_expand_builtin_pow(), frange::internal_singleton_p(), frange::known_isinf(), operator_cast::op1_range(), operand_compare::operand_equal_p(), frange::operator==(), real_ceil(), real_floor(), real_identical(), real_isinteger(), real_isinteger(), real_to_decimal_for_mode(), simple_cst_equal(), simplify_const_binary_operation(), some_nonzerop(), and tree_call_nonnegative_p().
| void real_inf | ( | REAL_VALUE_TYPE * | r, |
| bool | sign ) |
Fills R with Inf with SIGN.
References get_inf(), r, real_inf(), and REAL_VALUE_TYPE.
Referenced by init_emit_once(), real_inf(), and foperator_div::rv_fold().
|
inlinestatic |
Determine whether a floating-point value X is a denormal. R is expected to be in denormal form, so this function is only meaningful after a call to round_for_format.
References r, real_isdenormal(), REAL_VALUE_TYPE, rvc_normal, SIG_MSB, and SIGSZ.
| bool real_isfinite | ( | const REAL_VALUE_TYPE * | r | ) |
Determine whether a floating-point value X is finite.
References r, real_isfinite(), REAL_VALUE_TYPE, rvc_inf, and rvc_nan.
Referenced by do_mpc_arg1(), do_mpc_arg2(), do_mpc_arg2(), do_mpc_ckconv(), do_mpc_ckconv(), do_mpfr_arg1(), do_mpfr_arg2(), do_mpfr_arg2(), do_mpfr_arg3(), do_mpfr_ckconv(), do_mpfr_ckconv(), do_mpfr_lgamma_r(), do_mpfr_remquo(), do_mpfr_sincos(), float_widen_bound(), fold_const_call_ss(), fold_const_conversion(), cfn_sincos::fold_range(), frange_mpfr_arg1(), cfn_sqrt::op1_range(), real_isfinite(), and tree_expr_finite_p().
| bool real_isinf | ( | const REAL_VALUE_TYPE * | r | ) |
Determine whether a floating-point value X is infinite.
References r, real_isinf(), REAL_VALUE_TYPE, and rvc_inf.
Referenced by build_gt(), build_lt(), float_binary_op_range_finish(), float_widen_bound(), fold_const_builtin_load_exponent(), fold_const_call_cc(), fold_const_call_ss(), cfn_isinf::fold_range(), frange_arithmetic(), frange::internal_singleton_p(), frange::known_isfinite(), frange::known_isinf(), frange::maybe_isinf(), foperator_div::op1_range(), operator_mult::op1_range(), foperator_div::op2_range(), vrange_printer::print_real_value(), real_isinf(), real_isinf(), foperator_div::rv_fold(), operator_minus::rv_fold(), operator_mult::rv_fold(), operator_plus::rv_fold(), singleton_inf_p(), tree_expr_infinite_p(), tree_expr_maybe_infinite_p(), and ubsan_instrument_float_cast().
| bool real_isinf | ( | const REAL_VALUE_TYPE * | r, |
| bool | sign ) |
Determine whether a floating-point value X is infinite with SIGN.
References r, real_isinf(), and REAL_VALUE_TYPE.
| bool real_isinteger | ( | const REAL_VALUE_TYPE * | c, |
| format_helper | fmt ) |
Check whether the real constant value given is an integer. Returns false for signaling NaN.
Check whether the real constant value given is an integer.
References real_identical(), real_isinteger(), real_trunc(), and REAL_VALUE_TYPE.
Referenced by dconst_ninth_ptr(), do_mpfr_lgamma_r(), integer_valued_real_single_p(), optimize_pow_to_exp(), real_isinteger(), and real_isinteger().
| bool real_isinteger | ( | const REAL_VALUE_TYPE * | c, |
| HOST_WIDE_INT * | int_out ) |
Check whether C is an integer that fits in a HOST_WIDE_INT, storing it in *INT_OUT if so.
References real_from_integer(), real_identical(), real_isinteger(), real_to_integer(), REAL_VALUE_TYPE, and SIGNED.
| bool real_isnan | ( | const REAL_VALUE_TYPE * | r | ) |
Determine whether a floating-point value X is a NaN.
References r, real_isnan(), REAL_VALUE_TYPE, and rvc_nan.
Referenced by ctor_ref_range::accumulate_range_from_scalar(), frange::contains_p(), fold_const_call_ss(), fold_relational_const(), frange_cmp(), range_query::get_tree_range(), vrange_printer::print_real_value(), real_isnan(), real_issignaling_nan(), foperator_div::rv_fold(), operator_minus::rv_fold(), operator_mult::rv_fold(), operator_plus::rv_fold(), frange::set(), tree_expr_maybe_nan_p(), tree_expr_nan_p(), and frange::verify_range().
| bool real_isneg | ( | const REAL_VALUE_TYPE * | r | ) |
Determine whether a floating-point value X is negative.
References r, real_isneg(), and REAL_VALUE_TYPE.
Referenced by ctor_ref_range::accumulate_range_from_scalar(), attempt_builtin_copysign(), const_with_all_bytes_same(), do_mpfr_lgamma_r(), expand_copysign(), float_widen_bound(), frange::flush_denormals_to_zero(), fold_const_call_ss(), cfn_sincos::fold_range(), operator_cast::fold_range(), frange_arithmetic(), frange_cmp(), range_query::get_tree_range(), frange::known_isnormal(), real_isneg(), operator_mult::rv_fold(), signbit_known_p(), and singleton_inf_p().
| bool real_isnegzero | ( | const REAL_VALUE_TYPE * | r | ) |
Determine whether a floating-point value X is minus zero.
References r, real_isnegzero(), REAL_VALUE_TYPE, and rvc_zero.
Referenced by find_range(), and real_isnegzero().
| bool real_issignaling_nan | ( | const REAL_VALUE_TYPE * | r | ) |
Determine whether a floating-point value X is a signaling NaN.
References r, real_isnan(), real_issignaling_nan(), and REAL_VALUE_TYPE.
Referenced by fold_const_call_ss(), real_issignaling_nan(), tree_expr_maybe_signaling_nan_p(), and tree_expr_signaling_nan_p().
| bool real_iszero | ( | const REAL_VALUE_TYPE * | r | ) |
Determine whether a floating-point value X is plus or minus zero.
References r, real_iszero(), REAL_VALUE_TYPE, and rvc_zero.
Referenced by frange::canonicalize_zeros(), find_range(), operator_abs::fold_range(), operator_cast::fold_range(), operator_equal::fold_range(), operator_not_equal::fold_range(), frange_arithmetic(), frange_cmp(), frange_nextafter(), frange::known_isdenormal_or_zero(), frange::known_isnormal(), real_iszero(), real_iszero(), frange::verify_range(), frange::zero_p(), and zero_p().
| bool real_iszero | ( | const REAL_VALUE_TYPE * | r, |
| bool | sign ) |
Determine whether a floating-point value X is zero with SIGN.
References r, real_iszero(), and REAL_VALUE_TYPE.
| void real_ldexp | ( | REAL_VALUE_TYPE * | r, |
| const REAL_VALUE_TYPE * | op0, | ||
| int | exp ) |
R = OP0 * 2**EXP.
R = A * 2**EXP.
References exp(), gcc_unreachable, get_inf(), get_zero(), MAX_EXP, r, REAL_EXP, real_ldexp(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SET_REAL_EXP.
Referenced by fold_const_builtin_load_exponent(), and real_ldexp().
| bool real_less | ( | const REAL_VALUE_TYPE * | op0, |
| const REAL_VALUE_TYPE * | op1 ) |
Return whether OP0 < OP1.
References do_compare(), real_less(), and REAL_VALUE_TYPE.
Referenced by check_pow(), find_range(), fold_convert_const_int_from_real(), cfn_sincos::fold_range(), cfn_sqrt::fold_range(), operator_cast::fold_range(), operator_cast::fold_range(), operator_cast::fold_range(), operator_lt::fold_range(), frange_arithmetic(), frange_cmp(), frange_mpfr_arg1(), gen_conditions_for_pow_cst_base(), cfn_sincos::op1_range(), cfn_sqrt::op1_range(), operator_cast::op1_range(), operator_cast::op1_range(), real_compare(), real_less(), frange::set(), simplify_const_relational_operation(), simplify_const_unary_operation(), and frange::widen().
| void real_maxval | ( | REAL_VALUE_TYPE * | r, |
| int | sign, | ||
| machine_mode | mode ) |
Fills R with the largest finite value representable in mode MODE. If SIGN is nonzero, R is set to the most negative finite value.
References real_format::b, clear_significand_below(), clear_significand_bit(), decimal_real_maxval(), real_format::emax, gcc_assert, real_format::p, real_format::pnan, r, real_maxval(), REAL_MODE_FORMAT, REAL_VALUE_TYPE, rvc_normal, SET_REAL_EXP, SIGNIFICAND_BITS, and SIGSZ.
Referenced by build_sinatan_real(), omp_reduction_init_op(), and real_maxval().
| bool real_nan | ( | REAL_VALUE_TYPE * | r, |
| const char * | str, | ||
| int | quiet, | ||
| format_helper | fmt ) |
Fills R with a NaN whose significand is described by STR. If QUIET, we force a QNaN, else we force an SNaN. The string, if not empty, is parsed as a number and placed in the significand. Return true if the string was successfully parsed.
References add_significands(), gcc_unreachable, get_canonical_qnan(), get_canonical_snan(), get_zero(), lshift_significand(), lshift_significand_1(), real_format::pnan, r, real_nan(), REAL_VALUE_TYPE, rvc_nan, SIG_MSB, SIGNIFICAND_BITS, and SIGSZ.
Referenced by fold_const_builtin_nan(), real_from_mpfr(), and real_nan().
| bool real_nextafter | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | x, | ||
| const REAL_VALUE_TYPE * | y ) |
Calculate nextafter (X, Y) or nexttoward (X, Y). Return true if underflow or overflow needs to be raised.
Calculate nextafter (X, Y) in format FMT.
References add_significands(), clear_significand_below(), clear_significand_bit(), do_compare(), real_format::emax, real_format::emin, gcc_assert, get_canonical_qnan(), get_inf(), get_zero(), i, normalize(), real_format::p, r, real_convert(), REAL_EXP, real_nextafter(), REAL_VALUE_TYPE, rvc_inf, rvc_normal, rvc_zero, SET_REAL_EXP, set_significand_bit(), SIG_MSB, SIGNIFICAND_BITS, SIGSZ, sub_significands(), and y.
Referenced by dconst_ninth_ptr(), fold_const_nextafter(), operator_cast::fold_range(), frange_arithmetic(), frange_nextafter(), and real_nextafter().
| bool real_powi | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | x, | ||
| HOST_WIDE_INT | n ) |
Calculate X raised to the integer exponent N in format FMT and store the result in R. Return true if the result may be inexact due to loss of precision. The algorithm is the classic "left-to-right binary method" described in section 4.6.3 of Donald Knuth's "Seminumerical Algorithms", "The Art of Computer Programming", Volume 2.
Calculate R as X raised to the integer exponent N in format FMT.
References dconst1, do_divide(), do_multiply(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_1U, i, r, real_convert(), real_powi(), and REAL_VALUE_TYPE.
Referenced by dconst_ninth_ptr(), fold_const_call_sss(), and real_powi().
| void real_round | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | x ) |
Round X to the nearest integer, but round halfway cases away from zero.
References dconsthalf, do_add(), do_fix_trunc(), r, real_convert(), real_round(), and REAL_VALUE_TYPE.
Referenced by dconst_ninth_ptr(), fold_const_call_ss(), fold_const_call_ss(), gimple_expand_builtin_pow(), real_round(), and real_roundeven().
| void real_roundeven | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | x ) |
Round X to nearest integer, rounding halfway cases towards even.
References clear_significand_below(), dconsthalf, dconstm1, do_add(), is_even(), is_halfway_below(), r, real_convert(), REAL_EXP, real_round(), real_roundeven(), REAL_VALUE_TYPE, and SIGNIFICAND_BITS.
Referenced by dconst_ninth_ptr(), fold_const_call_ss(), and real_roundeven().
| void real_to_decimal | ( | char * | str, |
| const REAL_VALUE_TYPE * | r_orig, | ||
| size_t | buf_size, | ||
| size_t | digits, | ||
| int | crop_trailing_zeros ) |
Likewise, except always uses round-to-nearest.
Render R as a decimal floating point constant.
References real_to_decimal(), real_to_decimal_for_mode(), and REAL_VALUE_TYPE.
Referenced by decimal_from_binary(), decimal_to_binary(), dump_generic_node(), dump_real(), expand_pow_as_sqrts(), fixed_to_decimal(), print_real_cst(), rtx_writer::print_rtx(), print_value(), and real_to_decimal().
| void real_to_decimal_for_mode | ( | char * | str, |
| const REAL_VALUE_TYPE * | r_orig, | ||
| size_t | buf_size, | ||
| size_t | digits, | ||
| int | crop_trailing_zeros, | ||
| machine_mode | mode ) |
Render R as a decimal floating point constant, rounded so as to be parsed back to the same value when interpreted in mode MODE.
References cmp_significand_0(), cmp_significands(), decimal_real_to_decimal(), do_compare(), do_divide(), do_fix_trunc(), do_multiply(), floor_log2(), gcc_assert, gcc_unreachable, M_LOG10_2, NULL, real_format::p, r, real_convert(), real_digit(), REAL_EXP, real_from_string(), real_identical(), REAL_MODE_FORMAT, real_to_decimal_for_mode(), REAL_VALUE_TYPE, real_format::round_towards_zero, round_up, rtd_divmod(), rvc_inf, rvc_nan, rvc_normal, rvc_zero, SET_REAL_EXP, SIGNIFICAND_BITS, ten_to_mptwo(), and ten_to_ptwo().
Referenced by vrange_printer::print_real_value(), real_to_decimal(), and real_to_decimal_for_mode().
| void real_to_hexadecimal | ( | char * | str, |
| const REAL_VALUE_TYPE * | r, | ||
| size_t | buf_size, | ||
| size_t | digits, | ||
| int | crop_trailing_zeros ) |
Render R as a hexadecimal floating point constant. Emit DIGITS significant digits in the result, bounded by BUF_SIZE. If DIGITS is 0, choose the maximum for the representation. If CROP_TRAILING_ZEROS, strip trailing zeros.
Render R as a hexadecimal floating point constant.
References exp(), gcc_assert, gcc_unreachable, HOST_BITS_PER_LONG, i, real_format::p, r, REAL_EXP, real_to_hexadecimal(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SIGNIFICAND_BITS, and SIGSZ.
Referenced by debug(), mpfr_from_real(), vrange_printer::print_real_value(), rtx_writer::print_rtx(), and real_to_hexadecimal().
| HOST_WIDE_INT real_to_integer | ( | const REAL_VALUE_TYPE * | r | ) |
Render R as an integer.
References decimal_real_to_integer(), gcc_assert, gcc_unreachable, HOST_BITS_PER_LONG, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_1U, i, r, REAL_EXP, real_to_integer(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by acceptable_pow_call(), dconst_ninth_ptr(), decimal_real_to_integer(), decimal_real_to_integer(), decrement_power(), expand_pow_as_sqrts(), expr_expected_value_1(), fixed_convert_from_real(), fixed_from_string(), fold_const_conversion(), fold_convert_const(), fold_convert_const_int_from_real(), operator_cast::fold_range(), get_upper_bound_based_on_builtin_expr_with_prob(), gimple_expand_builtin_pow(), operator_cast::op1_range(), real_isinteger(), real_to_integer(), real_to_integer(), simplify_const_unary_operation(), and tree_call_nonnegative_p().
| wide_int real_to_integer | ( | const REAL_VALUE_TYPE * | r, |
| bool * | fail, | ||
| int | precision ) |
Likewise, but producing a wide-int of PRECISION. If the value cannot be represented in precision, *FAIL is set to TRUE.
real related routines.
References decimal_real_to_integer(), exp(), wide_int_storage::from(), wide_int_storage::from_array(), gcc_assert, gcc_unreachable, HOST_BITS_PER_LONG, HOST_BITS_PER_WIDE_INT, i, wi::lrshift(), r, REAL_EXP, real_to_integer(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, wi::set_bit_in_zero(), SIGSZ, UNLIKELY, UNSIGNED, WIDE_INT_MAX_INL_ELTS, and wi::zero().
| long real_to_target | ( | long * | buf, |
| const REAL_VALUE_TYPE * | r_orig, | ||
| format_helper | fmt ) |
Write R to the given target format. Place the words of the result in target word order in BUF. There are always 32 bits in each long, no matter the size of the host long. Legacy: return word 0 for implementing REAL_VALUE_TO_TARGET_SINGLE.
References real_format::encode, r, real_to_target(), REAL_VALUE_TYPE, and round_for_format().
Referenced by assemble_real(), insert_float(), native_encode_real(), native_encode_rtx(), real_to_target(), simplify_const_binary_operation(), and simplify_const_unary_operation().
| void real_trunc | ( | REAL_VALUE_TYPE * | r, |
| format_helper | fmt, | ||
| const REAL_VALUE_TYPE * | x ) |
Round X to the nearest integer not larger in absolute value, i.e. towards zero, placing the result in R in format FMT.
Standard round to integer value functions.
References do_fix_trunc(), r, real_convert(), real_trunc(), and REAL_VALUE_TYPE.
Referenced by dconst_ninth_ptr(), fold_builtin_modf(), fold_const_call_ss(), fold_convert_const_int_from_real(), operator_cast::fold_range(), operator_cast::op1_range(), real_isinteger(), and real_trunc().
| REAL_VALUE_TYPE real_value_abs | ( | const REAL_VALUE_TYPE * | op0 | ) |
References NULL, r, real_arithmetic(), real_value_abs(), and REAL_VALUE_TYPE.
Referenced by expand_pow_as_sqrts(), operator_abs::fold_range(), real_value_abs(), and simplify_const_unary_operation().
| REAL_VALUE_TYPE real_value_negate | ( | const REAL_VALUE_TYPE * | op0 | ) |
References NULL, r, real_arithmetic(), real_value_negate(), and REAL_VALUE_TYPE.
Referenced by check_real_for_fixed_mode(), fold_abs_const(), fold_const_call_ssss(), fold_negate_const(), operator_negate::fold_range(), operator_abs::op1_range(), real_from_mpfr(), real_min_representable(), real_value_negate(), and simplify_const_unary_operation().
| REAL_VALUE_TYPE real_value_truncate | ( | format_helper | fmt, |
| REAL_VALUE_TYPE | a ) |
Legacy. Likewise, except return the struct directly.
References a, r, real_convert(), real_value_truncate(), and REAL_VALUE_TYPE.
Referenced by build_real_truncate(), fold_const_builtin_load_exponent(), gimple_expand_builtin_pow(), real_value_truncate(), and simplify_const_unary_operation().
|
static |
References add_significands(), real_format::b, clear_significand_below(), decimal_real_convert(), decimal_round_for_format(), real_format::emax, real_format::emin, gcc_unreachable, get_inf(), get_zero(), real_format::has_denorm, real_format::has_signed_zero, HOST_BITS_PER_LONG, i, real_format::p, r, REAL_EXP, REAL_MODE_FORMAT, REAL_VALUE_TYPE, round_for_format(), real_format::round_towards_zero, round_up, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SET_REAL_EXP, set_significand_bit(), SIG_MSB, SIGNIFICAND_BITS, SIGSZ, sticky_rshift_significand(), and test_significand_bit().
Referenced by encode_ibm_extended(), real_convert(), real_to_target(), and round_for_format().
|
static |
Right-shift the significand of A by N bits; put the result in the significand of R.
References a, HOST_BITS_PER_LONG, i, r, REAL_VALUE_TYPE, rshift_significand(), and SIGSZ.
Referenced by encode_ieee_quad(), and rshift_significand().
|
static |
A subroutine of real_to_decimal. Compute the quotient and remainder of NUM / DEN. Return the quotient and place the remainder in NUM. It is expected that NUM / DEN are close enough that the quotient is small.
References cmp_significands(), lshift_significand_1(), normalize(), REAL_EXP, REAL_VALUE_TYPE, rtd_divmod(), SET_REAL_EXP, SIG_MSB, SIGSZ, and sub_significands().
Referenced by decimal_integer_string(), real_to_decimal_for_mode(), and rtd_divmod().
|
inlinestatic |
Set bit N of the significand of R.
References gcc_checking_assert, HOST_BITS_PER_LONG, r, REAL_VALUE_TYPE, set_significand_bit(), and SIGNIFICAND_BITS.
Referenced by div_significands(), real_nextafter(), round_for_format(), and set_significand_bit().
| int significand_size | ( | format_helper | fmt | ) |
Return the number of bits of the largest binary value that the significand of FMT will hold.
??? Legacy. Should get access to real_format directly.
References real_format::b, NULL, real_format::p, and significand_size().
Referenced by format_helper::can_represent_integral_type_p(), format_helper::can_represent_range_value_p(), exact_int_to_float_conversion_p(), expand_float(), and significand_size().
|
static |
Right-shift the significand of A by N bits; put the result in the significand of R. If any one bits are shifted out, return true.
References a, HOST_BITS_PER_LONG, i, r, REAL_VALUE_TYPE, SIGSZ, and sticky_rshift_significand().
Referenced by do_add(), round_for_format(), and sticky_rshift_significand().
|
inlinestatic |
Subtract the significands of A and B, placing the result in R. CARRY is true if there's a borrow incoming to the least significant word. Return true if there was borrow out of the most significant word.
References a, b, i, r, REAL_VALUE_TYPE, SIGSZ, and sub_significands().
Referenced by div_significands(), do_add(), real_nextafter(), rtd_divmod(), and sub_significands().
|
static |
Returns 10**(-2**N).
References do_divide(), EXP_BITS, gcc_assert, real_digit(), REAL_VALUE_TYPE, rvc_zero, ten_to_mptwo(), and ten_to_ptwo().
Referenced by real_to_decimal_for_mode(), and ten_to_mptwo().
|
static |
Returns 10**2**N.
References do_multiply(), EXP_BITS, gcc_assert, HOST_BITS_PER_WIDE_INT, i, real_from_integer(), REAL_VALUE_TYPE, rvc_zero, ten_to_ptwo(), and UNSIGNED.
Referenced by real_to_decimal_for_mode(), ten_to_mptwo(), ten_to_ptwo(), and times_pten().
|
inlinestatic |
Test bit N of the significand of R.
References gcc_checking_assert, HOST_BITS_PER_LONG, r, REAL_VALUE_TYPE, SIGNIFICAND_BITS, and test_significand_bit().
Referenced by round_for_format(), and test_significand_bit().
|
static |
Multiply R by 10**EXP.
References do_divide(), do_multiply(), exp(), i, r, real_digit(), REAL_VALUE_TYPE, ten_to_ptwo(), and times_pten().
Referenced by decimal_integer_string(), and times_pten().
| const struct real_format arm_bfloat_half_format |
ARM Bfloat half-precision format. This format resembles a truncated (16-bit) version of the 32-bit IEEE 754 single-precision floating-point format.
Referenced by build_common_tree_nodes(), convert_mode_scalar(), expand_fix(), and gen_trunc_conv_libfunc().
| const struct real_format arm_half_format |
ARM's alternative half-precision format, similar to IEEE but with no reserved exponent value for NaNs and infinities; rather, it just extends the range of exponents by one.
| const struct real_format decimal_double_format |
Double precision decimal floating point (IEEE 754).
Referenced by decimal_round_for_format().
| const struct real_format decimal_quad_format |
Quad precision decimal floating point (IEEE 754).
Referenced by decimal_round_for_format().
| const struct real_format decimal_single_format |
Single precision decimal floating point (IEEE 754).
Referenced by decimal_round_for_format().
| const struct real_format ibm_extended_format |
Referenced by convert_mode_scalar(), and gen_trunc_conv_libfunc().
| const struct real_format ieee_double_format |
Referenced by check_target_format(), decode_ibm_extended(), encode_ibm_extended(), and glibc_linux_libm_function_max_error().
| const struct real_format ieee_extended_intel_128_format |
Referenced by check_target_format(), and glibc_linux_libm_function_max_error().
| const struct real_format ieee_extended_intel_96_format |
Referenced by check_target_format(), and glibc_linux_libm_function_max_error().
| const struct real_format ieee_extended_intel_96_round_53_format |
The following caters to i386 systems that set the rounding precision to 53 bits instead of 64, e.g. FreeBSD.
Referenced by check_target_format().
| const struct real_format ieee_extended_motorola_format |
Referenced by check_target_format(), and glibc_linux_libm_function_max_error().
| const struct real_format ieee_half_format |
Half-precision format, as specified in IEEE 754R.
Referenced by convert_mode_scalar(), and gen_trunc_conv_libfunc().
| const struct real_format ieee_quad_format |
Referenced by check_target_format(), convert_mode_scalar(), gen_trunc_conv_libfunc(), and glibc_linux_libm_function_max_error().
| const struct real_format ieee_single_format |
Target formats defined in real.cc.
Referenced by check_target_format(), convert_mode_scalar(), expand_fix(), and glibc_linux_libm_function_max_error().
| const struct real_format mips_double_format |
Referenced by check_target_format(), decode_ibm_extended(), encode_ibm_extended(), and glibc_linux_libm_function_max_error().
| const struct real_format mips_extended_format |
| const struct real_format mips_quad_format |
Referenced by check_target_format(), and glibc_linux_libm_function_max_error().
| const struct real_format mips_single_format |
Referenced by check_target_format(), and glibc_linux_libm_function_max_error().
| const struct real_format motorola_double_format |
Referenced by check_target_format(), and glibc_linux_libm_function_max_error().
| const struct real_format motorola_single_format |
Referenced by check_target_format(), and glibc_linux_libm_function_max_error().
| const struct real_format real_internal_format |
| const struct real_format spu_single_format |
SPU Single Precision (Extended-Range Mode) format is the same as IEEE
single precision with the following differences:
- Infinities are not supported. Instead MAX_FLOAT or MIN_FLOAT
are generated.
- NaNs are not supported.
- The range of non-zero numbers in binary is
(001)[1.]000...000 to (255)[1.]111...111.
- Denormals can be represented, but are treated as +0.0 when
used as an operand and are never generated as a result.
- -0.0 can be represented, but a zero result is always +0.0.
- the only supported rounding mode is truncation (towards zero).
| const struct real_format vax_d_format |
| const struct real_format vax_f_format |
| const struct real_format vax_g_format |