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/] [execute/] [960909-1.c] - Blame information for rev 297

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

Line No. Rev Author Line
1 297 jeremybenn
int
2
ffs (x)
3
     int x;
4
{
5
  int bit, mask;
6
 
7
  if (x == 0)
8
    return 0;
9
 
10
  for (bit = 1, mask = 1; !(x & mask); bit++, mask <<= 1)
11
    ;
12
 
13
  return bit;
14
}
15
 
16
f (x)
17
     int x;
18
{
19
  int y;
20
  y = ffs (x) - 1;
21
  if (y < 0)
22
    abort ();
23
}
24
 
25
main ()
26
{
27
  f (1);
28
  exit (0);
29
}

powered by: WebSVN 2.1.0

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