osprey/kg++fe/gnu/real.c File Reference

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

Include dependency graph for real.c:

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_formatreal_format_for_mode [TFmode-QFmode+1]


Define Documentation

#define CLASS2 ( A,
B   )     ((A) << 2 | (B))

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

Definition at line 1461 of file real.c.

Referenced by real_to_decimal().


Function Documentation

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]

Definition at line 424 of file real.c.

References i, and SIGSZ.

Referenced by real_from_string(), and real_to_decimal().

static int cmp_significands ( REAL_VALUE_TYPE *  a,
REAL_VALUE_TYPE *  b 
) const [inline, static]

Definition at line 402 of file real.c.

References i, and SIGSZ.

Referenced by div_significands(), do_compare(), real_to_decimal(), and rtd_divmod().

static void decode_c4x_extended ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

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.

static void decode_c4x_single ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

Definition at line 4204 of file real.c.

References exp, HOST_BITS_PER_LONG, memset, rvc_normal, SIG_MSB, and SIGSZ.

static void decode_i370_double ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

static void decode_i370_single ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

Definition at line 3987 of file real.c.

References exp, HOST_BITS_PER_LONG, memset, normalize(), rvc_normal, and SIGSZ.

static void decode_ibm_extended ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

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]

static void decode_ieee_extended ( struct real_format fmt,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

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]

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.

static void decode_internal ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

Definition at line 4384 of file real.c.

References memcpy.

static void decode_vax_d ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

static void decode_vax_f ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

Definition at line 3659 of file real.c.

References exp, HOST_BITS_PER_LONG, memset, rvc_normal, SIG_MSB, and SIGSZ.

static void decode_vax_g ( fmt  ,
REAL_VALUE_TYPE *  r,
const long buf 
) const [static]

static bool div_significands ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a,
const REAL_VALUE_TYPE *  b 
) [inline, static]

static void do_add ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a,
const REAL_VALUE_TYPE *  b,
int  subtract_p 
) [static]

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]

static void do_fix_trunc ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a 
) [static]

static void do_multiply ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a,
const REAL_VALUE_TYPE *  b 
) [static]

static void encode_c4x_extended ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

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.

static void encode_c4x_single ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

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.

static void encode_i370_double ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

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.

static void encode_i370_single ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

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.

static void encode_ibm_extended ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

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]

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]

static void encode_ieee_single ( struct real_format fmt,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

Definition at line 2617 of file real.c.

References abort, exp, HOST_BITS_PER_LONG, rvc_inf, rvc_nan, rvc_normal, rvc_zero, SIG_MSB, and SIGSZ.

static void encode_internal ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

Definition at line 4375 of file real.c.

References memcpy.

static void encode_vax_d ( 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.

static void encode_vax_f ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

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.

static void encode_vax_g ( fmt  ,
long buf,
const REAL_VALUE_TYPE *  r 
) const [static]

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 
)

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]

Definition at line 171 of file real.c.

References memset, rvc_nan, SIG_MSB, and SIGSZ.

Referenced by real_nan().

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]

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]

Definition at line 371 of file real.c.

References carry, i, and SIGSZ.

Referenced by do_add().

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 
)

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 
)

Definition at line 1083 of file real.c.

bool real_compare ( int  icode,
const REAL_VALUE_TYPE *  op0,
const REAL_VALUE_TYPE *  op1 
)

void real_convert ( REAL_VALUE_TYPE *  r,
enum machine_mode  mode,
const REAL_VALUE_TYPE *  a 
)

static const REAL_VALUE_TYPE* real_digit ( int  n  )  [static]

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 
)

void real_from_string ( REAL_VALUE_TYPE *  r,
const char *  str 
)

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 
)

void real_from_target_fmt ( REAL_VALUE_TYPE *  r,
const long buf,
const struct real_format fmt 
)

Definition at line 2527 of file real.c.

unsigned int real_hash ( REAL_VALUE_TYPE *  r  )  const

bool real_identical ( REAL_VALUE_TYPE *  a,
REAL_VALUE_TYPE *  b 
) const

void real_inf ( REAL_VALUE_TYPE *  r  ) 

Definition at line 2155 of file real.c.

Referenced by fold_builtin_inf(), and omp_reduction_init().

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

bool real_isneg ( REAL_VALUE_TYPE *  r  )  const

bool real_isnegzero ( REAL_VALUE_TYPE *  r  )  const

Definition at line 1214 of file real.c.

References rvc_zero.

Referenced by real_sqrt().

void real_ldexp ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  op0,
int  exp 
)

Definition at line 1156 of file real.c.

Referenced by real_sqrt().

bool real_nan ( REAL_VALUE_TYPE *  r,
const char *  str,
int  quiet,
enum machine_mode  mode 
)

Definition at line 2167 of file real.c.

Referenced by fold_builtin_nan().

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 
)

Definition at line 1736 of file real.c.

Referenced by print_rtx().

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 
)

Definition at line 1348 of file real.c.

Referenced by decimal_real_to_integer2().

long real_to_target ( long buf,
const REAL_VALUE_TYPE *  r,
enum machine_mode  mode 
)

long real_to_target_fmt ( long buf,
const REAL_VALUE_TYPE *  r_orig,
const struct real_format fmt 
)

Definition at line 2487 of file real.c.

Referenced by real_to_target().

REAL_VALUE_TYPE real_value_truncate ( enum machine_mode  mode,
REAL_VALUE_TYPE  a 
)

static void round_for_format ( struct real_format fmt,
REAL_VALUE_TYPE *  r 
) const [static]

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.

References i, and SIGSZ.

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]

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().


Variable Documentation

Initial value:

 
  {
    encode_c4x_extended,
    decode_c4x_extended,
    2,
    1,
    32,
    -126,
    128,
    false,
    false,
    false,
    false,
    false
  }

Definition at line 4347 of file real.c.

Initial value:

 
  {
    encode_c4x_single,
    decode_c4x_single,
    2,
    1,
    24,
    -126,
    128,
    false,
    false,
    false,
    false,
    false
  }

Definition at line 4331 of file real.c.

Initial value:

  {
    encode_i370_double,
    decode_i370_double,
    16,
    4,
    14,
    -64,
    63,
    false,
    false,
    false, 
    false, 
    false
  }

Definition at line 4117 of file real.c.

Initial value:

  {
    encode_i370_single,
    decode_i370_single,
    16,
    4,
    6,
    -64,
    63,
    false,
    false,
    false, 
    false, 
    false
  }

Definition at line 4101 of file real.c.

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
  }

Definition at line 2916 of file real.c.

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
  }

Definition at line 3221 of file real.c.

Initial value:

 
  {
    encode_ieee_extended,
    decode_ieee_extended,
    2,
    1,
    64,
    -16382,
    16384,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 3171 of file real.c.

Initial value:

 
  {
    encode_ieee_quad,
    decode_ieee_quad,
    2,
    1,
    113,
    -16381,
    16384,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 3581 of file real.c.

Initial value:

 
  {
    encode_ieee_single,
    decode_ieee_single,
    2,
    1,
    24,
    -125,
    128,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 2723 of file real.c.

Initial value:

 
  {
    encode_internal,
    decode_internal,
    2,
    1,
    SIGNIFICAND_BITS - 2,
    -MAX_EXP,
    MAX_EXP,
    true,
    true,
    false,
    true,
    true 
  }

Definition at line 4392 of file real.c.

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().


Generated on Wed Apr 8 15:42:24 2009 for Open64 by  doxygen 1.5.6