]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.arch/powerpc-power8.exp
Fix powerpc-power8.exp test with new mnemonics
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-power8.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 power8"
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 "tabort. r5"
65 func_check "tabortwc. 7,r8,r16"
66 func_check "tabortdc. 20,r11,r10"
67 func_check "tabortwci. 17,r10,-13"
68 func_check "tabortdci. 29,r3,-5"
69 func_check "tbegin."
70 func_check "tcheck cr7"
71 func_check "tend."
72 func_check "tendall."
73 func_check "treclaim. r24"
74 func_check "trechkpt."
75 func_check "tsuspend."
76 func_check "tresume."
77 func_check "ori r2,r2,0"
78 func_check "nop"
79 func_check "rfebb 0"
80 func_check "rfebb"
81 func_check "bgttar cr5"
82 func_check "bnstarl cr1"
83 func_check "blttar+ cr3"
84 func_check "bnetarl+"
85 func_check "bgetar cr2,1"
86 func_check "bnstarl cr1,2"
87 func_check "waitasec"
88 func_check "msgsndp r8"
89 func_check "mtsle 1"
90 func_check "msgclrp r27"
91 func_check "stqcx. r10,r10,r12"
92 func_check "stqcx. r28,0,r7"
93 func_check "lqarx r24,r19,r11"
94 func_check "lqarx r22,0,r11"
95 func_check "mfbhrbe r20,6"
96 func_check "pbt. r29,r17,r16"
97 func_check "pbt. r14,0,r7"
98 func_check "clrbhrb"
99 func_check "vpermxor v11,v10,v0,v23"
100 func_check "vaddeuqm v24,v2,v7,v4"
101 func_check "vaddecuq v10,v10,v8,v2"
102 func_check "vsubeuqm v5,v15,v8,v19"
103 func_check "vsubecuq v12,v31,v16,v29"
104 func_check "vmulouw v20,v29,v13"
105 func_check "vmuluwm v29,v0,v26"
106 func_check "vaddudm v8,v21,v28"
107 func_check "vmaxud v1,v26,v1"
108 func_check "vrld v20,v3,v1"
109 func_check "vcmpequd v4,v19,v11"
110 func_check "vadduqm v23,v14,v30"
111 func_check "vaddcuq v8,v8,v13"
112 func_check "vmulosw v28,v27,v4"
113 func_check "vmaxsd v3,v4,v4"
114 func_check "vmuleuw v0,v19,v21"
115 func_check "vminud v24,v20,v19"
116 func_check "vcmpgtud v0,v28,v15"
117 func_check "vmulesw v21,v0,v2"
118 func_check "vminsd v9,v26,v9"
119 func_check "vsrad v25,v29,v11"
120 func_check "vcmpgtsd v11,v28,v11"
121 func_check "bcdadd. v5,v8,v26,1"
122 func_check "vpmsumb v4,v3,v12"
123 func_check "bcdsub. v26,v31,v21,1"
124 func_check "vpmsumh v5,v17,v16"
125 func_check "vpkudum v23,v17,v20"
126 func_check "vpmsumw v24,v21,v29"
127 func_check "vpmsumd v9,v22,v13"
128 func_check "vpkudus v18,v19,v18"
129 func_check "vsubuqm v30,v16,v22"
130 func_check "vcipher v14,v11,v7"
131 func_check "vcipherlast v10,v2,v22"
132 func_check "vgbbd v23,v13"
133 func_check "vsubcuq v16,v25,v16"
134 func_check "vorc v31,v1,v5"
135 func_check "vncipher v4,v17,v31"
136 func_check "vncipherlast v24,v2,v27"
137 func_check "vbpermq v23,v21,v23"
138 func_check "vpksdus v27,v18,v9"
139 func_check "vnand v27,v29,v27"
140 func_check "vsld v19,v19,v24"
141 func_check "vsbox v5,v13"
142 func_check "vpksdss v25,v3,v7"
143 func_check "vcmpequd. v28,v8,v0"
144 func_check "vupkhsw v26,v26"
145 func_check "vshasigmaw v5,v7,0,6"
146 func_check "veqv v28,v21,v14"
147 func_check "vmrgow v1,v8,v19"
148 func_check "vshasigmad v0,v10,0,10"
149 func_check "vsrd v5,v27,v14"
150 func_check "vupklsw v11,v13"
151 func_check "vclzb v14,v16"
152 func_check "vpopcntb v20,v27"
153 func_check "vclzh v28,v11"
154 func_check "vpopcnth v24,v9"
155 func_check "vclzw v27,v31"
156 func_check "vpopcntw v17,v19"
157 func_check "vclzd v12,v29"
158 func_check "vpopcntd v23,v22"
159 func_check "vcmpgtud. v24,v20,v29"
160 func_check "vcmpgtsd. v9,v6,v27"
161 func_check "lxsiwzx vs62,r14,r26"
162 func_check "lxsiwzx vs40,0,r25"
163 func_check "lxsiwax vs25,0,r26"
164 func_check "lxsiwax vs3,0,r3"
165 func_check "mfvrd r12,v30"
166 func_check "mffprwz r20,f12"
167 func_check "stxsiwx vs14,r9,r14"
168 func_check "stxsiwx vs21,0,r8"
169 func_check "mtvrd v16,r11"
170 func_check "mtvrwa v31,r23"
171 func_check "mtfprwz f16,r26"
172 func_check "lxsspx vs13,r19,r13"
173 func_check "lxsspx vs18,0,r13"
174 func_check "stxsspx vs43,r2,r4"
175 func_check "stxsspx vs55,0,r11"
176 func_check "xsaddsp vs54,vs48,vs25"
177 func_check "xsmaddasp vs14,vs50,vs1"
178 func_check "xssubsp vs26,vs22,vs42"
179 func_check "xsmaddmsp vs27,vs53,vs52"
180 func_check "xsrsqrtesp vs8,vs59"
181 func_check "xssqrtsp vs12,vs41"
182 func_check "xsmulsp vs57,vs11,vs32"
183 func_check "xsmsubasp vs38,vs20,vs26"
184 func_check "xsdivsp vs26,vs19,vs6"
185 func_check "xsmsubmsp vs35,vs37,vs55"
186 func_check "xsresp vs59,vs8"
187 func_check "xsnmaddasp vs44,vs33,vs33"
188 func_check "xsnmaddmsp vs17,vs62,vs30"
189 func_check "xsnmsubasp vs54,vs52,vs31"
190 func_check "xsnmsubmsp vs37,vs5,vs58"
191 func_check "xxlorc vs30,vs54,vs44"
192 func_check "xxlnand vs49,vs14,vs29"
193 func_check "xxleqv vs62,vs22,vs30"
194 func_check "xscvdpspn vs60,vs54"
195 func_check "xsrsp vs22,vs45"
196 func_check "xscvuxdsp vs26,vs59"
197 func_check "xscvsxdsp vs38,vs49"
198 func_check "xscvspdpn vs59,vs26"
199 func_check "fmrgow f24,f14,f2"
200 func_check "fmrgew f22,f7,f5"
201 func_check "msgsnd r14"
202 func_check "msgclr r23"
203 func_check "lxvd2x vs40,0,r5"
204 func_check "lxvd2x vs10,r20,r6"
205 func_check "stxvd2x vs41,0,r7"
206 func_check "stxvd2x vs11,r21,r8"
207 func_check "lbarx r20,0,r7"
208 func_check "lbarx r20,0,r7,1"
209 func_check "lbarx r20,r1,r7"
210 func_check "lbarx r20,r1,r7,1"
211 func_check "ldarx r21,0,r8"
212 func_check "ldarx r21,0,r8,1"
213 func_check "ldarx r21,r1,r8"
214 func_check "ldarx r21,r1,r8,1"
215 func_check "lharx r22,0,r9"
216 func_check "lharx r22,0,r9,1"
217 func_check "lharx r22,r1,r9"
218 func_check "lharx r22,r1,r9,1"
219 func_check "lwarx r23,0,r10"
220 func_check "lwarx r23,0,r10,1"
221 func_check "lwarx r23,r1,r10"
222 func_check "lwarx r23,r1,r10,1"
223 func_check "stbcx. r10,0,r7"
224 func_check "stbcx. r10,r1,r7"
225 func_check "sthcx. r11,0,r8"
226 func_check "sthcx. r11,r1,r8"
227 func_check "stwcx. r12,0,r9"
228 func_check "stwcx. r12,r1,r9"
229 func_check "stdcx. r13,0,r10"
230 func_check "stdcx. r13,r1,r10"