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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [drap.c] - Rev 689

Compare with Previous | Blame | View Log

/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
/* { dg-options "-g -mforce-drap" } */
 
volatile int v;
 
__attribute__((noinline, noclone)) int
bar (int a, int b)
{
#ifdef __x86_64__
  asm volatile ("movq %%rsp, %%r10" : : : "r10");
#else
  asm volatile ("movl %%esp, %%ecx" : : : "ecx");
#endif
  return 0;
}
 
__attribute__((noinline, noclone)) int
foo (int v0, int v1, int v2, int v3, int v4, int v5, int a, int b)
{
  __attribute__((aligned (32))) int c = bar (a, b);
  v++;               /* { dg-final { gdb-test 21 "a" "5" } } */
  return a + b + c;  /* { dg-final { gdb-test 22 "b" "6" } } */
}
 
int
main (void)
{
  foo (0, 0, 0, 0, 0, 0, 5, 6);
  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.