interrupt-1.c: Fix for thumb mode.
authorGreta Yorsh <greta.yorsh@arm.com>
Fri, 15 Feb 2013 13:27:11 +0000 (13:27 +0000)
committerGreta Yorsh <gretay@gcc.gnu.org>
Fri, 15 Feb 2013 13:27:11 +0000 (13:27 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/interrupt-1.c
gcc/testsuite/gcc.target/arm/interrupt-2.c

index 5d1726f0e89d50e53b6a6658a2b08f06e20b5f11..cbee8ae7e79db71b42a192b701ae2c98c22d2a96 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        PR fortran/56318
index 18379de33d0f6733df4da48bf4ab82d751caf7fe..a38424228cf9571aacf757ed02bf95aadeeeef20 100644 (file)
@@ -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}\\^" } } */
index b979bf17e8a1d077ada035cf294854f3d740492d..61d313053675e3f628b6f51ae63eda40d498af9a 100644 (file)
@@ -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}\\^" } } */