[ARC] Update target specific tests.
authorClaudiu Zissulescu <claziss@synopsys.com>
Thu, 17 Nov 2016 13:43:20 +0000 (14:43 +0100)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Thu, 17 Nov 2016 13:43:20 +0000 (14:43 +0100)
gcc/testsuite
2016-11-17  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/abitest.S: New file.
* gcc.target/arc/abitest.h: Likewise.
* gcc.target/arc/va_args-1.c: Likewise.
* gcc.target/arc/va_args-2.c: Likewise.
* gcc.target/arc/va_args-3.c: Likewise.
* gcc.target/arc/mcrc.c: Deleted.
* gcc.target/arc/mdsp-packa.c: Likewise.
* gcc.target/arc/mdvbf.c: Likewise.
* gcc.target/arc/mmac-24.c: Likewise.
* gcc.target/arc/mmac-d16.c: Likewise.
* gcc.target/arc/mno-crc.c: Likewise.
* gcc.target/arc/mno-dsp-packa.c: Likewise.
* gcc.target/arc/mno-dvbf.c: Likewise.
* gcc.target/arc/mno-mac-24.c: Likewise.
* gcc.target/arc/mno-mac-d16.c: Likewise.
* gcc.target/arc/mno-rtsc.c: Likewise.
* gcc.target/arc/mno-xy.c: Likewise.
* gcc.target/arc/mrtsc.c: Likewise.
* gcc.target/arc/arc.exp (check_effective_target_arcem):
New function.
(check_effective_target_arc700): Likewise.
(check_effective_target_arc6xx): Likewise.
(check_effective_target_arcmpy): Likewise.
(check_effective_target_archs): Likewise.
(check_effective_target_clmcpu): Likewise.
(check_effective_target_barrelshifter): Likewise.
* gcc.target/arc/barrel-shifter-1.c: Changed.
* gcc.target/arc/builtin_simd.c: Test only for ARC700
cpus.
* gcc.target/arc/cmem-1.c: Changed.
* gcc.target/arc/cmem-2.c: Likewise.
* gcc.target/arc/cmem-3.c: Likewise.
* gcc.target/arc/cmem-4.c: Likewise.
* gcc.target/arc/cmem-5.c: Likewise.
* gcc.target/arc/cmem-6.c: Likewise.
* gcc.target/arc/cmem-7.c: Likewise.
* gcc.target/arc/interrupt-1.c: Test for RTIE as well.
* gcc.target/arc/interrupt-2.c: Skip it for ARCv2 cores.
* gcc.target/arc/interrupt-3.c: Match also ARCv2
warnings.
* gcc.target/arc/jump-around-jump.c: Update options.
* gcc.target/arc/mARC601.c: Changed.
* gcc.target/arc/mcpu-arc600.c: Changed.
* gcc.target/arc/mcpu-arc601.c: Changed.
* gcc.target/arc/mcpu-arc700.c: Changed.
* gcc.target/arc/mdpfp.c: Skip for ARCv2 cores.
* gcc.target/arc/movb-1.c: Changed.
* gcc.target/arc/movb-2.c: Likewise.
* gcc.target/arc/movb-3.c: Likewise.
* gcc.target/arc/movb-4.c: Likewise.
* gcc.target/arc/movb-5.c: Likewise.
* gcc.target/arc/movb_cl-1.c: Likewise.
* gcc.target/arc/movb_cl-2.c: Likewise.
* gcc.target/arc/movbi_cl-1.c: Likewise.
* gcc.target/arc/movh_cl-1.c: Likewise.
* gcc.target/arc/mspfp.c: Skip for ARC HS cores.
* gcc.target/arc/mul64.c: Enable it only for ARC600.
* gcc.target/arc/mulsi3_highpart-1.c: Scan for ARCv2
instructions.
* gcc.target/arc/mulsi3_highpart-2.c: Skip it for ARCv1
cores.
* gcc.target/arc/no-dpfp-lrsr.c: Skip it for ARC HS.
* gcc.target/arc/trsub.c: Only for ARC EM cores.
* gcc.target/arc/builtin_simdarc.c: Changed.
* gcc.target/arc/extzv-1.c: Likewise.
* gcc.target/arc/insv-1.c: Likewise.
* gcc.target/arc/insv-2.c: Likewise.
* gcc.target/arc/mA6.c: Likewise.
* gcc.target/arc/mA7.c: Likewise.
* gcc.target/arc/mARC600.c: Likewise.
* gcc.target/arc/mARC700.c: Likewise.
* gcc.target/arc/mcpu-arc600.c: Likewise.
* gcc.target/arc/mcpu-arc700.c: Likewise.
* gcc.target/arc/movl-1.c: Likewise.
* gcc.target/arc/nps400-1.c: Likewise.
* gcc.target/arc/trsub.c: Likewise.
* gcc.target/arc/barrel-shifter-2.c: Check for barrel
shifter configuration.
* gcc.target/arc/mlock.c: Skip for arc6xx
configurations.
* gcc.target/arc/mswape.c: Likewise.

From-SVN: r242545

66 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/abitest.S [new file with mode: 0644]
gcc/testsuite/gcc.target/arc/abitest.h [new file with mode: 0644]
gcc/testsuite/gcc.target/arc/arc.exp
gcc/testsuite/gcc.target/arc/barrel-shifter-1.c
gcc/testsuite/gcc.target/arc/barrel-shifter-2.c
gcc/testsuite/gcc.target/arc/builtin_simd.c
gcc/testsuite/gcc.target/arc/builtin_simdarc.c
gcc/testsuite/gcc.target/arc/cmem-1.c
gcc/testsuite/gcc.target/arc/cmem-2.c
gcc/testsuite/gcc.target/arc/cmem-3.c
gcc/testsuite/gcc.target/arc/cmem-4.c
gcc/testsuite/gcc.target/arc/cmem-5.c
gcc/testsuite/gcc.target/arc/cmem-6.c
gcc/testsuite/gcc.target/arc/cmem-7.c
gcc/testsuite/gcc.target/arc/extzv-1.c
gcc/testsuite/gcc.target/arc/insv-1.c
gcc/testsuite/gcc.target/arc/insv-2.c
gcc/testsuite/gcc.target/arc/interrupt-1.c
gcc/testsuite/gcc.target/arc/interrupt-2.c
gcc/testsuite/gcc.target/arc/interrupt-3.c
gcc/testsuite/gcc.target/arc/jump-around-jump.c
gcc/testsuite/gcc.target/arc/mA6.c
gcc/testsuite/gcc.target/arc/mA7.c
gcc/testsuite/gcc.target/arc/mARC600.c
gcc/testsuite/gcc.target/arc/mARC601.c
gcc/testsuite/gcc.target/arc/mARC700.c
gcc/testsuite/gcc.target/arc/mcpu-arc600.c
gcc/testsuite/gcc.target/arc/mcpu-arc601.c
gcc/testsuite/gcc.target/arc/mcpu-arc700.c
gcc/testsuite/gcc.target/arc/mcrc.c [deleted file]
gcc/testsuite/gcc.target/arc/mdpfp.c
gcc/testsuite/gcc.target/arc/mdsp-packa.c [deleted file]
gcc/testsuite/gcc.target/arc/mdvbf.c [deleted file]
gcc/testsuite/gcc.target/arc/mlock.c
gcc/testsuite/gcc.target/arc/mmac-24.c [deleted file]
gcc/testsuite/gcc.target/arc/mmac-d16.c [deleted file]
gcc/testsuite/gcc.target/arc/mno-crc.c [deleted file]
gcc/testsuite/gcc.target/arc/mno-dsp-packa.c [deleted file]
gcc/testsuite/gcc.target/arc/mno-dvbf.c [deleted file]
gcc/testsuite/gcc.target/arc/mno-mac-24.c [deleted file]
gcc/testsuite/gcc.target/arc/mno-mac-d16.c [deleted file]
gcc/testsuite/gcc.target/arc/mno-rtsc.c [deleted file]
gcc/testsuite/gcc.target/arc/mno-xy.c [deleted file]
gcc/testsuite/gcc.target/arc/movb-1.c
gcc/testsuite/gcc.target/arc/movb-2.c
gcc/testsuite/gcc.target/arc/movb-3.c
gcc/testsuite/gcc.target/arc/movb-4.c
gcc/testsuite/gcc.target/arc/movb-5.c
gcc/testsuite/gcc.target/arc/movb_cl-1.c
gcc/testsuite/gcc.target/arc/movb_cl-2.c
gcc/testsuite/gcc.target/arc/movbi_cl-1.c
gcc/testsuite/gcc.target/arc/movh_cl-1.c
gcc/testsuite/gcc.target/arc/movl-1.c
gcc/testsuite/gcc.target/arc/mrtsc.c [deleted file]
gcc/testsuite/gcc.target/arc/mspfp.c
gcc/testsuite/gcc.target/arc/mswape.c
gcc/testsuite/gcc.target/arc/mul64.c
gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c
gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c
gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c
gcc/testsuite/gcc.target/arc/nps400-1.c
gcc/testsuite/gcc.target/arc/trsub.c
gcc/testsuite/gcc.target/arc/va_args-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arc/va_args-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arc/va_args-3.c [new file with mode: 0644]

index 0a0a1b57e20e181a835bc17200dd5cfb7e7a0c1d..5063e51ebd6bf844c69219b6a77cf384349c9b0f 100644 (file)
@@ -1,3 +1,82 @@
+2016-11-17  Claudiu Zissulescu  <claziss@synopsys.com>
+
+       * gcc.target/arc/abitest.S: New file.
+       * gcc.target/arc/abitest.h: Likewise.
+       * gcc.target/arc/va_args-1.c: Likewise.
+       * gcc.target/arc/va_args-2.c: Likewise.
+       * gcc.target/arc/va_args-3.c: Likewise.
+       * gcc.target/arc/mcrc.c: Deleted.
+       * gcc.target/arc/mdsp-packa.c: Likewise.
+       * gcc.target/arc/mdvbf.c: Likewise.
+       * gcc.target/arc/mmac-24.c: Likewise.
+       * gcc.target/arc/mmac-d16.c: Likewise.
+       * gcc.target/arc/mno-crc.c: Likewise.
+       * gcc.target/arc/mno-dsp-packa.c: Likewise.
+       * gcc.target/arc/mno-dvbf.c: Likewise.
+       * gcc.target/arc/mno-mac-24.c: Likewise.
+       * gcc.target/arc/mno-mac-d16.c: Likewise.
+       * gcc.target/arc/mno-rtsc.c: Likewise.
+       * gcc.target/arc/mno-xy.c: Likewise.
+       * gcc.target/arc/mrtsc.c: Likewise.
+       * gcc.target/arc/arc.exp (check_effective_target_arcem): New
+       function.
+       (check_effective_target_arc700): Likewise.
+       (check_effective_target_arc6xx): Likewise.
+       (check_effective_target_arcmpy): Likewise.
+       (check_effective_target_archs): Likewise.
+       (check_effective_target_clmcpu): Likewise.
+       (check_effective_target_barrelshifter): Likewise.
+       * gcc.target/arc/barrel-shifter-1.c: Changed.
+       * gcc.target/arc/builtin_simd.c: Test only for ARC700 cpus.
+       * gcc.target/arc/cmem-1.c: Changed.
+       * gcc.target/arc/cmem-2.c: Likewise.
+       * gcc.target/arc/cmem-3.c: Likewise.
+       * gcc.target/arc/cmem-4.c: Likewise.
+       * gcc.target/arc/cmem-5.c: Likewise.
+       * gcc.target/arc/cmem-6.c: Likewise.
+       * gcc.target/arc/cmem-7.c: Likewise.
+       * gcc.target/arc/interrupt-1.c: Test for RTIE as well.
+       * gcc.target/arc/interrupt-2.c: Skip it for ARCv2 cores.
+       * gcc.target/arc/interrupt-3.c: Match also ARCv2 warnings.
+       * gcc.target/arc/jump-around-jump.c: Update options.
+       * gcc.target/arc/mARC601.c: Changed.
+       * gcc.target/arc/mcpu-arc600.c: Changed.
+       * gcc.target/arc/mcpu-arc601.c: Changed.
+       * gcc.target/arc/mcpu-arc700.c: Changed.
+       * gcc.target/arc/mdpfp.c: Skip for ARCv2 cores.
+       * gcc.target/arc/movb-1.c: Changed.
+       * gcc.target/arc/movb-2.c: Likewise.
+       * gcc.target/arc/movb-3.c: Likewise.
+       * gcc.target/arc/movb-4.c: Likewise.
+       * gcc.target/arc/movb-5.c: Likewise.
+       * gcc.target/arc/movb_cl-1.c: Likewise.
+       * gcc.target/arc/movb_cl-2.c: Likewise.
+       * gcc.target/arc/movbi_cl-1.c: Likewise.
+       * gcc.target/arc/movh_cl-1.c: Likewise.
+       * gcc.target/arc/mspfp.c: Skip for ARC HS cores.
+       * gcc.target/arc/mul64.c: Enable it only for ARC600.
+       * gcc.target/arc/mulsi3_highpart-1.c: Scan for ARCv2 instructions.
+       * gcc.target/arc/mulsi3_highpart-2.c: Skip it for ARCv1 cores.
+       * gcc.target/arc/no-dpfp-lrsr.c: Skip it for ARC HS.
+       * gcc.target/arc/trsub.c: Only for ARC EM cores.
+       * gcc.target/arc/builtin_simdarc.c: Changed.
+       * gcc.target/arc/extzv-1.c: Likewise.
+       * gcc.target/arc/insv-1.c: Likewise.
+       * gcc.target/arc/insv-2.c: Likewise.
+       * gcc.target/arc/mA6.c: Likewise.
+       * gcc.target/arc/mA7.c: Likewise.
+       * gcc.target/arc/mARC600.c: Likewise.
+       * gcc.target/arc/mARC700.c: Likewise.
+       * gcc.target/arc/mcpu-arc600.c: Likewise.
+       * gcc.target/arc/mcpu-arc700.c: Likewise.
+       * gcc.target/arc/movl-1.c: Likewise.
+       * gcc.target/arc/nps400-1.c: Likewise.
+       * gcc.target/arc/trsub.c: Likewise.
+       * gcc.target/arc/barrel-shifter-2.c: Check for barrel shifter
+       configuration.
+       * gcc.target/arc/mlock.c: Skip for arc6xx configurations.
+       * gcc.target/arc/mswape.c: Likewise.
+
 2016-11-17  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/68180
diff --git a/gcc/testsuite/gcc.target/arc/abitest.S b/gcc/testsuite/gcc.target/arc/abitest.S
new file mode 100644 (file)
index 0000000..7be935b
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-do assemble } */
+#ifndef ENTRY
+#define ENTRY(nm)               \
+        .text `                 \
+        .align 4 `              \
+        .globl nm `             \
+        .type nm,@function `    \
+nm:
+#endif
+
+#ifndef END
+#define END(name)       .size name,.-name
+#endif
+
+ENTRY(tsyscall)
+ENTRY(clone)
+       add     r0,r0,r1
+       add     r0,r0,r2
+       add     r0,r0,r3
+       add     r0,r0,r4
+       add     r0,r0,r5
+       j_s.d   [blink]
+       add     r0,r0,r6
+END(tsyscall)
+END(clone)
+
+ENTRY(abidi)
+       add.f r0,r1,1
+        j_s.d [blink]
+        adc r1,r2,0
+END(abidi)
diff --git a/gcc/testsuite/gcc.target/arc/abitest.h b/gcc/testsuite/gcc.target/arc/abitest.h
new file mode 100644 (file)
index 0000000..26de3e4
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _DG_ABITEST_H
+#define _DG_ABITEST_H 1
+
+#ifdef  __ASSEMBLER__
+
+#define ENTRY(nm)               \
+        .text `                 \
+        .align 4 `              \
+        .globl nm `             \
+        .type nm,@function `    \
+nm:
+
+#define END(name)       .size name,.-name
+
+#endif /* __ASSEMBLER __*/
+
+#endif /*_DG_ABITEST_H*/
index fae2ece7f6f326553456852a49adc55c1ce821d3..62583cd0321ed5aabdd5d897c0bc63dd14f947ff 100644 (file)
@@ -4,12 +4,12 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
@@ -24,6 +24,76 @@ if ![istarget arc*-*-*] then {
 # Load support procs.
 load_lib gcc-dg.exp
 
+# Return 1 if this is a compiler supporting ARCv2 EM as default processor
+proc check_effective_target_arcem { } {
+    return [check_no_compiler_messages arcem assembly {
+       #if !defined(__ARCEM__)
+       #error No ARC EM
+       #endif
+    }]
+}
+
+# Return 1 if we compile for ARC700
+proc check_effective_target_arc700 { } {
+    return [check_no_compiler_messages arc700 assembly {
+       #if !defined(__ARC700__)
+       #error No ARC 700
+       #endif
+    }]
+}
+
+# Return 1 if we compile for ARC6xx
+proc check_effective_target_arc6xx { } {
+    return [check_no_compiler_messages arc6xx assembly {
+       #if !defined(__ARC600__) && !defined(__ARC601__)
+       #error No ARC 6xx
+       #endif
+    }]
+}
+
+# Return 1 if we have mpy
+proc check_effective_target_arcmpy { } {
+    return [check_no_compiler_messages arcmpy assembly {
+       #if !defined(__ARC_MPY__)
+       #error No MPY
+       #endif
+    }]
+}
+
+# Return 1 if this is a compiler supporting ARC HS as default processor
+proc check_effective_target_archs { } {
+    return [check_no_compiler_messages archs assembly {
+       #if !defined(__ARCHS__)
+       #error No ARC HS
+       #endif
+    }]
+}
+
+proc check_cl { flags } {
+    return [check_no_compiler_messages check_$flags assembly {
+       #if !defined(__arc__)
+       #error Extra mcpu options
+       #endif
+    } "$flags"]
+}
+
+# Return 1 if there are no extra mcpu options given via command line
+proc check_effective_target_clmcpu { } {
+    if { [check_cl "-mcpu=arc700"]
+        && [check_cl "-mcpu=arcem" ] } {
+       return 1
+    }
+    return 0
+}
+
+proc check_effective_target_barrelshifter { } {
+    return [check_no_compiler_messages barrelshifter assembly {
+       #if !defined(__ARC_BARREL_SHIFTER__)
+       #error No barrel shifter for this confi
+       #endif
+    }]
+}
+
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
 if ![info exists DEFAULT_CFLAGS] then {
index a0eb6d70c39e20df8d9cf5bf76b57ee0785e027c..5cfb282f6ac7b64c4cedd791e778990dfc5b21fe 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ARC601 -mbarrel-shifter" } */
+/* { dg-options "-O2 -mbarrel-shifter" } */
 int i;
 
 int f (void)
index 97998fbf1a38c3241bc11cb40648db41f2860a38..8e0bb9a8a60bbddee0ebe2fb4ac846a0439a0ef1 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { barrelshifter } } } */
 int i;
 
 int f (void)
index fff27a479607f95e4ac1e35f3a463e24302592ab..6b0252186c69b5b38c9e1de404be7b81dacb709d 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-O2 -Werror-implicit-function-declaration -mARC700 -msimd" } */
 
 #define STEST1(name, rettype, op1)             \
index 68aae40ca58e99f3d2faed72ad6154c89e5d363c..0cfe2ad767d4be777980039567a357158a78143e 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=archs -O2 -Werror-implicit-function-declaration -mmpy-option=9" } */
 
 #define STEST(name, rettype, op1type, op2type) \
index 7f36afbfa7d8b8a7c558f921934c95fe2ee84ff2..8ed5dcf2f019443a1cb11ab25425b46c2803444b 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mcmem" } */
 
 #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem")));
index a3d7c130b5e894f9b8fdfc00968b08366f9869c2..39bfb2885c780f47ae1546da7a291553eacb478f 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mcmem" } */
 
 #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem")));
index dee73b5c5d30d6d96c20a61c32378c1cbb8ca4e5..109084f01fb35614610236a220e60b996e731ef6 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mcmem" } */
 
 #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_private")));
index 1da6bce77c48f5a7bfb9200bb7dead8deac566c1..4ac8a22f231348a9e1c7092c90c2058516927732 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mcmem" } */
 
 #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_private")));
index ad6904f7360538488ab3e88af839f51aa045c624..451218b97651532cea7a6e6531ccd5d8d19be226 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mcmem" } */
 
 #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_shared")));
index 24bc39bfd07cac337ab89baf5aec2c0c6b040c19..0ed06085514b833121d0700a28855077796cb783 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mcmem" } */
 
 #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_shared")));
index 72ee7bdffafbff0cdf0f3b559ae9ed75b0710fa4..026732711728691a53e7615e673658c24f6ffb29 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mcmem" } */
 
 struct some_struct
index 242f522f187e155964fd715221f3b6140236e8ea..1e5533a72bb7347d3506a564b623c50ab1c47bf9 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct foo { unsigned a: 3, b: 5, c: 24; };
index 75d47e9b1b3f79f902a4726cee408ba9e50c378e..29e4188a2e2b19cb8817e09b0d9796d3762049ee 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 /* ??? Irrespective of insn set, generated code for this is a mess.  */
index 16525511698c0a3958b597e56960b19e26c0953f..620acecc2e2f91b0076e99354fb42cec7ec84bc7 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct foo { unsigned a: 3, b: 8, c: 21; } bar;
index 70514572ea564eae1d55c7814e532806ae1cd334..8a2002bf1c0ff26391ee9fc3211cef71d636374a 100644 (file)
@@ -1,5 +1,10 @@
+#if defined (__ARCHS__) || defined (__ARCEM__)
+void __attribute__ ((interrupt("ilink")))
+#else
 void __attribute__ ((interrupt("ilink1")))
+#endif
 handler1 (void)
 {
 }
-/* { dg-final { scan-assembler-times "j.*\[ilink1\]" 1 } } */
+/* { dg-final { scan-assembler-times "j.*\[ilink1\]" 1 { target { arc700 || arc6xx } } } } */
+/* { dg-final { scan-assembler-times "rtie" 1 { target { arcem || archs } } } } */
index ee8593b303919932ed401d0f37ebaf564c0ea1f6..285ebd57a220ca34e5c0aba201276f1cb40142aa 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-skip-if "ilink2 is not an ARCv2 register" { archs || arcem } } */
 void __attribute__ ((interrupt("ilink2")))
 handler1 (void)
 {
index fa598d67e6b1bfce4ae90af892bca1888b8093d7..b0cad88de95ea5b801f4b478bae50fc533223d4e 100644 (file)
@@ -5,7 +5,7 @@ handler0 (void)
 
 void __attribute__ ((interrupt("you load too")))
 handler1 (void)
-{ /* { dg-warning "is not \"ilink1\" or \"ilink2\"" } */
+{ /* { dg-warning "is not \"ilink" } */
 }
 
 void __attribute__ ((interrupt(42)))
index 338c66752385c5f53533063d23094a98dcd0992b..2fd3fb644c16b384a1726f4dc869bdbe045f48cd 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Os -mlock -mswape -mrtsc -fno-reorder-blocks" } */
+/* { dg-options "-Os -mlock -mswape -fno-reorder-blocks" } */
 
 /* This caused an ICE in arc_ifcvt when the 1->3 state change was not
    implemented for TYPE_UNCOND_BRANCH in arc_ccfsm_post_advance.  */
index 2e15a86f8a4d165237c70bd565ae6707c61d0e1f..c4eeb6feadcba489d864ab17edd9595ae08e2cf4 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mA6" } */
 
 /* { dg-final { scan-assembler ".cpu ARC600" } } */
index c4430f43b416f6cde1159ad833410b0bd8291488..a3c6f8204afb0744cf147878a1831ee613ff9aee 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mA7" } */
 
 /* { dg-final { scan-assembler ".cpu ARC700" } } */
index 20e086aa754f9e0040a9f52a46b4670c42944789..6a80457b19459aa73b9a5b015effb83754ed26e0 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mARC600" } */
 
 /* { dg-final { scan-assembler ".cpu ARC600" } } */
index 1d30da4cafb17823b21a25e04ccbe7a820070722..d2386613eb0818ba69ab0d658c82bdeeeb424c1c 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mARC601" } */
 
-/* { dg-final { scan-assembler ".cpu ARC601" } } */
+/* { dg-final { scan-assembler ".cpu ARC60.*" } } */
index 43e9baa3f3015e1e1ccb82f7785a994470c36490..d34583f46aa1d3ec2571bcdd26f3e547f6b72ce6 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mARC700" } */
 
 /* { dg-final { scan-assembler ".cpu ARC700" } } */
index 4c915fda0e388e253de500dbab114a273c2755e8..bd1dc9599a6da152cdc1bb56d4ccdb1b38901a11 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mcpu=ARC600" } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
+/* { dg-options "-mcpu=arc600" } */
 
 /* { dg-final { scan-assembler ".cpu ARC600" } } */
index 7c93c9dc4acfc984dd406246b06a47f3347810e7..8ef046efb86746e8124a95b8a4dc67b274065af3 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mcpu=ARC601" } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
+/* { dg-options "-mcpu=arc601" } */
 
-/* { dg-final { scan-assembler ".cpu ARC601" } } */
+/* { dg-final { scan-assembler ".cpu ARC60.*" } } */
index c805a5af76b1fcdd1127acfd5885660913d630b5..25bb40029864556d504403442e3b509ebdbb76ec 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mcpu=ARC700" } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
+/* { dg-options "-mcpu=arc700" } */
 
 /* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mcrc.c b/gcc/testsuite/gcc.target/arc/mcrc.c
deleted file mode 100644 (file)
index a449bdd..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/* { dg-options "-mcrc" } */
-/* { dg-do assemble } */
-
-int f (int i)
-{
-  __asm__("crc %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
index 4bbc9057b85677a464c8594ebdcbecff3151274a..aa6bdfa1c51fe576f0f26e15d5c39bf33ec13794 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "FPX cannot execute on ARC HS" { archs } } */
 /* { dg-options "-O2 -mdpfp" } */
 
 double i;
diff --git a/gcc/testsuite/gcc.target/arc/mdsp-packa.c b/gcc/testsuite/gcc.target/arc/mdsp-packa.c
deleted file mode 100644 (file)
index f013a6d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mdsp-packa" } */
-/* { dg-do assemble } */
-
-int f (int i)
-{
-  __asm__("minidl %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mdvbf.c b/gcc/testsuite/gcc.target/arc/mdvbf.c
deleted file mode 100644 (file)
index e2e545e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mdvbf" } */
-/* { dg-do assemble } */
-
-int f (int i)
-{
-  __asm__("vbfdw %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
index e207f91cddec5446103dc4431da4314bb7223403..708fb092409f674a3addb5a343ef66842b9c7d76 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-options "-mlock" } */
 /* { dg-do assemble } */
+/* { dg-skip-if "" { arc6xx } } */
 
 int f (void *p)
 {
diff --git a/gcc/testsuite/gcc.target/arc/mmac-24.c b/gcc/testsuite/gcc.target/arc/mmac-24.c
deleted file mode 100644 (file)
index 89da0b1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/* { dg-options "-mmac-24" } */
-/* { dg-do assemble } */
-
-int f (int i)
-{
-  __asm__("mult %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mmac-d16.c b/gcc/testsuite/gcc.target/arc/mmac-d16.c
deleted file mode 100644 (file)
index 0570011..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mmac-d16" } */
-/* { dg-do assemble } */
-
-int f (int i)
-{
-  __asm__("muldw %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mno-crc.c b/gcc/testsuite/gcc.target/arc/mno-crc.c
deleted file mode 100644 (file)
index 70ab9c1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mno-crc" } */
-/* Would also like to assemble and check that we get the expected
-   "Error: bad instruction" assembler messages, but at the moment our
-   testharness can't do that.  */
-
-int f (int i)
-{
-  __asm__("crc %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mno-dsp-packa.c b/gcc/testsuite/gcc.target/arc/mno-dsp-packa.c
deleted file mode 100644 (file)
index eb21522..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mno-dsp-packa" } */
-/* Would also like to assemble and check that we get the expected
-   "Error: bad instruction" assembler messages, but at the moment our
-   testharness can't do that.  */
-
-int f (int i)
-{
-  __asm__("minidl %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mno-dvbf.c b/gcc/testsuite/gcc.target/arc/mno-dvbf.c
deleted file mode 100644 (file)
index ea96d98..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mno-dvbf" } */
-/* Would also like to assemble and check that we get the expected
-   "Error: bad instruction" assembler messages, but at the moment our
-   testharness can't do that.  */
-
-int f (int i)
-{
-  __asm__("vbfdw %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mno-mac-24.c b/gcc/testsuite/gcc.target/arc/mno-mac-24.c
deleted file mode 100644 (file)
index b483957..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mno-mac-24" } */
-/* Would also like to assemble and check that we get the expected
-   "Error: bad instruction" assembler messages, but at the moment our
-   testharness can't do that.  */
-
-int f (int i)
-{
-  __asm__("mult %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mno-mac-d16.c b/gcc/testsuite/gcc.target/arc/mno-mac-d16.c
deleted file mode 100644 (file)
index 68a20f4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mno-mac-d16" } */
-/* Would also like to assemble and check that we get the expected
-   "Error: bad instruction" assembler messages, but at the moment our
-   testharness can't do that.  */
-
-int f (int i)
-{
-  __asm__("muldw %1, %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mno-rtsc.c b/gcc/testsuite/gcc.target/arc/mno-rtsc.c
deleted file mode 100644 (file)
index d74a60e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mno-rtsc" } */
-/* Would also like to assemble and check that we get the expected
-   "Error: bad instruction" assembler messages, but at the moment our
-   testharness can't do that.  */
-
-int f (int i)
-{
-  __asm__("rtsc %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
diff --git a/gcc/testsuite/gcc.target/arc/mno-xy.c b/gcc/testsuite/gcc.target/arc/mno-xy.c
deleted file mode 100644 (file)
index e378b3f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mno-xy" } */
-/* Would also like to assemble and check that we get the expected
-   "Error: bad instruction" assembler messages, but at the moment our
-   testharness can't do that.  */
-
-void f (int i)
-{
-  __asm__("add x0_u0, x0_u0, %0" : :  "r" (i));
-}
index 94d9f5fcd5e99da369ee037f1ae38485cc788d6c..37f3fd8b27c4a4b0bd173117da82c24863f5270b 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct { unsigned a: 5, b: 8, c: 19; } foo;
index 708f393497dc724c26921aa626989b8e5a59f3d7..1ac18d05e4c018675bfc71dce5117c9c77a7c570 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct { unsigned a: 23, b: 9; } foo;
index 0895154abb673a47c482500fcde7fdfe00824d80..34145d6cc6f249f4d3f683c9277512bc95a41a88 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct { int a: 23, b: 9; } foo;
index 89bf2c2b1232d43f0981e10ead10cb4cf49b89f9..83efad647d8dbe0f7dce377a79957240c3e1f971 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct { int a: 13, b: 19; } foo;
index d28588807820212c053fef45cc8fd413d807d4b7..c8159feb6032e84cdc8b7a175bbf32e52a12d636 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct { int a: 23, b: 9; } foo;
index 402250ce530238ea1f94790d8ad05a7ee9cbc673..977a0c2fbf02b0be4537f90d49733531db23bb0a 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 int
index d2e5a944a6ea764c351e4edbae144dca6f0de90c..4a1484a3e4c7fabbdb0d74f4a1da83871a717326 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 extern void g (void);
index 3c457dbe528741f233b1f0482915c0ac56012d3a..a86d06f30b4eccaeaa733af22fc96fae7c47af64 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 int
index c6434811e8afd3096ec988c486a759523df1a32d..9c0036c1a3a8c812e46e81c6eb211c863d0d3869 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 struct thing
index f1f0130a2b07a0ac48714aabc8f645444e143135..c44ca8d2ccdec6337eb4b6d05bec77906a37dba8 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
 
 int
diff --git a/gcc/testsuite/gcc.target/arc/mrtsc.c b/gcc/testsuite/gcc.target/arc/mrtsc.c
deleted file mode 100644 (file)
index 15cb939..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/* { dg-options "-mrtsc" } */
-/* { dg-do assemble } */
-
-int f (int i)
-{
-  __asm__("rtsc %1, %1" : "=r"(i) : "r"(i));
-  return i;
-}
index 0e41ff89d351775b842a6d7605084917b00c5661..19cb97828fbba9e1f2ba64708dc0e8e67a9e0591 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "FPX is not an ARC HS extension" { archs } } */
 /* { dg-options "-O2 -mspfp" } */
 
 float i;
index 6d23bde7c294a2f7ca94e743aad846c4d377c856..8763825be0a1a63bbd93c1b3b02ab87000d2fad9 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-options "-mswape" } */
 /* { dg-do assemble } */
+/* { dg-skip-if "" { arc6xx } } */
 
 int f (int i)
 {
index 3678b2799d54911b75d139ef83540c230848341b..fb8e7750c5354e37fdb8f82f20ad915cd4cd9dc5 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mcpu=ARC600 -mmul64" } */
+/* { dg-skip-if "MUL64 is ARC600 extension" { ! { arc6xx } } } */
+/* { dg-options "-O2 -mmul64" } */
+
 #include <stdint.h>
 
 int64_t i;
index 398ecfe948ee8385b7f220c47f4038b6fc200c0a..57cb95b91fc11b12c28d27f520cece9882d3453e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -mARC700 --save-temps" } */
+/* { dg-options "-save-temps -O2" } */
 
 #include <stdlib.h>
 
@@ -25,4 +25,5 @@ main (void)
   return 0;
 }
 
-/* { dg-final { scan-assembler "mpyhu\[ \t\]" } } */
+/* { dg-final { scan-assembler "mpyhu\[ \t\]" { target { arc700 } } } } */
+/* { dg-final { scan-assembler "mpy.u\[ \t\]" { target { { ! { arc700 } } && arcmpy } } } } */
index ccc74e7b1adae3786b0859cc45f11cde6e1e0630..287d96d4ee9af66c1c1c430217794bb3a2337cb7 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -mARC700 --save-temps -mno-mpy" } */
+/* { dg-skip-if "ARC700 always has mpy option on" { arc700 } } */
+/* { dg-skip-if "ARC600 doesn't have mpy instruction" { arc6xx } } */
+/* { dg-options "-O2 --save-temps -mmpy-option=0" } */
 
 #include <stdlib.h>
 
index e4e23e4a40f66138be708e6b9dd6775b55003493..61f07b53aacefc96bcf155eee84a2f105a1532ad 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "FPX cannot execute on ARC HS" { archs } } */
 /* { dg-options "-O2 -mdpfp -mno-dpfp-lrsr" } */
 
 double i;
index f3d62718bb07aac5455c37863ca271cb8d4c28e5..504aad734ccba8ec78a595c84ca1ee4cad702cbc 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mcpu=nps400 -mq-class -mbitops -munaligned-access -mcmem -O2 -fno-strict-aliasing" } */
 
 enum npsdp_mem_space_type {
index 031935fdc8f5ac770ce398e74bbbc0bcd4d773b1..8ea5711c6ee418fd88bd8ddd81bb391160c715ce 100644 (file)
@@ -1,6 +1,7 @@
 /* Tests if we generate rsub instructions when compiling using
    floating point assist instructions.  */
 /* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
 /* { dg-options "-mfpu=fpuda -mcpu=arcem" } */
 
 double foo (double a)
diff --git a/gcc/testsuite/gcc.target/arc/va_args-1.c b/gcc/testsuite/gcc.target/arc/va_args-1.c
new file mode 100644 (file)
index 0000000..4a35d12
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-sources "abitest.S" } */
+
+extern long tsyscall (long int sysnum, ...);
+
+int main (void)
+{
+  long a;
+
+  a = tsyscall (1, 2, 3, 4, 5, 6, 7);
+
+  if (a != 28)
+    return 1;
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arc/va_args-2.c b/gcc/testsuite/gcc.target/arc/va_args-2.c
new file mode 100644 (file)
index 0000000..18f48b0
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-sources "abitest.S" } */
+
+extern int clone(int (*fn)(void *), void *child_stack,
+                int flags, void *arg, ...);
+
+int main (void)
+{
+  int a = clone ((void *) 1, (void *)2, 3, (void *) 4, 5, 6, 7);
+  if (a != 28)
+    return 1;
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arc/va_args-3.c b/gcc/testsuite/gcc.target/arc/va_args-3.c
new file mode 100644 (file)
index 0000000..45624c1
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-sources "abitest.S" } */
+
+extern long long abidi (int a, ...);
+
+int main (void)
+{
+  long long a = 1;
+  a = abidi (10, a);
+
+  if (a != 2)
+    return 1;
+  return 0;
+}