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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [asm-5.c] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
/* PR inline-asm/11676 */
/* PR inline-asm/11676 */
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2" } */
/* { dg-options "-O2" } */
 
 
extern void abort (void);
extern void abort (void);
static int bar(int x) __asm__("bar") __attribute__((regparm(1)));
static int bar(int x) __asm__("bar") __attribute__((regparm(1)));
static int __attribute__((regparm(1), noinline, used))
static int __attribute__((regparm(1), noinline, used))
bar(int x)
bar(int x)
{
{
  if (x != 0)
  if (x != 0)
    abort ();
    abort ();
}
}
 
 
static int __attribute__((regparm(1), noinline))
static int __attribute__((regparm(1), noinline))
foo(int x)
foo(int x)
{
{
  x = 0;
  x = 0;
  __asm__ __volatile__("call bar" : "=a"(x) : "a"(x));
  __asm__ __volatile__("call bar" : "=a"(x) : "a"(x));
}
}
 
 
int main()
int main()
{
{
  foo(1);
  foo(1);
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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