]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/powerpc-vsx3.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-vsx3.exp
CommitLineData
1d506c26 1# Copyright 2014-2024 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 vsx"
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 "lxvx vs34,r6,r25"
62func_check "lxvx vs20,0,r10"
63func_check "lxvl vs20,r24,r10"
64func_check "lxvl vs54,0,r29"
65func_check "lxvll vs24,r20,r19"
66func_check "lxvll vs34,0,r14"
67func_check "mfvsrld r2,vs22"
68func_check "lxvwsx vs58,r26,r25"
69func_check "lxvwsx vs55,0,r29"
70func_check "stxvx vs14,r21,r4"
71func_check "stxvx vs30,0,r22"
72func_check "stxvl vs0,r26,r4"
73func_check "stxvl vs37,0,r22"
74func_check "mtvsrws vs24,r10"
75func_check "stxvll vs30,r21,r15"
76func_check "stxvll vs39,0,r14"
77func_check "mtvsrdd vs12,r6,r5"
78func_check "mtvsrdd vs38,0,r21"
79func_check "lxsibzx vs59,r28,r6"
80func_check "lxsibzx vs30,0,r8"
81func_check "lxvh8x vs42,r23,r17"
82func_check "lxvh8x vs36,0,r5"
83func_check "lxsihzx vs12,r9,r11"
84func_check "lxsihzx vs49,0,r13"
85func_check "lxvb16x vs37,r3,r19"
86func_check "lxvb16x vs0,0,r30"
87func_check "stxsibx vs2,r30,r6"
88func_check "stxsibx vs12,0,r13"
89func_check "stxvh8x vs16,r29,r8"
90func_check "stxvh8x vs55,0,r10"
91func_check "stxsihx vs34,r2,r23"
92func_check "stxsihx vs60,0,r23"
93func_check "stxvb16x vs23,r14,r12"
94func_check "stxvb16x vs19,0,r5"
95func_check "lxsd v24,0(0)"
96func_check "lxsd v15,16(r21)"
97func_check "lxssp v6,0(0)"
98func_check "lxssp v23,16(r9)"
99func_check "xscmpeqdp vs18,vs51,vs33"
100func_check "xscmpgtdp vs2,vs26,vs34"
101func_check "xscmpgedp vs5,vs26,vs20"
102func_check "xxperm vs44,vs10,vs43"
103func_check "xxpermr vs41,vs20,vs5"
104func_check "xscmpexpdp cr4,vs18,vs55"
105func_check "xxextractuw vs23,vs37,3"
106func_check "xxspltib vs54,235"
107func_check "xxinsertw vs15,vs30,4"
108func_check "xsmaxcdp vs12,vs11,vs7"
109func_check "xsmincdp vs32,vs25,vs24"
110func_check "xsmaxjdp vs25,vs53,vs12"
111func_check "xststdcsp cr2,vs36,127"
112func_check "xsminjdp vs32,vs21,vs45"
113func_check "xsxexpdp r17,vs50"
114func_check "xsxsigdp r7,vs40"
115func_check "xscvhpdp vs54,vs34"
116func_check "xscvdphp vs58,vs54"
117func_check "xststdcdp cr0,vs38,127"
118func_check "xvtstdcsp vs56,vs53,127"
119func_check "xviexpsp vs54,vs20,vs52"
120func_check "xsiexpdp vs57,r28,r29"
121func_check "xvxexpdp vs1,vs20"
122func_check "xvxsigdp vs54,vs59"
123func_check "xxbrh vs18,vs37"
124func_check "xvxexpsp vs14,vs1"
125func_check "xvxsigsp vs52,vs13"
126func_check "xxbrw vs19,vs5"
127func_check "xxbrd vs51,vs55"
128func_check "xvcvhpsp vs35,vs17"
129func_check "xvcvsphp vs15,vs45"
130func_check "xxbrq vs17,vs31"
131func_check "xvtstdcdp vs16,vs12,127"
132func_check "xviexpdp vs27,vs9,vs8"
133func_check "lxv vs4,0(0)"
134func_check "lxv vs40,16(r20)"
135func_check "stxv vs50,0(0)"
136func_check "stxv vs8,16(r16)"
137func_check "stxsd v3,0(0)"
138func_check "stxsd v17,16(r2)"
139func_check "stxssp v13,0(0)"
140func_check "stxssp v17,16(r13)"
141func_check "xsaddqp v8,v10,v18"
142func_check "xsaddqpo v5,v1,v29"
143func_check "xsrqpi 0,v12,v18,3"
144func_check "xsrqpix 1,v31,v19,0"
145func_check "xsmulqp v14,v1,v6"
146func_check "xsmulqpo v17,v7,v27"
147func_check "xsrqpxp 0,v4,v11,0"
148func_check "xscpsgnqp v29,v23,v28"
149func_check "xscmpoqp cr7,v13,v27"
150func_check "xscmpexpqp cr5,v21,v6"
151func_check "xsmaddqp v2,v19,v4"
152func_check "xsmaddqpo v30,v7,v16"
153func_check "xsmsubqp v21,v30,v15"
154func_check "xsmsubqpo v12,v17,v30"
155func_check "xsnmaddqp v6,v30,v12"
156func_check "xsnmaddqpo v12,v22,v12"
157func_check "xsnmsubqp v10,v29,v27"
158func_check "xsnmsubqpo v29,v29,v13"
159func_check "xssubqp v19,v27,v4"
160func_check "xssubqpo v13,v8,v1"
161func_check "xsdivqp v8,v3,v27"
162func_check "xsdivqpo v24,v20,v27"
163func_check "xscmpuqp cr7,v14,v4"
164func_check "xststdcqp cr4,v2,127"
165func_check "xsabsqp v31,v22"
166func_check "xsxexpqp v25,v3"
167func_check "xsnabsqp v10,v28"
168func_check "xsnegqp v19,v31"
169func_check "xsxsigqp v11,v13"
170func_check "xssqrtqp v13,v14"
171func_check "xssqrtqpo v1,v27"
172func_check "xscvqpuwz v3,v7"
173func_check "xscvudqp v20,v18"
174func_check "xscvqpswz v29,v29"
175func_check "xscvsdqp v2,v28"
176func_check "xscvqpudz v23,v4"
177func_check "xscvqpdp v3,v20"
178func_check "xscvqpdpo v1,v3"
179func_check "xscvdpqp v19,v12"
180func_check "xscvqpsdz v13,v4"
181func_check "xsiexpqp v7,v24,v7"