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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [extzvsi.c] - Blame information for rev 711

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

Line No. Rev Author Line
1 688 jeremybenn
/* The bit-field below would have a problem if __INT_MAX__ is too
2
   small.  */
3
#if __INT_MAX__ < 2147483647
4
int
5
main (void)
6
{
7
  exit (0);
8
}
9
#else
10
/* Failed on powerpc due to bad extzvsi pattern.  */
11
 
12
struct ieee
13
{
14
  unsigned int negative:1;
15
  unsigned int exponent:11;
16
  unsigned int mantissa0:20;
17
  unsigned int mantissa1:32;
18
} x;
19
 
20
unsigned int
21
foo (void)
22
{
23
  unsigned int exponent;
24
 
25
  exponent = x.exponent;
26
  if (exponent == 0)
27
    return 1;
28
  else if (exponent > 1)
29
    return 2;
30
  return 0;
31
}
32
 
33
int
34
main (void)
35
{
36
  x.exponent = 1;
37
  if (foo () != 0)
38
    abort ();
39
  return 0;
40
}
41
#endif

powered by: WebSVN 2.1.0

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