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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.target/] [arm/] [interrupt-1.c] - Diff between revs 313 and 338

Only display areas with differences | Details | Blame | View Log

Rev 313 Rev 338
/* Verify that prologue and epilogue are correct for functions with
/* Verify that prologue and epilogue are correct for functions with
   __attribute__ ((interrupt)).  */
   __attribute__ ((interrupt)).  */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O0" } */
/* { dg-options "-O0" } */
 
 
/* This test is not valid when -mthumb.  We just cheat.  */
/* This test is not valid when -mthumb.  We just cheat.  */
#ifndef __thumb__
#ifndef __thumb__
extern void bar (int);
extern void bar (int);
extern void foo (void) __attribute__ ((interrupt("IRQ")));
extern void foo (void) __attribute__ ((interrupt("IRQ")));
 
 
void foo ()
void foo ()
{
{
  bar (0);
  bar (0);
}
}
#else
#else
void foo ()
void foo ()
{
{
  asm ("stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}");
  asm ("stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}");
  asm ("ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}^");
  asm ("ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}^");
}
}
#endif
#endif
/* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}" } } */
/* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}" } } */
/* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}\\^" } } */
/* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}\\^" } } */
 
 

powered by: WebSVN 2.1.0

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