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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr22171.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-O2" } */
2
 
3
static unsigned int old_serial_port_irq[10];
4
 
5
static struct uart_8250_port {
6
  volatile unsigned int slock;
7
  unsigned int irq;
8
} serial8250_ports[10];
9
 
10
static __inline__ __attribute__((always_inline)) int irq_canonicalize(int irq)
11
{
12
  return ((irq == 2) ? 9 : irq);
13
}
14
 
15
void serial8250_isa_init_ports(void)
16
{
17
  struct uart_8250_port *up;
18
  int i;
19
 
20
  for (i = 0, up = serial8250_ports; i < 10; i++, up++)
21
    up->irq = irq_canonicalize(old_serial_port_irq[i]);
22
}
23
 
24
int main(void)
25
{
26
  serial8250_isa_init_ports();
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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