aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch/powerpc-vsx.exp
blob: 1cbca2fd27f84b41a2f0431517496707962667d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# Copyright 2014-2018 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# This file is part of the gdb testsuite.

# Test PowerPC instructions disassembly.

standard_testfile .s
set objfile [standard_output_file ${testfile}.o]

if {![istarget "powerpc*-*-*"]} then {
    verbose "Skipping PowerPC instructions disassembly."
    return
}

if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
    untested "PowerPC instructions disassembly"
    return -1
}

clean_restart ${objfile}

# Disassemble the function.
set func ""

gdb_test "set disassembler-options vsx"
set test "disass func"
gdb_test_multiple $test $test {
    -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
	set func $expect_out(1,string)
	pass $test
    }
}

proc instr_to_patt {instr} {
    global decimal hex
    # 0x0000000000000018 <+24>:	stxvd2x vs43,r4,r5
    return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
}

proc func_check {instr} {
    global func

    set test "found: $instr"
    if [regexp -nocase -line [instr_to_patt $instr] $func] {
	pass $test
    } else {
	fail $test
    }
}

func_check "lxsdx   vs40,r10,r20"
func_check "lxvd2x  vs40,r10,r20"
func_check "lxvdsx  vs40,r10,r20"
func_check "lxvw4x  vs40,r10,r20"
func_check "stxsdx  vs40,r10,r20"
func_check "stxvd2x vs40,r10,r20"
func_check "stxvw4x vs40,r10,r20"
func_check "xsabsdp vs40,vs60"
func_check "xsadddp vs40,vs50,vs60"
func_check "xscmpodp cr1,vs50,vs60"
func_check "xscmpudp cr1,vs50,vs60"
func_check "xscpsgndp vs40,vs50,vs60"
func_check "xscvdpsp vs40,vs60"
func_check "xscvdpsxds vs40,vs60"
func_check "xscvdpsxws vs40,vs60"
func_check "xscvdpuxds vs40,vs60"
func_check "xscvdpuxws vs40,vs60"
func_check "xscvspdp vs40,vs60"
func_check "xscvsxddp vs40,vs60"
func_check "xscvuxddp vs40,vs60"
func_check "xsdivdp vs40,vs50,vs60"
func_check "xsmaddadp vs40,vs50,vs60"
func_check "xsmaddmdp vs40,vs50,vs60"
func_check "xsmaxdp vs40,vs50,vs60"
func_check "xsmindp vs40,vs50,vs60"
func_check "xsmsubadp vs40,vs50,vs60"
func_check "xsmsubmdp vs40,vs50,vs60"
func_check "xsmuldp vs40,vs50,vs60"
func_check "xsnabsdp vs40,vs60"
func_check "xsnegdp vs40,vs60"
func_check "xsnmaddadp vs40,vs50,vs60"
func_check "xsnmaddmdp vs40,vs50,vs60"
func_check "xsnmsubadp vs40,vs50,vs60"
func_check "xsnmsubmdp vs40,vs50,vs60"
func_check "xsrdpi  vs40,vs60"
func_check "xsrdpic vs40,vs60"
func_check "xsrdpim vs40,vs60"
func_check "xsrdpip vs40,vs60"
func_check "xsrdpiz vs40,vs60"
func_check "xsredp  vs40,vs60"
func_check "xsrsqrtedp vs40,vs60"
func_check "xssqrtdp vs40,vs60"
func_check "xssubdp vs40,vs50,vs60"
func_check "xstdivdp cr1,vs50,vs60"
func_check "xstsqrtdp cr1,vs60"
func_check "xvabsdp vs40,vs60"
func_check "xvabssp vs40,vs60"
func_check "xvadddp vs40,vs50,vs60"
func_check "xvaddsp vs40,vs50,vs60"
func_check "xvcmpeqdp vs40,vs50,vs60"
func_check "xvcmpeqdp. vs40,vs50,vs60"
func_check "xvcmpeqsp vs40,vs50,vs60"
func_check "xvcmpeqsp. vs40,vs50,vs60"
func_check "xvcmpgedp vs40,vs50,vs60"
func_check "xvcmpgedp. vs40,vs50,vs60"
func_check "xvcmpgesp vs40,vs50,vs60"
func_check "xvcmpgesp. vs40,vs50,vs60"
func_check "xvcmpgtdp vs40,vs50,vs60"
func_check "xvcmpgtdp. vs40,vs50,vs60"
func_check "xvcmpgtsp vs40,vs50,vs60"
func_check "xvcmpgtsp. vs40,vs50,vs60"
func_check "xvcpsgndp vs40,vs50,vs60"
func_check "xvmovdp vs40,vs60"
func_check "xvmovdp vs40,vs60"
func_check "xvcpsgnsp vs40,vs50,vs60"
func_check "xvmovsp vs40,vs60"
func_check "xvmovsp vs40,vs60"
func_check "xvcvdpsp vs40,vs60"
func_check "xvcvdpsxds vs40,vs60"
func_check "xvcvdpsxws vs40,vs60"
func_check "xvcvdpuxds vs40,vs60"
func_check "xvcvdpuxws vs40,vs60"
func_check "xvcvspdp vs40,vs60"
func_check "xvcvspsxds vs40,vs60"
func_check "xvcvspsxws vs40,vs60"
func_check "xvcvspuxds vs40,vs60"
func_check "xvcvspuxws vs40,vs60"
func_check "xvcvsxddp vs40,vs60"
func_check "xvcvsxdsp vs40,vs60"
func_check "xvcvsxwdp vs40,vs60"
func_check "xvcvsxwsp vs40,vs60"
func_check "xvcvuxddp vs40,vs60"
func_check "xvcvuxdsp vs40,vs60"
func_check "xvcvuxwdp vs40,vs60"
func_check "xvcvuxwsp vs40,vs60"
func_check "xvdivdp vs40,vs50,vs60"
func_check "xvdivsp vs40,vs50,vs60"
func_check "xvmaddadp vs40,vs50,vs60"
func_check "xvmaddmdp vs40,vs50,vs60"
func_check "xvmaddasp vs40,vs50,vs60"
func_check "xvmaddmsp vs40,vs50,vs60"
func_check "xvmaxdp vs40,vs50,vs60"
func_check "xvmaxsp vs40,vs50,vs60"
func_check "xvmindp vs40,vs50,vs60"
func_check "xvminsp vs40,vs50,vs60"
func_check "xvmsubadp vs40,vs50,vs60"
func_check "xvmsubmdp vs40,vs50,vs60"
func_check "xvmsubasp vs40,vs50,vs60"
func_check "xvmsubmsp vs40,vs50,vs60"
func_check "xvmuldp vs40,vs50,vs60"
func_check "xvmulsp vs40,vs50,vs60"
func_check "xvnabsdp vs40,vs60"
func_check "xvnabssp vs40,vs60"
func_check "xvnegdp vs40,vs60"
func_check "xvnegsp vs40,vs60"
func_check "xvnmaddadp vs40,vs50,vs60"
func_check "xvnmaddmdp vs40,vs50,vs60"
func_check "xvnmaddasp vs40,vs50,vs60"
func_check "xvnmaddmsp vs40,vs50,vs60"
func_check "xvnmsubadp vs40,vs50,vs60"
func_check "xvnmsubmdp vs40,vs50,vs60"
func_check "xvnmsubasp vs40,vs50,vs60"
func_check "xvnmsubmsp vs40,vs50,vs60"
func_check "xvrdpi  vs40,vs60"
func_check "xvrdpic vs40,vs60"
func_check "xvrdpim vs40,vs60"
func_check "xvrdpip vs40,vs60"
func_check "xvrdpiz vs40,vs60"
func_check "xvredp  vs40,vs60"
func_check "xvresp  vs40,vs60"
func_check "xvrspi  vs40,vs60"
func_check "xvrspic vs40,vs60"
func_check "xvrspim vs40,vs60"
func_check "xvrspip vs40,vs60"
func_check "xvrspiz vs40,vs60"
func_check "xvrsqrtedp vs40,vs60"
func_check "xvrsqrtesp vs40,vs60"
func_check "xvsqrtdp vs40,vs60"
func_check "xvsqrtsp vs40,vs60"
func_check "xvsubdp vs40,vs50,vs60"
func_check "xvsubsp vs40,vs50,vs60"
func_check "xvtdivdp cr1,vs50,vs60"
func_check "xvtdivsp cr1,vs50,vs60"
func_check "xvtsqrtdp cr1,vs60"
func_check "xvtsqrtsp cr1,vs60"
func_check "xxland  vs40,vs50,vs60"
func_check "xxlandc vs40,vs50,vs60"
func_check "xxlnor  vs40,vs50,vs60"
func_check "xxlor   vs40,vs50,vs60"
func_check "xxlxor  vs40,vs50,vs60"
func_check "xxmrghw vs40,vs50,vs60"
func_check "xxmrglw vs40,vs50,vs60"
func_check "xxmrghd vs40,vs50,vs60"
func_check "xxpermdi vs40,vs50,vs60,1"
func_check "xxpermdi vs40,vs50,vs60,2"
func_check "xxmrgld vs40,vs50,vs60"
func_check "xxspltd vs40,vs50,0"
func_check "xxspltd vs40,vs50,0"
func_check "xxspltd vs40,vs50,1"
func_check "xxspltd vs40,vs50,1"
func_check "xxmrghd vs40,vs50,vs60"
func_check "xxmrghd vs40,vs50,vs60"
func_check "xxmrgld vs40,vs50,vs60"
func_check "xxswapd vs40,vs50"
func_check "xxswapd vs40,vs50"
func_check "xxsel   vs40,vs50,vs60,vs62"
func_check "xxsldwi vs40,vs50,vs60,2"
func_check "xxspltw vs40,vs60,2"
func_check "lxvd2x  vs40,0,r20"
func_check "lxvd2x  vs40,r10,r20"
func_check "stxvd2x vs40,0,r20"
func_check "stxvd2x vs40,r10,r20"