Commit 45e4e1e9 by Greta Yorsh Committed by Greta Yorsh

interrupt-1.c: Fix for thumb mode.

2012-02-15  Greta Yorsh  <Greta.Yorsh@arm.com>

        * gcc.target/arm/interrupt-1.c: Fix for thumb mode.
        * gcc.target/arm/interrupt-2.c: Likewise.

From-SVN: r196076
parent 711db0a6
2012-02-15 Greta Yorsh <Greta.Yorsh@arm.com>
* gcc.target/arm/interrupt-1.c: Fix for thumb mode.
* gcc.target/arm/interrupt-2.c: Likewise.
2013-02-15 Tobias Burnus <burnus@net-b.de> 2013-02-15 Tobias Burnus <burnus@net-b.de>
PR fortran/56318 PR fortran/56318
......
/* 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-require-effective-target arm_nothumb } */
/* { dg-options "-O0 -marm" } */
/* This test is not valid when -mthumb. We just cheat. */ /* This test is not valid when -mthumb. */
#ifndef __thumb__
extern void bar (int); extern void bar (int);
extern void foo (void) __attribute__ ((interrupt("IRQ"))); extern void foo (void) __attribute__ ((interrupt("IRQ")));
...@@ -12,12 +12,6 @@ void foo () ...@@ -12,12 +12,6 @@ void foo ()
{ {
bar (0); bar (0);
} }
#else
void foo ()
{
asm ("stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}");
asm ("ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}^");
}
#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}\\^" } } */
/* 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 "-O1" } */ /* { dg-require-effective-target arm_nothumb } */
/* { dg-options "-O1 -marm" } */
/* This test is not valid when -mthum. We just cheat. */ /* This test is not valid when -mthumb. */
#ifndef __thumb__
extern void bar (int); extern void bar (int);
extern void test (void) __attribute__((__interrupt__)); extern void test (void) __attribute__((__interrupt__));
int foo; int foo;
void test() void test()
{ {
funcptrs(foo); bar (foo);
foo = 0; foo = 0;
} }
#else
void test ()
{
asm ("stmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, lr}");
asm ("ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}^");
}
#endif
/* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, lr}" } } */ /* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, lr}" } } */
/* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}\\^" } } */ /* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}\\^" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment