| OLD | NEW |
| 1 # Copyright (C) 2008-2012 Free Software Foundation, Inc. | 1 # Copyright (C) 2008-2012 Free Software Foundation, Inc. |
| 2 # | 2 # |
| 3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
| 6 # (at your option) any later version. | 6 # (at your option) any later version. |
| 7 # | 7 # |
| 8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
| 12 # | 12 # |
| 13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
| 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 # | 15 # |
| 16 | 16 |
| 17 if $tracelevel then { | |
| 18 strace $tracelevel | |
| 19 } | |
| 20 | |
| 21 # | 17 # |
| 22 # Test the use of VSX registers, for Powerpc. | 18 # Test the use of VSX registers, for Powerpc. |
| 23 # | 19 # |
| 24 | 20 |
| 25 | 21 |
| 26 if {![istarget "powerpc*"] || [skip_vsx_tests]} then { | 22 if {![istarget "powerpc*"] || [skip_vsx_tests]} then { |
| 27 verbose "Skipping vsx register tests." | 23 verbose "Skipping vsx register tests." |
| 28 return | 24 return |
| 29 } | 25 } |
| 30 | 26 |
| 31 set testfile "vsx-regs" | 27 set testfile "vsx-regs" |
| 32 set binfile ${objdir}/${subdir}/${testfile} | 28 set binfile ${objdir}/${subdir}/${testfile} |
| 33 set srcfile ${testfile}.c | 29 set srcfile ${testfile}.c |
| 34 | 30 |
| 35 set compile_flags {debug nowarnings quiet} | 31 set compile_flags {debug nowarnings quiet} |
| 36 if [get_compiler_info $binfile] { | 32 if [get_compiler_info] { |
| 37 warning "get_compiler failed" | 33 warning "get_compiler failed" |
| 38 return -1 | 34 return -1 |
| 39 } | 35 } |
| 40 | 36 |
| 41 if [test_compiler_info gcc*] { | 37 if [test_compiler_info gcc*] { |
| 42 set compile_flags "$compile_flags additional_flags=-maltivec additional_flag
s=-mabi=altivec" | 38 set compile_flags "$compile_flags additional_flags=-maltivec additional_flag
s=-mabi=altivec" |
| 43 } elseif [test_compiler_info xlc*] { | 39 } elseif [test_compiler_info xlc*] { |
| 44 set compile_flags "$compile_flags additional_flags=-qaltivec" | 40 set compile_flags "$compile_flags additional_flags=-qaltivec" |
| 45 } else { | 41 } else { |
| 46 warning "unknown compiler" | 42 warning "unknown compiler" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } | 211 } |
| 216 } | 212 } |
| 217 | 213 |
| 218 for {set i 0} {$i < 32} {incr i 1} { | 214 for {set i 0} {$i < 32} {incr i 1} { |
| 219 gdb_test "info reg vs$i" "vs$i.*$vector_register2" "Restore vs$i from core f
ile" | 215 gdb_test "info reg vs$i" "vs$i.*$vector_register2" "Restore vs$i from core f
ile" |
| 220 } | 216 } |
| 221 | 217 |
| 222 for {set i 32} {$i < 64} {incr i 1} { | 218 for {set i 32} {$i < 64} {incr i 1} { |
| 223 gdb_test "info reg vs$i" "vs$i.*$vector_register3" "Restore vs$i from core f
ile" | 219 gdb_test "info reg vs$i" "vs$i.*$vector_register3" "Restore vs$i from core f
ile" |
| 224 } | 220 } |
| OLD | NEW |