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