diff options
author | Dan Albert <danalbert@google.com> | 2016-02-24 13:48:45 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2016-02-24 13:51:18 -0800 |
commit | b9de1157289455b0ca26daff519d4a0ddcd1fa13 (patch) | |
tree | 4c56cc0a34b91f17033a40a455f26652304f7b8d /gcc-4.8.1/gcc/testsuite/gcc.target/cris | |
parent | 098157a754787181cfa10e71325832448ddcea98 (diff) | |
download | toolchain_gcc-b9de1157289455b0ca26daff519d4a0ddcd1fa13.tar.gz toolchain_gcc-b9de1157289455b0ca26daff519d4a0ddcd1fa13.tar.bz2 toolchain_gcc-b9de1157289455b0ca26daff519d4a0ddcd1fa13.zip |
Update 4.8.1 to 4.8.3.
My previous drop was the wrong version. The platform mingw is
currently using 4.8.3, not 4.8.1 (not sure how I got that wrong).
From ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2.
Bug: http://b/26523949
Change-Id: Id85f1bdcbbaf78c7d0b5a69e74c798a08f341c35
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/gcc.target/cris')
68 files changed, 0 insertions, 1061 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/20011127-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/20011127-1.c deleted file mode 100644 index 298a8b9fd..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/20011127-1.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2001, 2007 Free Software Foundation. - by Hans-Peter Nilsson <hp@axis.com> - - Making sure that invalid asm operand modifiers don't cause an ICE. */ - -/* { dg-do compile } */ -/* { dg-options "-O2" } */ -/* { dg-message "reg:SI|const_double:DF" "prune debug_rtx output" { target *-*-* } 0 } */ - -void -foo (void) -{ - /* The first case symbolizes the default case for CRIS. */ - asm ("\n;# %w0" : : "r" (0)); /* { dg-error "modifier" } */ - - /* These are explicit cases. Luckily, a register is invalid in most of - them. */ - asm ("\n;# %b0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %v0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %p0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %z0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %H0" : : "F" (0.5)); /* { dg-error "modifier" } */ - asm ("\n;# %e0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %m0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %A0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %D0" : : "r" (0)); /* { dg-error "modifier" } */ - asm ("\n;# %T0" : : "r" (0)); /* { dg-error "modifier" } */ - /* Add more must-not-ICE asm errors here as we find them ICEing. */ -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-b-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-b-1.c deleted file mode 100644 index 5417c047d..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-b-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-options "-O2" } */ - -/* Checking that the "b" constraint is accepted, for all target variants. */ - -long sys_ipc (void) -{ - long __gu_err = -14; - long dummy_for_get_user_asm_64_; - __asm__ __volatile__( "move.d [%1+],%0\n" - : "=r" (__gu_err), "=b" (dummy_for_get_user_asm_64_) - : "0" (__gu_err)); - - return __gu_err; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-other.S b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-other.S deleted file mode 100644 index 4fe7ebfc4..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-other.S +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */ -/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */ - -/* Make sure we can assemble for the "other" variant, with the twist - that the gcc option -march=v0 isn't valid for the assembler. */ - .text -#if OTHER_ISA == 32 - addoq 42,$r1,$acr -#else -0: - move.d [$r2=$r0+42],$r1 - bwf 0b - nop -#endif diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-v10.S b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-v10.S deleted file mode 100644 index c85ebe293..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-v10.S +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-options "-DOTHER_ISA=10 -march=v10" } */ - -/* Check that -march=v10 is also recognized. */ - -#include "asm-other.S" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-v8.S b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-v8.S deleted file mode 100644 index 3fba31884..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asm-v8.S +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-options "-DOTHER_ISA=8 -march=v8" } */ - -/* Check that -march=v8 is also recognized. */ - -#include "asm-other.S" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asmreg-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asmreg-1.c deleted file mode 100644 index f430fafbe..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/asmreg-1.c +++ /dev/null @@ -1,73 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2" } */ -/* { dg-final { scan-assembler "\\\.ifnc \\\$r9-\\\$r10-\\\$r11-\\\$r12" } } */ - -/* Sanity check for asm register operands in syscall failed for - cris-axis-linux-gnu due to regmove bug. - Hans-Peter Nilsson <hp@axis.com>. */ - -extern void lseek64 (int, long long, int); -extern int *__errno_location (void); -struct dirent64 -{ - long long d_off; - unsigned short int d_reclen; - char d_name[256]; -}; -struct kernel_dirent64 -{ - long long d_off; - unsigned short d_reclen; - char d_name[256]; -}; - -static inline int __attribute__ ((__always_inline__)) -__syscall_getdents64 (int fd, char * dirp, unsigned count) -{ - register unsigned long __sys_res asm ("r10"); - register unsigned long __r10 __asm__ ("r10") = (unsigned long) fd; - register unsigned long __r11 __asm__ ("r11") = (unsigned long) dirp; - register unsigned long __r12 __asm__ ("r12") = (unsigned long) count; - register unsigned long __callno asm ("r9") = (220); - asm volatile (".ifnc %1-%0-%3-%4,$r9-$r10-$r11-$r12\n\t" - ".err\n\t" - ".endif\n\t" - "break 13" - : "=r" (__sys_res) - : "r" (__callno), "0" (__r10), "r" (__r11), "r" (__r12) - : "memory"); - if (__sys_res >= (unsigned long) -4096) - { - (*__errno_location ()) = - __sys_res; - __sys_res = -1; - } - return __sys_res; -} - -int -__getdents64 (int fd, char *buf, unsigned nbytes) -{ - struct dirent64 *dp; - long long last_offset = -1; - int retval; - struct kernel_dirent64 *skdp, *kdp; - dp = (struct dirent64 *) buf; - skdp = kdp = __builtin_alloca (nbytes); - retval = __syscall_getdents64(fd, (char *)kdp, nbytes); - if (retval == -1) - return -1; - while ((char *) kdp < (char *) skdp + retval) - { - if ((char *) dp > buf + nbytes) - { - lseek64(fd, last_offset, 0); - break; - } - last_offset = kdp->d_off; - __builtin_memcpy (dp->d_name, kdp->d_name, kdp->d_reclen - 10); - dp = (struct dirent64 *) ((char *) dp + sizeof (*dp)); - kdp = (struct kernel_dirent64 *) (((char *) kdp) + kdp->d_reclen); - } - - return (char *) dp - buf; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/biap.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/biap.c deleted file mode 100644 index 1f3b4368a..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/biap.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Make sure ADDI is combined and emitted successfully. - See also PR37939. */ -/* { dg-do compile } */ -/* { dg-options "-O2" } */ -/* { dg-final { scan-assembler "addi" } } */ -/* { dg-final { scan-assembler-not "lsl" } } */ - -int xyzzy (int r10, int r11) -{ - return r11 * 4 + r10; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_bswap_v3.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_bswap_v3.c deleted file mode 100644 index 1230d4b59..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_bswap_v3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we don't use the swap insn for bswap by checking assembler - output. The swap instruction was added in v8. */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "cris*-*-elf" } { "-march*" } { "" } } */ -/* { dg-options "-O2 -march=v3" } */ -/* { dg-final { scan-assembler-not "\[ \t\]swapwb\[ \t\]" } } */ - -int -f (int a) -{ - return __builtin_bswap32(a); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_bswap_v8.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_bswap_v8.c deleted file mode 100644 index b7a8d2684..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_bswap_v8.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we use the swap insn for bswap by checking assembler - output. The swap instruction was added in v8. */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "cris*-*-elf" } { "-march*" } { "" } } */ -/* { dg-options "-O2 -march=v8" } */ -/* { dg-final { scan-assembler "\[ \t\]swapwb\[ \t\]" } } */ - -int -f (int a) -{ - return __builtin_bswap32(a); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_clz_v0.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_clz_v0.c deleted file mode 100644 index 318402faa..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_clz_v0.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we don't use the lz insn for clz by checking assembler output. - The lz insn was implemented in CRIS v3 (ETRAX 4). */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "cris*-*-elf" } { "-march*" } { "" } } */ -/* { dg-options "-O2 -march=v0" } */ -/* { dg-final { scan-assembler-not "\[ \t\]lz\[ \t\]" } } */ - -int -f (int a) -{ - return __builtin_clz(a); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_clz_v3.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_clz_v3.c deleted file mode 100644 index ecf039048..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_clz_v3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we use the lz insn for clz by checking assembler output. - The lz insn was implemented in CRIS v3 (ETRAX 4). */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "cris*-*-elf" } { "-march*" } { "" } } */ -/* { dg-options "-O2 -march=v3" } */ -/* { dg-final { scan-assembler "\[ \t\]lz\[ \t\]" } } */ - -int -f (int a) -{ - return __builtin_clz(a); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_ctz_v3.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_ctz_v3.c deleted file mode 100644 index 8971a47a0..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_ctz_v3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we don't use the swap insn for ctz by checking - assembler output. The swap instruction was implemented in v8. */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "cris*-*-elf" } { "-march*" } { "" } } */ -/* { dg-options "-O2 -march=v3" } */ -/* { dg-final { scan-assembler-not "\[ \t\]swapwbr\[ \t\]" } } */ - -int -f (int a) -{ - return __builtin_ctz(a); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_ctz_v8.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_ctz_v8.c deleted file mode 100644 index 853b1740a..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/builtin_ctz_v8.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we use the swap insn for ctz by checking assembler output. - The swap instruction was implemented in v8. */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "cris*-*-elf" } { "-march*" } { "" } } */ -/* { dg-options "-O2 -march=v8" } */ -/* { dg-final { scan-assembler "\[ \t\]swapwbr\[ \t\]" } } */ - -int -f (int a) -{ - return __builtin_ctz(a); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/cris.exp b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/cris.exp deleted file mode 100644 index deb57d14f..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/cris.exp +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2005-2013 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# 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/>. - -# GCC testsuite that uses the `gcc-dg.exp' driver, just a single option, no -# looping over tests. - -# Exit immediately if this isn't a CRIS target. -if { ![istarget cris-*-*] && ![istarget crisv32-*-*] } then { - return -} - -# Load support procs. -load_lib gcc-dg.exp - -# If a testcase doesn't have special options, use these. -global DEFAULT_CFLAGS -if ![info exists DEFAULT_CFLAGS] then { - set DEFAULT_CFLAGS " -ansi -pedantic-errors" -} - -# Initialize `dg'. -dg-init - -# Main loop. -dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" $DEFAULT_CFLAGS - -# All done. -dg-finish diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-other.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-other.c deleted file mode 100644 index c1c043f56..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-other.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */ -/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */ - -/* Make sure we can (generate code and) assemble for the "other" - variant, with the twist that the gcc option -march=v0 isn't - valid for the assembler. We don't check that the generated code - is for the other variant; other tests cover that already, but they - don't *assemble* the result. We can't trust the prologue and - epilogue to contain incompatible insns (they actually deliberately - don't, usually and it'd be brittle to tweak the function signature - to make it so), so we force some with inline asm. */ - -void f(void) -{ -#if OTHER_ISA == 32 - asm volatile ("addoq 42,$r11,$acr"); -#else - asm volatile ("0: move.d [$r12=$sp+42],$r10\n\t" - "bwf 0b\n\t" - "nop"); -#endif -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-v10.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-v10.c deleted file mode 100644 index 75379b3c8..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-v10.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-options "-DOTHER_ISA=10 -march=v10" } */ - -/* Check that -march=v10 is also recognized. */ - -#include "inasm-other.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-v8.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-v8.c deleted file mode 100644 index b2fb3053c..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/inasm-v8.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-options "-DOTHER_ISA=8 -march=v8" } */ - -/* Check that -march=v8 is also recognized. */ - -#include "inasm-other.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-andu1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-andu1.c deleted file mode 100644 index 3b54c3295..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-andu1.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do compile } */ -/* { dg-final { scan-assembler-not "and.d " } } */ -/* { dg-final { scan-assembler-not "move.d " } } */ -/* { dg-final { scan-assembler "cLear.b" } } */ -/* { dg-final { scan-assembler "movu.b" } } */ -/* { dg-final { scan-assembler "and.b" } } */ -/* { dg-final { scan-assembler "movu.w" } } */ -/* { dg-final { scan-assembler "and.w" } } */ -/* { dg-final { scan-assembler "andq" } } */ -/* { dg-options "-O2" } */ - -/* Test the "andu" peephole2 trivially, memory operand. */ - -int -clearb (int x, int *y) -{ - return *y & 0xff00; -} - -int -andb (int x, int *y) -{ - return *y & 0x3f; -} - -int -andw (int x, int *y) -{ - return *y & 0xfff; -} - -int -andq (int x, int *y) -{ - return *y & 0xf0; -} - -int -andq2 (int x, int *y) -{ - return *y & 0xfff0; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-andu2.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-andu2.c deleted file mode 100644 index fd19cdd90..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-andu2.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do assemble } */ -/* { dg-final { scan-assembler "movu.w \\\$r10,\\\$|movu.w 2047," } } */ -/* { dg-final { scan-assembler "and.w 2047,\\\$|and.d \\\$r10," } } */ -/* { dg-final { scan-assembler-not "move.d \\\$r10,\\\$" } } */ -/* { dg-final { scan-assembler "movu.b \\\$r10,\\\$|movu.b 95," } } */ -/* { dg-final { scan-assembler "and.b 95,\\\$|and.d \\\$r10," } } */ -/* { dg-final { scan-assembler "andq -2,\\\$" } } */ -/* { dg-final { scan-assembler-not "movu.b 254,\\\$" } } */ -/* { dg-options "-O2 -save-temps" } */ - -/* Originally used to test the "andu" peephole2 trivially, register operand. - Due to reload changes (r186861), the suboptimal sequence isn't - generated and the peephole2 doesn't trig for this trivial code - anymore. Another minimal sequence is generated, where the constant - is loaded to a free register first. Instead another case is exposed; - handled by the "andqu" peephole2, trigged by and_peep2_q (the andq - and scan-assembler-not-movu.b lines above). */ - -unsigned int -and_peep2_hi (unsigned int y, unsigned int *x) -{ - *x = y & 0x7ff; - return y; -} - -unsigned int -and_peep2_qi (unsigned int y, unsigned int *x) -{ - *x = y & 0x5f; - return y; -} - - -unsigned int -and_peep2_q (unsigned int y, unsigned int *x) -{ - *x = y & 0xfe; - return y; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-xsrand.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-xsrand.c deleted file mode 100644 index df0e76886..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-xsrand.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do compile } */ -/* { dg-final { scan-assembler "and.w " } } */ -/* { dg-final { scan-assembler "and.b " } } */ -/* { dg-final { scan-assembler-not "and.d" } } */ -/* { dg-options "-O2" } */ - -/* Test the "asrandb", "asrandw", "lsrandb" and "lsrandw" peephole2:s - trivially. */ - -unsigned int -andwlsr (unsigned int x) -{ - return (x >> 17) & 0x7ff; -} - -unsigned int -andblsr (unsigned int x) -{ - return (x >> 25) & 0x5f; -} - -int -andwasr (int x) -{ - return (x >> 17) & 0x7ff; -} - -int -andbasr (int x) -{ - return (x >> 25) & 0x5f; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-xsrand2.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-xsrand2.c deleted file mode 100644 index 5d6ca788d..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/peep2-xsrand2.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do compile } */ -/* { dg-final { scan-assembler "and.w -137," } } */ -/* { dg-final { scan-assembler "and.b -64," } } */ -/* { dg-final { scan-assembler "and.w -139," } } */ -/* { dg-final { scan-assembler "and.b -63," } } */ -/* { dg-final { scan-assembler-not "and.d" } } */ -/* { dg-options "-O2" } */ - -/* PR target/17984. Test-case based on - testsuite/gcc.dg/cris-peep2-xsrand.c. */ - -unsigned int -andwlsr (unsigned int x) -{ - return (x >> 16) & 0xff77; -} - -unsigned int -andblsr (unsigned int x) -{ - return (x >> 24) & 0xc0; -} - -int -andwasr (int x) -{ - return (x >> 16) & 0xff75; -} - -int -andbasr (int x) -{ - return (x >> 24) & 0xc1; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/rld-legit1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/rld-legit1.c deleted file mode 100644 index 53a38af2c..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/rld-legit1.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Check that we don't get unnecessary insns due to reload using more - insns than needed due to reloading of more locations than - needed. */ -/* { dg-options -O2 } */ -/* { dg-final { scan-assembler-not "movs.w" } } */ -/* { dg-final { scan-assembler-not "move.w" } } */ - -/* As torture/pr24750-2.c, except we need to clobber R8 for thorough - testing and know we can do, since we replace the frame-pointer. */ - -int -f (short *a, char *y) -{ - __asm__ ("" : : : -#ifndef __PIC__ - "r0", -#endif - "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", - "r9", "r10", "r11", "r12", "r13"); - return y[*a]; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/rld-legit2.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/rld-legit2.c deleted file mode 100644 index 0add3e2b5..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/rld-legit2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* A variant of rld-legit1.c only for full code coverage of the - initial version of cris_reload_address_legitimized. */ -/* { dg-options -O2 } */ - -short * -g (short *a, char *y) -{ - __asm__ ("" : : : -#ifndef __PIC__ - "r0", -#endif - "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", - "r9", "r10", "r11", "r12", "r13"); - y[*a++] = 0; - return a; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1-v10.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1-v10.c deleted file mode 100644 index 6c8dd1a40..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1-v10.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Check that we can assemble both base atomic variants. */ -/* { dg-do assemble } */ -/* { dg-options "-O2 -march=v10" } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1-v32.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1-v32.c deleted file mode 100644 index 3c1d076ab..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1-v32.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Check that we can assemble both base atomic variants. */ -/* { dg-do assemble } */ -/* { dg-options "-O2 -march=v32" } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1.c deleted file mode 100644 index 1bc9a674c..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-1.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Check that we can assemble both base atomic variants, for v0. */ -/* { dg-do assemble } */ -/* { dg-options "-O2 -march=v0" } */ - -#ifndef type -#define type char -#endif - -#if !defined(op) && !defined(xchg) -#define op 1 -#define xchg 1 -#endif - -#ifndef op -#define op 0 -#endif - -#ifndef xchg -#define xchg 0 -#endif - -#if op -int sfa (type *p, type *q, int a) -{ - return __atomic_fetch_nand (p, a, __ATOMIC_ACQ_REL) - + __atomic_fetch_add (q, a, __ATOMIC_SEQ_CST); -} -#endif - -#if xchg -void acen (type *ptr, type *val, type *ret) -{ - __atomic_exchange (ptr, val, ret, __ATOMIC_SEQ_CST); -} -#endif diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2c.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2c.c deleted file mode 100644 index 80e646c20..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2c.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Check that we don't get alignment-checking code, char. */ -/* { dg-do compile } */ -/* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */ -/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */ -/* { dg-final { scan-assembler-not "\tand" } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2i.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2i.c deleted file mode 100644 index d491d3c08..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2i.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Check that we get the expected alignment-checking code, op variant, int. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -Dop -Dtype=int" } */ -/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -/* { dg-final { scan-assembler "\tbreak 8" } } */ -/* { dg-final { scan-assembler "\tbtstq \\(2-1\\)," } } */ -/* { dg-final { scan-assembler-not "\tand" } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2s.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2s.c deleted file mode 100644 index 06ff98a27..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-2s.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Check that we get the expected alignment-checking code, op variant, short. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -Dop -Dtype=short" } */ -/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -/* { dg-final { scan-assembler "\tbreak 8" } } */ -/* { dg-final { scan-assembler "\tbtstq \\(1-1\\)," } } */ -/* { dg-final { scan-assembler-not "\tand" } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-3i.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-3i.c deleted file mode 100644 index 9e67d61cb..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-3i.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we get the expected alignment-checking code, xchg variant, int. - Unfortunately, PRE moves the "and" to a different BB, so combine doesn't - see it with the compare to make it a btstq. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -Dxchg -Dtype=int" } */ -/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -/* { dg-final { scan-assembler "\tbreak 8" } } */ -/* { dg-final { scan-assembler "\tbtstq \\(2-1\\)," { xfail *-*-* } } } */ -/* { dg-final { scan-assembler-not "\tand" { xfail *-*-* } } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-3s.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-3s.c deleted file mode 100644 index 8e87a3b62..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-3s.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Check that we get the expected alignment-checking code, xchg variant, short. - Unfortunately, PRE moves the "and" to a different BB, so combine doesn't - see it with the compare to make it a btstq. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -Dxchg -Dtype=short" } */ -/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -/* { dg-final { scan-assembler "\tbreak 8" } } */ -/* { dg-final { scan-assembler "\tbtstq \\(1-1\\)," { xfail *-*-* } } } */ -/* { dg-final { scan-assembler-not "\tand" { xfail *-*-* } } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4c.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4c.c deleted file mode 100644 index e8cb69267..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4c.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Check that we get don't alignment-checking code, xchg variant, char. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -mno-trap-unaligned-atomic" } */ -/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */ -/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */ -/* { dg-final { scan-assembler-not "\tand" } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4i.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4i.c deleted file mode 100644 index 78a7012cc..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4i.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Check that we don't get alignment-checking code, int. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -Dtype=int -mno-trap-unaligned-atomic" } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */ -/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */ -/* { dg-final { scan-assembler-not "\tand" } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4s.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4s.c deleted file mode 100644 index 6691a4828..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-4s.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Check that we don't get alignment-checking code, short. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -Dtype=short -mno-trap-unaligned-atomic" } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */ -/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */ -/* { dg-final { scan-assembler-not "\tand" } } */ -/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */ -#include "sync-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-xchg-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-xchg-1.c deleted file mode 100644 index 21bb7d4ff..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/sync-xchg-1.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Check that the basic library call variant is sane; no other calls, no - checks compares or branches. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -munaligned-atomic-may-use-library" } */ -/* { dg-final { scan-assembler-not "\tdi" } } */ -/* { dg-final { scan-assembler-not "\tbtstq" } } */ -/* { dg-final { scan-assembler-not "\tand" } } */ -/* { dg-final { scan-assembler-not "\tclearf" } } */ -/* { dg-final { scan-assembler-not "\tmove.d" } } */ -/* { dg-final { scan-assembler-not "\tcmp" } } */ -/* { dg-final { scan-assembler-not "\tb\[^s\]" } } */ -/* { dg-final { scan-assembler-times "\t\[JjBb\]sr" 1 } } */ - -#ifndef type -#define type int -#endif - -type svcsw (type *ptr, type oldval, type newval) -{ - return __sync_val_compare_and_swap (ptr, oldval, newval); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp deleted file mode 100644 index 4eec2eb82..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2005-2013 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# 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/>. - -# GCC testsuite that uses the `gcc-dg.exp' driver, looping over -# optimization options. - -# Exit immediately if this isn't a CRIS target. -if { ![istarget cris-*-*] && ![istarget crisv32-*-*] } then { - return -} - -# Load support procs. -load_lib gcc-dg.exp - -# If a testcase doesn't have special options, use these. -global DEFAULT_CFLAGS -if ![info exists DEFAULT_CFLAGS] then { - set DEFAULT_CFLAGS " -ansi -pedantic-errors" -} - -# Initialize `dg'. -dg-init - -# Main loop. -gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] $DEFAULT_CFLAGS - -# All done. -dg-finish diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/no-pro-epi-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/no-pro-epi-1.c deleted file mode 100644 index 728a34c23..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/no-pro-epi-1.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-options -mno-prologue-epilogue } */ -void f (void) -{ -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/pr24750-2.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/pr24750-2.c deleted file mode 100644 index 281fb47b7..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/pr24750-2.c +++ /dev/null @@ -1,20 +0,0 @@ -/* As the invalid insn in this test got as far as to the target output - code and was "near enough" to output invalid assembly-code, we need - to pass it through the assembler as well. - { dg-do assemble } */ - -int -f (short *a, char *y) -{ - __asm__ ("" : : : -#ifndef __PIC__ - "r0", -#endif - "r1", "r2", "r3", "r4", "r5", "r6", "r7", - /* Register R8 is frame-pointer, and we don't have a means - to not clobber it for the test-runs that don't eliminate - it. But that's ok; we have enough general-register - pressure to repeat the bug without that. */ - "r9", "r10", "r11", "r12", "r13"); - return y[*a]; -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/pr34773.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/pr34773.c deleted file mode 100644 index d3723e38f..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/pr34773.c +++ /dev/null @@ -1,74 +0,0 @@ -/* { dg-do run } */ -union double_union -{ - double d; - int i[2]; -}; -void _dtoa_r (double) __attribute__ ((__noinline__)); -void _vfprintf_r (double) __attribute__ ((__noinline__)); -void -__sprint_r(int); -void -_vfprintf_r(double da) -{ - double ffp = da; - double value = ffp; - union double_union tmp; - - tmp.d = value; - - if ((tmp.i[1]) & ((unsigned)0x80000000L)) { - value = -value; - } - - _dtoa_r (value); - - if (ffp != 0) - __sprint_r(value == 0); - __asm__ (""); -} - - -double dd = -.012; -double ff = .012; - -void exit (int) __attribute__ ((__noreturn__)); -void abort (void) __attribute__ ((__noreturn__)); -void *memset(void *s, int c, __SIZE_TYPE__ n); -void _dtoa_r (double d) -{ - if (d != ff) - abort (); - __asm__ (""); -} - -void __sprint_r (int i) -{ - if (i != 0) - abort (); - __asm__ (""); -} - -int clearstack (void) __attribute__ ((__noinline__)); -int clearstack (void) -{ - char doodle[128]; - memset (doodle, 0, sizeof doodle); - __asm__ volatile ("" : : "g" (doodle) : "memory"); - return doodle[127]; -} - -void doit (void) __attribute__ ((__noinline__)); -void doit (void) -{ - _vfprintf_r (dd); - _vfprintf_r (ff); - __asm__ (""); -} - -int main(void) -{ - clearstack (); - doit (); - exit (0); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1.c deleted file mode 100644 index dd8704cc9..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -mno-unaligned-atomic-may-use-library" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1a.c deleted file mode 100644 index 8055fd380..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1ml.c deleted file mode 100644 index c8cef1841..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2.c deleted file mode 100644 index 3c162e96a..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2a.c deleted file mode 100644 index 61e1c2047..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2ml.c deleted file mode 100644 index 0d78e9001..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3.c deleted file mode 100644 index 626a3d5cb..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3a.c deleted file mode 100644 index 339e74cd8..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3ml.c deleted file mode 100644 index 17c6d34d1..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1.c deleted file mode 100644 index f2835aa06..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1.c +++ /dev/null @@ -1,126 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=short -mno-unaligned-atomic-may-use-library" } */ - -/* Make sure we get a SIGTRAP or equivalent when passing unaligned - but otherwise valid pointers to the atomic builtins. */ - -#include <signal.h> -#include <stdlib.h> - -#ifndef type -#error type not defined -#endif - -#ifndef op -#define op 0 -#endif - -#ifndef xchg -#define xchg 0 -#endif - -#if op -int sfa (type *p, type *q, int a); -#endif - -#if xchg -void acen (type *ptr, type *val, type *ret); -#endif - -#ifndef misalignment -#define misalignment 1 -#endif - -volatile int trap_expected = 0; - -struct { char x[misalignment]; type i; } s __attribute__ ((__aligned__ (4))) - = { {0}, (type) 0xdeadbeef }; -type x = 2; -type ret = 42; - -#ifdef TRAP_USING_ABORT -#define SYMSTR(x) STR1(__USER_LABEL_PREFIX__, x) -#define STR1(x,y) STR2(x, y) -#define STR2(x,y) #x #y -/* LTO requires marking seemingly-unused-but-used global functions. */ -void my_abort (void) __asm__ (SYMSTR (abort)) __attribute__ ((__used__)); -void my_abort (void) -#else -#ifdef __gnu_linux__ -void trap_handler(int signum) -#else -#error "can't catch break 8" -#endif -#endif -{ - if (1 -#ifndef TRAP_USING_ABORT - && signum == SIGTRAP -#endif - && trap_expected - && s.i == (type) 0xdeadbeef - && x == 2 && ret == 42) - exit (0); - -#ifdef TRAP_USING_ABORT - /* We might be able to trust the exit-value getting through, but add - a NULL-dereference SEGV just in case. Make sure gcc doesn't - understand the NULL. */ - *({ int *p; asm ("" : "=rm" (p) : "0" (0)); p; }) = 0xdead; - exit (2); -#else - abort (); -#endif -} - -int main(void) -{ - type ret; - -#ifndef TRAP_USING_ABORT -#ifdef __gnu_linux__ - if (signal (SIGTRAP, trap_handler) == SIG_ERR) - abort (); -#endif -#endif - -#ifndef mis_ok - trap_expected = 1; -#endif - -#if op - sfa (&s.i, &s.i, 42); - - /* We should have fallen into the trap now. But don't call abort - yet: if the trap is implemented as a call to abort, we have to - tell the difference. Set a global variable *and* make sure the - setting isn't eliminated by optimizers: another call to sfa - should do it. */ - trap_expected = 0; - -#ifdef mis_ok - /* We're missing a sequence point, but we shouldn't have the initial - value. */ - if (s.i == (type) 0xdeadbeef) - abort (); - exit (0); -#endif - - sfa (&x, &x, 1); -#else - acen (&s.i, &x, &ret); - -#ifdef mis_ok - if (s.i != 2 || x != 2 || ret != (type) 0xdeadbeef) - abort (); - exit (0); -#endif - - trap_expected = 0; - - acen (&x, &x, &ret); -#endif - - abort (); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1a.c deleted file mode 100644 index ba639172b..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1ml.c deleted file mode 100644 index 3685c5047..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dop -Dtype=short -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1.c deleted file mode 100644 index da25614e2..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -mno-unaligned-atomic-may-use-library" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1a.c deleted file mode 100644 index 09a7a9ea3..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1ml.c deleted file mode 100644 index d757a683b..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2.c deleted file mode 100644 index e8a425328..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2a.c deleted file mode 100644 index 2b97613de..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2ml.c deleted file mode 100644 index fb711e0ef..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3.c deleted file mode 100644 index 4a3511bf2..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3a.c deleted file mode 100644 index 94a25e37f..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3ml.c deleted file mode 100644 index 32f8ebbd9..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1.c deleted file mode 100644 index d8dede9c1..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=short -mno-unaligned-atomic-may-use-library" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1a.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1a.c deleted file mode 100644 index 6f5eb02af..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1a.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do run } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */ -/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */ -/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1ml.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1ml.c deleted file mode 100644 index a6f501c10..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1ml.c +++ /dev/null @@ -1,4 +0,0 @@ -/* { dg-do run { target *-*-linux* } } */ -/* { dg-additional-sources "../sync-1.c" } */ -/* { dg-options "-Dxchg -Dtype=short -Dmis_ok" } */ -#include "sync-mis-op-s-1.c" diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-1.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-1.c deleted file mode 100644 index 48363fbb3..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Check that "break 8" defaults according to CPU version. */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "*-*-*" } { "-march*" } { "" } } */ -/* { dg-final { scan-assembler "break 8" { target { ! cris-*-elf } } } } */ -/* { dg-final { scan-assembler-not "bsr" { target { ! cris-*-elf } } } } */ -/* { dg-final { scan-assembler-not "jsr" { target { ! cris-*-elf } } } } */ -/* { dg-final { scan-assembler-not "break\[ \t\]" { target cris-*-elf } } } */ -/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" { target cris-*-elf } } } */ - -void do_trap (void) -{ - __builtin_trap (); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-2.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-2.c deleted file mode 100644 index 155d5fe42..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-2.c +++ /dev/null @@ -1,11 +0,0 @@ -/* As trap-1.c but forcing on. */ -/* { dg-do compile } */ -/* { dg-options "-mtrap-using-break8" } */ -/* { dg-final { scan-assembler "break 8" } } */ -/* { dg-final { scan-assembler-not "bsr" } } */ -/* { dg-final { scan-assembler-not "jsr" } } */ - -void do_trap (void) -{ - __builtin_trap (); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-3.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-3.c deleted file mode 100644 index dfa092445..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-3.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Like trap-1.c and trap-2.c but force calls to abort. */ -/* { dg-do compile } */ -/* { dg-options "-mno-trap-using-break8" } */ -/* { dg-final { scan-assembler-not "break\[ \t\]" } } */ -/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" } } */ - -void do_trap (void) -{ - __builtin_trap (); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-v0.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-v0.c deleted file mode 100644 index 084fb28d4..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-v0.c +++ /dev/null @@ -1,11 +0,0 @@ -/* As trap-1.c but with CPU version specified, excluding. */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "*-*-*" } { "-march=*" } { "" } } */ -/* { dg-options "-march=v0" } */ -/* { dg-final { scan-assembler-not "break\[ \t\]" } } */ -/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" } } */ - -void do_trap (void) -{ - __builtin_trap (); -} diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-v3.c b/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-v3.c deleted file mode 100644 index e004c5bc8..000000000 --- a/gcc-4.8.1/gcc/testsuite/gcc.target/cris/torture/trap-v3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* As trap-1.c but with CPU version specified, including. */ -/* { dg-do compile } */ -/* { dg-skip-if "" { "*-*-*" } { "-march=*" } { "" } } */ -/* { dg-options "-march=v3" } */ -/* { dg-final { scan-assembler "break 8" } } */ -/* { dg-final { scan-assembler-not "bsr" } } */ -/* { dg-final { scan-assembler-not "jsr" } } */ - -void do_trap (void) -{ - __builtin_trap (); -} |