Automatic date update in version.in
[binutils-gdb.git] / gdb / testsuite / gdb.reverse / i386-sse-reverse.exp
blob8306a3fa41c596432ee08ab49c716261f15c6f0f
1 # Copyright 2009-2024 Free Software Foundation, Inc.
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.
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.
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/>.
16 # This file is part of the gdb testsuite.
19 # This test tests some i386 general instructions for reverse execution.
22 require supports_reverse
24 if {![istarget "*86*-*linux*"]} {
25     verbose "Skipping i386 reverse tests."
26     return
29 standard_testfile
31 # some targets have leading underscores on assembly symbols.
32 set additional_flags [gdb_target_symbol_prefix_flags]
34 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
35          [list debug $additional_flags]]} {
36     return -1
39 set end_of_main          [gdb_get_line_number " end of main "]
40 set end_sse_test         [gdb_get_line_number " end sse_test "]
41 set end_ssse3_test       [gdb_get_line_number " end ssse3_test "]
42 set end_sse4_test         [gdb_get_line_number " end sse4_test "]
44 runto_main
46 if [supports_process_record] {
47     # Activate process record/replay
48     gdb_test_no_output "record" "turn on process record"
51 global hex
52 global decimal
54 #sse_test
56 gdb_test "break $end_sse_test" \
57     "Breakpoint $decimal at .* line $end_sse_test\." \
58     "set breakpoint at end of sse_test"
60 set test "continue to end of sse_test"
61 gdb_test_multiple "continue" $test {
62     -re " end sse_test .*\r\n$gdb_prompt $" {
63         pass $test
64     }
65     -re " Illegal instruction.*\r\n$gdb_prompt $" {
66         untested i386-sse-reverse
67         return -1
68     }
71 gdb_test "reverse-step" "xorps.*" "reverse-step to xorps"
73 gdb_test "info register xmm0" \
74     "xmm0 .*uint128 = 0xf000c00080008000f800c00080008000.*" \
75     "verify xmm0 at end of sse_test"
77 gdb_test "info register xmm1" \
78     "xmm1 .*uint128 = 0x70004000000000007800400000000000.*" \
79     "verify xmm1 at end of sse_test"
81 gdb_test "info register xmm2" \
82     "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
83     "verify xmm2 at end of sse_test"
85 gdb_test "reverse-step" "xorpd.*" "reverse-step to xorpd"
87 gdb_test "info register xmm0" \
88     "xmm0 .*uint128 = 0xf000c00080008000f800c00080008000.*" \
89     "verify xmm0 after reverse xorps"
91 gdb_test "info register xmm1" \
92     "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
93     "verify xmm1 after reverse xorps"
95 gdb_test "info register xmm2" \
96     "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
97     "verify xmm2 after reverse xorps"
99 gdb_test "reverse-step" "unpckhps.*" "reverse-step to unpckhps"
101 gdb_test "info register xmm0" \
102     "xmm0 .*uint128 = 0x8000800080008000fff00000ffc00000.*" \
103     "verify xmm0 after reverse xorpd"
105 gdb_test "info register xmm1" \
106     "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
107     "verify xmm1 after reverse xorpd"
109 gdb_test "info register xmm2" \
110     "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
111     "verify xmm2 after reverse xorpd"
113 gdb_test "reverse-step" "unpckhpd.*" "reverse-step to unpckhpd"
115 gdb_test "info register xmm0" \
116     "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
117     "verify xmm0 after reverse unpckhps"
119 gdb_test "info register xmm1" \
120     "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
121     "verify xmm1 after reverse unpckhps"
123 gdb_test "info register xmm2" \
124     "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
125     "verify xmm2 after reverse unpckhps"
127 gdb_test "reverse-step" "ucomiss.*" "reverse-step to ucomiss"
129 gdb_test "info register xmm0" \
130     "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
131     "verify xmm0 after reverse unpckhpd"
133 gdb_test "info register xmm1" \
134     "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
135     "verify xmm1 after reverse unpckhpd"
137 gdb_test "info register xmm2" \
138     "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
139     "verify xmm2 after reverse unpckhpd"
141 gdb_test "reverse-step" "ucomisd.*" "reverse-step to ucomisd"
143 gdb_test "info register xmm0" \
144     "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
145     "verify xmm0 after reverse ucomiss"
147 gdb_test "info register xmm1" \
148     "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
149     "verify xmm1 after reverse ucomiss"
151 gdb_test "info register xmm2" \
152     "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
153     "verify xmm2 after reverse ucomiss"
155 gdb_test "reverse-step" "packssdw.*" "reverse-step to packssdw"
157 gdb_test "info register xmm0" \
158     "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
159     "verify xmm0 after reverse ucomisd"
161 gdb_test "info register xmm1" \
162     "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
163     "verify xmm1 after reverse ucomisd"
165 gdb_test "info register xmm2" \
166     "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
167     "verify xmm2 after reverse ucomisd"
169 gdb_test "reverse-step" "packsswb.*" "reverse-step to packsswb"
171 gdb_test "info register xmm0" \
172     "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
173     "verify xmm0 after reverse packssdw"
175 gdb_test "info register xmm1" \
176     "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
177     "verify xmm1 after reverse packssdw"
179 gdb_test "info register xmm2" \
180     "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
181     "verify xmm2 after reverse packssdw"
183 gdb_test "reverse-step" "orps.*" "reverse-step to orps"
185 gdb_test "info register xmm0" \
186     "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
187     "verify xmm0 after reverse packsswb"
189 gdb_test "info register xmm1" \
190     "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
191     "verify xmm1 after reverse packsswb"
193 gdb_test "info register xmm2" \
194     "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
195     "verify xmm2 after reverse packsswb"
197 gdb_test "reverse-step" "orpd.*" "reverse-step to orpd"
199 gdb_test "info register xmm0" \
200     "xmm0 .*uint128 = 0xfff80000ffc00000.*" \
201     "verify xmm0 after reverse orps"
203 gdb_test "info register xmm1" \
204     "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
205     "verify xmm1 after reverse orps"
207 gdb_test "info register xmm2" \
208     "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
209     "verify xmm2 after reverse orps"
211 gdb_test "reverse-step" "mulss.*" "reverse-step to mulss"
213 gdb_test "info register xmm0" \
214     "xmm0 .*uint128 = 0xfff80000ffc00000.*" \
215     "verify xmm0 after reverse orpd"
217 gdb_test "info register xmm1" \
218     "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
219     "verify xmm1 after reverse orpd"
221 gdb_test "info register xmm2" \
222     "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
223     "verify xmm2 after reverse orpd"
225 gdb_test "reverse-step" "mulsd.*" "reverse-step to mulsd"
227 gdb_test "info register xmm0" \
228     "xmm0 .*uint128 = 0xfff80000ffc00000.*" \
229     "verify xmm0 after reverse mulss"
231 gdb_test "info register xmm1" \
232     "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
233     "verify xmm1 after reverse mulss"
235 gdb_test "info register xmm2" \
236     "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
237     "verify xmm2 after reverse mulss"
239 gdb_test "reverse-step" "mulps.*" "reverse-step to mulps"
241 gdb_test "info register xmm0" \
242     "xmm0 .*uint128 = 0xfff80000ffc00000.*" \
243     "verify xmm0 after reverse mulsd"
245 gdb_test "info register xmm1" \
246     "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
247     "verify xmm1 after reverse mulsd"
249 gdb_test "info register xmm2" \
250     "xmm2 .*uint128 = 0xfff0000000000000fff00000ffc00000.*" \
251     "verify xmm2 after reverse mulsd"
253 gdb_test "reverse-step" "mulpd.*" "reverse-step to mulpd"
255 gdb_test "info register xmm0" \
256     "xmm0 .*uint128 = 0xfff80000ffc00000.*" \
257     "verify xmm0 after reverse mulps"
259 gdb_test "info register xmm1" \
260     "xmm1 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
261     "verify xmm1 after reverse mulps"
263 gdb_test "info register xmm2" \
264     "xmm2 .*uint128 = 0xfff0000000000000fff00000ffc00000.*" \
265     "verify xmm2 after reverse mulps"
267 gdb_test "reverse-step" "divss.*" "reverse-step to divss"
269 gdb_test "info register xmm0" \
270     "xmm0 .*uint128 = 0xfff80000ffc00000.*" \
271     "verify xmm0 after reverse mulpd"
273 gdb_test "info register xmm1" \
274     "xmm1 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
275     "verify xmm1 after reverse mulpd"
277 gdb_test "info register xmm2" \
278     "xmm2 .*uint128 = 0xfff0000000000000fff0000000000000.*" \
279     "verify xmm2 after reverse mulpd"
281 gdb_test "reverse-step" "divsd.*" "reverse-step to divsd"
283 gdb_test "info register xmm0" \
284     "xmm0 .*uint128 = 0x8000000080000000.*" \
285     "verify xmm0 after reverse divss"
287 gdb_test "info register xmm1" \
288     "xmm1 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
289     "verify xmm1 after reverse divss"
291 gdb_test "info register xmm2" \
292     "xmm2 .*uint128 = 0xfff0000000000000fff0000000000000.*" \
293     "verify xmm2 after reverse divss"
295 gdb_test "reverse-step" "divps.*" "reverse-step to divps"
297 gdb_test "info register xmm0" \
298     "xmm0 .*uint128 = 0x8000000080000000.*" \
299     "verify xmm0 after reverse divsd"
301 gdb_test "info register xmm1" \
302     "xmm1 .*uint128 = 0x80000000.*" \
303     "verify xmm1 after reverse divsd"
305 gdb_test "info register xmm2" \
306     "xmm2 .*uint128 = 0xfff0000000000000fff0000000000000.*" \
307     "verify xmm2 after reverse divsd"
309 gdb_test "reverse-step" "divpd.*" "reverse-step to divpd"
311 gdb_test "info register xmm0" \
312     "xmm0 .*uint128 = 0x8000000080000000.*" \
313     "verify xmm0 after reverse divps"
315 gdb_test "info register xmm1" \
316     "xmm1 .*uint128 = 0x80000000.*" \
317     "verify xmm1 after reverse divps"
319 gdb_test "info register xmm2" \
320     "xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
321     "verify xmm2 after reverse divps"
323 gdb_test "reverse-step" "cvtpd2ps.*" "reverse-step to cvtpd2ps"
325 gdb_test "info register xmm0" \
326     "xmm0 .*uint128 = 0x8000000080000000.*" \
327     "verify xmm0 after reverse divpd"
329 gdb_test "info register xmm1" \
330     "xmm1 .*uint128 = 0xce80200000000000ce80200000000000.*" \
331     "verify xmm1 after reverse divpd"
333 gdb_test "info register xmm2" \
334     "xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
335     "verify xmm2 after reverse divpd"
337 gdb_test "reverse-step" "cvtpd2dq.*" "reverse-step to cvtpd2dq"
339 gdb_test "info register xmm0" \
340     "xmm0 .*uint128 = 0xf0e0d0c0b0a090807060504ffffffff.*" \
341     "verify xmm0 after reverse cvtpd2ps"
343 gdb_test "info register xmm1" \
344     "xmm1 .*uint128 = 0xce80200000000000ce80200000000000.*" \
345     "verify xmm1 after reverse cvtpd2ps"
347 gdb_test "info register xmm2" \
348     "xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
349     "verify xmm2 after reverse cvtpd2ps"
351 gdb_test "reverse-step" "cvtdq2ps.*" "reverse-step to cvtdq2ps"
353 gdb_test "info register xmm0" \
354     "xmm0 .*uint128 = 0xf0e0d0c0b0a090807060504ffffffff.*" \
355     "verify xmm0 after reverse cvtpd2dq"
357 gdb_test "info register xmm1" \
358     "xmm1 .*uint128 = 0xffffffffffffffff.*" \
359     "verify xmm1 after reverse cvtpd2dq"
361 gdb_test "info register xmm2" \
362     "xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
363     "verify xmm2 after reverse cvtpd2dq"
365 gdb_test "reverse-step" "cvtdq2pd.*" "reverse-step to cvtdq2pd"
367 gdb_test "info register xmm0" \
368     "xmm0 .*uint128 = 0xf0e0d0c0b0a090807060504ffffffff.*" \
369     "verify xmm0 after reverse cvtdq2ps"
371 gdb_test "info register xmm1" \
372     "xmm1 .*uint128 = 0xffffffffffffffff.*" \
373     "verify xmm1 after reverse cvtdq2ps"
375 gdb_test "info register xmm2" \
376     "xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
377     "verify xmm2 after reverse cvtdq2ps"
379 gdb_test "reverse-step" "comiss.*" "reverse-step to comiss"
381 gdb_test "info register xmm0" \
382     "xmm0 .*uint128 = 0xf0e0d0c0b0a090807060504ffffffff.*" \
383     "verify xmm0 after reverse cvtdq2pd"
385 gdb_test "info register xmm1" \
386     "xmm1 .*uint128 = 0xffffffffffffffff.*" \
387     "verify xmm1 after reverse cvtdq2pd"
389 gdb_test "info register xmm2" \
390     "xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
391     "verify xmm2 after reverse cvtdq2pd"
393 gdb_test "reverse-step" "comisd.*" "reverse-step to comisd"
395 gdb_test "info register xmm0" \
396     "xmm0 .*uint128 = 0xf0e0d0c0b0a090807060504ffffffff.*" \
397     "verify xmm0 after reverse comiss"
399 gdb_test "info register xmm1" \
400     "xmm1 .*uint128 = 0xffffffffffffffff.*" \
401     "verify xmm1 after reverse comiss"
403 gdb_test "info register xmm2" \
404     "xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
405     "verify xmm2 after reverse comiss"
407 gdb_test "reverse-step" "cmpss.*" "reverse-step to cmpss"
409 gdb_test "info register xmm0" \
410     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
411     "verify xmm0 after reverse comisd"
413 gdb_test "info register xmm1" \
414     "xmm1 .*uint128 = 0xffffffffffffffff.*" \
415     "verify xmm1 after reverse comisd"
417 gdb_test "info register xmm2" \
418     "xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
419     "verify xmm2 after reverse comisd"
421 gdb_test "reverse-step" "cmpsd.*" "reverse-step to cmpsd"
423 gdb_test "info register xmm0" \
424     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
425     "verify xmm0 after reverse cmpss"
427 gdb_test "info register xmm1" \
428     "xmm1 .*uint128 = 0x.*" \
429     "verify xmm1 after reverse cmpss"
431 gdb_test "info register xmm2" \
432     "xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
433     "verify xmm2 after reverse cmpss"
435 gdb_test "reverse-step" "cmpps.*" "reverse-step to cmpps"
437 gdb_test "info register xmm0" \
438     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
439     "verify xmm0 after reverse cmpsd"
441 gdb_test "info register xmm1" \
442     "xmm1 .*uint128 = 0x.*" \
443     "verify xmm1 after reverse cmpsd"
445 gdb_test "info register xmm2" \
446     "xmm2 .*uint128 = 0xf0e0d0c0b0a09082726252400000000.*" \
447     "verify xmm2 after reverse cmpsd"
449 gdb_test "reverse-step" "cmppd.*" "reverse-step to cmppd"
451 gdb_test "info register xmm0" \
452     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
453     "verify xmm0 after reverse cmpps"
455 gdb_test "info register xmm1" \
456     "xmm1 .*uint128 = 0xf0e0d0c0b0a09082726252400000000.*" \
457     "verify xmm1 after reverse cmpps"
459 gdb_test "info register xmm2" \
460     "xmm2 .*uint128 = 0xf0e0d0c0b0a09082726252400000000.*" \
461     "verify xmm2 after reverse cmpps"
463 gdb_test "reverse-step" "andps.*" "reverse-step to andps"
465 gdb_test "info register xmm0" \
466     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
467     "verify xmm0 after reverse cmppd"
469 gdb_test "info register xmm1" \
470     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252400000000.*" \
471     "verify xmm1 after reverse cmppd"
473 gdb_test "info register xmm2" \
474     "xmm2 .*uint128 = 0xf0e0d0c0b0a09082726252400000000.*" \
475     "verify xmm2 after reverse cmppd"
477 gdb_test "reverse-step" "andpd.*" "reverse-step to andpd"
479 gdb_test "info register xmm0" \
480     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
481     "verify xmm0 after reverse andps"
483 gdb_test "info register xmm1" \
484     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252400000000.*" \
485     "verify xmm1 after reverse andps"
487 gdb_test "info register xmm2" \
488     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
489     "verify xmm2 after reverse andps"
491 gdb_test "reverse-step" "addsubps.*" "reverse-step to addsubps"
493 gdb_test "info register xmm0" \
494     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
495     "verify xmm0 after reverse andpd"
497 gdb_test "info register xmm1" \
498     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252423222120.*" \
499     "verify xmm1 after reverse andpd"
501 gdb_test "info register xmm2" \
502     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
503     "verify xmm2 after reverse andpd"
505 gdb_test "reverse-step" "addsubpd.*" "reverse-step to addsubpd"
507 gdb_test "info register xmm0" \
508     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050423222120.*" \
509     "verify xmm0 after reverse addsubps"
511 gdb_test "info register xmm1" \
512     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252423222120.*" \
513     "verify xmm1 after reverse addsubps"
515 gdb_test "info register xmm2" \
516     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
517     "verify xmm2 after reverse addsubps"
519 gdb_test "reverse-step" "addss.*" "reverse-step to addss"
521 gdb_test "info register xmm0" \
522     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
523     "verify xmm0 after reverse addsubpd"
525 gdb_test "info register xmm1" \
526     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252423222120.*" \
527     "verify xmm1 after reverse addsubpd"
529 gdb_test "info register xmm2" \
530     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
531     "verify xmm2 after reverse addsubpd"
533 gdb_test "reverse-step" "addsd.*" "reverse-step to addsd"
535 gdb_test "info register xmm0" \
536     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
537     "verify xmm0 after reverse addss"
539 gdb_test "info register xmm1" \
540     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
541     "verify xmm1 after reverse addss"
543 gdb_test "info register xmm2" \
544     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
545     "verify xmm2 after reverse addss"
547 gdb_test "reverse-step" "addps.*" "reverse-step to addps"
549 gdb_test "info register xmm0" \
550     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
551     "verify xmm0 after reverse addsd"
553 gdb_test "info register xmm1" \
554     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
555     "verify xmm1 after reverse addsd"
557 gdb_test "info register xmm2" \
558     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
559     "verify xmm2 after reverse addsd"
561 gdb_test "reverse-step" "addpd.*" "reverse-step to addpd"
563 gdb_test "info register xmm0" \
564     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
565     "verify xmm0 after reverse addps"
567 gdb_test "info register xmm1" \
568     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
569     "verify xmm1 after reverse addps"
571 gdb_test "info register xmm2" \
572     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
573     "verify xmm2 after reverse addps"
576 #ssse3_test
578 gdb_test "continue" \
579     " end sse_test .*" \
580     "continue to end of sse_test #2"
582 gdb_test "break $end_ssse3_test" \
583     "Breakpoint $decimal at .* line $end_ssse3_test\." \
584     "set breakpoint at end of ssse3_test"
586 set test "continue to end of ssse3_test"
587 gdb_test_multiple "continue" $test {
588     -re " end ssse3_test .*\r\n$gdb_prompt $" {
589         pass $test
590     }
591     -re " Illegal instruction.*\r\n$gdb_prompt $" {
592         untested i386-ssse3-reverse
593         return -1
594     }
597 gdb_test "info register xmm0" \
598     "xmm0 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
599     "verify xmm0 at end of ssse3_test"
601 gdb_test "info register xmm1" \
602     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
603     "verify xmm1 at end of ssse3_test"
605 gdb_test "info register xmm2" \
606     "xmm2 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
607     "verify xmm2 at end of ssse3_test"
609 gdb_test "reverse-step" "pabsd.*" "reverse-step to pabsd"
611 gdb_test "info register xmm0" \
612     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
613     "verify xmm0 after reverse pabsd"
615 gdb_test "info register xmm1" \
616     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
617     "verify xmm1 after reverse pabsd"
619 gdb_test "info register xmm2" \
620     "xmm2 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
621     "verify xmm2 after reverse pabsd"
623 gdb_test "reverse-step" "pabsw.*" "reverse-step to pabsw"
625 gdb_test "info register xmm0" \
626     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
627     "verify xmm0 after reverse pabsw"
629 gdb_test "info register xmm1" \
630     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
631     "verify xmm1 after reverse pabsw"
633 gdb_test "info register xmm2" \
634     "xmm2 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
635     "verify xmm2 after reverse pabsw"
637 gdb_test "reverse-step" "pabsb.*" "reverse-step to pabsb"
639 gdb_test "info register xmm0" \
640     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
641     "verify xmm0 after reverse pabsb"
643 gdb_test "info register xmm1" \
644     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
645     "verify xmm1 after reverse pabsb"
647 gdb_test "info register xmm2" \
648     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
649     "verify xmm2 after reverse pabsb"
652 #sse4_test
654 gdb_test "continue" \
655     " end ssse3_test .*" \
656     "continue to end of ssse3_test #2"
658 gdb_test "break $end_sse4_test" \
659     "Breakpoint $decimal at .* line $end_sse4_test\." \
660     "set breakpoint at end of sse4_test"
662 set test "continue to end of sse4_test"
663 gdb_test_multiple "continue" $test {
664     -re " end sse4_test .*\r\n$gdb_prompt $" {
665         pass $test
666     }
667     -re " Illegal instruction.*\r\n$gdb_prompt $" {
668         untested i386-sse4-reverse
669         return -1
670     }
673 gdb_test "reverse-step" "blendvps.*" "reverse-step to blendvps"
675 gdb_test "info register xmm0" \
676     "xmm0 .*uint128 = 0xf0e0d0c0b0a09082726252413121110.*" \
677     "verify xmm0 at end of sse4_test"
679 gdb_test "info register xmm1" \
680     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
681     "verify xmm1 at end of sse4_test"
683 gdb_test "info register xmm2" \
684     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
685     "verify xmm2 at end of sse4_test"
687 gdb_test "reverse-step" "blendvpd.*" "reverse-step to blendvpd"
689 gdb_test "info register xmm0" \
690     "xmm0 .*uint128 = 0xf0e0d0c0b0a09082726252413121110.*" \
691     "verify xmm0 after reverse blendvps"
693 gdb_test "info register xmm1" \
694     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
695     "verify xmm1 after reverse blendvps"
697 gdb_test "info register xmm2" \
698     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
699     "verify xmm2 after reverse blendvps"
701 gdb_test "reverse-step" "blendps.*" "reverse-step to blendps"
703 gdb_test "info register xmm0" \
704     "xmm0 .*uint128 = 0xf0e0d0c0b0a09081716151413121110.*" \
705     "verify xmm0 after reverse blendvpd"
707 gdb_test "info register xmm1" \
708     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
709     "verify xmm1 after reverse blendvpd"
711 gdb_test "info register xmm2" \
712     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
713     "verify xmm2 after reverse blendvpd"
715 gdb_test "reverse-step" "blendpd.*" "reverse-step to blendpd"
717 gdb_test "info register xmm0" \
718     "xmm0 .*uint128 = 0xf0e0d0c0b0a09080706050403020100.*" \
719     "verify xmm0 after reverse blendps"
721 gdb_test "info register xmm1" \
722     "xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
723     "verify xmm1 after reverse blendps"
725 gdb_test "info register xmm2" \
726     "xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
727     "verify xmm2 after reverse blendps"