1 # Copyright (C) 1992, 1997, 2007, 2008, 2009, 2010
2 # Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # This file was written by Jeff Law. (law@cs.utah.edu)
23 if ![istarget "sh3*-*-*"] {
24 verbose "Tests ignored for all but sh3 based targets."
32 set srcfile ${srcdir}/${subdir}/${testfile}.s
33 set binfile ${objdir}/${subdir}/${testfile}
34 if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
39 proc all_fp_move_and_load_tests { } {
44 send_gdb "x/9i fp_move_and_load_tests\n"
49 .*fmov.s\t@r0\\+,fr0.*
51 .*fmov.s\t@\\(r0,r0\\),fr0.*
52 .*fmov.s\tfr0,@\\(r0,r0\\).*
56 .*$gdb_prompt $" { pass "fp_move_and_load_tests" }
57 -re "$gdb_prompt $" { fail "fp_move_and_load_tests" }
58 timeout { fail "(timeout) fp_move_and_load_tests" }
62 proc all_fp_arithmetic_tests { } {
67 send_gdb "x/13i fp_arithmetic_tests\n"
83 .*$gdb_prompt $" { pass "fp_arithmetic_tests" }
84 -re "$gdb_prompt $" { fail "fp_arithmetic_tests" }
85 timeout { fail "(timeout) fp_arithmetic_tests" }
89 proc all_fp_misc_tests { } {
94 send_gdb "x/10i fp_misc_tests\n"
100 .*lds\\.l\t@r3\\+,fpul.*
102 .*lds\\.l\t@r3\\+,fpscr.*
104 .*sts\\.l\tfpul,@-r3.*
106 .*sts\\.l\tfpscr,@-r3.*
107 .*$gdb_prompt $" { pass "fp_misc_tests" }
108 -re "$gdb_prompt $" { fail "fp_misc_tests" }
109 timeout { fail "(timeout) fp_misc_tests" }
115 gdb_reinitialize_dir $srcdir/$subdir
118 all_fp_move_and_load_tests
119 all_fp_arithmetic_tests