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/] [pr39041.c] - Blame information for rev 315

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

Line No. Rev Author Line
1 297 jeremybenn
int test_bit(int nr, void *addr)
2
{
3
  int *a = (int *)addr;
4
  int mask;
5
  a += nr;
6
  mask = 1 << nr;
7
  return mask & *a;
8
}
9
struct {
10
    struct {
11
        int disabled;
12
    } *data[1];
13
} trace;
14
struct {
15
    unsigned bits[1];
16
} cpumask;
17
void inc(int *);
18
void dec(int *);
19
int foo(void)
20
{
21
  int cpu;
22
  for (cpu = 0; cpu < 1; cpu++) {
23
      if (test_bit(cpu, cpumask.bits))
24
        inc(&trace.data[cpu]->disabled);
25
      if (!test_bit(cpu, cpumask.bits))
26
        dec(&trace.data[cpu]->disabled);
27
  }
28
}

powered by: WebSVN 2.1.0

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