Always keep the newly-added configure scripts.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.disasm / sh3.exp
CommitLineData
98395eaf
JL
1# Copyright (C) 1992 Free Software Foundation, Inc.
2
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 2 of the License, or
6# (at your option) any later version.
7#
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.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
16
17# Please email any bugs, comments, and/or additions to this file to:
18# bug-gdb@prep.ai.mit.edu
19
20# This file was written by Jeff Law. (law@cs.utah.edu)
21
22if $tracelevel then {
23 strace $tracelevel
24}
25
26set prms_id 0
27set bug_id 0
28
29set binfile "sh3"
30set srcfile $binfile.s
31
32proc all_fp_move_and_load_tests { } {
33 global prompt
34 global hex
35 global decimal
36
37 send "x/9i fp_move_and_load_tests\n"
38 expect {
39 -re "
40.*fmov.s\t@r0,fr0.*
41.*fmov.s\tfr0,@r0.*
42.*fmov.s\t@r0\\+,fr0.*
43.*fmov.s\tfr0,@-r0.*
44.*fmov.s\t@\\(r0,r0\\),fr0.*
45.*fmov.s\tfr0,@\\(r0,r0\\).*
46.*fmov\tfr0,fr1.*
47.*fldi0\tfr0.*
48.*fldi1\tfr0.*
49.*$prompt $" { pass "fp_move_and_load_tests" }
50 -re "$prompt $" { fail "fp_move_and_load_tests" }
51 timeout { fail "(timeout) fp_move_and_load_tests" }
52 }
53}
54
55proc all_fp_arithmetic_tests { } {
56 global prompt
57 global hex
58 global decimal
59
60 send "x/13i fp_arithmetic_tests\n"
61 expect {
62 -re "
63.*fadd\tfr0,fr1.*
64.*fsub\tfr0,fr1.*
65.*fmul\tfr0,fr1.*
66.*fdiv\tfr0,fr1.*
67.*fmac\tfr0,fr1.*
68.*fcmp/eq\tfr0,fr1.*
69.*fcmp/gt\tfr0,fr1.*
70.*ftst/nan\tfr0.*
71.*fneg\tfr0.*
72.*fabs\tfr0.*
73.*fsqrt\tfr0.*
74.*float\tfpul,fr0.*
75.*ftrc\tfr0,fpul.*
76.*$prompt $" { pass "fp_arithmetic_tests" }
77 -re "$prompt $" { fail "fp_arithmetic_tests" }
78 timeout { fail "(timeout) fp_arithmetic_tests" }
79 }
80}
81
82proc all_fp_misc_tests { } {
83 global prompt
84 global hex
85 global decimal
86
87 send "x/10i fp_misc_tests\n"
88 expect {
89 -re "
90.*fsts\tfpul,fr0.*
91.*flds\tfr0,fpul.*
92.*lds\tr3,fpul.*
93.*lds\\.l\t@r3\\+,fpul.*
94.*lds\tr3,fpscr.*
95.*lds\\.l\t@r3\\+,fpscr.*
96.*sts\tfpul,r3.*
97.*sts\\.l\tfpul,@-r3.*
98.*sts\tfpscr,r3.*
99.*sts\\.l\tfpscr,@-r3.*
100.*$prompt $" { pass "fp_misc_tests" }
101 -re "$prompt $" { fail "fp_misc_tests" }
102 timeout { fail "(timeout) fp_misc_tests" }
103 }
104}
105
106if ![file exists $objdir/$subdir/$binfile] then {
107 if $all_flag then {
108 warning "$objdir/$subdir/$binfile does not exist; tests suppressed"
109 }
110} else {
111 # Start with a fresh gdb.
112
113 gdb_exit
114 gdb_start
115 gdb_reinitialize_dir $srcdir/$subdir
116 gdb_load $objdir/$subdir/$binfile
117
118 all_fp_move_and_load_tests
119 all_fp_arithmetic_tests
98395eaf
JL
120 all_fp_misc_tests
121}
This page took 0.044088 seconds and 4 git commands to generate.