]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/powerpc-power8.exp
Use require with istarget
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-power8.exp
CommitLineData
213516ef 1# Copyright 2014-2023 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
73c06197 23require {istarget "powerpc*-*-*"}
65b48a81
PB
24
25if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
26 untested "PowerPC instructions disassembly"
27 return -1
28}
29
30clean_restart ${objfile}
31
32# Disassemble the function.
33set func ""
34
35gdb_test "set disassembler-options power8"
36set test "disass func"
37gdb_test_multiple $test $test {
38 -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
39 set func $expect_out(1,string)
40 pass $test
41 }
42}
43
44proc instr_to_patt {instr} {
45 global decimal hex
46 # 0x0000000000000018 <+24>: stxvd2x vs43,r4,r5
47 return "\[ \t\]*$hex <\\+$decimal>:\[ \t\]*[string_to_regexp $instr]"
48}
49
50proc func_check {instr} {
51 global func
52
53 set test "found: $instr"
54 if [regexp -nocase -line [instr_to_patt $instr] $func] {
55 pass $test
56 } else {
57 fail $test
58 }
59}
60
61func_check "tabort. r5"
62func_check "tabortwc. 7,r8,r16"
63func_check "tabortdc. 20,r11,r10"
64func_check "tabortwci. 17,r10,-13"
65func_check "tabortdci. 29,r3,-5"
5d2e1193 66func_check "tbegin."
65b48a81 67func_check "tcheck cr7"
5d2e1193 68func_check "tend."
65b48a81
PB
69func_check "tendall."
70func_check "treclaim. r24"
71func_check "trechkpt."
72func_check "tsuspend."
65b48a81
PB
73func_check "tresume."
74func_check "ori r2,r2,0"
75func_check "nop"
65b48a81 76func_check "rfebb 0"
5d2e1193 77func_check "rfebb"
5d2e1193
RA
78func_check "bgttar cr5"
79func_check "bnstarl cr1"
80func_check "blttar+ cr3"
81func_check "bnetarl+"
ff5404f5
CL
82func_check "bgetar cr2,1"
83func_check "bnstarl cr1,2"
65b48a81
PB
84func_check "waitasec"
85func_check "msgsndp r8"
86func_check "mtsle 1"
87func_check "msgclrp r27"
88func_check "stqcx. r10,r10,r12"
89func_check "stqcx. r28,0,r7"
90func_check "lqarx r24,r19,r11"
91func_check "lqarx r22,0,r11"
92func_check "mfbhrbe r20,6"
93func_check "pbt. r29,r17,r16"
94func_check "pbt. r14,0,r7"
95func_check "clrbhrb"
96func_check "vpermxor v11,v10,v0,v23"
97func_check "vaddeuqm v24,v2,v7,v4"
98func_check "vaddecuq v10,v10,v8,v2"
99func_check "vsubeuqm v5,v15,v8,v19"
100func_check "vsubecuq v12,v31,v16,v29"
101func_check "vmulouw v20,v29,v13"
102func_check "vmuluwm v29,v0,v26"
103func_check "vaddudm v8,v21,v28"
104func_check "vmaxud v1,v26,v1"
105func_check "vrld v20,v3,v1"
106func_check "vcmpequd v4,v19,v11"
107func_check "vadduqm v23,v14,v30"
108func_check "vaddcuq v8,v8,v13"
109func_check "vmulosw v28,v27,v4"
110func_check "vmaxsd v3,v4,v4"
111func_check "vmuleuw v0,v19,v21"
112func_check "vminud v24,v20,v19"
113func_check "vcmpgtud v0,v28,v15"
114func_check "vmulesw v21,v0,v2"
115func_check "vminsd v9,v26,v9"
116func_check "vsrad v25,v29,v11"
117func_check "vcmpgtsd v11,v28,v11"
118func_check "bcdadd. v5,v8,v26,1"
119func_check "vpmsumb v4,v3,v12"
120func_check "bcdsub. v26,v31,v21,1"
121func_check "vpmsumh v5,v17,v16"
122func_check "vpkudum v23,v17,v20"
123func_check "vpmsumw v24,v21,v29"
124func_check "vpmsumd v9,v22,v13"
125func_check "vpkudus v18,v19,v18"
126func_check "vsubuqm v30,v16,v22"
127func_check "vcipher v14,v11,v7"
128func_check "vcipherlast v10,v2,v22"
129func_check "vgbbd v23,v13"
130func_check "vsubcuq v16,v25,v16"
131func_check "vorc v31,v1,v5"
132func_check "vncipher v4,v17,v31"
133func_check "vncipherlast v24,v2,v27"
134func_check "vbpermq v23,v21,v23"
135func_check "vpksdus v27,v18,v9"
136func_check "vnand v27,v29,v27"
137func_check "vsld v19,v19,v24"
138func_check "vsbox v5,v13"
139func_check "vpksdss v25,v3,v7"
140func_check "vcmpequd. v28,v8,v0"
141func_check "vupkhsw v26,v26"
142func_check "vshasigmaw v5,v7,0,6"
143func_check "veqv v28,v21,v14"
144func_check "vmrgow v1,v8,v19"
145func_check "vshasigmad v0,v10,0,10"
146func_check "vsrd v5,v27,v14"
147func_check "vupklsw v11,v13"
148func_check "vclzb v14,v16"
149func_check "vpopcntb v20,v27"
150func_check "vclzh v28,v11"
151func_check "vpopcnth v24,v9"
152func_check "vclzw v27,v31"
153func_check "vpopcntw v17,v19"
154func_check "vclzd v12,v29"
155func_check "vpopcntd v23,v22"
156func_check "vcmpgtud. v24,v20,v29"
157func_check "vcmpgtsd. v9,v6,v27"
158func_check "lxsiwzx vs62,r14,r26"
159func_check "lxsiwzx vs40,0,r25"
160func_check "lxsiwax vs25,0,r26"
161func_check "lxsiwax vs3,0,r3"
c65c6c42 162func_check "mfvrd r12,v30"
65b48a81
PB
163func_check "mffprwz r20,f12"
164func_check "stxsiwx vs14,r9,r14"
165func_check "stxsiwx vs21,0,r8"
c65c6c42 166func_check "mtvrd v16,r11"
65b48a81
PB
167func_check "mtvrwa v31,r23"
168func_check "mtfprwz f16,r26"
169func_check "lxsspx vs13,r19,r13"
170func_check "lxsspx vs18,0,r13"
171func_check "stxsspx vs43,r2,r4"
172func_check "stxsspx vs55,0,r11"
173func_check "xsaddsp vs54,vs48,vs25"
174func_check "xsmaddasp vs14,vs50,vs1"
175func_check "xssubsp vs26,vs22,vs42"
176func_check "xsmaddmsp vs27,vs53,vs52"
177func_check "xsrsqrtesp vs8,vs59"
178func_check "xssqrtsp vs12,vs41"
179func_check "xsmulsp vs57,vs11,vs32"
180func_check "xsmsubasp vs38,vs20,vs26"
181func_check "xsdivsp vs26,vs19,vs6"
182func_check "xsmsubmsp vs35,vs37,vs55"
183func_check "xsresp vs59,vs8"
184func_check "xsnmaddasp vs44,vs33,vs33"
185func_check "xsnmaddmsp vs17,vs62,vs30"
186func_check "xsnmsubasp vs54,vs52,vs31"
187func_check "xsnmsubmsp vs37,vs5,vs58"
188func_check "xxlorc vs30,vs54,vs44"
189func_check "xxlnand vs49,vs14,vs29"
190func_check "xxleqv vs62,vs22,vs30"
191func_check "xscvdpspn vs60,vs54"
192func_check "xsrsp vs22,vs45"
193func_check "xscvuxdsp vs26,vs59"
194func_check "xscvsxdsp vs38,vs49"
195func_check "xscvspdpn vs59,vs26"
196func_check "fmrgow f24,f14,f2"
197func_check "fmrgew f22,f7,f5"
198func_check "msgsnd r14"
199func_check "msgclr r23"
200func_check "lxvd2x vs40,0,r5"
65b48a81 201func_check "lxvd2x vs10,r20,r6"
65b48a81
PB
202func_check "stxvd2x vs41,0,r7"
203func_check "stxvd2x vs11,r21,r8"
65b48a81
PB
204func_check "lbarx r20,0,r7"
205func_check "lbarx r20,0,r7,1"
206func_check "lbarx r20,r1,r7"
65b48a81
PB
207func_check "lbarx r20,r1,r7,1"
208func_check "ldarx r21,0,r8"
65b48a81
PB
209func_check "ldarx r21,0,r8,1"
210func_check "ldarx r21,r1,r8"
65b48a81
PB
211func_check "ldarx r21,r1,r8,1"
212func_check "lharx r22,0,r9"
65b48a81
PB
213func_check "lharx r22,0,r9,1"
214func_check "lharx r22,r1,r9"
65b48a81
PB
215func_check "lharx r22,r1,r9,1"
216func_check "lwarx r23,0,r10"
65b48a81
PB
217func_check "lwarx r23,0,r10,1"
218func_check "lwarx r23,r1,r10"
65b48a81
PB
219func_check "lwarx r23,r1,r10,1"
220func_check "stbcx. r10,0,r7"
221func_check "stbcx. r10,r1,r7"
222func_check "sthcx. r11,0,r8"
223func_check "sthcx. r11,r1,r8"
224func_check "stwcx. r12,0,r9"
225func_check "stwcx. r12,r1,r9"
226func_check "stdcx. r13,0,r10"
227func_check "stdcx. r13,r1,r10"