OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [vect/] [vect.exp] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#   Copyright (C) 2004, 2007 Free Software Foundation, Inc.
2
 
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 3 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with GCC; see the file COPYING3.  If not see
15
# .
16
 
17
# GCC testsuite that uses the 'dg.exp' driver.
18
 
19
# There's a bunch of headers we need.
20
if [is_remote host] {
21
    foreach header [glob -nocomplain $srcdir/$subdir/*.{h,def} ] {
22
        remote_download host $header
23
    }
24
}
25
 
26
# Load support procs.
27
load_lib g++-dg.exp
28
load_lib target-supports.exp
29
 
30
# If the target system supports vector instructions, the default action
31
# for a test is 'run', otherwise it's 'compile'.  Save current default.
32
# Executing vector instructions on a system without hardware vector support
33
# is also disabled by a call to check_vect, but disabling execution here is
34
# more efficient.
35
global dg-do-what-default
36
set save-dg-do-what-default ${dg-do-what-default}
37
 
38
# Set up flags used for tests that don't specify options.
39
set DEFAULT_VECTCFLAGS ""
40
 
41
# These flags are used for all targets.
42
lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" \
43
  "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
44
 
45
# Skip these tests for targets that do not support generating vector
46
# code.  Set additional target-dependent vector flags, which can be
47
# overridden by using dg-options in individual tests.
48
if [istarget "powerpc*-*-*"] {
49
    # Skip targets not supporting -maltivec.
50
    if ![is-effective-target powerpc_altivec_ok] {
51
        return
52
    }
53
 
54
    lappend DEFAULT_VECTCFLAGS "-maltivec"
55
    if [check_vmx_hw_available] {
56
        set dg-do-what-default run
57
    } else {
58
        if [is-effective-target ilp32] {
59
            # Specify a cpu that supports VMX for compile-only tests.
60
            lappend DEFAULT_VECTCFLAGS "-mcpu=7400"
61
        }
62
        set dg-do-what-default compile
63
    }
64
} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
65
    lappend DEFAULT_VECTCFLAGS "-msse2"
66
    set dg-do-what-default run
67
} elseif { [istarget "mipsisa64*-*-*"]
68
           && [check_effective_target_mpaired_single] } {
69
    lappend DEFAULT_VECTCFLAGS "-mpaired-single"
70
    set dg-do-what-default run
71
} elseif [istarget "sparc*-*-*"] {
72
    lappend DEFAULT_VECTCFLAGS "-mcpu=ultrasparc" "-mvis"
73
    set dg-do-what-default run
74
} elseif [istarget "alpha*-*-*"] {
75
    lappend DEFAULT_VECTCFLAGS "-mmax"
76
    if [check_alpha_max_hw_available] {
77
        set dg-do-what-default run
78
    } else {
79
        set dg-do-what-default compile
80
    }
81
} elseif [istarget "ia64-*-*"] {
82
    set dg-do-what-default run
83
} else {
84
    return
85
}
86
 
87
 
88
# Initialize `dg'.
89
dg-init
90
 
91
# Main loop.
92
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,cc,S} ]] \
93
        "" $DEFAULT_VECTCFLAGS
94
 
95
#### Tests with special options
96
global SAVED_DEFAULT_VECTCFLAGS
97
set SAVED_DEFAULT_VECTCFLAGS $DEFAULT_VECTCFLAGS
98
 
99
# --param max-aliased-vops=0
100
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
101
lappend DEFAULT_VECTCFLAGS "--param max-aliased-vops=0"
102
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/param-max-aliased*.\[cS\]]]  \
103
        "" $DEFAULT_VECTCFLAGS
104
 
105
# Clean up.
106
set dg-do-what-default ${save-dg-do-what-default}
107
 
108
# All done.
109
dg-finish

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.