[gdb/testsuite] Require c++11 where necessary
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-altivec.exp
CommitLineData
42a4f53d 1# Copyright 2014-2019 Free Software Foundation, Inc.
65b48a81
PB
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
20standard_testfile .s
21set objfile [standard_output_file ${testfile}.o]
22
23if {![istarget "powerpc*-*-*"]} then {
24 verbose "Skipping PowerPC instructions disassembly."
25 return
26}
27
28if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
29 untested "PowerPC instructions disassembly"
30 return -1
31}
32
33clean_restart ${objfile}
34
35# Disassemble the function.
36set func ""
37
38gdb_test "set disassembler-options altivec"
39set test "disass func"
40gdb_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
47proc 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
53proc func_check {instr} {
54 global func
55
56 set test "found: '$instr'"
57 set peb [instr_to_patt $instr]
58 if [regexp -nocase -line [instr_to_patt $instr] $func] {
59 pass $test
60 } else {
61 fail $peb
62 }
63}
64
65func_check "dss 3"
66func_check "dssall"
67func_check "dst r5,r4,1"
68func_check "dstt r8,r7,0"
69func_check "dstst r5,r6,3"
70func_check "dststt r4,r5,2"
71func_check "lvebx v30,r22,r24"
72func_check "lvebx v21,0,r24"
73func_check "lvehx v10,r16,r2"
74func_check "lvehx v20,0,r23"
75func_check "lvewx v17,r4,r18"
76func_check "lvewx v23,0,r8"
77func_check "lvsl v6,0,r25"
78func_check "lvsl v2,0,r6"
79func_check "lvsr v22,r16,r12"
80func_check "lvsr v0,0,r29"
81func_check "lvxl v15,r5,r13"
82func_check "lvxl v19,0,r23"
83func_check "lvx v22,r1,r2"
84func_check "lvx v18,0,r17"
85func_check "mfvrsave r31"
86func_check "mfvscr v24"
87func_check "mtvrsave r10"
88func_check "mtvscr v25"
89func_check "stvebx v18,r27,r10"
90func_check "stvebx v16,0,r6"
91func_check "stvehx v17,r13,r16"
92func_check "stvehx v23,0,r20"
93func_check "stvewx v11,r19,r31"
94func_check "stvewx v31,0,r1"
95func_check "stvxl v26,r21,r17"
96func_check "stvxl v13,0,r22"
97func_check "stvx v11,r31,r31"
98func_check "stvx v30,0,r16"
99func_check "vaddcuw v24,v7,v28"
100func_check "vaddfp v3,v30,v11"
101func_check "vaddsbs v8,v28,v9"
102func_check "vaddshs v7,v5,v4"
103func_check "vaddsws v22,v26,v27"
104func_check "vaddubm v16,v14,v28"
105func_check "vaddubs v6,v1,v25"
106func_check "vadduhm v2,v4,v6"
107func_check "vadduhs v26,v21,v8"
108func_check "vadduwm v29,v31,v1"
109func_check "vadduws v23,v13,v4"
110func_check "vandc v30,v16,v9"
111func_check "vand v3,v13,v27"
112func_check "vavgsb v4,v6,v17"
113func_check "vavgsh v23,v28,v19"
114func_check "vavgsw v8,v15,v31"
115func_check "vavgub v6,v7,v25"
116func_check "vavguh v25,v22,v10"
117func_check "vavguw v3,v23,v29"
118func_check "vctsxs v14,v2,6"
119func_check "vctuxs v9,v31,20"
120func_check "vcfsx v24,v30,3"
121func_check "vcfux v17,v21,29"
122func_check "vcmpbfp v18,v28,v0"
123func_check "vcmpbfp. v19,v26,v3"
124func_check "vcmpeqfp v16,v2,v11"
125func_check "vcmpeqfp. v23,v13,v13"
126func_check "vcmpequb v25,v19,v10"
127func_check "vcmpequb. v18,v11,v2"
128func_check "vcmpequh v9,v25,v7"
129func_check "vcmpequh. v14,v24,v21"
130func_check "vcmpequw v24,v12,v5"
131func_check "vcmpequw. v19,v16,v1"
132func_check "vcmpgefp v23,v17,v16"
133func_check "vcmpgefp. v19,v29,v17"
134func_check "vcmpgtfp v16,v28,v13"
135func_check "vcmpgtfp. v14,v24,v7"
136func_check "vcmpgtsb v16,v22,v6"
137func_check "vcmpgtsb. v2,v12,v14"
138func_check "vcmpgtsh v28,v3,v29"
139func_check "vcmpgtsh. v16,v19,v13"
140func_check "vcmpgtsw v15,v0,v5"
141func_check "vcmpgtsw. v21,v13,v0"
142func_check "vcmpgtub v5,v10,v30"
143func_check "vcmpgtub. v7,v13,v10"
144func_check "vcmpgtuh v24,v15,v16"
145func_check "vcmpgtuh. v25,v21,v27"
146func_check "vcmpgtuw v17,v27,v6"
147func_check "vcmpgtuw. v8,v21,v27"
148func_check "vcfsx v1,v1,14"
149func_check "vctsxs v4,v15,25"
150func_check "vctuxs v28,v23,14"
151func_check "vcfux v6,v6,0"
152func_check "vexptefp v0,v8"
153func_check "vlogefp v22,v27"
154func_check "vmaddfp v23,v18,v5,v18"
155func_check "vmaxfp v13,v13,v27"
156func_check "vmaxsb v8,v23,v14"
157func_check "vmaxsh v19,v17,v0"
158func_check "vmaxsw v19,v3,v22"
159func_check "vmaxub v23,v30,v28"
160func_check "vmaxuh v9,v20,v23"
161func_check "vmaxuw v21,v19,v1"
162func_check "vmhaddshs v22,v13,v5,v22"
163func_check "vmhraddshs v31,v0,v3,v18"
164func_check "vminfp v2,v21,v24"
165func_check "vminsb v20,v6,v10"
166func_check "vminsh v18,v27,v26"
167func_check "vminsw v3,v4,v1"
168func_check "vminub v7,v0,v13"
169func_check "vminuh v0,v12,v6"
170func_check "vminuw v6,v3,v1"
171func_check "vmladduhm v3,v29,v3,v26"
172func_check "vmrghb v21,v5,v31"
173func_check "vmrghh v21,v24,v0"
174func_check "vmrghw v16,v0,v22"
175func_check "vmrglb v1,v17,v16"
176func_check "vmrglh v14,v8,v15"
177func_check "vmrglw v31,v21,v5"
178func_check "vmr v24,v9"
179func_check "vmr v24,v9"
180func_check "vmsummbm v0,v24,v15,v23"
181func_check "vmsumshm v1,v4,v7,v25"
182func_check "vmsumshs v9,v8,v13,v31"
183func_check "vmsumubm v23,v31,v12,v30"
184func_check "vmsumuhm v29,v0,v26,v21"
185func_check "vmsumuhs v27,v14,v25,v5"
186func_check "vmulesb v10,v25,v14"
187func_check "vmulesh v1,v18,v8"
188func_check "vmuleub v17,v14,v9"
189func_check "vmuleuh v5,v26,v9"
190func_check "vmulosb v21,v18,v6"
191func_check "vmulosh v4,v5,v8"
192func_check "vmuloub v2,v9,v19"
193func_check "vmulouh v29,v5,v4"
194func_check "vnmsubfp v8,v2,v6,v5"
195func_check "vnor v31,v9,v10"
196func_check "vnot v25,v31"
197func_check "vnot v25,v31"
198func_check "vor v23,v7,v2"
199func_check "vperm v0,v28,v22,v25"
200func_check "vpkpx v16,v25,v17"
201func_check "vpkshss v12,v16,v17"
202func_check "vpkshus v1,v19,v23"
203func_check "vpkswss v25,v7,v13"
204func_check "vpkswus v4,v24,v10"
205func_check "vpkuhum v9,v27,v12"
206func_check "vpkuhus v22,v10,v25"
207func_check "vpkuwum v30,v18,v0"
208func_check "vpkuwus v7,v3,v22"
209func_check "vrefp v24,v28"
210func_check "vrfim v17,v19"
211func_check "vrfin v24,v25"
212func_check "vrfip v3,v5"
213func_check "vrfiz v8,v10"
214func_check "vrlb v26,v18,v30"
215func_check "vrlh v16,v17,v25"
216func_check "vrlw v23,v30,v9"
217func_check "vrsqrtefp v2,v18"
218func_check "vsel v20,v14,v18,v10"
219func_check "vslb v25,v25,v12"
220func_check "vsldoi v9,v9,v12,7"
221func_check "vslh v14,v2,v11"
222func_check "vslo v30,v5,v6"
223func_check "vsl v22,v30,v9"
224func_check "vslw v26,v26,v3"
225func_check "vspltb v1,v20,6"
226func_check "vsplth v16,v18,3"
227func_check "vspltisb v25,-13"
228func_check "vspltish v22,10"
229func_check "vspltisw v13,13"
230func_check "vspltw v9,v18,2"
231func_check "vsrab v14,v22,v0"
232func_check "vsrah v12,v12,v18"
233func_check "vsraw v2,v2,v13"
234func_check "vsrb v7,v27,v5"
235func_check "vsrh v7,v11,v29"
236func_check "vsro v18,v30,v31"
237func_check "vsr v2,v9,v28"
238func_check "vsrw v0,v25,v0"
239func_check "vsubcuw v24,v2,v10"
240func_check "vsubfp v22,v24,v20"
241func_check "vsubsbs v10,v22,v13"
242func_check "vsubshs v24,v17,v28"
243func_check "vsubsws v10,v26,v0"
244func_check "vsububm v16,v11,v24"
245func_check "vsububs v11,v21,v1"
246func_check "vsubuhm v6,v12,v24"
247func_check "vsubuhs v30,v11,v9"
248func_check "vsubuwm v19,v20,v13"
249func_check "vsubuws v18,v25,v6"
250func_check "vsum2sws v25,v10,v18"
251func_check "vsum4sbs v13,v16,v21"
252func_check "vsum4shs v23,v8,v4"
253func_check "vsum4ubs v28,v13,v30"
254func_check "vsumsws v22,v10,v8"
255func_check "vupkhpx v24,v14"
256func_check "vupkhsb v2,v22"
257func_check "vupkhsh v16,v2"
258func_check "vupklpx v10,v26"
259func_check "vupklsb v15,v28"
260func_check "vupklsh v8,v8"
261func_check "vxor v25,v0,v3"
This page took 0.383697 seconds and 4 git commands to generate.