OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.disasm/] [sh3.exp] - Blame information for rev 833

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# Copyright (C) 1992, 1997, 2007, 2008, 2009, 2010
2
# Free Software Foundation, Inc.
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
6
# the Free Software Foundation; either version 3 of the License, or
7
# (at your option) any later version.
8
#
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.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program.  If not, see .
16
 
17
# This file was written by Jeff Law. (law@cs.utah.edu)
18
 
19
if $tracelevel then {
20
        strace $tracelevel
21
}
22
 
23
if ![istarget "sh3*-*-*"] {
24
    verbose "Tests ignored for all but sh3 based targets."
25
    return
26
}
27
 
28
set prms_id 0
29
set bug_id 0
30
 
31
set testfile "sh3"
32
set srcfile ${srcdir}/${subdir}/${testfile}.s
33
set binfile ${objdir}/${subdir}/${testfile}
34
if  { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
35
     untested sh3.exp
36
     return -1
37
}
38
 
39
proc 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
 
62
proc 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
 
89
proc 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
 
113
gdb_exit
114
gdb_start
115
gdb_reinitialize_dir $srcdir/$subdir
116
gdb_load $binfile
117
 
118
all_fp_move_and_load_tests
119
all_fp_arithmetic_tests
120
all_fp_misc_tests
121
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.