RFA: Skip SH interrupt tests for PIC flags
Richard Sandiford
richard@codesourcery.com
Sun Aug 12 10:02:00 GMT 2007
gcc.dg has several SH interrupt tests that fail on VxWorks for -mrtp -fPIC.
Of course, interrupt functions are not something you'd normally use SVR4-
or RTP-style PIC for, but for completeness:
attr-isr-nosave_low_regs.c
pragma-isr-nosave_low_regs.c
- Checks that we don't save and restore r8-r13, but we need to
save and restore r12 (the global pointer).
- Checks that a low register doesn't appear before a comma,
but r0 appears in "(r0,r12)" GOT accesses.
attr-isr-trapa.c
pragma-isr-trapa.c
- Checks that there are no occurences of r8-r13, but we again
need r12.
attr-isr.c
pragma-isr-trapa2.c
- As for attr-isr-trapa.c.
- Checks for a certain number of low-register references, but GOT
loads mean that there are more "r0,"s than expected.
Is the patch below OK? Tested on sh-wrs-vxworks.
Richard
gcc/testsuite/
* gcc.dg/attr-isr.c: Skip for PIC.
* gcc.dg/attr-isr-nosave_low_regs.c: Likewise.
* gcc.dg/attr-isr-trapa.c: Likewise.
* gcc.dg/pragma-isr-nosave_low_regs.c: Likewise.
* gcc.dg/pragma-isr-trapa.c: Likewise.
* gcc.dg/pragma-isr-trapa2.c: Likewise.
Index: gcc/testsuite/gcc.dg/attr-isr.c
===================================================================
--- gcc/testsuite/gcc.dg/attr-isr.c (revision 127359)
+++ gcc/testsuite/gcc.dg/attr-isr.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
/* { dg-options "-O" } */
extern void foo ();
Index: gcc/testsuite/gcc.dg/attr-isr-nosave_low_regs.c
===================================================================
--- gcc/testsuite/gcc.dg/attr-isr-nosave_low_regs.c (revision 127359)
+++ gcc/testsuite/gcc.dg/attr-isr-nosave_low_regs.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
/* { dg-options "-O" } */
extern void bar ();
Index: gcc/testsuite/gcc.dg/attr-isr-trapa.c
===================================================================
--- gcc/testsuite/gcc.dg/attr-isr-trapa.c (revision 127359)
+++ gcc/testsuite/gcc.dg/attr-isr-trapa.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
/* { dg-options "-O" } */
extern void foo ();
Index: gcc/testsuite/gcc.dg/pragma-isr-nosave_low_regs.c
===================================================================
--- gcc/testsuite/gcc.dg/pragma-isr-nosave_low_regs.c (revision 127359)
+++ gcc/testsuite/gcc.dg/pragma-isr-nosave_low_regs.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
/* { dg-options "-O" } */
extern void foo ();
#pragma interrupt
Index: gcc/testsuite/gcc.dg/pragma-isr-trapa.c
===================================================================
--- gcc/testsuite/gcc.dg/pragma-isr-trapa.c (revision 127359)
+++ gcc/testsuite/gcc.dg/pragma-isr-trapa.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-*} } */
+/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
/* { dg-options "-O" } */
extern void foo ();
#pragma trapa
Index: gcc/testsuite/gcc.dg/pragma-isr-trapa2.c
===================================================================
--- gcc/testsuite/gcc.dg/pragma-isr-trapa2.c (revision 127359)
+++ gcc/testsuite/gcc.dg/pragma-isr-trapa2.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target sh-*-* sh4*-*-*} } */
+/* { dg-do compile { target { { sh-*-* sh4*-*-* } && nonpic } } } */
/* { dg-options "-O -m4" } */
extern void foo ();
More information about the Gcc-patches
mailing list