aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2010-04-02 05:13:09 +0000
committerHui Zhu <teawater@gmail.com>2010-04-02 05:13:09 +0000
commiteb8e76db62be7f9c66669baa51ba660b445cd835 (patch)
tree2bf621275897f0efd7add5fece01834f05ca3b3b /gdb/testsuite
parenta3c4230a6352173ed7b57e835478cbae4e2d8327 (diff)
downloadgdb-eb8e76db62be7f9c66669baa51ba660b445cd835.zip
gdb-eb8e76db62be7f9c66669baa51ba660b445cd835.tar.gz
gdb-eb8e76db62be7f9c66669baa51ba660b445cd835.tar.bz2
2010-04-02 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com> * gdb.reverse/i386-sse-reverse.exp: New file. * gdb.reverse/i386-sse-reverse.c: New file.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.reverse/i386-sse-reverse.c101
-rw-r--r--gdb/testsuite/gdb.reverse/i386-sse-reverse.exp705
3 files changed, 812 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 088b0f8..aff549f 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-02 Hui Zhu <teawater@gmail.com>
+ Michael Snyder <msnyder@vmware.com>
+
+ * gdb.reverse/i386-sse-reverse.exp: New file.
+ * gdb.reverse/i386-sse-reverse.c: New file.
+
2010-04-02 Pedro Alves <pedro@codesourcery.com>
* gdb.trace/tfind.exp: Adjust expected disassembly output.
diff --git a/gdb/testsuite/gdb.reverse/i386-sse-reverse.c b/gdb/testsuite/gdb.reverse/i386-sse-reverse.c
new file mode 100644
index 0000000..72e3ad8
--- /dev/null
+++ b/gdb/testsuite/gdb.reverse/i386-sse-reverse.c
@@ -0,0 +1,101 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009, 2010 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/>. */
+
+/* Architecture tests for intel i386 platform. */
+
+void
+sse_test (void)
+{
+ char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15};
+ char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31};
+ char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47};
+
+ asm ("movupd %0, %%xmm0":"=m"(buf0));
+ asm ("movupd %0, %%xmm1":"=m"(buf1));
+ asm ("movupd %0, %%xmm2":"=m"(buf2));
+
+ asm ("addpd %xmm0, %xmm1");
+ asm ("addps %xmm1, %xmm2");
+ asm ("addsd %xmm2, %xmm1");
+ asm ("addss %xmm1, %xmm0");
+ asm ("addsubpd %xmm0, %xmm2");
+ asm ("addsubps %xmm0, %xmm1");
+ asm ("andpd %xmm1, %xmm2");
+ asm ("andps %xmm2, %xmm1");
+ asm ("cmppd $3, %xmm0, %xmm1");
+ asm ("cmpps $4, %xmm1, %xmm2");
+ asm ("cmpsd $5, %xmm2, %xmm1");
+ asm ("cmpss $6, %xmm1, %xmm0");
+ asm ("comisd %xmm0, %xmm2");
+ asm ("comiss %xmm0, %xmm1");
+ asm ("cvtdq2pd %xmm1, %xmm2");
+ asm ("cvtdq2ps %xmm2, %xmm1");
+ asm ("cvtpd2dq %xmm1, %xmm0");
+ asm ("cvtpd2ps %xmm0, %xmm1");
+ asm ("divpd %xmm1, %xmm2");
+ asm ("divps %xmm2, %xmm1");
+ asm ("divsd %xmm1, %xmm0");
+ asm ("divss %xmm0, %xmm2");
+ asm ("mulpd %xmm0, %xmm1");
+ asm ("mulps %xmm1, %xmm2");
+ asm ("mulsd %xmm2, %xmm1");
+ asm ("mulss %xmm1, %xmm0");
+ asm ("orpd %xmm2, %xmm0");
+ asm ("orps %xmm0, %xmm1");
+ asm ("pabsb %xmm1, %xmm2");
+ asm ("pabsw %xmm2, %xmm1");
+ asm ("pabsd %xmm1, %xmm0");
+ asm ("packsswb %xmm0, %xmm2");
+ asm ("packssdw %xmm0, %xmm1");
+ asm ("ucomisd %xmm1, %xmm2");
+ asm ("ucomiss %xmm2, %xmm1");
+ asm ("unpckhpd %xmm1, %xmm0");
+ asm ("unpckhps %xmm2, %xmm0");
+ asm ("xorpd %xmm0, %xmm1");
+ asm ("xorps %xmm1, %xmm2");
+} /* end sse_test */
+
+void
+sse4_test (void)
+{
+ char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15};
+ char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31};
+ char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47};
+
+ asm ("movupd %0, %%xmm0":"=m"(buf0));
+ asm ("movupd %0, %%xmm1":"=m"(buf1));
+ asm ("movupd %0, %%xmm2":"=m"(buf2));
+
+ asm ("blendpd $1, %xmm1, %xmm0");
+ asm ("blendps $2, %xmm2, %xmm0");
+ asm ("blendvpd %xmm0, %xmm1, %xmm2");
+ asm ("blendvps %xmm0, %xmm2, %xmm1");
+} /* end sse4_test */
+
+int
+main ()
+{
+ sse_test ();
+ sse4_test ();
+ return 0; /* end of main */
+}
diff --git a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
new file mode 100644
index 0000000..872d0cf
--- /dev/null
+++ b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp
@@ -0,0 +1,705 @@
+# Copyright 2009, 2010 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 ![target_info exists gdb,can_reverse] {
+ return
+}
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "*86*-*linux*"] then {
+ verbose "Skipping i386 reverse tests."
+ return
+}
+
+set testfile "i386-sse-reverse"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# some targets have leading underscores on assembly symbols.
+# TODO: detect this automatically
+set additional_flags ""
+if [istarget "i?86-*-cygwin*"] then {
+ set additional_flags "additional_flags=-DSYMBOL_PREFIX=\"_\""
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
+ untested i386-sse-reverse
+ 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_sse4_test [gdb_get_line_number " end sse4_test "]
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+runto main
+
+if [target_info exists gdb,use_precord] {
+ # Activate process record/replay
+ gdb_test "record" "" "Turn on process record"
+ # FIXME: command ought to acknowledge, so we can test if it succeeded.
+}
+
+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"
+
+gdb_test "continue" \
+ " end sse_test .*" \
+ "continue to end of sse_test"
+
+gdb_test "reverse-step" "xorps.*" "reverse-step to xorps"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x7f007f007fff7fff7f007f007fff7fff.*" \
+ "verify xmm0 at end of sse_test"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x00ff00ff0000000000ff00ff00000000.*" \
+ "verify xmm1 at end of sse_test"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \
+ "verify xmm2 at end of sse_test"
+
+gdb_test "reverse-step" "xorpd.*" "reverse-step to xorpd"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x7f007f007fff7fff7f007f007fff7fff.*" \
+ "verify xmm0 after reverse xorps"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \
+ "verify xmm1 after reverse xorps"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \
+ "verify xmm2 after reverse xorps"
+
+gdb_test "reverse-step" "unpckhps.*" "reverse-step to unpckhps"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x7fff7fff7fff7fff0108000001400000.*" \
+ "verify xmm0 after reverse xorpd"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \
+ "verify xmm1 after reverse xorpd"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \
+ "verify xmm2 after reverse xorpd"
+
+gdb_test "reverse-step" "unpckhpd.*" "reverse-step to unpckhpd"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm0 after reverse unpckhps"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \
+ "verify xmm1 after reverse unpckhps"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \
+ "verify xmm2 after reverse unpckhps"
+
+gdb_test "reverse-step" "ucomiss.*" "reverse-step to ucomiss"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm0 after reverse unpckhpd"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \
+ "verify xmm1 after reverse unpckhpd"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \
+ "verify xmm2 after reverse unpckhpd"
+
+gdb_test "reverse-step" "ucomisd.*" "reverse-step to ucomisd"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm0 after reverse ucomiss"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \
+ "verify xmm1 after reverse ucomiss"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \
+ "verify xmm2 after reverse ucomiss"
+
+gdb_test "reverse-step" "packssdw.*" "reverse-step to packssdw"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm0 after reverse ucomisd"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm1 after reverse ucomisd"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \
+ "verify xmm2 after reverse ucomisd"
+
+gdb_test "reverse-step" "packsswb.*" "reverse-step to packsswb"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm0 after reverse packssdw"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm1 after reverse packssdw"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm2 after reverse packssdw"
+
+gdb_test "reverse-step" "pabsd.*" "reverse-step to pabsd"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
+ "verify xmm0 after reverse packsswb"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm1 after reverse packsswb"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm2 after reverse packsswb"
+
+gdb_test "reverse-step" "pabsw.*" "reverse-step to pabsw"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
+ "verify xmm0 after reverse pabsd"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
+ "verify xmm1 after reverse pabsd"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0x01080000014000000108000001400000.*" \
+ "verify xmm2 after reverse pabsd"
+
+gdb_test "reverse-step" "pabsb.*" "reverse-step to pabsb"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
+ "verify xmm0 after reverse pabsw"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
+ "verify xmm1 after reverse pabsw"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
+ "verify xmm2 after reverse pabsw"
+
+gdb_test "reverse-step" "orps.*" "reverse-step to orps"
+
+gdb_test "info register xmm0" \
+ "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \
+ "verify xmm0 after reverse pabsb"
+
+gdb_test "info register xmm1" \
+ "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \
+ "verify xmm1 after reverse pabsb"
+
+gdb_test "info register xmm2" \
+ "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \
+ "verify xmm2 after reverse pabsb"
+
+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"
+
+
+#sse4_test
+
+send_gdb "continue\n"
+
+gdb_test "break $end_sse4_test" \
+ "Breakpoint $decimal at .* line $end_sse4_test\." \
+ "set breakpoint at end of sse4_test"
+
+send_gdb "continue\n"
+gdb_expect {
+ -re " end sse4_test .*" {
+ pass "continue to end of sse4_test"
+ }
+ -re " Illegal instruction.*" {
+ 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"