osprey-gcc-4.2.0/gcc/dfp.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 "dfp.h"
#include "decimal128.h"
#include "decimal64.h"
#include "decimal32.h"
#include "decNumber.h"

Include dependency graph for dfp.c:

Go to the source code of this file.

Functions/Subroutines

static uint32_t dfp_byte_swap (uint32_t in)
static void decimal_from_decnumber (REAL_VALUE_TYPE *r, decNumber *dn, decContext *context)
void decimal_real_from_string (REAL_VALUE_TYPE *r, const char *s)
static void decimal_to_decnumber (const REAL_VALUE_TYPE *r, decNumber *dn)
void encode_decimal32 (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
void decode_decimal32 (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
void encode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
void decode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
void encode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED, long *buf, const REAL_VALUE_TYPE *r)
void decode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED, REAL_VALUE_TYPE *r, const long *buf)
static void decimal_to_binary (REAL_VALUE_TYPE *to, const REAL_VALUE_TYPE *from, enum machine_mode mode)
static void decimal_from_binary (REAL_VALUE_TYPE *to, const REAL_VALUE_TYPE *from)
int decimal_do_compare (const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b, int nan_result)
void decimal_round_for_format (const struct real_format *fmt, REAL_VALUE_TYPE *r)
void decimal_real_convert (REAL_VALUE_TYPE *r, enum machine_mode mode, const REAL_VALUE_TYPE *a)
void decimal_real_to_decimal (char *str, const REAL_VALUE_TYPE *r_orig, size_t buf_size, size_t digits ATTRIBUTE_UNUSED, int crop_trailing_zeros ATTRIBUTE_UNUSED)
static bool decimal_do_add (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1, int subtract_p)
static bool decimal_do_multiply (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1)
static bool decimal_do_divide (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1)
void decimal_do_fix_trunc (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *a)
HOST_WIDE_INT decimal_real_to_integer (const REAL_VALUE_TYPE *r)
void decimal_real_to_integer2 (HOST_WIDE_INT *plow, HOST_WIDE_INT *phigh, const REAL_VALUE_TYPE *r)
bool decimal_real_arithmetic (REAL_VALUE_TYPE *r, enum tree_code code, const REAL_VALUE_TYPE *op0, const REAL_VALUE_TYPE *op1)
void decimal_real_maxval (REAL_VALUE_TYPE *r, int sign, enum machine_mode mode)


Function Documentation

static bool decimal_do_add ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  op0,
const REAL_VALUE_TYPE *  op1,
int  subtract_p 
) [static]

int decimal_do_compare ( const REAL_VALUE_TYPE *  a,
const REAL_VALUE_TYPE *  b,
int  nan_result 
)

static bool decimal_do_divide ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  op0,
const REAL_VALUE_TYPE *  op1 
) [static]

void decimal_do_fix_trunc ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  a 
)

static bool decimal_do_multiply ( REAL_VALUE_TYPE *  r,
const REAL_VALUE_TYPE *  op0,
const REAL_VALUE_TYPE *  op1 
) [static]

static void decimal_from_binary ( REAL_VALUE_TYPE *  to,
const REAL_VALUE_TYPE *  from 
) [static]

static void decimal_from_decnumber ( REAL_VALUE_TYPE *  r,
decNumber dn,
decContext context 
) [static]

bool decimal_real_arithmetic ( REAL_VALUE_TYPE *  r,
enum tree_code  code,
const REAL_VALUE_TYPE *  op0,
const REAL_VALUE_TYPE *  op1 
)

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

Definition at line 429 of file dfp.c.

References real_format::b, decimal_from_binary(), decimal_to_binary(), and REAL_MODE_FORMAT.

Referenced by real_convert(), and round_for_format().

void decimal_real_from_string ( REAL_VALUE_TYPE *  r,
const char *  s 
)

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

Definition at line 694 of file dfp.c.

References decimal_real_from_string(), gcc_unreachable, and max.

Referenced by real_maxval().

void decimal_real_to_decimal ( char *  str,
const REAL_VALUE_TYPE *  r_orig,
size_t  buf_size,
size_t digits  ATTRIBUTE_UNUSED,
int crop_trailing_zeros  ATTRIBUTE_UNUSED 
)

Definition at line 449 of file dfp.c.

References decimal128ToString(), and gcc_assert.

Referenced by real_to_decimal().

HOST_WIDE_INT decimal_real_to_integer ( const REAL_VALUE_TYPE *  r  ) 

void decimal_real_to_integer2 ( HOST_WIDE_INT *  plow,
HOST_WIDE_INT *  phigh,
const REAL_VALUE_TYPE *  r 
)

void decimal_round_for_format ( const struct real_format fmt,
REAL_VALUE_TYPE *  r 
)

static void decimal_to_binary ( REAL_VALUE_TYPE *  to,
const REAL_VALUE_TYPE *  from,
enum machine_mode  mode 
) [static]

Definition at line 311 of file dfp.c.

References decimal128ToString(), and real_from_string3().

Referenced by decimal_real_convert().

static void decimal_to_decnumber ( const REAL_VALUE_TYPE *  r,
decNumber dn 
) [static]

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

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

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

static uint32_t dfp_byte_swap ( uint32_t  in  )  [static]

Definition at line 40 of file dfp.c.

References b, i, out, and p.

Referenced by decode_decimal128(), decode_decimal32(), decode_decimal64(), encode_decimal128(), encode_decimal32(), and encode_decimal64().

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

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

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


Generated on Wed Apr 8 14:18:56 2009 for Open64 by  doxygen 1.5.6