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] - Rev 816

Compare with Previous | Blame | View Log

/* { dg-options "-O2" } */
 
static unsigned int old_serial_port_irq[10];
 
static struct uart_8250_port {
  volatile unsigned int slock;
  unsigned int irq;
} serial8250_ports[10];
 
static __inline__ __attribute__((always_inline)) int irq_canonicalize(int irq)
{
  return ((irq == 2) ? 9 : irq);
}
 
void serial8250_isa_init_ports(void)
{
  struct uart_8250_port *up;
  int i;
 
  for (i = 0, up = serial8250_ports; i < 10; i++, up++)
    up->irq = irq_canonicalize(old_serial_port_irq[i]);
}
 
int main(void)
{
  serial8250_isa_init_ports();
  return 0;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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