#include "config.h"#include "system.h"#include "tree.h"#include "toplev.h"#include "real.h"#include "tm_p.h"

Go to the source code of this file.
Defines | |
| #define | CLASS2(A, B) ((A) << 2 | (B)) |
| #define | M_LOG10_2 0.30102999566398119521 |
Functions/Subroutines | |
| static void get_zero | PARAMS ((REAL_VALUE_TYPE *, int)) |
| static bool sticky_rshift_significand | PARAMS ((REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, unsigned int)) |
| static void lshift_significand_1 | PARAMS ((REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)) |
| static bool add_significands | PARAMS ((REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)) |
| static bool sub_significands | PARAMS ((REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int)) |
| static int cmp_significands | PARAMS ((const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)) |
| static int cmp_significand_0 | PARAMS ((const REAL_VALUE_TYPE *)) |
| static void set_significand_bit | PARAMS ((REAL_VALUE_TYPE *, unsigned int)) |
| static bool div_significands | PARAMS ((REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)) |
| static void normalize | PARAMS ((REAL_VALUE_TYPE *)) |
| static int do_compare | PARAMS ((const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int)) |
| static unsigned long rtd_divmod | PARAMS ((REAL_VALUE_TYPE *, REAL_VALUE_TYPE *)) |
| static const REAL_VALUE_TYPE *ten_to_ptwo | PARAMS ((int)) |
| static void round_for_format | PARAMS ((const struct real_format *, REAL_VALUE_TYPE *)) |
| static void | get_zero (REAL_VALUE_TYPE *r, int sign) |
| static void | get_canonical_qnan (REAL_VALUE_TYPE *r, int sign) |
| static void | get_canonical_snan (REAL_VALUE_TYPE *r, int sign) |
| static void | get_inf (REAL_VALUE_TYPE *r, int sign) |
| static bool | sticky_rshift_significand (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, unsigned int n) |
| static void | rshift_significand (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, unsigned int n) |
| static void | lshift_significand (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, unsigned int n) |
| static void | lshift_significand_1 (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a) |
| static bool | add_significands (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b) |
| static bool | sub_significands (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b, int carry) |
| static void | neg_significand (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a) |
| static int | cmp_significands (REAL_VALUE_TYPE *a, REAL_VALUE_TYPE *b) const |
| static int | cmp_significand_0 (REAL_VALUE_TYPE *a) const |
| static void | set_significand_bit (REAL_VALUE_TYPE *r, unsigned int n) |
| static void | clear_significand_bit (REAL_VALUE_TYPE *r, unsigned int n) |
| static bool | test_significand_bit (REAL_VALUE_TYPE *r, unsigned int n) |
| static void | clear_significand_below (REAL_VALUE_TYPE *r, unsigned int n) |
| static bool | div_significands (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b) |
| static void | normalize (REAL_VALUE_TYPE *r) |
| static void | do_add (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b, int subtract_p) |
| static void | do_multiply (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b) |
| static void | do_divide (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b) |
| static int | do_compare (REAL_VALUE_TYPE *a, REAL_VALUE_TYPE *b, int nan_result) const |
| static void | do_fix_trunc (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a) |
| void | real_arithmetic (REAL_VALUE_TYPE *r, int icode, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1) |
| REAL_VALUE_TYPE | real_arithmetic2 (int icode, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1) |
| bool | real_compare (int icode, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1) |
| int | real_exponent (REAL_VALUE_TYPE *r) const |
| void | real_ldexp (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, int exp) |
| bool | real_isinf (REAL_VALUE_TYPE *r) const |
| bool | real_isnan (REAL_VALUE_TYPE *r) const |
| bool | real_isneg (REAL_VALUE_TYPE *r) const |
| bool | real_isnegzero (REAL_VALUE_TYPE *r) const |
| bool | real_identical (REAL_VALUE_TYPE *a, REAL_VALUE_TYPE *b) const |
| bool | exact_real_inverse (enum machine_mode mode, REAL_VALUE_TYPE *r) |
| HOST_WIDE_INT | real_to_integer (REAL_VALUE_TYPE *r) const |
| void | real_to_integer2 (HOST_WIDE_INT *plow, HOST_WIDE_INT *phigh, const REAL_VALUE_TYPE *r) |
| static unsigned long | rtd_divmod (REAL_VALUE_TYPE *num, REAL_VALUE_TYPE *den) |
| void | real_to_decimal (char *str, const REAL_VALUE_TYPE *r_orig, size_t buf_size, size_t digits, int crop_trailing_zeros) |
| void | real_to_hexadecimal (char *str, const REAL_VALUE_TYPE *r, size_t buf_size, size_t digits, int crop_trailing_zeros) |
| void | real_from_string (REAL_VALUE_TYPE *r, const char *str) |
| REAL_VALUE_TYPE | real_from_string2 (char *s, enum machine_mode mode) const |
| void | real_from_integer (REAL_VALUE_TYPE *r, enum machine_mode mode, unsigned HOST_WIDE_INT low, HOST_WIDE_INT high, int unsigned_p) |
| static const REAL_VALUE_TYPE * | ten_to_ptwo (int n) |
| static const REAL_VALUE_TYPE * | ten_to_mptwo (int n) |
| static const REAL_VALUE_TYPE * | real_digit (int n) |
| static void | times_pten (REAL_VALUE_TYPE *r, int exp) |
| void | real_inf (REAL_VALUE_TYPE *r) |
| bool | real_nan (REAL_VALUE_TYPE *r, const char *str, int quiet, enum machine_mode mode) |
| void | real_2expN (REAL_VALUE_TYPE *r, int n) |
| static void | round_for_format (struct real_format *fmt, REAL_VALUE_TYPE *r) const |
| void | real_convert (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *a) |
| REAL_VALUE_TYPE | real_value_truncate (enum machine_mode mode, REAL_VALUE_TYPE a) |
| bool | exact_real_truncate (enum machine_mode mode, const REAL_VALUE_TYPE *a) |
| long | real_to_target_fmt (long *buf, const REAL_VALUE_TYPE *r_orig, const struct real_format *fmt) |
| long | real_to_target (long *buf, const REAL_VALUE_TYPE *r, enum machine_mode mode) |
| void | real_from_target_fmt (REAL_VALUE_TYPE *r, const long *buf, const struct real_format *fmt) |
| void | real_from_target (REAL_VALUE_TYPE *r, const long *buf, enum machine_mode mode) |
| int | significand_size (enum machine_mode mode) |
| unsigned int | real_hash (REAL_VALUE_TYPE *r) const |
| static void encode_ieee_single | PARAMS ((const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)) |
| static void decode_ieee_single | PARAMS ((const struct real_format *, REAL_VALUE_TYPE *, const long *)) |
| static void | encode_ieee_single (struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_ieee_single (struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_ieee_double (struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_ieee_double (struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_ieee_extended (struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | encode_ieee_extended_128 (struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_ieee_extended (struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | decode_ieee_extended_128 (struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_ibm_extended (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_ibm_extended (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_ieee_quad (struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_ieee_quad (struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_vax_f (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_vax_f (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_vax_d (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_vax_d (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_vax_g (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_vax_g (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_i370_single (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_i370_single (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_i370_double (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_i370_double (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_c4x_single (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_c4x_single (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_c4x_extended (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_c4x_extended (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
| static void | encode_internal (fmt, long *buf, const REAL_VALUE_TYPE *r) const |
| static void | decode_internal (fmt, REAL_VALUE_TYPE *r, const long *buf) const |
Variables | |
| struct real_format | ieee_single_format |
| struct real_format | ieee_double_format |
| struct real_format | ieee_extended_motorola_format |
| struct real_format | ieee_extended_intel_96_format |
| struct real_format | ieee_extended_intel_128_format |
| struct real_format | ieee_extended_intel_96_round_53_format |
| struct real_format | ibm_extended_format |
| struct real_format | ieee_quad_format |
| struct real_format | vax_f_format |
| struct real_format | vax_d_format |
| struct real_format | vax_g_format |
| struct real_format | i370_single_format |
| struct real_format | i370_double_format |
| struct real_format | c4x_single_format |
| struct real_format | c4x_extended_format |
| struct real_format | real_internal_format |
| struct real_format * | real_format_for_mode [TFmode-QFmode+1] |
Definition at line 82 of file real.c.
Referenced by do_add(), do_compare(), do_divide(), and do_multiply().
| #define M_LOG10_2 0.30102999566398119521 |
| static bool add_significands | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| const REAL_VALUE_TYPE * | b | |||
| ) | [inline, static] |
Definition at line 311 of file real.c.
References carry, i, and SIGSZ.
Referenced by do_add(), real_nan(), and round_for_format().
| static void clear_significand_below | ( | REAL_VALUE_TYPE * | r, | |
| unsigned int | n | |||
| ) | [static] |
Definition at line 475 of file real.c.
References HOST_BITS_PER_LONG, and i.
Referenced by do_fix_trunc(), encode_ibm_extended(), real_maxval(), and round_for_format().
| static void clear_significand_bit | ( | REAL_VALUE_TYPE * | r, | |
| unsigned int | n | |||
| ) | [inline, static] |
Definition at line 450 of file real.c.
References HOST_BITS_PER_LONG, and long.
Referenced by real_maxval().
| static int cmp_significand_0 | ( | REAL_VALUE_TYPE * | a | ) | const [inline, static] |
| static int cmp_significands | ( | REAL_VALUE_TYPE * | a, | |
| REAL_VALUE_TYPE * | b | |||
| ) | const [inline, static] |
Definition at line 402 of file real.c.
Referenced by div_significands(), do_compare(), real_to_decimal(), and rtd_divmod().
Definition at line 4291 of file real.c.
References exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, memset, rvc_normal, SIG_MSB, and SIGSZ.
Definition at line 4204 of file real.c.
References exp, HOST_BITS_PER_LONG, memset, rvc_normal, SIG_MSB, and SIGSZ.
Definition at line 4063 of file real.c.
References exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, memset, normalize(), rvc_normal, and SIGNIFICAND_BITS.
Definition at line 3987 of file real.c.
References exp, HOST_BITS_PER_LONG, memset, normalize(), rvc_normal, and SIGSZ.
Definition at line 3310 of file real.c.
References decode_ieee_double(), do_add(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, and rvc_zero.
| static void decode_ieee_double | ( | struct real_format * | fmt, | |
| REAL_VALUE_TYPE * | r, | |||
| const long * | buf | |||
| ) | const [static] |
Definition at line 2828 of file real.c.
References exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, memset, normalize(), rvc_inf, rvc_nan, rvc_normal, SIG_MSB, and SIGSZ.
Referenced by decode_ibm_extended().
| static void decode_ieee_extended | ( | struct real_format * | fmt, | |
| REAL_VALUE_TYPE * | r, | |||
| const long * | buf | |||
| ) | const [static] |
Definition at line 3071 of file real.c.
References exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, memset, normalize(), rvc_inf, rvc_nan, rvc_normal, SIG_MSB, and SIGSZ.
Referenced by decode_ieee_extended_128(), decode_ieee_extended_intel_96(), and decode_ieee_extended_motorola().
| static void decode_ieee_extended_128 | ( | struct real_format * | fmt, | |
| REAL_VALUE_TYPE * | r, | |||
| const long * | buf | |||
| ) | const [static] |
Definition at line 3163 of file real.c.
References decode_ieee_extended(), and FLOAT_WORDS_BIG_ENDIAN.
| static void decode_ieee_quad | ( | struct real_format * | fmt, | |
| REAL_VALUE_TYPE * | r, | |||
| const long * | buf | |||
| ) | const [static] |
Definition at line 3469 of file real.c.
References exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, lshift_significand(), memset, normalize(), rvc_inf, rvc_nan, rvc_normal, SIG_MSB, SIGNIFICAND_BITS, and SIGSZ.
| static void decode_ieee_single | ( | struct real_format * | fmt, | |
| REAL_VALUE_TYPE * | r, | |||
| const long * | buf | |||
| ) | const [static] |
Definition at line 2672 of file real.c.
References exp, HOST_BITS_PER_LONG, memset, normalize(), rvc_inf, rvc_nan, rvc_normal, SIG_MSB, and SIGSZ.
Definition at line 3737 of file real.c.
References exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, lshift_significand(), memset, rvc_normal, SIG_MSB, and SIGSZ.
Definition at line 3659 of file real.c.
References exp, HOST_BITS_PER_LONG, memset, rvc_normal, SIG_MSB, and SIGSZ.
Definition at line 3841 of file real.c.
References exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, lshift_significand(), memset, rvc_normal, SIG_MSB, and SIGSZ.
| static bool div_significands | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| const REAL_VALUE_TYPE * | b | |||
| ) | [inline, static] |
Definition at line 491 of file real.c.
References cmp_significands(), i, lshift_significand_1(), memset, REAL_VALUE_TYPE, set_significand_bit(), SIG_MSB, SIGNIFICAND_BITS, SIGSZ, start, and sub_significands().
Referenced by do_divide().
| static void do_add | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| const REAL_VALUE_TYPE * | b, | |||
| int | subtract_p | |||
| ) | [static] |
Definition at line 574 of file real.c.
References abort, add_significands(), CLASS2, exp, get_canonical_qnan(), get_inf(), get_zero(), MAX_EXP, neg_significand(), normalize(), REAL_VALUE_TYPE, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SIG_MSB, SIGNIFICAND_BITS, SIGSZ, sticky_rshift_significand(), and sub_significands().
Referenced by decode_ibm_extended(), do_multiply(), encode_ibm_extended(), gimplify_scan_omp_clauses(), real_arithmetic(), real_ceil(), real_floor(), real_from_string(), real_round(), and real_sqrt().
| static int do_compare | ( | REAL_VALUE_TYPE * | a, | |
| REAL_VALUE_TYPE * | b, | |||
| int | nan_result | |||
| ) | const [static] |
Definition at line 932 of file real.c.
References abort, CLASS2, cmp_significands(), ret, rvc_inf, rvc_nan, rvc_normal, and rvc_zero.
Referenced by real_arithmetic(), real_compare(), and real_to_decimal().
| static void do_divide | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| const REAL_VALUE_TYPE * | b | |||
| ) | [static] |
Definition at line 840 of file real.c.
References abort, CLASS2, div_significands(), exp, get_canonical_qnan(), get_inf(), get_zero(), MAX_EXP, normalize(), overflow, REAL_VALUE_TYPE, rr, rvc_inf, rvc_nan, rvc_normal, and rvc_zero.
Referenced by exact_real_inverse(), real_arithmetic(), real_powi(), real_to_decimal(), ten_to_mptwo(), and times_pten().
| static void do_fix_trunc | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a | |||
| ) | [static] |
Definition at line 989 of file real.c.
References abort, clear_significand_below(), get_zero(), rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGNIFICAND_BITS.
Referenced by real_arithmetic(), real_ceil(), real_floor(), real_round(), real_to_decimal(), and real_trunc().
| static void do_multiply | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| const REAL_VALUE_TYPE * | b | |||
| ) | [static] |
Definition at line 711 of file real.c.
References abort, CLASS2, do_add(), exp, get_canonical_qnan(), get_inf(), get_zero(), HOST_BITS_PER_LONG, i, long, MAX_EXP, normalize(), overflow, REAL_VALUE_TYPE, rr, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by real_arithmetic(), real_from_string(), real_powi(), real_sqrt(), real_to_decimal(), ten_to_ptwo(), and times_pten().
Definition at line 4239 of file real.c.
References abort, exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Definition at line 4162 of file real.c.
References abort, exp, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Definition at line 4012 of file real.c.
References abort, exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Definition at line 3953 of file real.c.
References abort, exp, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Definition at line 3252 of file real.c.
References abort, clear_significand_below(), do_add(), encode_ieee_double(), FLOAT_WORDS_BIG_ENDIAN, normalize(), REAL_VALUE_TYPE, round_for_format(), rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGNIFICAND_BITS.
| static void encode_ieee_double | ( | struct real_format * | fmt, | |
| long * | buf, | |||
| const REAL_VALUE_TYPE * | r | |||
| ) | const [static] |
Definition at line 2748 of file real.c.
References abort, exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SIG_MSB, and SIGSZ.
Referenced by encode_ibm_extended().
| static void encode_ieee_extended | ( | struct real_format * | fmt, | |
| long * | buf, | |||
| const REAL_VALUE_TYPE * | r | |||
| ) | const [static] |
Definition at line 2950 of file real.c.
References abort, exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SIG_MSB, and SIGSZ.
Referenced by encode_ieee_extended_128(), encode_ieee_extended_intel_96(), and encode_ieee_extended_motorola().
| static void encode_ieee_extended_128 | ( | struct real_format * | fmt, | |
| long * | buf, | |||
| const REAL_VALUE_TYPE * | r | |||
| ) | const [static] |
Definition at line 3061 of file real.c.
References encode_ieee_extended(), and FLOAT_WORDS_BIG_ENDIAN.
| static void encode_ieee_quad | ( | struct real_format * | fmt, | |
| long * | buf, | |||
| const REAL_VALUE_TYPE * | r | |||
| ) | const [static] |
Definition at line 3353 of file real.c.
References abort, exp, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, REAL_VALUE_TYPE, rshift_significand(), rvc_inf, rvc_nan, rvc_normal, rvc_zero, SIG_MSB, SIGNIFICAND_BITS, and SIGSZ.
| static void encode_ieee_single | ( | struct real_format * | fmt, | |
| long * | buf, | |||
| const REAL_VALUE_TYPE * | r | |||
| ) | const [static] |
Definition at line 3681 of file real.c.
References abort, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Definition at line 3621 of file real.c.
References abort, exp, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Definition at line 3785 of file real.c.
References abort, FLOAT_WORDS_BIG_ENDIAN, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
| bool exact_real_inverse | ( | enum machine_mode | mode, | |
| REAL_VALUE_TYPE * | r | |||
| ) |
Definition at line 1260 of file real.c.
Referenced by fold(), fold_binary(), and vax_float_literal().
| bool exact_real_truncate | ( | enum machine_mode | mode, | |
| const REAL_VALUE_TYPE * | a | |||
| ) |
Definition at line 2471 of file real.c.
Referenced by compress_float_constant(), fold_builtin_logarithm(), and strip_float_extensions().
| static void get_canonical_qnan | ( | REAL_VALUE_TYPE * | r, | |
| int | sign | |||
| ) | [inline, static] |
Definition at line 160 of file real.c.
References memset, rvc_nan, SIG_MSB, and SIGSZ.
Referenced by do_add(), do_divide(), do_multiply(), real_nan(), and real_sqrt().
| static void get_canonical_snan | ( | REAL_VALUE_TYPE * | r, | |
| int | sign | |||
| ) | [inline, static] |
| static void get_inf | ( | REAL_VALUE_TYPE * | r, | |
| int | sign | |||
| ) | [inline, static] |
Definition at line 182 of file real.c.
References memset, and rvc_inf.
Referenced by do_add(), do_divide(), do_multiply(), normalize(), real_from_string(), real_inf(), real_ldexp(), and round_for_format().
| static void get_zero | ( | REAL_VALUE_TYPE * | r, | |
| int | sign | |||
| ) | [inline, static] |
Definition at line 149 of file real.c.
References memset.
Referenced by do_add(), do_divide(), do_fix_trunc(), do_multiply(), normalize(), real_from_integer(), real_from_string(), real_ldexp(), real_nan(), and round_for_format().
| static void lshift_significand | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| unsigned int | n | |||
| ) | [static] |
Definition at line 268 of file real.c.
References for(), HOST_BITS_PER_LONG, i, and SIGSZ.
Referenced by decode_ieee_quad(), decode_vax_d(), decode_vax_g(), normalize(), and real_nan().
| static void lshift_significand_1 | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a | |||
| ) | [inline, static] |
Definition at line 296 of file real.c.
References HOST_BITS_PER_LONG, i, and SIGSZ.
Referenced by div_significands(), real_nan(), and rtd_divmod().
| static void neg_significand | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a | |||
| ) | [inline, static] |
| static void normalize | ( | REAL_VALUE_TYPE * | r | ) | [static] |
Definition at line 529 of file real.c.
References exp, get_inf(), get_zero(), HOST_BITS_PER_LONG, i, lshift_significand(), MAX_EXP, rvc_zero, shift, and SIGSZ.
| static void decode_ieee_single PARAMS | ( | (const struct real_format *, REAL_VALUE_TYPE *, const long *) | ) | [static] |
| static void encode_ieee_single PARAMS | ( | (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *) | ) | [static] |
| static void round_for_format PARAMS | ( | (const struct real_format *, REAL_VALUE_TYPE *) | ) | [static] |
| static const REAL_VALUE_TYPE* ten_to_ptwo PARAMS | ( | (int) | ) | [static] |
| static unsigned long rtd_divmod PARAMS | ( | (REAL_VALUE_TYPE *, REAL_VALUE_TYPE *) | ) | [static] |
| static int do_compare PARAMS | ( | (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int) | ) | [static] |
| static void normalize PARAMS | ( | (REAL_VALUE_TYPE *) | ) | [static] |
| static bool div_significands PARAMS | ( | (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *) | ) | [static] |
| static void set_significand_bit PARAMS | ( | (REAL_VALUE_TYPE *, unsigned int) | ) | [static] |
| static int cmp_significand_0 PARAMS | ( | (const REAL_VALUE_TYPE *) | ) | [static] |
| static int cmp_significands PARAMS | ( | (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *) | ) | [static] |
| static bool sub_significands PARAMS | ( | (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int) | ) | [static] |
| static bool add_significands PARAMS | ( | (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *) | ) | [static] |
| static void lshift_significand_1 PARAMS | ( | (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *) | ) | [static] |
| static bool sticky_rshift_significand PARAMS | ( | (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, unsigned int) | ) | [static] |
| static void get_zero PARAMS | ( | (REAL_VALUE_TYPE *, int) | ) | [static] |
| void real_2expN | ( | REAL_VALUE_TYPE * | r, | |
| int | n | |||
| ) |
Definition at line 2275 of file real.c.
Referenced by expand_fix(), expand_float(), floating_exact_log2(), gen_divsi3(), gen_fixuns_truncdfdi2(), gen_fixuns_truncdfsi2(), gen_fixuns_truncsfdi2(), gen_fixuns_truncsfsi2(), and gen_udivsi3().
| void real_arithmetic | ( | REAL_VALUE_TYPE * | r, | |
| int | icode, | |||
| const REAL_VALUE_TYPE * | op0, | |||
| const REAL_VALUE_TYPE * | op1 | |||
| ) |
Definition at line 1018 of file real.c.
Referenced by const_binop(), distribute_real_division(), fold(), fold_binary(), fold_builtin_cabs(), fold_builtin_cbrt(), init_emit_once(), omp_reduction_init(), real_arithmetic2(), simplify_binary_operation(), simplify_const_binary_operation(), simplify_const_unary_operation(), and simplify_unary_operation().
| REAL_VALUE_TYPE real_arithmetic2 | ( | int | icode, | |
| const REAL_VALUE_TYPE * | op0, | |||
| const REAL_VALUE_TYPE * | op1 | |||
| ) |
| bool real_compare | ( | int | icode, | |
| const REAL_VALUE_TYPE * | op0, | |||
| const REAL_VALUE_TYPE * | op1 | |||
| ) |
Definition at line 1093 of file real.c.
Referenced by c_common_truthvalue_conversion(), decimal_real_arithmetic(), fold_builtin_classify(), and fold_relational_const().
| void real_convert | ( | REAL_VALUE_TYPE * | r, | |
| enum machine_mode | mode, | |||
| const REAL_VALUE_TYPE * | a | |||
| ) |
Definition at line 2437 of file real.c.
Referenced by const_binop(), exact_real_inverse(), exact_real_truncate(), fold_builtin_atan(), fold_builtin_exponent(), fold_convert_const_real_from_real(), fold_mathfn_compare(), init_ext_80387_constants(), interpret_float(), real_ceil(), real_floor(), real_from_integer(), real_from_string2(), real_from_string3(), real_powi(), real_round(), real_sqrt(), real_trunc(), real_value_truncate(), simplify_binary_operation(), and simplify_const_binary_operation().
| static const REAL_VALUE_TYPE* real_digit | ( | int | n | ) | [static] |
Definition at line 2110 of file real.c.
References abort, real_from_integer(), REAL_VALUE_TYPE, and rvc_zero.
Referenced by exact_real_inverse(), real_from_string(), real_to_decimal(), ten_to_mptwo(), and times_pten().
| int real_exponent | ( | REAL_VALUE_TYPE * | r | ) | const |
Definition at line 1136 of file real.c.
References abort, rvc_inf, rvc_nan, rvc_normal, and rvc_zero.
Referenced by floating_exact_log2(), and real_sqrt().
| void real_from_integer | ( | REAL_VALUE_TYPE * | r, | |
| enum machine_mode | mode, | |||
| unsigned HOST_WIDE_INT | low, | |||
| HOST_WIDE_INT | high, | |||
| int | unsigned_p | |||
| ) |
Definition at line 2008 of file real.c.
Referenced by expand_builtin_pow(), fold_builtin_exponent(), fold_builtin_pow(), real_digit(), real_value_from_int_cst(), simplify_const_unary_operation(), simplify_unary_operation(), and ten_to_ptwo().
| void real_from_string | ( | REAL_VALUE_TYPE * | r, | |
| const char * | str | |||
| ) |
Definition at line 1806 of file real.c.
Referenced by builtin_define_with_hex_fp_value(), decimal_real_to_integer(), decimal_real_to_integer2(), init_emit_once(), init_ext_80387_constants(), interpret_float(), real_from_string2(), and real_from_string3().
| REAL_VALUE_TYPE real_from_string2 | ( | char * | s, | |
| enum machine_mode | mode | |||
| ) | const |
Definition at line 1992 of file real.c.
References r, real_convert(), real_from_string(), and REAL_VALUE_TYPE.
| void real_from_target | ( | REAL_VALUE_TYPE * | r, | |
| const long * | buf, | |||
| enum machine_mode | mode | |||
| ) |
Definition at line 2538 of file real.c.
Referenced by gen_lowpart_common(), native_interpret_real(), simplify_binary_operation(), simplify_const_binary_operation(), simplify_const_unary_operation(), simplify_immed_subreg(), and simplify_unary_operation().
| void real_from_target_fmt | ( | REAL_VALUE_TYPE * | r, | |
| const long * | buf, | |||
| const struct real_format * | fmt | |||
| ) |
| unsigned int real_hash | ( | REAL_VALUE_TYPE * | r | ) | const |
Definition at line 2573 of file real.c.
References abort, h, HOST_BITS_PER_LONG, i, int, rvc_inf, rvc_nan, rvc_normal, rvc_zero, s, and SIGSZ.
Referenced by canon_hash(), const_double_htab_hash(), const_hash_1(), const_rtx_hash_1(), cselib_hash_rtx(), hash_rtx(), iterative_hash_expr(), and rs6000_hash_constant().
| bool real_identical | ( | REAL_VALUE_TYPE * | a, | |
| REAL_VALUE_TYPE * | b | |||
| ) | const |
Definition at line 1223 of file real.c.
References abort, i, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by const_binop(), const_double_htab_eq(), exact_real_truncate(), expand_builtin_pow(), fold_builtin_exponent(), fold_builtin_pow(), integer_valued_real_p(), real_ceil(), real_floor(), real_sqrt(), simplify_binary_operation(), simplify_const_binary_operation(), and standard_80387_constant_p().
| void real_inf | ( | REAL_VALUE_TYPE * | r | ) |
| bool real_isinf | ( | REAL_VALUE_TYPE * | r | ) | const |
Definition at line 1187 of file real.c.
References rvc_inf.
Referenced by fold_builtin_classify(), real_sqrt(), and rs6000_emit_cmove().
| bool real_isnan | ( | REAL_VALUE_TYPE * | r | ) | const |
Definition at line 1196 of file real.c.
References rvc_nan.
Referenced by fold_builtin_classify(), fold_relational_const(), real_sqrt(), simplify_const_unary_operation(), and simplify_unary_operation().
| bool real_isneg | ( | REAL_VALUE_TYPE * | r | ) | const |
Definition at line 1205 of file real.c.
Referenced by expand_copysign(), ix86_expand_copysign(), real_sqrt(), and simplify_rhs_and_lookup_avail_expr().
| bool real_isnegzero | ( | REAL_VALUE_TYPE * | r | ) | const |
| void real_ldexp | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | op0, | |||
| int | exp | |||
| ) |
| bool real_nan | ( | REAL_VALUE_TYPE * | r, | |
| const char * | str, | |||
| int | quiet, | |||
| enum machine_mode | mode | |||
| ) |
| void real_to_decimal | ( | char * | str, | |
| const REAL_VALUE_TYPE * | r_orig, | |||
| size_t | buf_size, | |||
| size_t | digits, | |||
| int | crop_trailing_zeros | |||
| ) |
Definition at line 1464 of file real.c.
Referenced by arc_print_operand(), asm_output_float(), builtin_define_with_hex_fp_value(), c4x_print_operand(), decimal_from_binary(), dump_expr(), dump_generic_node(), dump_real(), fr30_print_operand(), m32r_print_operand(), pp_c_floating_constant(), pp_c_real_literal(), print_node(), print_node_brief(), print_operand(), print_rtx(), and print_value().
| HOST_WIDE_INT real_to_integer | ( | REAL_VALUE_TYPE * | r | ) | const |
Definition at line 1298 of file real.c.
References abort, HOST_BITS_PER_LONG, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, i, overflow, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.
Referenced by decimal_real_to_integer(), expand_builtin_pow(), fold_builtin_exponent(), and fold_builtin_pow().
| void real_to_integer2 | ( | HOST_WIDE_INT * | plow, | |
| HOST_WIDE_INT * | phigh, | |||
| const REAL_VALUE_TYPE * | r | |||
| ) |
| long real_to_target | ( | long * | buf, | |
| const REAL_VALUE_TYPE * | r, | |||
| enum machine_mode | mode | |||
| ) |
Definition at line 2508 of file real.c.
Referenced by assemble_real(), ia64_split_tmode(), ix86_split_to_parts(), native_encode_real(), simplify_binary_operation(), simplify_const_binary_operation(), simplify_const_unary_operation(), simplify_immed_subreg(), simplify_unary_operation(), and write_real_cst().
| long real_to_target_fmt | ( | long * | buf, | |
| const REAL_VALUE_TYPE * | r_orig, | |||
| const struct real_format * | fmt | |||
| ) |
| REAL_VALUE_TYPE real_value_truncate | ( | enum machine_mode | mode, | |
| REAL_VALUE_TYPE | a | |||
| ) |
Definition at line 2459 of file real.c.
Referenced by const_binop(), fold_builtin_cbrt(), fold_builtin_logarithm(), fold_builtin_pow(), fold_builtin_sqrt(), fold_convert(), simplify_binary_operation(), simplify_const_unary_operation(), simplify_unary_operation(), and strip_float_extensions().
| static void round_for_format | ( | struct real_format * | fmt, | |
| REAL_VALUE_TYPE * | r | |||
| ) | const [static] |
Definition at line 2296 of file real.c.
References abort, add_significands(), clear_significand_below(), get_inf(), get_zero(), HOST_BITS_PER_LONG, i, overflow, p2, REAL_VALUE_TYPE, rshift_significand(), rvc_inf, rvc_nan, rvc_normal, rvc_zero, set_significand_bit(), shift, SIG_MSB, SIGNIFICAND_BITS, SIGSZ, sticky_rshift_significand(), and test_significand_bit().
Referenced by encode_ibm_extended(), real_convert(), and real_to_target_fmt().
| static void rshift_significand | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| unsigned int | n | |||
| ) | [static] |
Definition at line 237 of file real.c.
References for(), HOST_BITS_PER_LONG, i, and SIGSZ.
Referenced by encode_ieee_quad(), real_to_integer2(), and round_for_format().
| static unsigned long rtd_divmod | ( | REAL_VALUE_TYPE * | num, | |
| REAL_VALUE_TYPE * | den | |||
| ) | [static] |
Definition at line 1425 of file real.c.
References cmp_significands(), lshift_significand_1(), normalize(), q, SIG_MSB, SIGSZ, start, and sub_significands().
Referenced by real_to_decimal().
| static void set_significand_bit | ( | REAL_VALUE_TYPE * | r, | |
| unsigned int | n | |||
| ) | [inline, static] |
Definition at line 439 of file real.c.
References HOST_BITS_PER_LONG, and long.
Referenced by div_significands(), and round_for_format().
| int significand_size | ( | enum machine_mode | mode | ) |
Definition at line 2556 of file real.c.
Referenced by combine_simplify_rtx(), expand_float(), and simplify_unary_operation_1().
| static bool sticky_rshift_significand | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| unsigned int | n | |||
| ) | [static] |
Definition at line 196 of file real.c.
References for(), HOST_BITS_PER_LONG, i, long, and SIGSZ.
Referenced by do_add(), and round_for_format().
| static bool sub_significands | ( | REAL_VALUE_TYPE * | r, | |
| const REAL_VALUE_TYPE * | a, | |||
| const REAL_VALUE_TYPE * | b, | |||
| int | carry | |||
| ) | [inline, static] |
Definition at line 342 of file real.c.
Referenced by div_significands(), do_add(), and rtd_divmod().
| static const REAL_VALUE_TYPE* ten_to_mptwo | ( | int | n | ) | [static] |
Definition at line 2093 of file real.c.
References abort, do_divide(), EXP_BITS, real_digit(), REAL_VALUE_TYPE, rvc_zero, and ten_to_ptwo().
Referenced by real_to_decimal().
| static const REAL_VALUE_TYPE* ten_to_ptwo | ( | int | n | ) | [static] |
Definition at line 2060 of file real.c.
References abort, do_multiply(), EXP_BITS, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, i, real_from_integer(), REAL_VALUE_TYPE, and rvc_zero.
Referenced by real_from_string(), real_to_decimal(), ten_to_mptwo(), ten_to_ptwo(), and times_pten().
| static bool test_significand_bit | ( | REAL_VALUE_TYPE * | r, | |
| unsigned int | n | |||
| ) | [inline, static] |
Definition at line 461 of file real.c.
References HOST_BITS_PER_LONG.
Referenced by round_for_format().
| static void times_pten | ( | REAL_VALUE_TYPE * | r, | |
| int | exp | |||
| ) | [static] |
Definition at line 2127 of file real.c.
References do_divide(), do_multiply(), i, real_digit(), REAL_VALUE_TYPE, rr, and ten_to_ptwo().
Referenced by real_from_string().
Initial value:
{
encode_c4x_extended,
decode_c4x_extended,
2,
1,
32,
-126,
128,
false,
false,
false,
false,
false
}
Initial value:
{
encode_c4x_single,
decode_c4x_single,
2,
1,
24,
-126,
128,
false,
false,
false,
false,
false
}
Initial value:
{
encode_i370_double,
decode_i370_double,
16,
4,
14,
-64,
63,
false,
false,
false,
false,
false
}
Initial value:
{
encode_i370_single,
decode_i370_single,
16,
4,
6,
-64,
63,
false,
false,
false,
false,
false
}
Initial value:
{
encode_ibm_extended,
decode_ibm_extended,
2,
1,
53 + 53,
-1021 + 53,
1024,
true,
true,
true,
true,
true
}
Definition at line 3328 of file real.c.
Referenced by rs6000_override_options().
Initial value:
{
encode_ieee_double,
decode_ieee_double,
2,
1,
53,
-1021,
1024,
true,
true,
true,
true,
true
}
Initial value:
{
encode_ieee_extended_128,
decode_ieee_extended_128,
2,
1,
64,
-16381,
16384,
true,
true,
true,
true,
true
}
Definition at line 3203 of file real.c.
Referenced by ia64_override_options(), and override_options().
Initial value:
{
encode_ieee_extended,
decode_ieee_extended,
2,
1,
64,
-16381,
16384,
true,
true,
true,
true,
true
}
Definition at line 3187 of file real.c.
Referenced by override_options().
Initial value:
{
encode_ieee_extended,
decode_ieee_extended,
2,
1,
53,
-16381,
16384,
true,
true,
true,
true,
true
}
Initial value:
{
encode_ieee_extended,
decode_ieee_extended,
2,
1,
64,
-16382,
16384,
true,
true,
true,
true,
true
}
Initial value:
{
encode_ieee_quad,
decode_ieee_quad,
2,
1,
113,
-16381,
16384,
true,
true,
true,
true,
true
}
Initial value:
{
encode_ieee_single,
decode_ieee_single,
2,
1,
24,
-125,
128,
true,
true,
true,
true,
true
}
| struct real_format* real_format_for_mode[TFmode-QFmode+1] |
Initial value:
{
NULL,
NULL,
NULL,
&ieee_single_format,
&ieee_double_format,
NULL,
&ieee_quad_format
}
Definition at line 4411 of file real.c.
Referenced by builtin_define_float_constants(), ia64_override_options(), override_options(), real_convert(), real_from_target(), real_nan(), real_to_target(), and significand_size().
Initial value:
{
encode_internal,
decode_internal,
2,
1,
SIGNIFICAND_BITS - 2,
-MAX_EXP,
MAX_EXP,
true,
true,
false,
true,
true
}
Initial value:
{
encode_vax_d,
decode_vax_d,
2,
1,
56,
-127,
127,
false,
false,
false,
false,
false
}
Definition at line 3904 of file real.c.
Referenced by decode_pdp11_d(), and encode_pdp11_d().
Initial value:
{
encode_vax_f,
decode_vax_f,
2,
1,
24,
-127,
127,
false,
false,
false,
false,
false
}
Definition at line 3888 of file real.c.
Referenced by decode_pdp11_f(), encode_pdp11_f(), and override_options().
Initial value:
{
encode_vax_g,
decode_vax_g,
2,
1,
53,
-1023,
1023,
false,
false,
false,
false,
false
}
Definition at line 3920 of file real.c.
Referenced by override_options().
1.5.6