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 # Tests for Powerpc Decimal Floating Point registers setting and fetching | 17 # Tests for Powerpc Decimal Floating Point registers setting and fetching |
18 | 18 |
19 if $tracelevel then { | |
20 strace $tracelevel | |
21 } | |
22 | |
23 if ![istarget "powerpc*"] then { | 19 if ![istarget "powerpc*"] then { |
24 verbose "Skipping powerpc decimal floating point register tests." | 20 verbose "Skipping powerpc decimal floating point register tests." |
25 return | 21 return |
26 } | 22 } |
27 | 23 |
28 set testfile "ppc-dfp" | 24 set testfile "ppc-dfp" |
29 set binfile ${objdir}/${subdir}/${testfile} | 25 set binfile ${objdir}/${subdir}/${testfile} |
30 set srcfile ${testfile}.c | 26 set srcfile ${testfile}.c |
31 | 27 |
32 if [get_compiler_info $binfile] { | 28 if [get_compiler_info] { |
33 warning "get_compiler failed" | 29 warning "get_compiler failed" |
34 return -1 | 30 return -1 |
35 } | 31 } |
36 | 32 |
37 if ![test_compiler_info gcc*] { | 33 if ![test_compiler_info gcc*] { |
38 # We use GCC's extended asm syntax | 34 # We use GCC's extended asm syntax |
39 warning "unknown compiler" | 35 warning "unknown compiler" |
40 return -1 | 36 return -1 |
41 } | 37 } |
42 | 38 |
(...skipping 27 matching lines...) Expand all Loading... |
70 # First, verify if FPSCR is all zeroes. | 66 # First, verify if FPSCR is all zeroes. |
71 gdb_test "print \$fpscr" " = 0" "FPSCR is all zeroes" | 67 gdb_test "print \$fpscr" " = 0" "FPSCR is all zeroes" |
72 | 68 |
73 # Step over "set rounding mode" instruction. | 69 # Step over "set rounding mode" instruction. |
74 gdb_test "next" "" "" | 70 gdb_test "next" "" "" |
75 | 71 |
76 # Verify that the following bits are set (See Power ISA for details): | 72 # Verify that the following bits are set (See Power ISA for details): |
77 # | 73 # |
78 # 29:31 - DFP Rounding Control | 74 # 29:31 - DFP Rounding Control |
79 gdb_test "print/t \$fpscr" " = 10100000000000000000000000000000000" "FPSCR for r
ound to nearest, ties toward zero rounding mode" | 75 gdb_test "print/t \$fpscr" " = 10100000000000000000000000000000000" "FPSCR for r
ound to nearest, ties toward zero rounding mode" |
OLD | NEW |