blob: e5770905fa912f142412e0abae4e49ee441214d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
|
# Copyright 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This file is part of the gdb testsuite.
#
# This test tests some i386 general instructions for reverse execution.
#
if ![supports_reverse] {
return
}
if ![istarget "*86*-*linux*"] then {
verbose "Skipping i386 reverse tests."
return
}
standard_testfile
# some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags]
if {[prepare_for_testing $testfile.exp $testfile $srcfile \
[list debug $additional_flags]]} {
return -1
}
set end_of_main [gdb_get_line_number " end of main "]
set end_sse_test [gdb_get_line_number " end sse_test "]
set end_ssse3_test [gdb_get_line_number " end ssse3_test "]
set end_sse4_test [gdb_get_line_number " end sse4_test "]
runto main
if [supports_process_record] {
# Activate process record/replay
gdb_test_no_output "record" "Turn on process record"
}
global hex
global decimal
#sse_test
gdb_test "break $end_sse_test" \
"Breakpoint $decimal at .* line $end_sse_test\." \
"set breakpoint at end of sse_test"
set test "continue to end of sse_test"
gdb_test_multiple "continue" $test {
-re " end sse_test .*\r\n$gdb_prompt $" {
pass $test
}
-re " Illegal instruction.*\r\n$gdb_prompt $" {
untested i386-sse-reverse
return -1
}
}
gdb_test "reverse-step" "xorps.*" "reverse-step to xorps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xf000c00080008000f800c00080008000.*" \
"verify xmm0 at end of sse_test"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x70004000000000007800400000000000.*" \
"verify xmm1 at end of sse_test"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
"verify xmm2 at end of sse_test"
gdb_test "reverse-step" "xorpd.*" "reverse-step to xorpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xf000c00080008000f800c00080008000.*" \
"verify xmm0 after reverse xorps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
"verify xmm1 after reverse xorps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
"verify xmm2 after reverse xorps"
gdb_test "reverse-step" "unpckhps.*" "reverse-step to unpckhps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x8000800080008000fff00000ffc00000.*" \
"verify xmm0 after reverse xorpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
"verify xmm1 after reverse xorpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
"verify xmm2 after reverse xorpd"
gdb_test "reverse-step" "unpckhpd.*" "reverse-step to unpckhpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
"verify xmm0 after reverse unpckhps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
"verify xmm1 after reverse unpckhps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
"verify xmm2 after reverse unpckhps"
gdb_test "reverse-step" "ucomiss.*" "reverse-step to ucomiss"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
"verify xmm0 after reverse unpckhpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
"verify xmm1 after reverse unpckhpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
"verify xmm2 after reverse unpckhpd"
gdb_test "reverse-step" "ucomisd.*" "reverse-step to ucomisd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
"verify xmm0 after reverse ucomiss"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \
"verify xmm1 after reverse ucomiss"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
"verify xmm2 after reverse ucomiss"
gdb_test "reverse-step" "packssdw.*" "reverse-step to packssdw"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
"verify xmm0 after reverse ucomisd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
"verify xmm1 after reverse ucomisd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \
"verify xmm2 after reverse ucomisd"
gdb_test "reverse-step" "packsswb.*" "reverse-step to packsswb"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
"verify xmm0 after reverse packssdw"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
"verify xmm1 after reverse packssdw"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm2 after reverse packssdw"
gdb_test "reverse-step" "orps.*" "reverse-step to orps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
"verify xmm0 after reverse packsswb"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
"verify xmm1 after reverse packsswb"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm2 after reverse packsswb"
gdb_test "reverse-step" "orpd.*" "reverse-step to orpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0000000000000000fff80000ffc00000.*" \
"verify xmm0 after reverse orps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
"verify xmm1 after reverse orps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm2 after reverse orps"
gdb_test "reverse-step" "mulss.*" "reverse-step to mulss"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0000000000000000fff80000ffc00000.*" \
"verify xmm0 after reverse orpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
"verify xmm1 after reverse orpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm2 after reverse orpd"
gdb_test "reverse-step" "mulsd.*" "reverse-step to mulsd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0000000000000000fff80000ffc00000.*" \
"verify xmm0 after reverse mulss"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
"verify xmm1 after reverse mulss"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm2 after reverse mulss"
gdb_test "reverse-step" "mulps.*" "reverse-step to mulps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0000000000000000fff80000ffc00000.*" \
"verify xmm0 after reverse mulsd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
"verify xmm1 after reverse mulsd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff0000000000000fff00000ffc00000.*" \
"verify xmm2 after reverse mulsd"
gdb_test "reverse-step" "mulpd.*" "reverse-step to mulpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0000000000000000fff80000ffc00000.*" \
"verify xmm0 after reverse mulps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm1 after reverse mulps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff0000000000000fff00000ffc00000.*" \
"verify xmm2 after reverse mulps"
gdb_test "reverse-step" "divss.*" "reverse-step to divss"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0000000000000000fff80000ffc00000.*" \
"verify xmm0 after reverse mulpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm1 after reverse mulpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff0000000000000fff0000000000000.*" \
"verify xmm2 after reverse mulpd"
gdb_test "reverse-step" "divsd.*" "reverse-step to divsd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x00000000000000008000000080000000.*" \
"verify xmm0 after reverse divss"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
"verify xmm1 after reverse divss"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff0000000000000fff0000000000000.*" \
"verify xmm2 after reverse divss"
gdb_test "reverse-step" "divps.*" "reverse-step to divps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x00000000000000008000000080000000.*" \
"verify xmm0 after reverse divsd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x00000000000000000000000080000000.*" \
"verify xmm1 after reverse divsd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xfff0000000000000fff0000000000000.*" \
"verify xmm2 after reverse divsd"
gdb_test "reverse-step" "divpd.*" "reverse-step to divpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x00000000000000008000000080000000.*" \
"verify xmm0 after reverse divps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x00000000000000000000000080000000.*" \
"verify xmm1 after reverse divps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
"verify xmm2 after reverse divps"
gdb_test "reverse-step" "cvtpd2ps.*" "reverse-step to cvtpd2ps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x00000000000000008000000080000000.*" \
"verify xmm0 after reverse divpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xce80200000000000ce80200000000000.*" \
"verify xmm1 after reverse divpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
"verify xmm2 after reverse divpd"
gdb_test "reverse-step" "cvtpd2dq.*" "reverse-step to cvtpd2dq"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a090807060504ffffffff.*" \
"verify xmm0 after reverse cvtpd2ps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0xce80200000000000ce80200000000000.*" \
"verify xmm1 after reverse cvtpd2ps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
"verify xmm2 after reverse cvtpd2ps"
gdb_test "reverse-step" "cvtdq2ps.*" "reverse-step to cvtdq2ps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a090807060504ffffffff.*" \
"verify xmm0 after reverse cvtpd2dq"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x0000000000000000ffffffffffffffff.*" \
"verify xmm1 after reverse cvtpd2dq"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xbff0000000000000bff0000000000000.*" \
"verify xmm2 after reverse cvtpd2dq"
gdb_test "reverse-step" "cvtdq2pd.*" "reverse-step to cvtdq2pd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a090807060504ffffffff.*" \
"verify xmm0 after reverse cvtdq2ps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x0000000000000000ffffffffffffffff.*" \
"verify xmm1 after reverse cvtdq2ps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
"verify xmm2 after reverse cvtdq2ps"
gdb_test "reverse-step" "comiss.*" "reverse-step to comiss"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a090807060504ffffffff.*" \
"verify xmm0 after reverse cvtdq2pd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x0000000000000000ffffffffffffffff.*" \
"verify xmm1 after reverse cvtdq2pd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
"verify xmm2 after reverse cvtdq2pd"
gdb_test "reverse-step" "comisd.*" "reverse-step to comisd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a090807060504ffffffff.*" \
"verify xmm0 after reverse comiss"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x0000000000000000ffffffffffffffff.*" \
"verify xmm1 after reverse comiss"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
"verify xmm2 after reverse comiss"
gdb_test "reverse-step" "cmpss.*" "reverse-step to cmpss"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse comisd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x0000000000000000ffffffffffffffff.*" \
"verify xmm1 after reverse comisd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
"verify xmm2 after reverse comisd"
gdb_test "reverse-step" "cmpsd.*" "reverse-step to cmpsd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse cmpss"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x00000000000000000000000000000000.*" \
"verify xmm1 after reverse cmpss"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0xffffffffffffffffffffffff00000000.*" \
"verify xmm2 after reverse cmpss"
gdb_test "reverse-step" "cmpps.*" "reverse-step to cmpps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse cmpsd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x00000000000000000000000000000000.*" \
"verify xmm1 after reverse cmpsd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x0f0e0d0c0b0a09082726252400000000.*" \
"verify xmm2 after reverse cmpsd"
gdb_test "reverse-step" "cmppd.*" "reverse-step to cmppd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse cmpps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x0f0e0d0c0b0a09082726252400000000.*" \
"verify xmm1 after reverse cmpps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x0f0e0d0c0b0a09082726252400000000.*" \
"verify xmm2 after reverse cmpps"
gdb_test "reverse-step" "andps.*" "reverse-step to andps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse cmppd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252400000000.*" \
"verify xmm1 after reverse cmppd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x0f0e0d0c0b0a09082726252400000000.*" \
"verify xmm2 after reverse cmppd"
gdb_test "reverse-step" "andpd.*" "reverse-step to andpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse andps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252400000000.*" \
"verify xmm1 after reverse andps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse andps"
gdb_test "reverse-step" "addsubps.*" "reverse-step to addsubps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse andpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252423222120.*" \
"verify xmm1 after reverse andpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse andpd"
gdb_test "reverse-step" "addsubpd.*" "reverse-step to addsubpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050423222120.*" \
"verify xmm0 after reverse addsubps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252423222120.*" \
"verify xmm1 after reverse addsubps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse addsubps"
gdb_test "reverse-step" "addss.*" "reverse-step to addss"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse addsubpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19182726252423222120.*" \
"verify xmm1 after reverse addsubpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse addsubpd"
gdb_test "reverse-step" "addsd.*" "reverse-step to addsd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse addss"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse addss"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse addss"
gdb_test "reverse-step" "addps.*" "reverse-step to addps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse addsd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse addsd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse addsd"
gdb_test "reverse-step" "addpd.*" "reverse-step to addpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse addps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse addps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse addps"
#ssse3_test
gdb_test "continue" \
" end sse_test .*" \
"continue to end of sse_test #2"
gdb_test "break $end_ssse3_test" \
"Breakpoint $decimal at .* line $end_ssse3_test\." \
"set breakpoint at end of ssse3_test"
set test "continue to end of ssse3_test"
gdb_test_multiple "continue" $test {
-re " end ssse3_test .*\r\n$gdb_prompt $" {
pass $test
}
-re " Illegal instruction.*\r\n$gdb_prompt $" {
untested i386-ssse3-reverse
return -1
}
}
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm0 at end of ssse3_test"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 at end of ssse3_test"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm2 at end of ssse3_test"
gdb_test "reverse-step" "pabsd.*" "reverse-step to pabsd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse pabsd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse pabsd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm2 after reverse pabsd"
gdb_test "reverse-step" "pabsw.*" "reverse-step to pabsw"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse pabsw"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse pabsw"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm2 after reverse pabsw"
gdb_test "reverse-step" "pabsb.*" "reverse-step to pabsb"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse pabsb"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse pabsb"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse pabsb"
#sse4_test
gdb_test "continue" \
" end ssse3_test .*" \
"continue to end of ssse3_test #2"
gdb_test "break $end_sse4_test" \
"Breakpoint $decimal at .* line $end_sse4_test\." \
"set breakpoint at end of sse4_test"
set test "continue to end of sse4_test"
gdb_test_multiple "continue" $test {
-re " end sse4_test .*\r\n$gdb_prompt $" {
pass $test
}
-re " Illegal instruction.*\r\n$gdb_prompt $" {
untested i386-sse4-reverse
return -1
}
}
gdb_test "reverse-step" "blendvps.*" "reverse-step to blendvps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09082726252413121110.*" \
"verify xmm0 at end of sse4_test"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 at end of sse4_test"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 at end of sse4_test"
gdb_test "reverse-step" "blendvpd.*" "reverse-step to blendvpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09082726252413121110.*" \
"verify xmm0 after reverse blendvps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse blendvps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse blendvps"
gdb_test "reverse-step" "blendps.*" "reverse-step to blendps"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09081716151413121110.*" \
"verify xmm0 after reverse blendvpd"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse blendvpd"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse blendvpd"
gdb_test "reverse-step" "blendpd.*" "reverse-step to blendpd"
gdb_test "info register xmm0" \
"xmm0 .*uint128 = 0x0f0e0d0c0b0a09080706050403020100.*" \
"verify xmm0 after reverse blendps"
gdb_test "info register xmm1" \
"xmm1 .*uint128 = 0x1f1e1d1c1b1a19181716151413121110.*" \
"verify xmm1 after reverse blendps"
gdb_test "info register xmm2" \
"xmm2 .*uint128 = 0x2f2e2d2c2b2a29282726252423222120.*" \
"verify xmm2 after reverse blendps"
|