@@ -9,6 +9,7 @@
/* { dg-options "-O -fno-pic" } */
/* { dg-additional-options "-no-pie" { target pie_enabled } } */
/* { dg-require-effective-target nonlocal_goto } */
+/* { dg-skip-if "" { arm*-*-uclinuxfdpiceabi } "*" "" } */
extern void abort (void);
@@ -3,6 +3,7 @@
the call would need an output reload. */
/* { dg-do run } */
/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+/* { dg-skip-if "r9 is reserved in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */
extern void abort (void);
typedef void (*callback) (void);
@@ -1,3 +1,4 @@
+/* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-options "-fPIC -mno-pic-data-is-text-relative -mno-single-pic-base" } */
/* { dg-final { scan-assembler-not "j-\\(.LPIC" } } */
/* { dg-final { scan-assembler "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */
@@ -1,3 +1,4 @@
+/* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-options "-fPIC -mpic-data-is-text-relative" } */
/* { dg-final { scan-assembler "j-\\(.LPIC" } } */
/* { dg-final { scan-assembler-not "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */
@@ -14,4 +14,4 @@ tr4 (short array[], int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */
-/* { dg-final { object-size text <= 26 { target arm_thumb2 } } } */
+/* { dg-final { object-size text <= 26 { target { arm_thumb2 && { ! arm*-*-uclinuxfdpiceabi } } } } } */
@@ -16,4 +16,4 @@ tr3 (short array[], unsigned int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <x" 0 "ivopts"} } */
/* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
-/* { dg-final { object-size text <= 30 { target arm_thumb2 } } } */
+/* { dg-final { object-size text <= 30 { target { arm_thumb2 && { ! arm*-*-uclinuxfdpiceabi } } } } } */
@@ -17,4 +17,4 @@ tr2 (int array[], int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <x" 0 "ivopts"} } */
/* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
-/* { dg-final { object-size text <= 36 { target arm_thumb2 } } } */
+/* { dg-final { object-size text <= 36 { target { arm_thumb2 && { ! arm*-*-uclinuxfdpiceabi } } } } } */
@@ -16,4 +16,4 @@ tr1 (int array[], unsigned int n)
/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
/* { dg-final { scan-tree-dump-times "PHI <x" 0 "ivopts"} } */
/* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
-/* { dg-final { object-size text <= 30 { target arm_thumb2 } } } */
+/* { dg-final { object-size text <= 30 { target { arm_thumb2 && { ! arm*-*-uclinuxfdpiceabi } } } } } */
@@ -9,6 +9,7 @@
/* { dg-require-effective-target arm32 } */
/* { dg-require-effective-target arm_iwmmxt_ok } */
/* { dg-final { scan-assembler "push.*ip,\[ ]*pc" } } */
+/* { dg-skip-if "r9 is reserved in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* This function uses all the call-saved registers, namely r4, r5, r6,
r7, r8, r9, sl, fp. Since we also save lr, that leaves an odd
@@ -1,4 +1,5 @@
/* { dg-skip-if "need at least armv5te" { *-*-* } { "-march=armv[234]*" "-mthumb" } { "" } } */
+/* { dg-skip-if "FDPIC does not support armv5te" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-options "-O2 -march=armv5te -marm" } */
/* { dg-final { scan-assembler "bx" } } */
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-skip-if "need at least armv5" { *-*-* } { "-march=armv[234]*" } { "" } } */
+/* { dg-skip-if "FDPIC does not support armv5te" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-require-effective-target arm_arch_v5te_ok } */
/* { dg-options "-O2" } */
/* { dg-add-options arm_arch_v5te } */
@@ -24,4 +24,4 @@ foo4 ()
/* { dg-final { scan-assembler-times "sub" 1 } } */
/* { dg-final { scan-assembler-times "cmp" 0 } } */
-/* { dg-final { object-size text <= 30 } } */
+/* { dg-final { object-size text <= 30 { target { ! arm*-*-uclinuxfdpiceabi } } } } */
@@ -29,4 +29,4 @@ int getFileStartAndLength (int fd, int *start_, size_t *length_)
/* { dg-final { scan-assembler-times "pop" 2 } } */
/* { dg-final { scan-assembler-times "beq" 3 } } */
-/* { dg-final { object-size text <= 54 } } */
+/* { dg-final { object-size text <= 54 { target { ! arm*-*-uclinuxfdpiceabi } } } } */
@@ -1,8 +1,8 @@
/* { dg-do compile } */
/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
/* { dg-options "-mthumb -Os" } */
-/* { dg-final { scan-assembler "push\t\{r3" } } */
-/* { dg-final { scan-assembler-not "\[^\-\]r8" } } */
+/* { dg-final { scan-assembler "push\t\{r3" { target { ! arm*-*-uclinuxfdpiceabi } } } } */
+/* { dg-final { scan-assembler-not "\[^\-\]r8" { target { ! arm*-*-uclinuxfdpiceabi } } } } */
extern int hist_verify;
extern int a1;
@@ -1,8 +1,8 @@
/* { dg-do compile } */
/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
/* { dg-options "-mthumb -Os" } */
-/* { dg-final { scan-assembler "push\t\{r3" } } */
-/* { dg-final { scan-assembler-not "\[^\-\]r8" } } */
+/* { dg-final { scan-assembler "push\t\{r3" { target { ! arm*-*-uclinuxfdpiceabi } } } } */
+/* { dg-final { scan-assembler-not "\[^\-\]r8" { target { ! arm*-*-uclinuxfdpiceabi } } } } */
extern int hist_verify;
extern int a1;
@@ -1,5 +1,6 @@
/* PR target/61948 */
/* { dg-do compile } */
+/* { dg-skip-if "r9 is reserved in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-require-effective-target arm_thumb2_ok } */
/* { dg-options "-O2 -mthumb" } */
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "r9 is reserved in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-options "-O2" } */
__attribute__ ((noinline, noclone)) void
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
+/* { dg-skip-if "r9 is reserved in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-options "-mthumb -O2 -mtpcs-leaf-frame" } */
__attribute__ ((noinline, noclone)) void
@@ -1,5 +1,6 @@
/* { dg-do compile { target { arm32 } } } */
/* { dg-options "-O2" } */
+/* { dg-skip-if "FDPIC does not support sibcall optimization" { arm*-*-uclinuxfdpiceabi } "*" "" } */
#define noinline __attribute__((noinline))
@@ -1,7 +1,7 @@
/* No stack red zone. PR38644. */
/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
/* { dg-options "-mthumb -O2" } */
-/* { dg-final { scan-assembler "ldrb\[^\n\]*\\n\[\t \]*add\[\t \]*sp" } } */
+/* { dg-final { scan-assembler "ldrb\[^\n\]*\\n\[\t \]*add\[\t \]*sp" { target { ! arm*-*-uclinuxfdpiceabi } } } } */
extern int doStreamReadBlock (int *, char *, int size, int);
@@ -1,4 +1,5 @@
/* { dg-skip-if "need at least armv5te" { *-*-* } { "-march=armv[234]*" "-mthumb" } { "" } } */
+/* { dg-skip-if "FDPIC does not support tailcall optimization" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-options "-O2 -march=armv5te -marm" } */
/* { dg-final { scan-assembler "bx" } } */
/* { dg-final { scan-assembler-not "blx" } } */
@@ -2,6 +2,7 @@
/* { dg-do assemble } */
/* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */
+/* { dg-skip-if "FDPIC does not support gnu2 TLS dialect" { arm*-*-uclinuxfdpiceabi } "*" "" } */
typedef struct _IO_FILE FILE;
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "FDPIC does not support sibcall optimization" { arm*-*-uclinuxfdpiceabi } "*" "" } */
/* { dg-options "-mapcs-frame -O -foptimize-sibling-calls -ffunction-sections" } */
extern void abort (void);
From: Christophe Lyon <christophe.lyon@linaro.org> Several tests cannot work on ARM-FDPIC for various reasons: skip them, or skip some directives. gcc.dg/20020312-2.c: Skip since it forces -fno-pic. gcc.target/arm/: * Skip since r9 is clobbered by assembly code: 20051215-1.c mmx-1.c pr61948.c pr77933-1.c pr77933-2.c * Skip since the test forces armv5te which is not supported by FDPIC: pr40887.c pr19599.c * Skip since FDPIC disables sibcall to external functions: sibcall-1.c tail-long-call vfp-longcall-apcs * Skip size check since it's different for FDPIC: ivopts-2.c ivopts-3.c ivopts-4.c ivopts-5.c pr43597.c pr43920-2.c * Disable assembler scanning invalid for FDPIC: pr45701-1.c pr45701-2.c stack-red-zone.c * gnu2 TLS dialect is not supported by FDPIC: tlscall.c * Test relies on symbols not generated in FDPIC: data-rel-2.c data-rel-3.c 2019-XX-XX Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> gcc/testsuite/ * gcc.dg/20020312-2.c: Skip on arm*-*-uclinuxfdpiceabi. * gcc.target/arm/20051215-1.c: Likewise. * gcc.target/arm/mmx-1.c: Likewise. * gcc.target/arm/pr19599.c: Likewise. * gcc.target/arm/pr40887.c: Likewise. * gcc.target/arm/pr61948.c: Likewise. * gcc.target/arm/pr77933-1.c: Likewise. * gcc.target/arm/pr77933-2.c: Likewise. * gcc.target/arm/sibcall-1.c: Likewise. * gcc.target/arm/data-rel-2.c: Likewise. * gcc.target/arm/data-rel-3.c: Likewise. * gcc.target/arm/tail-long-call: Likewise. * gcc.target/arm/tlscall.c: Likewise. * gcc.target/arm/vfp-longcall-apcs: Likewise. * gcc.target/arm/ivopts-2.c: Skip object-size test on arm*-*-uclinuxfdpiceabi. * gcc.target/arm/ivopts-3.c: Likewise. * gcc.target/arm/ivopts-4.c: Likewise. * gcc.target/arm/ivopts-5.c: Likewise. * gcc.target/arm/pr43597.c: Likewise. * gcc.target/arm/pr43920-2.c: Likewise. * gcc.target/arm/pr45701-1.c: Skip scan-assembler on arm*-*-uclinuxfdpiceabi. * gcc.target/arm/pr45701-2.c: Likewise. * gcc.target/arm/stack-red-zone.c: Likewise. Change-Id: Icada7ce52537901fdac10403e7997571b7e2c509 -- 2.6.3