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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [arm/] [register-variables.c] - Rev 826

Compare with Previous | Blame | View Log

/* { dg-do run } */
/* { dg-options "-O" } */
 
#include <stdlib.h>
 
void __attribute__((noinline)) 
bar(int a, int b)
{
  if (a != 43 || b != 42)
    abort();
}
 
int main(void)
{
    register int r0 asm("r0") = 42;
    register int r1 asm("r1") = 43;
    asm volatile("": "+r" (r0), "+r" (r1));
    bar(r1, r0);
    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.