OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [arm/] [interrupt-1.c] - Blame information for rev 317

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 313 jeremybenn
/* Verify that prologue and epilogue are correct for functions with
2
   __attribute__ ((interrupt)).  */
3
/* { dg-do compile } */
4
/* { dg-options "-O0" } */
5
 
6
/* This test is not valid when -mthumb.  We just cheat.  */
7
#ifndef __thumb__
8
extern void bar (int);
9
extern void foo (void) __attribute__ ((interrupt("IRQ")));
10
 
11
void foo ()
12
{
13
  bar (0);
14
}
15
#else
16
void foo ()
17
{
18
  asm ("stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}");
19
  asm ("ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}^");
20
}
21
#endif
22
/* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}" } } */
23
/* { 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.