549da6be27a762a337ccf232eea7aec39f6038cc
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-power9.exp
1 # Copyright 2014-2021 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 3 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, see <http://www.gnu.org/licenses/>.
15
16 # This file is part of the gdb testsuite.
17
18 # Test PowerPC instructions disassembly.
19
20 standard_testfile .s
21 set objfile [standard_output_file ${testfile}.o]
22
23 if {![istarget "powerpc*-*-*"]} then {
24 verbose "Skipping PowerPC instructions disassembly."
25 return
26 }
27
28 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
29 untested "PowerPC instructions disassembly"
30 return -1
31 }
32
33 clean_restart ${objfile}
34
35 # Disassemble the function.
36 set func ""
37
38 gdb_test "set disassembler-options power9"
39 set test "disass func"
40 gdb_test_multiple $test $test {
41 -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
42 set func $expect_out(1,string)
43 pass $test
44 }
45 }
46
47 proc instr_to_patt {instr} {
48 global decimal hex
49 # 0x0000000000000018 <+24>: stxvd2x vs43,r4,r5
50 return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
51 }
52
53 proc func_check {instr} {
54 global func
55
56 set test "found: $instr"
57 if [regexp -nocase -line [instr_to_patt $instr] $func] {
58 pass $test
59 } else {
60 fail $test
61 }
62 }
63
64 func_check "cnttzd r3,r13"
65 func_check "cnttzd. r4,r14"
66 func_check "cnttzw r5,r15"
67 func_check "cnttzw. r6,r16"
68 func_check "modsd r10,r20,r21"
69 func_check "modsw r11,r21,r22"
70 func_check "modud r12,r22,r23"
71 func_check "moduw r13,r23,r24"
72 func_check "bcdcfn. v3,v4,0"
73 func_check "bcdcfn. v3,v4,1"
74 func_check "bcdcfsq. v4,v5,0"
75 func_check "bcdcfsq. v4,v5,1"
76 func_check "bcdcfz. v5,v6,0"
77 func_check "bcdcfz. v5,v6,1"
78 func_check "bcdcpsgn. v6,v7,v8"
79 func_check "bcdctn. v7,v8"
80 func_check "bcdctsq. v8,v9"
81 func_check "bcdctz. v9,v10,0"
82 func_check "bcdctz. v9,v10,1"
83 func_check "bcdsetsgn. v10,v11,0"
84 func_check "bcdsetsgn. v10,v11,1"
85 func_check "bcdsr. v11,v12,v13,0"
86 func_check "bcdsr. v11,v12,v13,1"
87 func_check "bcds. v12,v13,v14,0"
88 func_check "bcds. v12,v13,v14,1"
89 func_check "bcdtrunc. v13,v14,v15,0"
90 func_check "bcdtrunc. v13,v14,v15,1"
91 func_check "bcdus. v14,v15,v16"
92 func_check "bcdutrunc. v15,v16,v17"
93 func_check "lxvll vs20,0,r21"
94 func_check "lxvll vs20,r10,r21"
95 func_check "stxvll vs21,0,r11"
96 func_check "stxvll vs21,r10,r11"
97 func_check "vmul10cuq v22,v23"
98 func_check "vmul10ecuq v23,v24,v25"
99 func_check "vmul10euq v24,v25,v26"
100 func_check "vmul10uq v25,v26"
101 func_check "xsaddqp v10,v11,v12"
102 func_check "xsaddqpo v11,v12,v12"
103 func_check "xsrqpi 0,v20,v30,0"
104 func_check "xsrqpi 1,v20,v30,0"
105 func_check "xsrqpi 0,v20,v30,3"
106 func_check "xsrqpi 1,v20,v30,3"
107 func_check "xsrqpix 0,v21,v31,0"
108 func_check "xsrqpix 1,v21,v31,0"
109 func_check "xsrqpix 0,v21,v31,3"
110 func_check "xsrqpix 1,v21,v31,3"
111 func_check "xsmulqp v12,v13,v14"
112 func_check "xsmulqpo v13,v14,v15"
113 func_check "xsrqpxp 0,v22,v23,0"
114 func_check "xsrqpxp 1,v22,v23,0"
115 func_check "xsrqpxp 0,v22,v23,3"
116 func_check "xsrqpxp 1,v22,v23,3"
117 func_check "xscpsgnqp v14,v15,v16"
118 func_check "xscmpoqp cr0,v15,v16"
119 func_check "xscmpoqp cr7,v15,v16"
120 func_check "xscmpexpqp cr0,v16,v17"
121 func_check "xscmpexpqp cr7,v16,v17"
122 func_check "xsmaddqp v17,v18,v19"
123 func_check "xsmaddqpo v18,v19,v20"
124 func_check "xsmsubqp v19,v20,v21"
125 func_check "xsmsubqpo v20,v21,v22"
126 func_check "xsnmaddqp v21,v22,v23"
127 func_check "xsnmaddqpo v22,v23,v24"
128 func_check "xsnmsubqp v23,v24,v25"
129 func_check "xsnmsubqpo v24,v25,v26"
130 func_check "xssubqp v25,v26,v27"
131 func_check "xssubqpo v26,v27,v28"
132 func_check "xsdivqp v27,v28,v29"
133 func_check "xsdivqpo v28,v29,v30"
134 func_check "xscmpuqp cr0,v29,v30"
135 func_check "xscmpuqp cr7,v29,v30"
136 func_check "xststdcqp cr0,v30,0"
137 func_check "xststdcqp cr7,v30,0"
138 func_check "xststdcqp cr0,v31,127"
139 func_check "xststdcqp cr7,v31,127"
140 func_check "xsabsqp v10,v11"
141 func_check "xsxexpqp v11,v12"
142 func_check "xsnabsqp v12,v13"
143 func_check "xsnegqp v13,v14"
144 func_check "xsxsigqp v14,v15"
145 func_check "xssqrtqp v15,v16"
146 func_check "xssqrtqpo v16,v17"
147 func_check "xscvqpuwz v17,v18"
148 func_check "xscvudqp v18,v19"
149 func_check "xscvqpswz v19,v20"
150 func_check "xscvsdqp v20,v21"
151 func_check "xscvqpudz v21,v22"
152 func_check "xscvqpdp v22,v23"
153 func_check "xscvqpdpo v23,v24"
154 func_check "xscvdpqp v24,v25"
155 func_check "xscvqpsdz v25,v26"
156 func_check "xsiexpqp v26,v27,v28"
157 func_check "vpermr v4,v5,v6,v7"
158 func_check "vextractub v5,v6,0"
159 func_check "vextractub v5,v6,15"
160 func_check "vextractuh v6,v7,0"
161 func_check "vextractuh v6,v7,15"
162 func_check "vextractuw v7,v8,0"
163 func_check "vextractuw v7,v8,15"
164 func_check "vextractd v8,v9,0"
165 func_check "vextractd v8,v9,15"
166 func_check "vinsertb v9,v10,0"
167 func_check "vinsertb v9,v10,15"
168 func_check "vinserth v10,v11,0"
169 func_check "vinserth v10,v11,15"
170 func_check "vinsertw v11,v12,0"
171 func_check "vinsertw v11,v12,15"
172 func_check "vinsertd v12,v13,0"
173 func_check "vinsertd v12,v13,15"
174 func_check "mfvsrld r20,vs45"
175 func_check "mtvsrws vs46,r21"
176 func_check "mtvsrdd vs47,0,r23"
177 func_check "mtvsrdd vs47,r22,r23"
178 func_check "lxvx vs50,0,r11"
179 func_check "lxvx vs0,r10,r11"
180 func_check "lxvwsx vs51,0,r12"
181 func_check "lxvwsx vs1,r10,r12"
182 func_check "lxvh8x vs52,0,r13"
183 func_check "lxvh8x vs2,r10,r13"
184 func_check "lxvb16x vs53,0,r14"
185 func_check "lxvb16x vs3,r10,r14"
186 func_check "stxvx vs54,0,r15"
187 func_check "stxvx vs4,r20,r15"
188 func_check "stxvh8x vs55,0,r16"
189 func_check "stxvh8x vs5,r20,r16"
190 func_check "stxvb16x vs56,0,r17"
191 func_check "stxvb16x vs6,r20,r17"
192 func_check "xxextractuw vs4,vs5,0"
193 func_check "xxextractuw vs40,vs50,15"
194 func_check "xxspltib vs4,0"
195 func_check "xxspltib vs4,128"
196 func_check "xxspltib vs41,255"
197 func_check "xxinsertw vs5,vs6,0"
198 func_check "xxinsertw vs50,vs60,15"
199 func_check "xxbrh vs6,vs7"
200 func_check "xxbrh vs56,vs57"
201 func_check "xxbrw vs7,vs8"
202 func_check "xxbrw vs57,vs58"
203 func_check "xxbrd vs8,vs9"
204 func_check "xxbrd vs58,vs59"
205 func_check "xxbrq vs9,vs10"
206 func_check "xxbrq vs59,vs60"
207 func_check "lxsd v20,0(0)"
208 func_check "lxsd v20,0(r10)"
209 func_check "lxsd v20,8(0)"
210 func_check "lxsd v20,8(r10)"
211 func_check "lxsd v20,-8(0)"
212 func_check "lxsd v20,-8(r10)"
213 func_check "lxsd v20,32764(0)"
214 func_check "lxsd v20,32764(r10)"
215 func_check "lxsd v20,-32768(0)"
216 func_check "lxsd v20,-32768(r10)"
217 func_check "lxssp v30,0(0)"
218 func_check "lxssp v30,0(r11)"
219 func_check "lxssp v30,8(0)"
220 func_check "lxssp v30,8(r11)"
221 func_check "lxssp v30,-8(0)"
222 func_check "lxssp v30,-8(r11)"
223 func_check "lxssp v30,32764(0)"
224 func_check "lxssp v30,32764(r11)"
225 func_check "lxssp v30,-32768(0)"
226 func_check "lxssp v30,-32768(r11)"
227 func_check "lxv vs40,0(0)"
228 func_check "lxv vs40,0(r12)"
229 func_check "lxv vs40,16(0)"
230 func_check "lxv vs40,16(r12)"
231 func_check "lxv vs40,-16(0)"
232 func_check "lxv vs10,-16(r12)"
233 func_check "lxv vs10,32752(0)"
234 func_check "lxv vs10,32752(r12)"
235 func_check "lxv vs10,-32768(0)"
236 func_check "lxv vs10,-32768(r12)"
237 func_check "stxsd v21,0(0)"
238 func_check "stxsd v21,0(r10)"
239 func_check "stxsd v21,8(0)"
240 func_check "stxsd v21,8(r10)"
241 func_check "stxsd v21,-8(0)"
242 func_check "stxsd v21,-8(r10)"
243 func_check "stxsd v21,32764(0)"
244 func_check "stxsd v21,32764(r10)"
245 func_check "stxsd v21,-32768(0)"
246 func_check "stxsd v21,-32768(r10)"
247 func_check "stxssp v31,0(0)"
248 func_check "stxssp v31,0(r11)"
249 func_check "stxssp v31,8(0)"
250 func_check "stxssp v31,8(r11)"
251 func_check "stxssp v31,-8(0)"
252 func_check "stxssp v31,-8(r11)"
253 func_check "stxssp v31,32764(0)"
254 func_check "stxssp v31,32764(r11)"
255 func_check "stxssp v31,-32768(0)"
256 func_check "stxssp v31,-32768(r11)"
257 func_check "stxv vs41,0(0)"
258 func_check "stxv vs41,0(r12)"
259 func_check "stxv vs41,16(0)"
260 func_check "stxv vs41,16(r12)"
261 func_check "stxv vs41,-16(0)"
262 func_check "stxv vs11,-16(r12)"
263 func_check "stxv vs11,32752(0)"
264 func_check "stxv vs11,32752(r12)"
265 func_check "stxv vs11,-32768(0)"
266 func_check "stxv vs11,-32768(r12)"
267 func_check "xxperm vs20,vs22,vs24"
268 func_check "xxperm vs40,vs42,vs44"
269 func_check "xxpermr vs21,vs23,vs25"
270 func_check "xxpermr vs41,vs43,vs45"
271 func_check "extswsli r12,r20,0"
272 func_check "extswsli r12,r20,1"
273 func_check "extswsli r12,r20,63"
274 func_check "extswsli. r13,r21,0"
275 func_check "extswsli. r13,r21,1"
276 func_check "extswsli. r13,r21,63"
277 func_check "vrlwmi v14,v22,v23"
278 func_check "vrldmi v15,v23,v24"
279 func_check "vrlwnm v16,v24,v25"
280 func_check "vrldnm v17,v25,v26"
281 func_check "vbpermd v18,v26,v27"
282 func_check "vnegw v19,v20"
283 func_check "vnegd v20,v21"
284 func_check "vprtybw v21,v22"
285 func_check "vprtybd v22,v23"
286 func_check "vprtybq v23,v24"
287 func_check "vextsb2w v24,v25"
288 func_check "vextsh2w v25,v26"
289 func_check "vextsb2d v26,v27"
290 func_check "vextsh2d v27,v28"
291 func_check "vextsw2d v28,v29"
292 func_check "vctzb v29,v30"
293 func_check "vctzh v30,v31"
294 func_check "vctzw v31,v30"
295 func_check "vctzd v30,v29"
296 func_check "lxsibzx vs10,0,r20"
297 func_check "lxsibzx vs50,r10,r20"
298 func_check "lxsihzx vs11,0,r21"
299 func_check "lxsihzx vs51,r11,r21"
300 func_check "stxsibx vs12,0,r22"
301 func_check "stxsibx vs52,r12,r22"
302 func_check "stxsihx vs13,0,r23"
303 func_check "stxsihx vs53,r13,r23"
304 func_check "maddhd r10,r11,r12,r13"
305 func_check "maddhdu r20,r21,r22,r23"
306 func_check "maddld r2,r3,r4,r5"
307 func_check "xscmpexpdp cr0,vs10,vs20"
308 func_check "xscmpexpdp cr7,vs40,vs50"
309 func_check "xsiexpdp vs41,r11,r21"
310 func_check "xststdcdp cr0,vs11,127"
311 func_check "xststdcdp cr7,vs41,127"
312 func_check "xststdcsp cr0,vs11,127"
313 func_check "xststdcsp cr7,vs41,127"
314 func_check "xsxexpdp r13,vs43"
315 func_check "xsxsigdp r14,vs44"
316 func_check "xviexpdp vs45,vs46,vs47"
317 func_check "xviexpsp vs46,vs47,vs48"
318 func_check "xvtstdcdp vs54,vs55,0"
319 func_check "xvtstdcdp vs54,vs55,127"
320 func_check "xvtstdcsp vs55,vs56,0"
321 func_check "xvtstdcsp vs55,vs56,127"
322 func_check "xvxexpdp vs57,vs58"
323 func_check "xvxexpsp vs58,vs59"
324 func_check "xvxsigdp vs59,vs60"
325 func_check "xvxsigsp vs60,vs61"
326 func_check "cmpeqb cr0,r6,r7"
327 func_check "cmpeqb cr7,r6,r7"
328 func_check "cmprb cr0,0,r8,r9"
329 func_check "cmprb cr7,0,r8,r9"
330 func_check "cmprb cr0,1,r8,r9"
331 func_check "cmprb cr7,1,r8,r9"
332 func_check "setb r15,cr0"
333 func_check "setb r15,cr7"
334 func_check "lxvl vs26,0,r10"
335 func_check "lxvl vs56,r20,r10"
336 func_check "stxvl vs27,0,r11"
337 func_check "stxvl vs57,r21,r11"
338 func_check "vclzlsbb r20,v30"
339 func_check "vctzlsbb r21,v31"
340 func_check "vcmpneb v10,v11,v12"
341 func_check "vcmpneb. v20,v21,v22"
342 func_check "vcmpneh v11,v12,v13"
343 func_check "vcmpneh. v21,v22,v23"
344 func_check "vcmpnew v12,v13,v14"
345 func_check "vcmpnew. v22,v23,v24"
346 func_check "vcmpnezb v13,v14,v15"
347 func_check "vcmpnezb. v23,v24,v25"
348 func_check "vcmpnezh v14,v15,v16"
349 func_check "vcmpnezh. v24,v25,v26"
350 func_check "vcmpnezw v15,v16,v17"
351 func_check "vcmpnezw. v25,v26,v27"
352 func_check "vextublx r16,r17,v10"
353 func_check "vextubrx r17,r18,v11"
354 func_check "vextuhlx r18,r19,v12"
355 func_check "vextuhrx r19,r20,v13"
356 func_check "vextuwlx r20,r21,v14"
357 func_check "vextuwrx r21,r22,v15"
358 func_check "dtstsfi cr0,0,f3"
359 func_check "dtstsfi cr7,63,f3"
360 func_check "dtstsfiq cr0,0,f4"
361 func_check "dtstsfiq cr7,63,f4"
362 func_check "xscvhpdp vs40,vs50"
363 func_check "xscvdphp vs41,vs51"
364 func_check "xvcvhpsp vs42,vs52"
365 func_check "xvcvsphp vs43,vs53"
366 func_check "lnia r3"
367 func_check "addpcis r4,1"
368 func_check "addpcis r5,-2"
369 func_check "addpcis r6,32767"
370 func_check "addpcis r7,-32768"
371 func_check "slbsync"
372 func_check "slbiag r10"
373 func_check "slbieg r10,r11"
374 func_check "slbmfee r3,r4"
375 func_check "slbmfee r3,r4,1"
376 func_check "slbmfev r4,r5"
377 func_check "slbmfev r4,r5,1"
378 func_check "tlbie r3,r4"
379 func_check "tlbie r3,r4,3,1,1"
380 func_check "tlbiel r3"
381 func_check "tlbiel r3,r4,3,1,1"
382 func_check "copy r12,r13"
383 func_check "paste. r10,r11"
384 func_check "cpabort"
385 func_check "hwsync"
386 func_check "lwsync"
387 func_check "ptesync"
388 func_check "ldat r20,0,0"
389 func_check "ldat r20,r10,28"
390 func_check "lwat r21,0,0"
391 func_check "lwat r21,r11,28"
392 func_check "stdat r22,0,0"
393 func_check "stdat r22,r12,28"
394 func_check "stwat r23,0,0"
395 func_check "stwat r23,r13,28"
396 func_check "urfid"
397 func_check "rmieg r30"
398 func_check "stop"
399 func_check "wait"
400 func_check "darn r3,0"
401 func_check "darn r3,1"
402 func_check "darn r3,2"
403 func_check "mcrxrx cr0"
404 func_check "mcrxrx cr7"
405 func_check "vslv v20,v21,v22"
406 func_check "vsrv v23,v24,v25"
407 func_check "msgsync"
408 func_check "xscmpeqdp vs30,vs40,vs50"
409 func_check "xscmpgtdp vs31,vs41,vs51"
410 func_check "xscmpgedp vs32,vs42,vs52"
411 func_check "xsmincdp vs34,vs44,vs54"
412 func_check "xsmaxcdp vs35,vs45,vs55"
413 func_check "xsminjdp vs36,vs46,vs56"
414 func_check "xsmaxjdp vs37,vs47,vs57"
415 func_check "vmsumudm v20,v21,v22,v23"
416 func_check "addex r11,r12,r13,0"
417 func_check "addex r11,r12,r13,1"
418 func_check "addex r11,r12,r13,2"
419 func_check "mffs f25"
420 func_check "mffs. f25"
421 func_check "mffsce f26"
422 func_check "mffscdrn f27,f20"
423 func_check "mffscdrni f28,0"
424 func_check "mffscdrni f28,7"
425 func_check "mffscrn f29,f21"
426 func_check "mffscrni f30,0"
427 func_check "mffscrni f30,3"
428 func_check "mffsl f31"
This page took 0.038619 seconds and 3 git commands to generate.