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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr39824.c] - Blame information for rev 859

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
static const double internalEndianMagic = 7.949928895127363e-275;
2
static const unsigned char ieee_754_mantissa_mask[] = { 0x00, 0x0F, 0xFF, 0xFF,
3
    0xFF, 0xFF, 0xFF, 0xFF };
4
static inline int
5
trio_isnan (double number)
6
{
7
  int has_mantissa = 0;
8
  unsigned int i;
9
  unsigned char current;
10
  for (i = 0; i < (unsigned int)sizeof(double); i++)
11
    {
12
      current = ((unsigned char *)&number)[(((unsigned char
13
                                              *)&internalEndianMagic)[7-(i)])];
14
      has_mantissa |= (current & ieee_754_mantissa_mask[i]);
15
    }
16
  return has_mantissa;
17
}
18
void
19
xmlXPathEqualNodeSetFloat(int nodeNr, double v)
20
{
21
  int i;
22
  for (i=0; i<nodeNr; i++)
23
    if (!trio_isnan(v))
24
      break;
25
}
26
 

powered by: WebSVN 2.1.0

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