GCC Middle and Back End API Reference
|
#include "machmode.h"
Go to the source code of this file.
Data Structures | |
struct | real_value |
struct | real_format |
Enumerations | |
enum | real_value_class { rvc_zero, rvc_normal, rvc_inf, rvc_nan } |
#define CONST_DOUBLE_ATOF | ( | s, | |
m | |||
) | CONST_DOUBLE_FROM_REAL_VALUE (real_from_string2 (s, m), m) |
#define CONST_DOUBLE_FROM_REAL_VALUE | ( | r, | |
m | |||
) | const_double_from_real_value (r, m) |
Return a CONST_DOUBLE with value R and mode M.
Referenced by expand_float(), and fold_rtx().
#define dconst_e | ( | ) | (*dconst_e_ptr ()) |
Referenced by fold_builtin_sincos().
#define dconst_sqrt2 | ( | ) | (*dconst_sqrt2_ptr ()) |
Referenced by fold_builtin_constant_p().
#define dconst_third | ( | ) | (*dconst_third_ptr ()) |
Referenced by fold_builtin_sincos(), and integer_valued_real_p().
#define EXP_BITS (32 - 6) |
#define FLOAT_MODE_FORMAT | ( | MODE | ) |
#define HONOR_INFINITIES | ( | MODE | ) | (MODE_HAS_INFINITIES (MODE) && !flag_finite_math_only) |
As for HONOR_NANS, but true if the mode can represent infinity and the treatment of infinite values is important.
#define HONOR_NANS | ( | MODE | ) | (MODE_HAS_NANS (MODE) && !flag_finite_math_only) |
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.
Referenced by emit_cstore(), fold_comparison(), forward_propagate_addr_expr(), simplify_relational_operation_1(), and swap_tree_comparison().
#define HONOR_SIGN_DEPENDENT_ROUNDING | ( | MODE | ) | (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math) |
Like HONOR_NANS, but true if given mode supports sign-dependent rounding, and the rounding mode is important.
#define HONOR_SIGNED_ZEROS | ( | MODE | ) | (MODE_HAS_SIGNED_ZEROS (MODE) && flag_signed_zeros) |
Like HONOR_NANS, but true if the given mode distinguishes between positive and negative zero, and the sign of zero is important.
Referenced by associate_equivalences_with_edges(), expand_builtin_expect(), operand_equal_for_value_replacement(), set_value_varying(), simplify_byte_swapping_operation(), and split_iv().
#define HONOR_SNANS | ( | MODE | ) | (flag_signaling_nans && HONOR_NANS (MODE)) |
Like HONOR_NANs, but true if we honor signaling NaNs (or sNaNs).
Referenced by emit_cstore(), and simplify_relational_operation_1().
#define MAX_EXP ((1 << (EXP_BITS - 1)) - 1) |
Referenced by real_from_string().
#define MODE_COMPOSITE_P | ( | MODE | ) |
The following macro determines whether the floating point format is composite, i.e. may contain non-consecutive mantissa bits, in which case compile-time FP overflow may not model run-time overflow.
Referenced by real_identical().
#define MODE_HAS_INFINITIES | ( | MODE | ) | (FLOAT_MODE_P (MODE) && FLOAT_MODE_FORMAT (MODE)->has_inf) |
#define MODE_HAS_NANS | ( | MODE | ) | (FLOAT_MODE_P (MODE) && FLOAT_MODE_FORMAT (MODE)->has_nans) |
Accessor macros for format properties.
#define MODE_HAS_SIGN_DEPENDENT_ROUNDING | ( | MODE | ) |
#define MODE_HAS_SIGNED_ZEROS | ( | MODE | ) | (FLOAT_MODE_P (MODE) && FLOAT_MODE_FORMAT (MODE)->has_signed_zero) |
#define REAL_ARITHMETIC | ( | value, | |
code, | |||
d1, | |||
d2 | |||
) | real_arithmetic (&(value), code, &(d1), &(d2)) |
====================================================================== Crap.
#define REAL_EXP | ( | REAL | ) |
Referenced by do_compare(), fold_builtin_strncpy(), integer_valued_real_p(), real_ldexp(), and real_maxval().
#define REAL_MODE_FORMAT | ( | MODE | ) |
Referenced by convert_to_real(), fold_builtin_snprintf_chk(), fold_builtin_sprintf_chk_1(), fold_builtin_strncat_chk(), fold_builtin_strncpy(), and real_identical().
#define REAL_VALUE_ATOF | ( | s, | |
m | |||
) | real_from_string2 (s, m) |
#define REAL_VALUE_FIX | ( | r | ) | real_to_integer (&(r)) |
#define REAL_VALUE_FROM_CONST_DOUBLE | ( | to, | |
from | |||
) | ((to) = *CONST_DOUBLE_REAL_VALUE (from)) |
Given a CONST_DOUBLE in FROM, store into TO the value it represents.
Referenced by const_desc_rtx_eq(), and simplify_relational_operation_1().
#define REAL_VALUE_FROM_INT | ( | r, | |
lo, | |||
hi, | |||
mode | |||
) | real_from_integer (&(r), mode, lo, hi, 0) |
#define REAL_VALUE_FROM_UNSIGNED_INT | ( | r, | |
lo, | |||
hi, | |||
mode | |||
) | real_from_integer (&(r), mode, lo, hi, 1) |
#define REAL_VALUE_ISINF | ( | x | ) | real_isinf (&(x)) |
Determine whether a floating-point value X is infinite.
#define REAL_VALUE_ISNAN | ( | x | ) | real_isnan (&(x)) |
Determine whether a floating-point value X is a NaN.
Referenced by build_complex_cproj(), and simplify_relational_operation_1().
#define REAL_VALUE_MINUS_ZERO | ( | x | ) | real_isnegzero (&(x)) |
Determine whether a floating-point value X is minus zero.
Referenced by set_value_varying().
#define REAL_VALUE_NEGATIVE | ( | x | ) | real_isneg (&(x)) |
Determine whether a floating-point value X is negative.
#define REAL_VALUE_TO_INT | ( | plow, | |
phigh, | |||
r | |||
) | real_to_integer2 (plow, phigh, &(r)) |
#define REAL_VALUE_TO_TARGET_DECIMAL128 | ( | IN, | |
OUT | |||
) | real_to_target (OUT, &(IN), mode_for_size (128, MODE_DECIMAL_FLOAT, 0)) |
Real values to IEEE 754 decimal floats. IN is a REAL_VALUE_TYPE. OUT is an array of longs.
#define REAL_VALUE_TO_TARGET_DECIMAL32 | ( | IN, | |
OUT | |||
) | ((OUT) = real_to_target (NULL, &(IN), mode_for_size (32, MODE_DECIMAL_FLOAT, 0))) |
IN is a REAL_VALUE_TYPE. OUT is a long.
#define REAL_VALUE_TO_TARGET_DECIMAL64 | ( | IN, | |
OUT | |||
) | real_to_target (OUT, &(IN), mode_for_size (64, MODE_DECIMAL_FLOAT, 0)) |
#define REAL_VALUE_TO_TARGET_DOUBLE | ( | IN, | |
OUT | |||
) | real_to_target (OUT, &(IN), mode_for_size (64, MODE_FLOAT, 0)) |
#define REAL_VALUE_TO_TARGET_LONG_DOUBLE | ( | IN, | |
OUT | |||
) |
IN is a REAL_VALUE_TYPE. OUT is an array of longs.
#define REAL_VALUE_TO_TARGET_SINGLE | ( | IN, | |
OUT | |||
) | ((OUT) = real_to_target (NULL, &(IN), mode_for_size (32, MODE_FLOAT, 0))) |
IN is a REAL_VALUE_TYPE. OUT is a long.
#define REAL_VALUE_TYPE struct real_value |
Various headers condition prototypes on #ifdef REAL_VALUE_TYPE, so it needs to be a macro. We do need to continue to have a structure tag so that other headers can forward declare it.
Referenced by build_complex_cproj(), const_desc_rtx_eq(), decimal_from_binary(), decode_ieee_extended_intel_128(), oecount_hasher::equal(), expand_float(), fold_builtin_ceil(), fold_builtin_constant_p(), fold_builtin_sincos(), fold_builtin_snprintf_chk(), fold_builtin_sprintf_chk_1(), fold_builtin_strncat_chk(), fold_builtin_strncpy(), fold_builtin_toascii(), integer_valued_real_p(), pack_ts_int_cst_value_fields(), real_arithmetic(), real_from_string(), real_from_string3(), real_isnan(), set_value_varying(), simplify_relational_operation_1(), and unpack_ts_int_cst_value_fields().
#define REAL_VALUE_TYPE_SIZE (SIGNIFICAND_BITS + 32) |
We store a REAL_VALUE_TYPE into an rtx, and we do this by putting it in consecutive "w" slots. Moreover, we've got to compute the number of "w" slots at preprocessor time, which means we can't use sizeof. Guess.
#define REAL_VALUE_UNSIGNED_FIX | ( | r | ) | real_to_integer (&(r)) |
??? Not quite right.
#define REAL_VALUES_EQUAL | ( | x, | |
y | |||
) | real_compare (EQ_EXPR, &(x), &(y)) |
#define REAL_VALUES_IDENTICAL | ( | x, | |
y | |||
) | real_identical (&(x), &(y)) |
Referenced by decode_addr_const(), and expand_complex_libcall().
#define REAL_VALUES_LESS | ( | x, | |
y | |||
) | real_compare (LT_EXPR, &(x), &(y)) |
Referenced by simplify_relational_operation_1().
#define REAL_WIDTH |
#define SET_REAL_EXP | ( | REAL, | |
EXP | |||
) | ((REAL)->uexp = ((unsigned int)(EXP) & (unsigned int)((1 << EXP_BITS) - 1))) |
Referenced by encode_ieee_extended(), integer_valued_real_p(), and real_maxval().
#define SIG_MSB ((unsigned long)1 << (HOST_BITS_PER_LONG - 1)) |
Referenced by decode_ieee_extended_intel_128(), decode_vax_g(), real_maxval(), and real_to_integer2().
#define SIGNIFICAND_BITS (128 + HOST_BITS_PER_LONG) |
Referenced by decimal_from_integer(), and do_compare().
#define SIGSZ (SIGNIFICAND_BITS / HOST_BITS_PER_LONG) |
Referenced by lshift_significand_1(), and rshift_significand().
enum real_value_class |
Definitions of floating-point access for GNU compiler. Copyright (C) 1989-2013 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/. An expanded form of the represented number. Enumerate the special cases of numbers that we encounter.
tree build_real | ( | tree | , |
REAL_VALUE_TYPE | |||
) |
In tree.c: wrap up a REAL_VALUE_TYPE in a tree node.
Referenced by build_one_cst(), build_string(), expand_builtin_expect(), fold_builtin_ceil(), fold_builtin_constant_p(), fold_builtin_fabs(), fold_builtin_sincos(), fold_builtin_strncpy(), integer_valued_real_p(), set_value_varying(), tree_unary_nonnegative_warnv_p(), and vect_slp_analyze_bb().
rtx const_double_from_real_value | ( | REAL_VALUE_TYPE | , |
enum | machine_mode | ||
) |
const REAL_VALUE_TYPE* dconst_e_ptr | ( | void | ) |
Function to return the real value special constant 'e'.
Returns the special REAL_VALUE_TYPE corresponding to 'e'.
Initialize mathematical constants for constant folding builtins. These constants need to be given to at least 160 bits precision.
const REAL_VALUE_TYPE* dconst_sqrt2_ptr | ( | void | ) |
Returns the special REAL_VALUE_TYPE corresponding to sqrt(2).
Initialize mathematical constants for constant folding builtins. These constants need to be given to at least 160 bits precision.
const REAL_VALUE_TYPE* dconst_third_ptr | ( | void | ) |
Returns the special REAL_VALUE_TYPE corresponding to 1/3.
Initialize mathematical constants for constant folding builtins. These constants need to be given to at least 160 bits precision.
Referenced by integer_valued_real_p().
bool exact_real_inverse | ( | enum | machine_mode, |
REAL_VALUE_TYPE * | |||
) |
Replace R by 1/R in the given machine mode, if the result is exact.
bool exact_real_truncate | ( | enum | machine_mode, |
const REAL_VALUE_TYPE * | |||
) |
Return true if truncating to NEW is exact.
void get_max_float | ( | const struct real_format * | , |
char * | , | ||
size_t | |||
) |
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.
void real_2expN | ( | REAL_VALUE_TYPE * | , |
int | , | ||
enum | machine_mode | ||
) |
bool real_arithmetic | ( | REAL_VALUE_TYPE * | r, |
int | icode, | ||
const REAL_VALUE_TYPE * | op0, | ||
const REAL_VALUE_TYPE * | op1 | ||
) |
Declare functions in real.c. Binary or unary arithmetic on tree_code.
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.
Clear any padding areas in *r if it isn't equal to one of the operands so that we can later do bitwise comparisons later on.
References NULL, real_arithmetic(), and REAL_VALUE_TYPE.
Referenced by integer_valued_real_p(), maybe_lookup_ctx(), and real_arithmetic().
bool real_can_shorten_arithmetic | ( | enum | machine_mode, |
enum | machine_mode | ||
) |
Return true if arithmetic on values in IMODE that were promoted from values in TMODE is equivalent to direct arithmetic on values in TMODE.
void real_ceil | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
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 mode MODE.
bool real_compare | ( | int | , |
const REAL_VALUE_TYPE * | , | ||
const REAL_VALUE_TYPE * | |||
) |
Compare reals by tree_code.
Referenced by fold_builtin_strncat_chk().
void real_convert | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
const REAL_VALUE_TYPE * | a | ||
) |
Extend or truncate to a new mode.
round_for_format de-normalizes denormals. Undo just that part.
void real_copysign | ( | REAL_VALUE_TYPE * | , |
const REAL_VALUE_TYPE * | |||
) |
Set the sign of R to the sign of X.
int real_exponent | ( | const REAL_VALUE_TYPE * | ) |
??? These were added for Paranoia support. Return floor log2(R).
void real_floor | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
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 mode MODE.
Referenced by build_complex_cproj().
void real_from_integer | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
unsigned HOST_WIDE_INT | low, | ||
HOST_WIDE_INT | high, | ||
int | unsigned_p | ||
) |
Initialize R from an integer pair HIGH/LOW.
Initialize R from the integer pair HIGH+LOW.
Referenced by fold_builtin_sincos().
int real_from_string | ( | REAL_VALUE_TYPE * | , |
const char * | |||
) |
Initialize R from a decimal or hexadecimal string. Return -1 if the value underflows, +1 if overflows, and 0 otherwise.
REAL_VALUE_TYPE real_from_string2 | ( | const char * | , |
enum | machine_mode | ||
) |
void real_from_string3 | ( | REAL_VALUE_TYPE * | , |
const char * | , | ||
enum | machine_mode | ||
) |
Wrapper to allow different internal representation for decimal floats.
void real_from_target | ( | REAL_VALUE_TYPE * | , |
const long * | , | ||
enum | machine_mode | ||
) |
void real_from_target_fmt | ( | REAL_VALUE_TYPE * | r, |
const long * | buf, | ||
const struct real_format * | 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.
unsigned int real_hash | ( | const REAL_VALUE_TYPE * | ) |
bool real_identical | ( | const REAL_VALUE_TYPE * | , |
const REAL_VALUE_TYPE * | |||
) |
Compare two floating-point objects for bitwise identity.
void real_inf | ( | REAL_VALUE_TYPE * | ) |
bool real_isfinite | ( | const REAL_VALUE_TYPE * | ) |
Determine whether a floating-point value X is finite.
bool real_isinf | ( | const REAL_VALUE_TYPE * | ) |
Determine whether a floating-point value X is infinite.
bool real_isinteger | ( | const REAL_VALUE_TYPE * | c, |
enum machine_mode | mode | ||
) |
Check whether the real constant value given is an integer.
bool real_isnan | ( | const REAL_VALUE_TYPE * | ) |
Determine whether a floating-point value X is a NaN.
bool real_isneg | ( | const REAL_VALUE_TYPE * | ) |
Determine whether a floating-point value X is negative.
bool real_isnegzero | ( | const REAL_VALUE_TYPE * | ) |
Determine whether a floating-point value X is minus zero.
void real_ldexp | ( | REAL_VALUE_TYPE * | , |
const REAL_VALUE_TYPE * | , | ||
int | |||
) |
R = A * 2**EXP.
void real_maxval | ( | REAL_VALUE_TYPE * | , |
int | , | ||
enum | machine_mode | ||
) |
bool real_nan | ( | REAL_VALUE_TYPE * | r, |
const char * | str, | ||
int | quiet, | ||
enum machine_mode | mode | ||
) |
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.
Parse akin to strtol into the significand of R.
Must have consumed the entire string for success.
Shift the significand into place such that the bits are in the most significant bits for the format.
Our MSB is always unset for NaNs.
Force quiet or signalling NaN.
References real_format::b, decimal_real_convert(), and decimal_round_for_format().
bool real_powi | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
const REAL_VALUE_TYPE * | x, | ||
HOST_WIDE_INT | n | ||
) |
Calculate R as X raised to the integer exponent N in mode MODE.
Calculate X raised to the integer exponent N in mode MODE 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.
Don't worry about overflow, from now on n is unsigned.
Referenced by fold_builtin_ceil().
void real_round | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
const REAL_VALUE_TYPE * | x | ||
) |
Round X to the nearest integer, but round halfway cases away from zero.
bool real_sqrt | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
const REAL_VALUE_TYPE * | x | ||
) |
Calculate R as the square root of X in the given machine mode.
Calculate the square root of X in mode MODE, and store the result in R. Return TRUE if the operation does not raise an exception. For details see "High Precision Division and Square Root", Alan H. Karp and Peter Markstein, HP Lab Report 93-93-42, June
sqrt(-0.0) is -0.0.
Negative arguments return NaN.
Infinity and NaN return themselves.
Initial guess for reciprocal sqrt, i.
Newton's iteration for reciprocal sqrt, i.
i(n+1) = i(n) * (1.5 - 0.5*i(n)*i(n)*x).
Check for early convergence.
??? Unroll loop to avoid copying.
Final iteration: r = i*x + 0.5*i*x*(1.0 - i*(i*x)).
??? We need a Tuckerman test to get the last bit.
void real_to_decimal | ( | char * | str, |
const REAL_VALUE_TYPE * | r_orig, | ||
size_t | buf_size, | ||
size_t | digits, | ||
int | crop_trailing_zeros | ||
) |
Render R as a decimal floating point constant.
Likewise, except always uses round-to-nearest.
References HOST_BITS_PER_LONG.
Referenced by decimal_to_binary(), dump_pointer(), and print_value().
void real_to_decimal_for_mode | ( | char * | , |
const REAL_VALUE_TYPE * | , | ||
size_t | , | ||
size_t | , | ||
int | , | ||
enum | machine_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.
??? Print the significand as well, if not canonical?
Bound the number of digits printed by the size of the representation. Estimate the decimal exponent, and compute the length of the string it will print as. Be conservative and add one to account for possible overflow or rounding error.
Bound the number of digits printed by the size of the output buffer.
Number is greater than one. Convert significand to an integer and strip trailing decimal zeros.
Largest M, such that 10**2**M fits within SIGNIFICAND_BITS.
Iterate over the bits of the possible powers of 10 that might be present in U and eliminate them. That is, if we find that 10**2**M divides U evenly, keep the division and increase DEC_EXP by 2**M.
Revert the scaling to integer that we performed earlier.
Find power of 10. Do this by dividing out 10**2**M when this is larger than the current remainder. Fill PTEN with the power of 10 that we compute.
We managed to divide off enough tens in the above reduction loop that we've now got a negative exponent. Fall into the less-than-one code to compute the proper value for PTEN.
Number is less than one. Pad significand with leading decimal zeros.
Stop if we'd shift bits off the bottom.
Stop if we're now >= 1.
Find power of 10. Do this by multiplying in P=10**2**M when the current remainder is smaller than 1/P. Fill PTEN with the power of 10 that we compute.
Invert the positive power of 10 that we've collected so far.
At this point, PTEN should contain the nearest power of 10 smaller than R, such that this division produces the first digit. Using a divide-step primitive that returns the complete integral remainder avoids the rounding error that would be produced if we were to use do_divide here and then simply multiply by 10 for each subsequent digit.
Be prepared for error in that division via underflow ...
Multiply by 10 and try again.
... or overflow.
Generate subsequent digits.
Generate one more digit with which to do rounding.
Round the result.
If the format uses round towards zero when parsing the string back in, we need to always round away from zero here.
Round to nearest. If R is nonzero there are additional nonzero digits to be extracted.
Round to even.
Carry out of the first digit. This means we had all 9's and now have all 0's. "Prepend" a 1 by overwriting the first 0.
Insert the decimal point.
If requested, drop trailing zeros. Never crop past "1.0".
Append the exponent.
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.
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.
??? Print the significand as well, if not canonical?
Hexadecimal format for decimal floats is not interesting.
Bound the number of digits printed by the size of the output buffer.
HOST_WIDE_INT real_to_integer | ( | const REAL_VALUE_TYPE * | ) |
Render R as an integer.
void real_to_integer2 | ( | HOST_WIDE_INT * | plow, |
HOST_WIDE_INT * | phigh, | ||
const REAL_VALUE_TYPE * | r | ||
) |
Likewise, but to an integer pair, HI+LOW.
Only force overflow for unsigned overflow. Signed overflow is undefined, so it doesn't matter what we return, and some callers expect to be able to use this routine for both signed and unsigned conversions.
References cmp_significands(), lshift_significand_1(), SIG_MSB, and sub_significands().
long real_to_target | ( | long * | , |
const REAL_VALUE_TYPE * | , | ||
enum | machine_mode | ||
) |
long real_to_target_fmt | ( | long * | buf, |
const REAL_VALUE_TYPE * | r_orig, | ||
const struct real_format * | 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.
void real_trunc | ( | REAL_VALUE_TYPE * | r, |
enum machine_mode | mode, | ||
const REAL_VALUE_TYPE * | x | ||
) |
Standard round to integer value functions.
Round X to the nearest integer not larger in absolute value, i.e. towards zero, placing the result in R in mode MODE.
REAL_VALUE_TYPE real_value_abs | ( | const REAL_VALUE_TYPE * | ) |
REAL_VALUE_TYPE real_value_from_int_cst | ( | const_tree | , |
const_tree | |||
) |
Function to return a real value (not a tree node) from a given integer constant.
REAL_VALUE_TYPE real_value_negate | ( | const REAL_VALUE_TYPE * | ) |
REAL_VALUE_TYPE real_value_truncate | ( | enum | machine_mode, |
REAL_VALUE_TYPE | |||
) |
int significand_size | ( | enum | machine_mode | ) |
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.
REAL_VALUE_TYPE dconst0 |
End of software floating point emulator interface macros ****
Constant real values 0, 1, 2, -1 and 0.5.
Referenced by associate_equivalences_with_edges(), build_one_cst(), expand_builtin_expect(), fold_builtin_classify(), fold_builtin_tan(), set_value_varying(), and vect_slp_analyze_bb().
REAL_VALUE_TYPE dconst1 |
Referenced by decimal_to_decnumber(), encode_ieee_half(), expand_complex_libcall(), fixed_zerop(), and vect_slp_analyze_bb().
REAL_VALUE_TYPE dconst2 |
Referenced by decimal_to_decnumber(), estimate_move_cost(), and fold_builtin_sincos().
REAL_VALUE_TYPE dconsthalf |
Referenced by decimal_to_decnumber(), encode_ieee_half(), and fold_builtin_sincos().
REAL_VALUE_TYPE dconstm1 |
Referenced by build_string(), and decimal_to_decnumber().
struct real_format decimal_double_format |
Double precision decimal floating point (IEEE 754).
struct real_format decimal_quad_format |
Quad precision decimal floating point (IEEE 754).
struct real_format decimal_single_format |
Single precision decimal floating point (IEEE 754).
struct real_format ibm_extended_format |
struct real_format ieee_double_format |
struct real_format ieee_extended_intel_128_format |
struct real_format ieee_extended_intel_96_format |
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.
struct real_format ieee_extended_motorola_format |
struct real_format ieee_half_format |
Half-precision format, as specified in IEEE 754R.
struct real_format ieee_quad_format |
struct real_format ieee_single_format |
Target formats defined in real.c.
struct real_format mips_double_format |
struct real_format mips_extended_format |
struct real_format mips_quad_format |
struct real_format mips_single_format |
struct real_format motorola_double_format |
struct real_format motorola_single_format |
struct real_format* real_format_for_mode[MAX_MODE_FLOAT-MIN_MODE_FLOAT+1+MAX_MODE_DECIMAL_FLOAT-MIN_MODE_DECIMAL_FLOAT+1] |
The target format used for each floating point mode. Float modes are followed by decimal float modes, with entries for float modes indexed by (MODE - first float mode), and entries for decimal float modes indexed by (MODE - first decimal float mode) + the number of float modes.
struct real_format real_internal_format |
struct real_format spu_single_format |
SPU Single Precision (Extended-Range Mode) format is the same as IEEE single precision with the following differences:
char test_real_width[sizeof(REAL_VALUE_TYPE)<=REAL_WIDTH *sizeof(HOST_WIDE_INT)?1:-1] |
Verify the guess.
struct real_format vax_d_format |
struct real_format vax_f_format |
struct real_format vax_g_format |