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 floating point register setting and fetching | 17 # Tests for Powerpc floating point register 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 floating point register tests." | 20 verbose "Skipping powerpc floating point register tests." |
25 return | 21 return |
26 } | 22 } |
27 | 23 |
28 set testfile "ppc-fp" | 24 set testfile "ppc-fp" |
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 # Step over division by zero. | 84 # Step over division by zero. |
89 gdb_test "next" "" "" | 85 gdb_test "next" "" "" |
90 | 86 |
91 # Verify that the following bits are set (See Power ISA for details): | 87 # Verify that the following bits are set (See Power ISA for details): |
92 # | 88 # |
93 # 32 - Floating-Point Exception Summary (FX) | 89 # 32 - Floating-Point Exception Summary (FX) |
94 # 37 - Floating-Point Zero Divide Exception (ZX) | 90 # 37 - Floating-Point Zero Divide Exception (ZX) |
95 # 49 - Floating-Point Greater Than or Positive (FG or >) | 91 # 49 - Floating-Point Greater Than or Positive (FG or >) |
96 # 51 - Floating-Point Unordered or NaN (FU or ?) | 92 # 51 - Floating-Point Unordered or NaN (FU or ?) |
97 gdb_test "print/t \$fpscr" " = 10000100000000000101000000000000" "FPSCR for divi
sion by zero" | 93 gdb_test "print/t \$fpscr" " = 10000100000000000101000000000000" "FPSCR for divi
sion by zero" |
OLD | NEW |