1 # Copyright (C) 1992, 1997, 2007, 2008 Free Software Foundation, Inc.
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
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
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/>.
16 # Please email any bugs, comments, and/or additions to this file to:
17 # bug-gdb@prep.ai.mit.edu
19 # This file was written by Jeff Law. (law@cs.utah.edu)
25 if ![istarget "sh3*-*-*"] {
26 verbose "Tests ignored for all but sh3 based targets."
34 set srcfile ${srcdir}/${subdir}/${testfile}.s
35 set binfile ${objdir}/${subdir}/${testfile}
36 if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
41 proc all_fp_move_and_load_tests { } {
46 send_gdb "x/9i fp_move_and_load_tests\n"
51 .*fmov.s\t@r0\\+,fr0.*
53 .*fmov.s\t@\\(r0,r0\\),fr0.*
54 .*fmov.s\tfr0,@\\(r0,r0\\).*
58 .*$gdb_prompt $" { pass "fp_move_and_load_tests" }
59 -re "$gdb_prompt $" { fail "fp_move_and_load_tests" }
60 timeout { fail "(timeout) fp_move_and_load_tests" }
64 proc all_fp_arithmetic_tests { } {
69 send_gdb "x/13i fp_arithmetic_tests\n"
85 .*$gdb_prompt $" { pass "fp_arithmetic_tests" }
86 -re "$gdb_prompt $" { fail "fp_arithmetic_tests" }
87 timeout { fail "(timeout) fp_arithmetic_tests" }
91 proc all_fp_misc_tests { } {
96 send_gdb "x/10i fp_misc_tests\n"
102 .*lds\\.l\t@r3\\+,fpul.*
104 .*lds\\.l\t@r3\\+,fpscr.*
106 .*sts\\.l\tfpul,@-r3.*
108 .*sts\\.l\tfpscr,@-r3.*
109 .*$gdb_prompt $" { pass "fp_misc_tests" }
110 -re "$gdb_prompt $" { fail "fp_misc_tests" }
111 timeout { fail "(timeout) fp_misc_tests" }
117 gdb_reinitialize_dir $srcdir/$subdir
120 all_fp_move_and_load_tests
121 all_fp_arithmetic_tests