@@ -1,10 +1,10 @@
/* Verify that prologue and epilogue are correct for functions with
__attribute__ ((interrupt)). */
/* { 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. */
-#ifndef __thumb__
+/* This test is not valid when -mthumb. */
extern void bar (int);
extern void foo (void) __attribute__ ((interrupt("IRQ")));
@@ -12,12 +12,6 @@ void foo ()
{
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 "ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}\\^" } } */
@@ -1,26 +1,19 @@
/* Verify that prologue and epilogue are correct for functions with
__attribute__ ((interrupt)). */
/* { 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. */
-#ifndef __thumb__
+/* This test is not valid when -mthumb. */
extern void bar (int);
extern void test (void) __attribute__((__interrupt__));
int foo;
void test()
{
- funcptrs(foo);
+ bar (foo);
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 "ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}\\^" } } */