From c867c39d8ae911e8d4c96333e7dc610837bf414e Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Thu, 17 Nov 2016 14:43:20 +0100 Subject: [PATCH] [ARC] Update target specific tests. gcc/testsuite 2016-11-17 Claudiu Zissulescu * 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 --- gcc/testsuite/ChangeLog | 79 +++++++++++++++++++ gcc/testsuite/gcc.target/arc/abitest.S | 31 ++++++++ gcc/testsuite/gcc.target/arc/abitest.h | 17 ++++ gcc/testsuite/gcc.target/arc/arc.exp | 74 ++++++++++++++++- .../gcc.target/arc/barrel-shifter-1.c | 2 +- .../gcc.target/arc/barrel-shifter-2.c | 1 + gcc/testsuite/gcc.target/arc/builtin_simd.c | 1 + .../gcc.target/arc/builtin_simdarc.c | 1 + gcc/testsuite/gcc.target/arc/cmem-1.c | 1 + gcc/testsuite/gcc.target/arc/cmem-2.c | 1 + gcc/testsuite/gcc.target/arc/cmem-3.c | 1 + gcc/testsuite/gcc.target/arc/cmem-4.c | 1 + gcc/testsuite/gcc.target/arc/cmem-5.c | 1 + gcc/testsuite/gcc.target/arc/cmem-6.c | 1 + gcc/testsuite/gcc.target/arc/cmem-7.c | 1 + gcc/testsuite/gcc.target/arc/extzv-1.c | 1 + gcc/testsuite/gcc.target/arc/insv-1.c | 1 + gcc/testsuite/gcc.target/arc/insv-2.c | 1 + gcc/testsuite/gcc.target/arc/interrupt-1.c | 7 +- gcc/testsuite/gcc.target/arc/interrupt-2.c | 1 + gcc/testsuite/gcc.target/arc/interrupt-3.c | 2 +- .../gcc.target/arc/jump-around-jump.c | 2 +- gcc/testsuite/gcc.target/arc/mA6.c | 1 + gcc/testsuite/gcc.target/arc/mA7.c | 1 + gcc/testsuite/gcc.target/arc/mARC600.c | 1 + gcc/testsuite/gcc.target/arc/mARC601.c | 3 +- gcc/testsuite/gcc.target/arc/mARC700.c | 1 + gcc/testsuite/gcc.target/arc/mcpu-arc600.c | 3 +- gcc/testsuite/gcc.target/arc/mcpu-arc601.c | 5 +- gcc/testsuite/gcc.target/arc/mcpu-arc700.c | 3 +- gcc/testsuite/gcc.target/arc/mcrc.c | 8 -- gcc/testsuite/gcc.target/arc/mdpfp.c | 1 + gcc/testsuite/gcc.target/arc/mdsp-packa.c | 9 --- gcc/testsuite/gcc.target/arc/mdvbf.c | 9 --- gcc/testsuite/gcc.target/arc/mlock.c | 1 + gcc/testsuite/gcc.target/arc/mmac-24.c | 8 -- gcc/testsuite/gcc.target/arc/mmac-d16.c | 9 --- gcc/testsuite/gcc.target/arc/mno-crc.c | 11 --- gcc/testsuite/gcc.target/arc/mno-dsp-packa.c | 11 --- gcc/testsuite/gcc.target/arc/mno-dvbf.c | 11 --- gcc/testsuite/gcc.target/arc/mno-mac-24.c | 11 --- gcc/testsuite/gcc.target/arc/mno-mac-d16.c | 11 --- gcc/testsuite/gcc.target/arc/mno-rtsc.c | 11 --- gcc/testsuite/gcc.target/arc/mno-xy.c | 10 --- gcc/testsuite/gcc.target/arc/movb-1.c | 1 + gcc/testsuite/gcc.target/arc/movb-2.c | 1 + gcc/testsuite/gcc.target/arc/movb-3.c | 1 + gcc/testsuite/gcc.target/arc/movb-4.c | 1 + gcc/testsuite/gcc.target/arc/movb-5.c | 1 + gcc/testsuite/gcc.target/arc/movb_cl-1.c | 1 + gcc/testsuite/gcc.target/arc/movb_cl-2.c | 1 + gcc/testsuite/gcc.target/arc/movbi_cl-1.c | 1 + gcc/testsuite/gcc.target/arc/movh_cl-1.c | 1 + gcc/testsuite/gcc.target/arc/movl-1.c | 1 + gcc/testsuite/gcc.target/arc/mrtsc.c | 8 -- gcc/testsuite/gcc.target/arc/mspfp.c | 1 + gcc/testsuite/gcc.target/arc/mswape.c | 1 + gcc/testsuite/gcc.target/arc/mul64.c | 4 +- .../gcc.target/arc/mulsi3_highpart-1.c | 5 +- .../gcc.target/arc/mulsi3_highpart-2.c | 4 +- gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c | 1 + gcc/testsuite/gcc.target/arc/nps400-1.c | 1 + gcc/testsuite/gcc.target/arc/trsub.c | 1 + gcc/testsuite/gcc.target/arc/va_args-1.c | 16 ++++ gcc/testsuite/gcc.target/arc/va_args-2.c | 14 ++++ gcc/testsuite/gcc.target/arc/va_args-3.c | 15 ++++ 66 files changed, 306 insertions(+), 142 deletions(-) create mode 100644 gcc/testsuite/gcc.target/arc/abitest.S create mode 100644 gcc/testsuite/gcc.target/arc/abitest.h delete mode 100644 gcc/testsuite/gcc.target/arc/mcrc.c delete mode 100644 gcc/testsuite/gcc.target/arc/mdsp-packa.c delete mode 100644 gcc/testsuite/gcc.target/arc/mdvbf.c delete mode 100644 gcc/testsuite/gcc.target/arc/mmac-24.c delete mode 100644 gcc/testsuite/gcc.target/arc/mmac-d16.c delete mode 100644 gcc/testsuite/gcc.target/arc/mno-crc.c delete mode 100644 gcc/testsuite/gcc.target/arc/mno-dsp-packa.c delete mode 100644 gcc/testsuite/gcc.target/arc/mno-dvbf.c delete mode 100644 gcc/testsuite/gcc.target/arc/mno-mac-24.c delete mode 100644 gcc/testsuite/gcc.target/arc/mno-mac-d16.c delete mode 100644 gcc/testsuite/gcc.target/arc/mno-rtsc.c delete mode 100644 gcc/testsuite/gcc.target/arc/mno-xy.c delete mode 100644 gcc/testsuite/gcc.target/arc/mrtsc.c create mode 100644 gcc/testsuite/gcc.target/arc/va_args-1.c create mode 100644 gcc/testsuite/gcc.target/arc/va_args-2.c create mode 100644 gcc/testsuite/gcc.target/arc/va_args-3.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a0a1b57e20..5063e51ebd6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,82 @@ +2016-11-17 Claudiu Zissulescu + + * 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 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 index 00000000000..7be935b1034 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/abitest.S @@ -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 index 00000000000..26de3e4f7e4 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/abitest.h @@ -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*/ diff --git a/gcc/testsuite/gcc.target/arc/arc.exp b/gcc/testsuite/gcc.target/arc/arc.exp index fae2ece7f6f..62583cd0321 100644 --- a/gcc/testsuite/gcc.target/arc/arc.exp +++ b/gcc/testsuite/gcc.target/arc/arc.exp @@ -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 # . @@ -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 { diff --git a/gcc/testsuite/gcc.target/arc/barrel-shifter-1.c b/gcc/testsuite/gcc.target/arc/barrel-shifter-1.c index a0eb6d70c39..5cfb282f6ac 100644 --- a/gcc/testsuite/gcc.target/arc/barrel-shifter-1.c +++ b/gcc/testsuite/gcc.target/arc/barrel-shifter-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mcpu=ARC601 -mbarrel-shifter" } */ +/* { dg-options "-O2 -mbarrel-shifter" } */ int i; int f (void) diff --git a/gcc/testsuite/gcc.target/arc/barrel-shifter-2.c b/gcc/testsuite/gcc.target/arc/barrel-shifter-2.c index 97998fbf1a3..8e0bb9a8a60 100644 --- a/gcc/testsuite/gcc.target/arc/barrel-shifter-2.c +++ b/gcc/testsuite/gcc.target/arc/barrel-shifter-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { barrelshifter } } } */ int i; int f (void) diff --git a/gcc/testsuite/gcc.target/arc/builtin_simd.c b/gcc/testsuite/gcc.target/arc/builtin_simd.c index fff27a47960..6b0252186c6 100644 --- a/gcc/testsuite/gcc.target/arc/builtin_simd.c +++ b/gcc/testsuite/gcc.target/arc/builtin_simd.c @@ -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) \ diff --git a/gcc/testsuite/gcc.target/arc/builtin_simdarc.c b/gcc/testsuite/gcc.target/arc/builtin_simdarc.c index 68aae40ca58..0cfe2ad767d 100644 --- a/gcc/testsuite/gcc.target/arc/builtin_simdarc.c +++ b/gcc/testsuite/gcc.target/arc/builtin_simdarc.c @@ -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) \ diff --git a/gcc/testsuite/gcc.target/arc/cmem-1.c b/gcc/testsuite/gcc.target/arc/cmem-1.c index 7f36afbfa7d..8ed5dcf2f01 100644 --- a/gcc/testsuite/gcc.target/arc/cmem-1.c +++ b/gcc/testsuite/gcc.target/arc/cmem-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -mcmem" } */ #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem"))); diff --git a/gcc/testsuite/gcc.target/arc/cmem-2.c b/gcc/testsuite/gcc.target/arc/cmem-2.c index a3d7c130b5e..39bfb2885c7 100644 --- a/gcc/testsuite/gcc.target/arc/cmem-2.c +++ b/gcc/testsuite/gcc.target/arc/cmem-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -mcmem" } */ #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem"))); diff --git a/gcc/testsuite/gcc.target/arc/cmem-3.c b/gcc/testsuite/gcc.target/arc/cmem-3.c index dee73b5c5d3..109084f01fb 100644 --- a/gcc/testsuite/gcc.target/arc/cmem-3.c +++ b/gcc/testsuite/gcc.target/arc/cmem-3.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -mcmem" } */ #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_private"))); diff --git a/gcc/testsuite/gcc.target/arc/cmem-4.c b/gcc/testsuite/gcc.target/arc/cmem-4.c index 1da6bce77c4..4ac8a22f231 100644 --- a/gcc/testsuite/gcc.target/arc/cmem-4.c +++ b/gcc/testsuite/gcc.target/arc/cmem-4.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -mcmem" } */ #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_private"))); diff --git a/gcc/testsuite/gcc.target/arc/cmem-5.c b/gcc/testsuite/gcc.target/arc/cmem-5.c index ad6904f7360..451218b9765 100644 --- a/gcc/testsuite/gcc.target/arc/cmem-5.c +++ b/gcc/testsuite/gcc.target/arc/cmem-5.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -mcmem" } */ #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_shared"))); diff --git a/gcc/testsuite/gcc.target/arc/cmem-6.c b/gcc/testsuite/gcc.target/arc/cmem-6.c index 24bc39bfd07..0ed06085514 100644 --- a/gcc/testsuite/gcc.target/arc/cmem-6.c +++ b/gcc/testsuite/gcc.target/arc/cmem-6.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -mcmem" } */ #define CMEM_SECTION_ATTR __attribute__ ((section (".cmem_shared"))); diff --git a/gcc/testsuite/gcc.target/arc/cmem-7.c b/gcc/testsuite/gcc.target/arc/cmem-7.c index 72ee7bdffaf..02673271172 100644 --- a/gcc/testsuite/gcc.target/arc/cmem-7.c +++ b/gcc/testsuite/gcc.target/arc/cmem-7.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -mcmem" } */ struct some_struct diff --git a/gcc/testsuite/gcc.target/arc/extzv-1.c b/gcc/testsuite/gcc.target/arc/extzv-1.c index 242f522f187..1e5533a72bb 100644 --- a/gcc/testsuite/gcc.target/arc/extzv-1.c +++ b/gcc/testsuite/gcc.target/arc/extzv-1.c @@ -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; }; diff --git a/gcc/testsuite/gcc.target/arc/insv-1.c b/gcc/testsuite/gcc.target/arc/insv-1.c index 75d47e9b1b3..29e4188a2e2 100644 --- a/gcc/testsuite/gcc.target/arc/insv-1.c +++ b/gcc/testsuite/gcc.target/arc/insv-1.c @@ -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. */ diff --git a/gcc/testsuite/gcc.target/arc/insv-2.c b/gcc/testsuite/gcc.target/arc/insv-2.c index 16525511698..620acecc2e2 100644 --- a/gcc/testsuite/gcc.target/arc/insv-2.c +++ b/gcc/testsuite/gcc.target/arc/insv-2.c @@ -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; diff --git a/gcc/testsuite/gcc.target/arc/interrupt-1.c b/gcc/testsuite/gcc.target/arc/interrupt-1.c index 70514572ea5..8a2002bf1c0 100644 --- a/gcc/testsuite/gcc.target/arc/interrupt-1.c +++ b/gcc/testsuite/gcc.target/arc/interrupt-1.c @@ -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 } } } } */ diff --git a/gcc/testsuite/gcc.target/arc/interrupt-2.c b/gcc/testsuite/gcc.target/arc/interrupt-2.c index ee8593b3039..285ebd57a22 100644 --- a/gcc/testsuite/gcc.target/arc/interrupt-2.c +++ b/gcc/testsuite/gcc.target/arc/interrupt-2.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "ilink2 is not an ARCv2 register" { archs || arcem } } */ void __attribute__ ((interrupt("ilink2"))) handler1 (void) { diff --git a/gcc/testsuite/gcc.target/arc/interrupt-3.c b/gcc/testsuite/gcc.target/arc/interrupt-3.c index fa598d67e6b..b0cad88de95 100644 --- a/gcc/testsuite/gcc.target/arc/interrupt-3.c +++ b/gcc/testsuite/gcc.target/arc/interrupt-3.c @@ -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))) diff --git a/gcc/testsuite/gcc.target/arc/jump-around-jump.c b/gcc/testsuite/gcc.target/arc/jump-around-jump.c index 338c6675238..2fd3fb644c1 100644 --- a/gcc/testsuite/gcc.target/arc/jump-around-jump.c +++ b/gcc/testsuite/gcc.target/arc/jump-around-jump.c @@ -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. */ diff --git a/gcc/testsuite/gcc.target/arc/mA6.c b/gcc/testsuite/gcc.target/arc/mA6.c index 2e15a86f8a4..c4eeb6feadc 100644 --- a/gcc/testsuite/gcc.target/arc/mA6.c +++ b/gcc/testsuite/gcc.target/arc/mA6.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mA6" } */ /* { dg-final { scan-assembler ".cpu ARC600" } } */ diff --git a/gcc/testsuite/gcc.target/arc/mA7.c b/gcc/testsuite/gcc.target/arc/mA7.c index c4430f43b41..a3c6f8204af 100644 --- a/gcc/testsuite/gcc.target/arc/mA7.c +++ b/gcc/testsuite/gcc.target/arc/mA7.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mA7" } */ /* { dg-final { scan-assembler ".cpu ARC700" } } */ diff --git a/gcc/testsuite/gcc.target/arc/mARC600.c b/gcc/testsuite/gcc.target/arc/mARC600.c index 20e086aa754..6a80457b194 100644 --- a/gcc/testsuite/gcc.target/arc/mARC600.c +++ b/gcc/testsuite/gcc.target/arc/mARC600.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mARC600" } */ /* { dg-final { scan-assembler ".cpu ARC600" } } */ diff --git a/gcc/testsuite/gcc.target/arc/mARC601.c b/gcc/testsuite/gcc.target/arc/mARC601.c index 1d30da4cafb..d2386613eb0 100644 --- a/gcc/testsuite/gcc.target/arc/mARC601.c +++ b/gcc/testsuite/gcc.target/arc/mARC601.c @@ -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.*" } } */ diff --git a/gcc/testsuite/gcc.target/arc/mARC700.c b/gcc/testsuite/gcc.target/arc/mARC700.c index 43e9baa3f30..d34583f46aa 100644 --- a/gcc/testsuite/gcc.target/arc/mARC700.c +++ b/gcc/testsuite/gcc.target/arc/mARC700.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mARC700" } */ /* { dg-final { scan-assembler ".cpu ARC700" } } */ diff --git a/gcc/testsuite/gcc.target/arc/mcpu-arc600.c b/gcc/testsuite/gcc.target/arc/mcpu-arc600.c index 4c915fda0e3..bd1dc9599a6 100644 --- a/gcc/testsuite/gcc.target/arc/mcpu-arc600.c +++ b/gcc/testsuite/gcc.target/arc/mcpu-arc600.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.target/arc/mcpu-arc601.c b/gcc/testsuite/gcc.target/arc/mcpu-arc601.c index 7c93c9dc4ac..8ef046efb86 100644 --- a/gcc/testsuite/gcc.target/arc/mcpu-arc601.c +++ b/gcc/testsuite/gcc.target/arc/mcpu-arc601.c @@ -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.*" } } */ diff --git a/gcc/testsuite/gcc.target/arc/mcpu-arc700.c b/gcc/testsuite/gcc.target/arc/mcpu-arc700.c index c805a5af76b..25bb4002986 100644 --- a/gcc/testsuite/gcc.target/arc/mcpu-arc700.c +++ b/gcc/testsuite/gcc.target/arc/mcpu-arc700.c @@ -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 index a449bdd48d6..00000000000 --- a/gcc/testsuite/gcc.target/arc/mcrc.c +++ /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; -} diff --git a/gcc/testsuite/gcc.target/arc/mdpfp.c b/gcc/testsuite/gcc.target/arc/mdpfp.c index 4bbc9057b85..aa6bdfa1c51 100644 --- a/gcc/testsuite/gcc.target/arc/mdpfp.c +++ b/gcc/testsuite/gcc.target/arc/mdpfp.c @@ -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 index f013a6dd1ea..00000000000 --- a/gcc/testsuite/gcc.target/arc/mdsp-packa.c +++ /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 index e2e545e8bb3..00000000000 --- a/gcc/testsuite/gcc.target/arc/mdvbf.c +++ /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; -} diff --git a/gcc/testsuite/gcc.target/arc/mlock.c b/gcc/testsuite/gcc.target/arc/mlock.c index e207f91cdde..708fb092409 100644 --- a/gcc/testsuite/gcc.target/arc/mlock.c +++ b/gcc/testsuite/gcc.target/arc/mlock.c @@ -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 index 89da0b127aa..00000000000 --- a/gcc/testsuite/gcc.target/arc/mmac-24.c +++ /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 index 0570011fd26..00000000000 --- a/gcc/testsuite/gcc.target/arc/mmac-d16.c +++ /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 index 70ab9c11761..00000000000 --- a/gcc/testsuite/gcc.target/arc/mno-crc.c +++ /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 index eb21522af06..00000000000 --- a/gcc/testsuite/gcc.target/arc/mno-dsp-packa.c +++ /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 index ea96d987c18..00000000000 --- a/gcc/testsuite/gcc.target/arc/mno-dvbf.c +++ /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 index b4839579b12..00000000000 --- a/gcc/testsuite/gcc.target/arc/mno-mac-24.c +++ /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 index 68a20f4f55a..00000000000 --- a/gcc/testsuite/gcc.target/arc/mno-mac-d16.c +++ /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 index d74a60e9351..00000000000 --- a/gcc/testsuite/gcc.target/arc/mno-rtsc.c +++ /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 index e378b3fc9b6..00000000000 --- a/gcc/testsuite/gcc.target/arc/mno-xy.c +++ /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)); -} diff --git a/gcc/testsuite/gcc.target/arc/movb-1.c b/gcc/testsuite/gcc.target/arc/movb-1.c index 94d9f5fcd5e..37f3fd8b27c 100644 --- a/gcc/testsuite/gcc.target/arc/movb-1.c +++ b/gcc/testsuite/gcc.target/arc/movb-1.c @@ -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; diff --git a/gcc/testsuite/gcc.target/arc/movb-2.c b/gcc/testsuite/gcc.target/arc/movb-2.c index 708f393497d..1ac18d05e4c 100644 --- a/gcc/testsuite/gcc.target/arc/movb-2.c +++ b/gcc/testsuite/gcc.target/arc/movb-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */ struct { unsigned a: 23, b: 9; } foo; diff --git a/gcc/testsuite/gcc.target/arc/movb-3.c b/gcc/testsuite/gcc.target/arc/movb-3.c index 0895154abb6..34145d6cc6f 100644 --- a/gcc/testsuite/gcc.target/arc/movb-3.c +++ b/gcc/testsuite/gcc.target/arc/movb-3.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */ struct { int a: 23, b: 9; } foo; diff --git a/gcc/testsuite/gcc.target/arc/movb-4.c b/gcc/testsuite/gcc.target/arc/movb-4.c index 89bf2c2b123..83efad647d8 100644 --- a/gcc/testsuite/gcc.target/arc/movb-4.c +++ b/gcc/testsuite/gcc.target/arc/movb-4.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */ struct { int a: 13, b: 19; } foo; diff --git a/gcc/testsuite/gcc.target/arc/movb-5.c b/gcc/testsuite/gcc.target/arc/movb-5.c index d2858880782..c8159feb603 100644 --- a/gcc/testsuite/gcc.target/arc/movb-5.c +++ b/gcc/testsuite/gcc.target/arc/movb-5.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */ struct { int a: 23, b: 9; } foo; diff --git a/gcc/testsuite/gcc.target/arc/movb_cl-1.c b/gcc/testsuite/gcc.target/arc/movb_cl-1.c index 402250ce530..977a0c2fbf0 100644 --- a/gcc/testsuite/gcc.target/arc/movb_cl-1.c +++ b/gcc/testsuite/gcc.target/arc/movb_cl-1.c @@ -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/movb_cl-2.c b/gcc/testsuite/gcc.target/arc/movb_cl-2.c index d2e5a944a6e..4a1484a3e4c 100644 --- a/gcc/testsuite/gcc.target/arc/movb_cl-2.c +++ b/gcc/testsuite/gcc.target/arc/movb_cl-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */ extern void g (void); diff --git a/gcc/testsuite/gcc.target/arc/movbi_cl-1.c b/gcc/testsuite/gcc.target/arc/movbi_cl-1.c index 3c457dbe528..a86d06f30b4 100644 --- a/gcc/testsuite/gcc.target/arc/movbi_cl-1.c +++ b/gcc/testsuite/gcc.target/arc/movbi_cl-1.c @@ -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/movh_cl-1.c b/gcc/testsuite/gcc.target/arc/movh_cl-1.c index c6434811e8a..9c0036c1a3a 100644 --- a/gcc/testsuite/gcc.target/arc/movh_cl-1.c +++ b/gcc/testsuite/gcc.target/arc/movh_cl-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "" { ! { clmcpu } } } */ /* { dg-options "-mcpu=nps400 -O2 -mbitops" } */ struct thing diff --git a/gcc/testsuite/gcc.target/arc/movl-1.c b/gcc/testsuite/gcc.target/arc/movl-1.c index f1f0130a2b0..c44ca8d2ccd 100644 --- a/gcc/testsuite/gcc.target/arc/movl-1.c +++ b/gcc/testsuite/gcc.target/arc/movl-1.c @@ -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 index 15cb9395dfd..00000000000 --- a/gcc/testsuite/gcc.target/arc/mrtsc.c +++ /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; -} diff --git a/gcc/testsuite/gcc.target/arc/mspfp.c b/gcc/testsuite/gcc.target/arc/mspfp.c index 0e41ff89d35..19cb97828fb 100644 --- a/gcc/testsuite/gcc.target/arc/mspfp.c +++ b/gcc/testsuite/gcc.target/arc/mspfp.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "FPX is not an ARC HS extension" { archs } } */ /* { dg-options "-O2 -mspfp" } */ float i; diff --git a/gcc/testsuite/gcc.target/arc/mswape.c b/gcc/testsuite/gcc.target/arc/mswape.c index 6d23bde7c29..8763825be0a 100644 --- a/gcc/testsuite/gcc.target/arc/mswape.c +++ b/gcc/testsuite/gcc.target/arc/mswape.c @@ -1,5 +1,6 @@ /* { dg-options "-mswape" } */ /* { dg-do assemble } */ +/* { dg-skip-if "" { arc6xx } } */ int f (int i) { diff --git a/gcc/testsuite/gcc.target/arc/mul64.c b/gcc/testsuite/gcc.target/arc/mul64.c index 3678b2799d5..fb8e7750c53 100644 --- a/gcc/testsuite/gcc.target/arc/mul64.c +++ b/gcc/testsuite/gcc.target/arc/mul64.c @@ -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 int64_t i; diff --git a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c index 398ecfe948e..57cb95b91fc 100644 --- a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c +++ b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -mARC700 --save-temps" } */ +/* { dg-options "-save-temps -O2" } */ #include @@ -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 } } } } */ diff --git a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c index ccc74e7b1ad..287d96d4ee9 100644 --- a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c +++ b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c @@ -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 diff --git a/gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c b/gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c index e4e23e4a40f..61f07b53aac 100644 --- a/gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c +++ b/gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c @@ -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; diff --git a/gcc/testsuite/gcc.target/arc/nps400-1.c b/gcc/testsuite/gcc.target/arc/nps400-1.c index f3d62718bb0..504aad734cc 100644 --- a/gcc/testsuite/gcc.target/arc/nps400-1.c +++ b/gcc/testsuite/gcc.target/arc/nps400-1.c @@ -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 { diff --git a/gcc/testsuite/gcc.target/arc/trsub.c b/gcc/testsuite/gcc.target/arc/trsub.c index 031935fdc8f..8ea5711c6ee 100644 --- a/gcc/testsuite/gcc.target/arc/trsub.c +++ b/gcc/testsuite/gcc.target/arc/trsub.c @@ -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 index 00000000000..4a35d122ade --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/va_args-1.c @@ -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 index 00000000000..18f48b030b0 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/va_args-2.c @@ -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 index 00000000000..45624c153c6 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/va_args-3.c @@ -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; +} -- 2.30.2