OLD | NEW |
1 # Copyright 2009-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-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 # This file is part of the gdb testsuite. | 16 # This file is part of the gdb testsuite. |
17 | 17 |
18 if $tracelevel { | |
19 strace $tracelevel | |
20 } | |
21 | |
22 | 18 |
23 if ![istarget "i?86-*linux*"] then { | 19 if ![istarget "i?86-*linux*"] then { |
24 verbose "Skipping i387 reverse float tests." | 20 verbose "Skipping i387 reverse float tests." |
25 return | 21 return |
26 } | 22 } |
27 | 23 |
28 set testfile "i387-stack-reverse" | 24 standard_testfile |
29 set srcfile ${testfile}.c | |
30 set binfile ${objdir}/${subdir}/${testfile} | |
31 | 25 |
32 # some targets have leading underscores on assembly symbols. | 26 # some targets have leading underscores on assembly symbols. |
33 set additional_flags [gdb_target_symbol_prefix_flags] | 27 set additional_flags [gdb_target_symbol_prefix_flags] |
34 | 28 |
35 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
debug $additional_flags]] != "" } { | 29 if {[prepare_for_testing $testfile.exp $testfile $srcfile \ |
36 untested ${testfile}.exp | 30 » [list debug $additional_flags]]} { |
37 return -1 | 31 return -1 |
38 } | 32 } |
39 | 33 |
40 # Get things started. | |
41 | |
42 gdb_exit | |
43 gdb_start | |
44 gdb_reinitialize_dir $srcdir/$subdir | |
45 gdb_load ${binfile} | |
46 runto main | 34 runto main |
47 | 35 |
48 # Record to end of main | 36 # Record to end of main |
49 | 37 |
50 set location [gdb_get_line_number "END I387-FLOAT-REVERSE"] | 38 set location [gdb_get_line_number "END I387-FLOAT-REVERSE"] |
51 gdb_test_no_output "record" "Turn on process record" | 39 gdb_test_no_output "record" "Turn on process record" |
52 gdb_test "until $location" ".*/$srcfile:$location.*" \ | 40 gdb_test "until $location" ".*/$srcfile:$location.*" \ |
53 "record to end of main" | 41 "record to end of main" |
54 | 42 |
55 # Now rewind to beginning so we can begin testing. | 43 # Now rewind to beginning so we can begin testing. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 gdb_test "info register st0" "st0 *3.32192.*\t.*" "verify st0 == 3.3219280948*" | 150 gdb_test "info register st0" "st0 *3.32192.*\t.*" "verify st0 == 3.3219280948*" |
163 gdb_test "info register st1" "st1 *1\t.*" "verify st1 == 1" | 151 gdb_test "info register st1" "st1 *1\t.*" "verify st1 == 1" |
164 | 152 |
165 gdb_test "reverse-stepi" "asm.*fldl2t.*" "push st0 == 1" | 153 gdb_test "reverse-stepi" "asm.*fldl2t.*" "push st0 == 1" |
166 gdb_test "info register st0" "st0 *1\t.*" "verify st0 == 1"
| 154 gdb_test "info register st0" "st0 *1\t.*" "verify st0 == 1"
|
167 | 155 |
168 | 156 |
169 | 157 |
170 | 158 |
171 | 159 |
OLD | NEW |