GDB: Add support for the new set/show disassembler-options commands.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / powerpc-altivec2.exp
1 # Copyright 2014-2017 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 altivec"
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 "lvepxl v3,0,r28"
65 func_check "lvepxl v19,r4,r18"
66 func_check "lvepx v27,0,r19"
67 func_check "lvepx v1,r25,r18"
68 func_check "lvexbx v31,0,r27"
69 func_check "lvexbx v28,r1,r12"
70 func_check "lvexhx v31,0,r14"
71 func_check "lvexhx v17,r16,r31"
72 func_check "lvexwx v22,0,r29"
73 func_check "lvexwx v23,r25,r5"
74 func_check "lvsm v3,0,r12"
75 func_check "lvsm v27,r29,r1"
76 func_check "lvswxl v7,0,r6"
77 func_check "lvswxl v7,r16,r8"
78 func_check "lvswx v14,0,r18"
79 func_check "lvswx v28,r28,r16"
80 func_check "lvtlxl v27,0,r12"
81 func_check "lvtlxl v27,r28,r0"
82 func_check "lvtlx v23,0,r25"
83 func_check "lvtlx v1,r25,r14"
84 func_check "lvtrxl v20,0,r24"
85 func_check "lvtrxl v22,r29,r24"
86 func_check "lvtrx v24,0,r8"
87 func_check "lvtrx v13,r23,r28"
88 func_check "mvidsplt v12,r28,r12"
89 func_check "mviwsplt v10,r27,r0"
90 func_check "stvepxl v27,0,r13"
91 func_check "stvepxl v2,r2,r31"
92 func_check "stvepx v3,0,r10"
93 func_check "stvepx v27,r28,r0"
94 func_check "stvexbx v13,0,r6"
95 func_check "stvexbx v13,r25,r3"
96 func_check "stvexhx v22,0,r1"
97 func_check "stvexhx v17,r14,r10"
98 func_check "stvexwx v21,0,r27"
99 func_check "stvexwx v31,r18,r1"
100 func_check "stvflxl v26,0,r13"
101 func_check "stvflxl v22,r13,r21"
102 func_check "stvflx v5,0,r9"
103 func_check "stvflx v21,r24,r1"
104 func_check "stvfrxl v13,0,r10"
105 func_check "stvfrxl v13,r17,r25"
106 func_check "stvfrx v17,0,r10"
107 func_check "stvfrx v8,r12,r31"
108 func_check "stvswxl v18,0,r29"
109 func_check "stvswxl v26,r14,r8"
110 func_check "stvswx v0,0,r15"
111 func_check "stvswx v13,r23,r7"
112 func_check "vabsdub v6,v17,v16"
113 func_check "vabsduh v21,v18,v4"
114 func_check "vabsduw v25,v20,v9"
115 func_check "vpermxor v6,v17,v20,v26"
116 func_check "vaddeuqm v29,v26,v15,v28"
117 func_check "vaddecuq v15,v8,v7,v24"
118 func_check "vsubeuqm v2,v6,v21,v1"
119 func_check "vsubecuq v29,v6,v0,v4"
120 func_check "vmulouw v14,v9,v3"
121 func_check "vmuluwm v24,v16,v18"
122 func_check "vaddudm v10,v17,v17"
123 func_check "vmaxud v30,v25,v4"
124 func_check "vrld v10,v6,v28"
125 func_check "vcmpequd v27,v7,v7"
126 func_check "vadduqm v22,v16,v25"
127 func_check "vaddcuq v1,v21,v29"
128 func_check "vmulosw v20,v11,v19"
129 func_check "vmaxsd v24,v19,v1"
130 func_check "vmuleuw v13,v27,v30"
131 func_check "vminud v9,v24,v17"
132 func_check "vcmpgtud v10,v18,v28"
133 func_check "vmulesw v0,v29,v22"
134 func_check "vminsd v13,v28,v1"
135 func_check "vsrad v10,v20,v5"
136 func_check "vcmpgtsd v27,v21,v5"
137 func_check "bcdadd. v0,v23,v30,1"
138 func_check "vpmsumb v25,v24,v26"
139 func_check "bcdsub. v8,v4,v4,1"
140 func_check "vpmsumh v16,v14,v26"
141 func_check "vpkudum v27,v2,v26"
142 func_check "vpmsumw v6,v23,v17"
143 func_check "vpmsumd v20,v6,v25"
144 func_check "vpkudus v27,v22,v16"
145 func_check "vsubudm v21,v20,v18"
146 func_check "vsubuqm v21,v20,v18"
147 func_check "vcipher v29,v29,v6"
148 func_check "vcipherlast v2,v13,v20"
149 func_check "vgbbd v20,v18"
150 func_check "vsubcuq v19,v8,v25"
151 func_check "vorc v9,v26,v29"
152 func_check "vncipher v20,v20,v13"
153 func_check "vncipherlast v15,v5,v27"
154 func_check "vbpermq v3,v19,v6"
155 func_check "vpksdus v30,v4,v28"
156 func_check "vnand v0,v4,v14"
157 func_check "vsld v17,v8,v29"
158 func_check "vsbox v29,v20"
159 func_check "vpksdss v11,v7,v11"
160 func_check "vcmpequd. v3,v19,v16"
161 func_check "vupkhsw v18,v17"
162 func_check "vshasigmaw v29,v8,0,13"
163 func_check "veqv v23,v28,v26"
164 func_check "vmrgew v29,v0,v2"
165 func_check "vmrgow v29,v0,v2"
166 func_check "vshasigmad v27,v19,0,0"
167 func_check "vsrd v20,v28,v28"
168 func_check "vupklsw v18,v21"
169 func_check "vclzb v30,v7"
170 func_check "vpopcntb v29,v21"
171 func_check "vclzh v25,v21"
172 func_check "vpopcnth v16,v30"
173 func_check "vclzw v28,v3"
174 func_check "vpopcntw v10,v9"
175 func_check "vclzd v22,v9"
176 func_check "vpopcntd v15,v30"
177 func_check "vcmpgtud. v2,v31,v6"
178 func_check "vcmpgtsd. v20,v15,v2"
This page took 0.037926 seconds and 4 git commands to generate.