URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* Contributed by Joost VandeVondele <jv244@cam.ac.uk> */
|
/* Contributed by Joost VandeVondele <jv244@cam.ac.uk> */
|
|
|
/* { dg-do run } */
|
/* { dg-do run } */
|
/* { dg-require-profiling "-pg" } */
|
/* { dg-require-profiling "-pg" } */
|
/* { dg-options "-O2 -pg" } */
|
/* { dg-options "-O2 -pg" } */
|
/* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */
|
/* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
int stack_pointer;
|
int stack_pointer;
|
|
|
void
|
void
|
__attribute__((noinline))
|
__attribute__((noinline))
|
mystop ()
|
mystop ()
|
{
|
{
|
abort ();
|
abort ();
|
}
|
}
|
|
|
void
|
void
|
__attribute__((noinline))
|
__attribute__((noinline))
|
add ()
|
add ()
|
{
|
{
|
if (stack_pointer + 1 > 10)
|
if (stack_pointer + 1 > 10)
|
mystop ();
|
mystop ();
|
|
|
stack_pointer = stack_pointer + 1;
|
stack_pointer = stack_pointer + 1;
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
add ();
|
add ();
|
return stack_pointer - 1;
|
return stack_pointer - 1;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.