osprey-gcc/gcc/real.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.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 (REAL_VALUE_TYPE *, int)
static void get_canonical_qnan (REAL_VALUE_TYPE *, int)
static void get_canonical_snan (REAL_VALUE_TYPE *, int)
static void get_inf (REAL_VALUE_TYPE *, int)
static bool sticky_rshift_significand (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, unsigned int)
static void rshift_significand (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, unsigned int)
static void lshift_significand (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, unsigned int)
static void lshift_significand_1 (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static bool add_significands (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static bool sub_significands (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int)
static void neg_significand (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static int cmp_significands (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static int cmp_significand_0 (const REAL_VALUE_TYPE *)
static void set_significand_bit (REAL_VALUE_TYPE *, unsigned int)
static void clear_significand_bit (REAL_VALUE_TYPE *, unsigned int)
static bool test_significand_bit (REAL_VALUE_TYPE *, unsigned int)
static void clear_significand_below (REAL_VALUE_TYPE *, unsigned int)
static bool div_significands (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static void normalize (REAL_VALUE_TYPE *)
static bool do_add (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int)
static bool do_multiply (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static bool do_divide (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static int do_compare (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int)
static void do_fix_trunc (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *)
static unsigned long rtd_divmod (REAL_VALUE_TYPE *, REAL_VALUE_TYPE *)
static const REAL_VALUE_TYPE * ten_to_ptwo (int)
static const REAL_VALUE_TYPE * ten_to_mptwo (int)
static const REAL_VALUE_TYPE * real_digit (int)
static void times_pten (REAL_VALUE_TYPE *, int)
static void round_for_format (const struct real_format *, REAL_VALUE_TYPE *)
bool 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 (const REAL_VALUE_TYPE *r)
void real_ldexp (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, int exp)
bool real_isinf (const REAL_VALUE_TYPE *r)
bool real_isnan (const REAL_VALUE_TYPE *r)
bool real_isneg (const REAL_VALUE_TYPE *r)
bool real_isnegzero (const REAL_VALUE_TYPE *r)
bool real_identical (const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b)
bool exact_real_inverse (enum machine_mode mode, REAL_VALUE_TYPE *r)
HOST_WIDE_INT real_to_integer (const REAL_VALUE_TYPE *r)
void real_to_integer2 (HOST_WIDE_INT *plow, HOST_WIDE_INT *phigh, const REAL_VALUE_TYPE *r)
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 (const char *s, enum machine_mode mode)
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_inf (REAL_VALUE_TYPE *r)
bool real_nan (REAL_VALUE_TYPE *r, const char *str, int quiet, enum machine_mode mode)
void real_maxval (REAL_VALUE_TYPE *r, int sign, enum machine_mode mode)
void real_2expN (REAL_VALUE_TYPE *r, int n)
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 (const REAL_VALUE_TYPE *r)
static void encode_ieee_single (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_ieee_single (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_ieee_double (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_ieee_double (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_ieee_extended (const struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r)
static void encode_ieee_extended_motorola (const struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r)
static void encode_ieee_extended_intel_96 (const struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r)
static void encode_ieee_extended_intel_128 (const struct real_format *fmt, long *buf, const REAL_VALUE_TYPE *r)
static void decode_ieee_extended (const struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf)
static void decode_ieee_extended_motorola (const struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf)
static void decode_ieee_extended_intel_96 (const struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf)
static void decode_ieee_extended_intel_128 (const struct real_format *fmt, REAL_VALUE_TYPE *r, const long *buf)
static void encode_ibm_extended (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_ibm_extended (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void decode_ibm_extended (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_ieee_quad (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_ieee_quad (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_vax_f (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_vax_f (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_vax_d (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_vax_d (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_vax_g (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_vax_g (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_vax_f (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_vax_f (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_vax_d (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_vax_d (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_vax_g (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_vax_g (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_i370_single (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_i370_single (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_i370_double (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_i370_double (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_i370_single (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_i370_single (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_i370_double (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_i370_double (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_c4x_single (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_c4x_single (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_c4x_extended (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_c4x_extended (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_c4x_single (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_c4x_single (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_c4x_extended (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_c4x_extended (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void encode_internal (const struct real_format *fmt, long *, const REAL_VALUE_TYPE *)
static void decode_internal (const struct real_format *, REAL_VALUE_TYPE *, const long *)
static void encode_internal (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
static void decode_internal (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
bool real_sqrt (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *x)
bool real_powi (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *x, HOST_WIDE_INT n)
void real_trunc (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *x)
void real_floor (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *x)
void real_ceil (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *x)
void real_round (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *x)
void real_copysign (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *x)

Variables

struct real_format ieee_single_format
struct real_format mips_single_format
struct real_format ieee_double_format
struct real_format mips_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 mips_extended_format
struct real_format ieee_quad_format
struct real_format mips_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


Define Documentation

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

Definition at line 76 of file real.c.

#define M_LOG10_2   0.30102999566398119521

Definition at line 1419 of file real.c.


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 276 of file real.c.

References carry, i, and SIGSZ.

static void clear_significand_below ( REAL_VALUE_TYPE *  r,
unsigned int  n 
) [static]

Definition at line 427 of file real.c.

References HOST_BITS_PER_LONG, and i.

static void clear_significand_bit ( REAL_VALUE_TYPE *  r,
unsigned int  n 
) [inline, static]

Definition at line 406 of file real.c.

References HOST_BITS_PER_LONG, and long.

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

Definition at line 383 of file real.c.

References i, and SIGSZ.

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

Definition at line 362 of file real.c.

References i, and SIGSZ.

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

Definition at line 4365 of file real.c.

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

static void decode_c4x_extended ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

Definition at line 4282 of file real.c.

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

static void decode_c4x_single ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

static void decode_i370_double ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

Definition at line 4069 of file real.c.

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

static void decode_i370_single ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

static void decode_ibm_extended ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

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

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

Definition at line 3219 of file real.c.

References decode_ieee_extended_intel_96().

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

Definition at line 3195 of file real.c.

References decode_ieee_extended(), FLOAT_WORDS_BIG_ENDIAN, and long.

Referenced by decode_ieee_extended_intel_128().

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

Definition at line 3177 of file real.c.

References decode_ieee_extended(), and long.

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

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

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

Definition at line 4458 of file real.c.

References memcpy.

static void decode_internal ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

static void decode_vax_d ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

Definition at line 3747 of file real.c.

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

static void decode_vax_f ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

static void decode_vax_g ( const struct real_format ,
REAL_VALUE_TYPE *  ,
const long  
) [static]

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

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

static int do_compare ( const REAL_VALUE_TYPE *  a,
const REAL_VALUE_TYPE *  b,
int  nan_result 
) [static]

Definition at line 898 of file real.c.

References CLASS2, cmp_significands(), gcc_unreachable, REAL_EXP, ret, rvc_inf, rvc_nan, rvc_normal, and rvc_zero.

static bool 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 bool do_multiply ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a,
const REAL_VALUE_TYPE *  b 
) [static]

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

static void encode_c4x_extended ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

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

Definition at line 4242 of file real.c.

References exp, gcc_unreachable, HOST_BITS_PER_LONG, REAL_EXP, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.

static void encode_c4x_single ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

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

static void encode_i370_double ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

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

Definition at line 4037 of file real.c.

References exp, gcc_unreachable, HOST_BITS_PER_LONG, REAL_EXP, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.

static void encode_i370_single ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

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

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

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

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

Definition at line 3078 of file real.c.

References encode_ieee_extended_intel_96().

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

Definition at line 3056 of file real.c.

References encode_ieee_extended(), and FLOAT_WORDS_BIG_ENDIAN.

Referenced by encode_ieee_extended_intel_128().

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

Definition at line 3036 of file real.c.

References encode_ieee_extended().

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

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

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

Definition at line 4451 of file real.c.

References memcpy.

static void encode_internal ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

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

static void encode_vax_d ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

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

Definition at line 3711 of file real.c.

References exp, gcc_unreachable, HOST_BITS_PER_LONG, REAL_EXP, rvc_inf, rvc_nan, rvc_normal, rvc_zero, and SIGSZ.

static void encode_vax_f ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

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

static void encode_vax_g ( const struct real_format fmt,
long ,
const REAL_VALUE_TYPE *   
) [static]

bool exact_real_inverse ( enum machine_mode  mode,
REAL_VALUE_TYPE *  r 
)

Definition at line 1217 of file real.c.

References do_divide(), i, one, real_convert(), real_digit(), REAL_VALUE_TYPE, rvc_normal, SIG_MSB, and SIGSZ.

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 138 of file real.c.

References memset, and rvc_nan.

static void get_canonical_snan ( REAL_VALUE_TYPE *  r,
int  sign 
) [inline, static]

Definition at line 147 of file real.c.

References memset, and rvc_nan.

static void get_inf ( REAL_VALUE_TYPE *  r,
int  sign 
) [inline, static]

Definition at line 157 of file real.c.

References memset, and rvc_inf.

static void get_zero ( REAL_VALUE_TYPE *  r,
int  sign 
) [inline, static]

Definition at line 129 of file real.c.

References memset.

static void lshift_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.

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

Definition at line 263 of file real.c.

References HOST_BITS_PER_LONG, i, and SIGSZ.

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

Definition at line 333 of file real.c.

References carry, i, and SIGSZ.

static void normalize ( REAL_VALUE_TYPE *  r  )  [static]

void real_2expN ( REAL_VALUE_TYPE *  r,
int  n 
)

Definition at line 2213 of file real.c.

References MAX_EXP, memset, rvc_inf, rvc_normal, SET_REAL_EXP, SIG_MSB, and SIGSZ.

bool real_arithmetic ( REAL_VALUE_TYPE *  r,
int  icode,
const REAL_VALUE_TYPE *  op0,
const REAL_VALUE_TYPE *  op1 
)

Definition at line 982 of file real.c.

References do_add(), do_compare(), do_divide(), do_fix_trunc(), do_multiply(), gcc_unreachable, and rvc_nan.

REAL_VALUE_TYPE real_arithmetic2 ( int  icode,
const REAL_VALUE_TYPE *  op0,
const REAL_VALUE_TYPE *  op1 
)

Definition at line 1042 of file real.c.

References r, real_arithmetic(), and REAL_VALUE_TYPE.

void real_ceil ( REAL_VALUE_TYPE *  r,
enum machine_mode  mode,
const REAL_VALUE_TYPE *  x 
)

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

Definition at line 1051 of file real.c.

References do_compare(), gcc_unreachable, and rvc_nan.

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

Definition at line 2364 of file real.c.

References gcc_assert, normalize(), REAL_MODE_FORMAT, round_for_format(), and rvc_normal.

void real_copysign ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  x 
)

Definition at line 4677 of file real.c.

Referenced by fold_builtin_copysign().

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

Definition at line 2049 of file real.c.

References cl(), gcc_assert, real_from_integer(), REAL_VALUE_TYPE, and rvc_zero.

int real_exponent ( const REAL_VALUE_TYPE *  r  ) 

Definition at line 1095 of file real.c.

void real_floor ( REAL_VALUE_TYPE *  r,
enum machine_mode  mode,
const REAL_VALUE_TYPE *  x 
)

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 ( const char *  s,
enum machine_mode  mode 
)

Definition at line 1941 of file real.c.

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

Definition at line 2462 of file real.c.

References real_format::decode, gcc_assert, and REAL_MODE_FORMAT.

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

Definition at line 2453 of file real.c.

References real_format::decode.

unsigned int real_hash ( const REAL_VALUE_TYPE *  r  ) 

Definition at line 2492 of file real.c.

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

Definition at line 1174 of file real.c.

void real_inf ( REAL_VALUE_TYPE *  r  ) 

Definition at line 2091 of file real.c.

References get_inf().

bool real_isinf ( const REAL_VALUE_TYPE *  r  ) 

Definition at line 1142 of file real.c.

bool real_isnan ( const REAL_VALUE_TYPE *  r  ) 

Definition at line 1150 of file real.c.

bool real_isneg ( const REAL_VALUE_TYPE *  r  ) 

Definition at line 1158 of file real.c.

bool real_isnegzero ( const REAL_VALUE_TYPE *  r  ) 

Definition at line 1166 of file real.c.

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

void real_maxval ( REAL_VALUE_TYPE *  r,
int  sign,
enum machine_mode  mode 
)

Definition at line 2191 of file real.c.

Referenced by fold_inf_compare(), and omp_reduction_init().

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

bool real_powi ( REAL_VALUE_TYPE *  r,
enum machine_mode  mode,
const REAL_VALUE_TYPE *  x,
HOST_WIDE_INT  n 
)

Definition at line 4567 of file real.c.

Referenced by fold_builtin_exponent(), fold_builtin_pow(), and fold_builtin_powi().

void real_round ( REAL_VALUE_TYPE *  r,
enum machine_mode  mode,
const REAL_VALUE_TYPE *  x 
)

bool real_sqrt ( REAL_VALUE_TYPE *  r,
enum machine_mode  mode,
const REAL_VALUE_TYPE *  x 
)

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 
)

HOST_WIDE_INT real_to_integer ( const REAL_VALUE_TYPE *  r  ) 

Definition at line 1253 of file real.c.

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 2438 of file real.c.

References gcc_assert, REAL_MODE_FORMAT, and real_to_target_fmt().

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

Definition at line 2419 of file real.c.

References real_format::encode, r, REAL_VALUE_TYPE, and round_for_format().

void real_trunc ( REAL_VALUE_TYPE *  r,
enum machine_mode  mode,
const REAL_VALUE_TYPE *  x 
)

REAL_VALUE_TYPE real_value_truncate ( enum machine_mode  mode,
REAL_VALUE_TYPE  a 
)

Definition at line 2383 of file real.c.

References r, real_convert(), and REAL_VALUE_TYPE.

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

static void rshift_significand ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a,
unsigned int  n 
) [static]

Definition at line 208 of file real.c.

References for(), HOST_BITS_PER_LONG, i, and SIGSZ.

static unsigned long rtd_divmod ( REAL_VALUE_TYPE *  num,
REAL_VALUE_TYPE *  den 
) [static]

static void set_significand_bit ( REAL_VALUE_TYPE *  r,
unsigned int  n 
) [inline, static]

Definition at line 397 of file real.c.

References HOST_BITS_PER_LONG, and long.

int significand_size ( enum machine_mode  mode  ) 

Definition at line 2476 of file real.c.

References real_format::log2_b, NULL, real_format::p, and REAL_MODE_FORMAT.

static bool sticky_rshift_significand ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a,
unsigned int  n 
) [static]

Definition at line 169 of file real.c.

References for(), HOST_BITS_PER_LONG, i, long, and SIGSZ.

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 306 of file real.c.

References i, and SIGSZ.

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

Definition at line 2033 of file real.c.

References cl(), do_divide(), EXP_BITS, gcc_assert, real_digit(), REAL_VALUE_TYPE, rvc_zero, and ten_to_ptwo().

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 415 of file real.c.

References HOST_BITS_PER_LONG.

static void times_pten ( REAL_VALUE_TYPE *  r,
int  exp 
) [static]

Definition at line 2065 of file real.c.

References do_divide(), do_multiply(), i, real_digit(), REAL_VALUE_TYPE, rr, and ten_to_ptwo().


Variable Documentation

Initial value:

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

Definition at line 4421 of file real.c.

Initial value:

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

Definition at line 4403 of file real.c.

Initial value:

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

Definition at line 4195 of file real.c.

Initial value:

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

Definition at line 4177 of file real.c.

Initial value:

  {
    encode_ibm_extended,
    decode_ibm_extended,
    2,
    1,
    53 + 53,
    53,
    -1021 + 53,
    1024,
    -1,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 3367 of file real.c.

Initial value:

  {
    encode_ieee_double,
    decode_ieee_double,
    2,
    1,
    53,
    53,
    -1021,
    1024,
    63,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 2879 of file real.c.

Initial value:

  {
    encode_ieee_extended_intel_128,
    decode_ieee_extended_intel_128,
    2,
    1,
    64,
    64,
    -16381,
    16384,
    79,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 3262 of file real.c.

Initial value:

  {
    encode_ieee_extended_intel_96,
    decode_ieee_extended_intel_96,
    2,
    1,
    64,
    64,
    -16381,
    16384,
    79,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 3244 of file real.c.

Initial value:

  {
    encode_ieee_extended_intel_96,
    decode_ieee_extended_intel_96,
    2,
    1,
    53,
    53,
    -16381,
    16384,
    79,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 3282 of file real.c.

Initial value:

  {
    encode_ieee_extended_motorola,
    decode_ieee_extended_motorola,
    2,
    1,
    64,
    64,
    -16382,
    16384,
    95,
    true,
    true,
    true,
    true,
    true
  }

Definition at line 3226 of file real.c.

Initial value:

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

Definition at line 3651 of file real.c.

Initial value:

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

Definition at line 2656 of file real.c.

Initial value:

  {
    encode_ieee_double,
    decode_ieee_double,
    2,
    1,
    53,
    53,
    -1021,
    1024,
    63,
    true,
    true,
    true,
    true,
    false
  }

Definition at line 2897 of file real.c.

Initial value:

  {
    encode_ibm_extended,
    decode_ibm_extended,
    2,
    1,
    53 + 53,
    53,
    -1021 + 53,
    1024,
    -1,
    true,
    true,
    true,
    true,
    false
  }

Definition at line 3385 of file real.c.

Initial value:

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

Definition at line 3669 of file real.c.

Initial value:

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

Definition at line 2674 of file real.c.

Initial value:

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

Definition at line 4464 of file real.c.

Initial value:

  {
    encode_vax_d,
    decode_vax_d,
    2,
    1,
    56,
    56,
    -127,
    127,
    15,
    false,
    false,
    false,
    false,
    false
  }

Definition at line 3984 of file real.c.

Initial value:

  {
    encode_vax_f,
    decode_vax_f,
    2,
    1,
    24,
    24,
    -127,
    127,
    15,
    false,
    false,
    false,
    false,
    false
  }

Definition at line 3966 of file real.c.

Initial value:

  {
    encode_vax_g,
    decode_vax_g,
    2,
    1,
    53,
    53,
    -1023,
    1023,
    15,
    false,
    false,
    false,
    false,
    false
  }

Definition at line 4002 of file real.c.


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