Update copyright year in most headers.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.disasm / sh3.exp
CommitLineData
4c38e0a4
JB
1# Copyright (C) 1992, 1997, 2007, 2008, 2009, 2010
2# Free Software Foundation, Inc.
c906108c
SS
3
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
e22f8b7c 6# the Free Software Foundation; either version 3 of the License, or
c906108c 7# (at your option) any later version.
e22f8b7c 8#
c906108c
SS
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.
e22f8b7c 13#
c906108c 14# You should have received a copy of the GNU General Public License
e22f8b7c 15# along with this program. If not, see <http://www.gnu.org/licenses/>.
c906108c 16
c906108c
SS
17# This file was written by Jeff Law. (law@cs.utah.edu)
18
19if $tracelevel then {
20 strace $tracelevel
21}
22
23if ![istarget "sh3*-*-*"] {
24 verbose "Tests ignored for all but sh3 based targets."
25 return
26}
27
28set prms_id 0
29set bug_id 0
30
31set testfile "sh3"
32set srcfile ${srcdir}/${subdir}/${testfile}.s
33set binfile ${objdir}/${subdir}/${testfile}
34if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
b60f0898
JB
35 untested sh3.exp
36 return -1
c906108c
SS
37}
38
39proc all_fp_move_and_load_tests { } {
40 global gdb_prompt
41 global hex
42 global decimal
43
44 send_gdb "x/9i fp_move_and_load_tests\n"
45 gdb_expect {
46 -re "
47.*fmov.s\t@r0,fr0.*
48.*fmov.s\tfr0,@r0.*
49.*fmov.s\t@r0\\+,fr0.*
50.*fmov.s\tfr0,@-r0.*
51.*fmov.s\t@\\(r0,r0\\),fr0.*
52.*fmov.s\tfr0,@\\(r0,r0\\).*
53.*fmov\tfr0,fr1.*
54.*fldi0\tfr0.*
55.*fldi1\tfr0.*
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" }
59 }
60}
61
62proc all_fp_arithmetic_tests { } {
63 global gdb_prompt
64 global hex
65 global decimal
66
67 send_gdb "x/13i fp_arithmetic_tests\n"
68 gdb_expect {
69 -re "
70.*fadd\tfr0,fr1.*
71.*fsub\tfr0,fr1.*
72.*fmul\tfr0,fr1.*
73.*fdiv\tfr0,fr1.*
74.*fmac\tfr0,fr0,fr1.*
75.*fcmp/eq\tfr0,fr1.*
76.*fcmp/gt\tfr0,fr1.*
77.*ftst/nan\tfr0.*
78.*fneg\tfr0.*
79.*fabs\tfr0.*
80.*fsqrt\tfr0.*
81.*float\tfpul,fr0.*
82.*ftrc\tfr0,fpul.*
83.*$gdb_prompt $" { pass "fp_arithmetic_tests" }
84 -re "$gdb_prompt $" { fail "fp_arithmetic_tests" }
85 timeout { fail "(timeout) fp_arithmetic_tests" }
86 }
87}
88
89proc all_fp_misc_tests { } {
90 global gdb_prompt
91 global hex
92 global decimal
93
94 send_gdb "x/10i fp_misc_tests\n"
95 gdb_expect {
96 -re "
97.*fsts\tfpul,fr0.*
98.*flds\tfr0,fpul.*
99.*lds\tr3,fpul.*
100.*lds\\.l\t@r3\\+,fpul.*
101.*lds\tr3,fpscr.*
102.*lds\\.l\t@r3\\+,fpscr.*
103.*sts\tfpul,r3.*
104.*sts\\.l\tfpul,@-r3.*
105.*sts\tfpscr,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" }
110 }
111}
112
113gdb_exit
114gdb_start
115gdb_reinitialize_dir $srcdir/$subdir
116gdb_load $binfile
117
118all_fp_move_and_load_tests
119all_fp_arithmetic_tests
120all_fp_misc_tests
121
This page took 0.897572 seconds and 4 git commands to generate.