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