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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [m68k/] [crash1.c] - Blame information for rev 816

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

Line No. Rev Author Line
1 320 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Os -fomit-frame-pointer" } */
3
 
4
/* Caused an ICE because of forgotten auto increment.  */
5
 
6
register void *current __asm__("%a2");
7
 
8
struct kernel_stat
9
{
10
 long long user;
11
 long long nice;
12
 long long system;
13
 long long idle;
14
 long long steal;
15
 unsigned irqs[256];
16
};
17
extern struct kernel_stat per_cpu__kstat;
18
 
19
void show_stat(void)
20
{
21
  int i;
22
  long long user, nice, system, idle, steal;
23
  long long sum = 0;
24
 
25
  user = nice = system = idle = steal = 0;
26
  for (i = 0; i < 1; i++)
27
    {
28
      int j;
29
      user = user + per_cpu__kstat.user;
30
      nice = nice + per_cpu__kstat.nice;
31
      system = system + per_cpu__kstat.system;
32
      idle = idle + per_cpu__kstat.idle;
33
      steal = steal + per_cpu__kstat.steal;
34
 
35
      for (j = 0 ; j < 256 ; j++)
36
        sum += per_cpu__kstat.irqs[j];
37
    }
38
  seq_printf(user, nice, system, idle, steal);
39
  seq_printf(sum);
40
  for (i = 0; i < 256; i++)
41
    seq_printf (i);
42
}

powered by: WebSVN 2.1.0

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