OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [coremark/] [fmod.c] - Diff between revs 355 and 406

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 355 Rev 406
Line 1... Line 1...
 
 
typedef unsigned int u_int32_t;
typedef unsigned int u_int32_t;
typedef signed int int32_t;
typedef signed int int32_t;
 
 
// Big endian struct...
// Big endian struct...
typedef union
typedef union {
{
 
  double value;
  double value;
  struct
        struct {
  {
 
    u_int32_t msw;
    u_int32_t msw;
    u_int32_t lsw;
    u_int32_t lsw;
  } parts;
  } parts;
} ieee_double_shape_type;
} ieee_double_shape_type;
 
 
 
 
/*
/*
typedef union
typedef union
{
{
  double value;
  double value;
  struct
  struct
Line 85... Line 82...
} while (0)
} while (0)
 
 
/* A union which permits us to convert between a float and a 32 bit
/* A union which permits us to convert between a float and a 32 bit
   int.  */
   int.  */
 
 
typedef union
typedef union {
{
 
  float value;
  float value;
  u_int32_t word;
  u_int32_t word;
} ieee_float_shape_type;
} ieee_float_shape_type;
 
 
/* Get a 32 bit int from a float.  */
/* Get a 32 bit int from a float.  */
Line 109... Line 105...
  ieee_float_shape_type sf_u;                                   \
  ieee_float_shape_type sf_u;                                   \
  sf_u.word = (i);                                              \
  sf_u.word = (i);                                              \
  (d) = sf_u.value;                                             \
  (d) = sf_u.value;                                             \
} while (0)
} while (0)
 
 
 
 
static const double one = 1.0;
static const double one = 1.0;
 
 
double modf(double x, double *iptr)
double modf(double x, double *iptr)
{
{
        int32_t i0,i1,j0;
        int32_t i0,i1,j0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.