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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20011114-4.c] - Blame information for rev 301

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

Line No. Rev Author Line
1 297 jeremybenn
static inline int foo (long x)
2
{
3
  register int a = 0;
4
  register unsigned b;
5
 
6
  do
7
    {
8
      b = (x & 0x7f);
9
      x = (x >> 7) | ~(-1L >> 7);
10
      a += 1;
11
    }
12
  while ((x != 0 || (b & 0x40) != 0) && (x != -1 || (b & 0x40) == 0));
13
  return a;
14
}
15
 
16
static inline int bar (unsigned long x)
17
{
18
  register int a = 0;
19
  register unsigned b;
20
 
21
  do
22
    {
23
      b = (x & 0x7f);
24
      x >>= 7;
25
      a++;
26
    }
27
  while (x != 0);
28
  return a;
29
}
30
 
31
int
32
baz (unsigned long x, int y)
33
{
34
  if (y)
35
    return foo ((long) x);
36
  else
37
    return bar (x);
38
}

powered by: WebSVN 2.1.0

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