Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Side by Side Diff: gdb/testsuite/gdb.arch/altivec-abi.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.arch/alpha-step.exp ('k') | gdb/testsuite/gdb.arch/altivec-regs.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2002-2003, 2005, 2007-2012 Free Software Foundation, 1 # Copyright (C) 2002-2003, 2005, 2007-2012 Free Software Foundation,
2 # Inc. 2 # Inc.
3 # 3 #
4 # This program is free software; you can redistribute it and/or modify 4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by 5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or 6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version. 7 # (at your option) any later version.
8 # 8 #
9 # This program is distributed in the hope that it will be useful, 9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. 12 # GNU General Public License for more details.
13 # 13 #
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 # 16 #
17 17
18 # Tests for Powerpc AltiVec ABI 18 # Tests for Powerpc AltiVec ABI
19 19
20 20
21 if $tracelevel then {
22 strace $tracelevel
23 }
24
25 # 21 #
26 # This file uses altivec-abi.c for input. 22 # This file uses altivec-abi.c for input.
27 # 23 #
28 24
29 if {![istarget "powerpc*"] || [skip_altivec_tests]} then { 25 if {![istarget "powerpc*"] || [skip_altivec_tests]} then {
30 verbose "Skipping altivec abi tests." 26 verbose "Skipping altivec abi tests."
31 return 27 return
32 } 28 }
33 29
34 set testfile "altivec-abi" 30 set testfile "altivec-abi"
35 set binfile ${objdir}/${subdir}/${testfile} 31 set binfile ${objdir}/${subdir}/${testfile}
36 set srcfile ${testfile}.c 32 set srcfile ${testfile}.c
37 33
38 if [get_compiler_info $binfile] { 34 if [get_compiler_info] {
39 warning "get_compiler failed" 35 warning "get_compiler failed"
40 return -1 36 return -1
41 } 37 }
42 38
43 proc altivec_abi_tests { extra_flags force_abi } { 39 proc altivec_abi_tests { extra_flags force_abi } {
44 global testfile binfile srcfile srcdir subdir 40 global testfile binfile srcfile srcdir subdir
45 global gdb_prompt 41 global gdb_prompt
46 42
47 set compile_flags "debug nowarnings $extra_flags" 43 set compile_flags "debug nowarnings $extra_flags"
48 44
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 "back to main (2)" 140 "back to main (2)"
145 141
146 gdb_test "step" "" "step into array_of_vector_func" 142 gdb_test "step" "" "step into array_of_vector_func"
147 gdb_test "p matrix\[0\]" ".*= .1, 2, 3, 4, 5, 6, 7, 8." "print first vector" 143 gdb_test "p matrix\[0\]" ".*= .1, 2, 3, 4, 5, 6, 7, 8." "print first vector"
148 gdb_test "p matrix\[1\]" ".*= .11, 12, 13, 14, 15, 16, 17, 18." "print secon d vector" 144 gdb_test "p matrix\[1\]" ".*= .11, 12, 13, 14, 15, 16, 17, 18." "print secon d vector"
149 gdb_test "p matrix\[2\]" ".*= .21, 22, 23, 24, 25, 26, 27, 28." "print third vector" 145 gdb_test "p matrix\[2\]" ".*= .21, 22, 23, 24, 25, 26, 27, 28." "print third vector"
150 gdb_test "p matrix\[3\]" ".*= .31, 32, 33, 34, 35, 36, 37, 38." "print fourt h vector" 146 gdb_test "p matrix\[3\]" ".*= .31, 32, 33, 34, 35, 36, 37, 38." "print fourt h vector"
151 } 147 }
152 148
153 if [test_compiler_info gcc*] { 149 if [test_compiler_info gcc*] {
154 set saved_prefix $pf_prefix 150 with_test_prefix "default ABI, auto" {
155 151 » altivec_abi_tests "additional_flags=-maltivec" "auto"
156 set pf_prefix "${saved_prefix} default ABI, auto:" 152 }
157 altivec_abi_tests "additional_flags=-maltivec" "auto"
158 153
159 # On GNU/Linux, we can mix -mabi=no-altivec and -mabi=altivec. 154 # On GNU/Linux, we can mix -mabi=no-altivec and -mabi=altivec.
160 # So test some combinations. 155 # So test some combinations.
161 if { [istarget "powerpc*-linux*"] } { 156 if { [istarget "powerpc*-linux*"] } {
162 # On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec 157 # On 64-bit GNU/Linux with GCC 4.1 and 4.2, -mabi=no-altivec
163 # was broken, so skip those tests there. 158 # was broken, so skip those tests there.
164 if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } { 159 if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } {
165 set binfile ${objdir}/${subdir}/${testfile}-ge-ge 160 set binfile ${objdir}/${subdir}/${testfile}-ge-ge
166 » set pf_prefix "${saved_prefix} generic ABI, forced:" 161 » with_test_prefix "generic ABI, forced" {
167 » altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi =no-altivec" "generic" 162 » » altivec_abi_tests "additional_flags=-maltivec additional_flags=- mabi=no-altivec" "generic"
163 » }
168 164
169 set binfile ${objdir}/${subdir}/${testfile}-ge-auto 165 set binfile ${objdir}/${subdir}/${testfile}-ge-auto
170 » set pf_prefix "${saved_prefix} generic ABI, auto:" 166 » with_test_prefix "generic ABI, auto" {
171 » altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi =no-altivec" "auto" 167 » » altivec_abi_tests "additional_flags=-maltivec additional_flags=- mabi=no-altivec" "auto"
168 » }
172 } 169 }
173 170
174 set binfile ${objdir}/${subdir}/${testfile}-av-av 171 set binfile ${objdir}/${subdir}/${testfile}-av-av
175 » set pf_prefix "${saved_prefix} AltiVec ABI, forced:" 172 » with_test_prefix "AltiVec ABI, forced" {
176 » altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=alt ivec" "altivec" 173 » altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi =altivec" "altivec"
174 » }
177 175
178 set binfile ${objdir}/${subdir}/${testfile}-av-auto 176 set binfile ${objdir}/${subdir}/${testfile}-av-auto
179 » set pf_prefix "${saved_prefix} AltiVec ABI, auto:" 177 » with_test_prefix "AltiVec ABI, auto" {
180 » altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=alt ivec" "auto" 178 » altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi =altivec" "auto"
179 » }
181 } 180 }
182 } elseif [test_compiler_info xlc*] { 181 } elseif [test_compiler_info xlc*] {
183 altivec_abi_tests "additional_flags=-qaltivec" "auto" 182 altivec_abi_tests "additional_flags=-qaltivec" "auto"
184 } else { 183 } else {
185 warning "unknown compiler" 184 warning "unknown compiler"
186 return -1 185 return -1
187 } 186 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.arch/alpha-step.exp ('k') | gdb/testsuite/gdb.arch/altivec-regs.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698