diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-02-29 14:55:46 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-02-29 14:55:46 +0000 |
commit | 8703a944b0b85cffebf5bb6da36f42150b40f64a (patch) | |
tree | 7005e5a376cc5ad7e706650a0e804cc7837e2dcc /gdb | |
parent | c70a6932bbfed97f2ab40953daee470b42b81543 (diff) | |
download | gdb-8703a944b0b85cffebf5bb6da36f42150b40f64a.zip gdb-8703a944b0b85cffebf5bb6da36f42150b40f64a.tar.gz gdb-8703a944b0b85cffebf5bb6da36f42150b40f64a.tar.bz2 |
gdb/testsuite/
Support processors without SSSE3.
* gdb.reverse/i386-sse-reverse.c (sse_test): Move pabsb, pabsw and
pabsd into ...
(ssse3_test): ... a new function.
(main): Call ssse3_test.
* gdb.reverse/i386-sse-reverse.exp: New variable end_ssse3_test.
Update expected values everywhere.
(reverse-step to pabsd, verify xmm0 after reverse pabsd)
(verify xmm1 after reverse pabsd, verify xmm2 after reverse pabsd)
(reverse-step to pabsw, verify xmm0 after reverse pabsw)
(verify xmm1 after reverse pabsw, verify xmm2 after reverse pabsw)
(reverse-step to pabsb, verify xmm0 after reverse pabsb)
(verify xmm1 after reverse pabsb, verify xmm2 after reverse pabsb):
Move these tests lower.
(set breakpoint at end of ssse3_test, continue to end of ssse3_test)
(verify xmm0 at end of ssse3_test, verify xmm1 at end of ssse3_test)
(verify xmm2 at end of ssse3_test, continue to end of ssse3_test #2):
New tests.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 21 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/i386-sse-reverse.c | 23 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/i386-sse-reverse.exp | 175 |
3 files changed, 146 insertions, 73 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d40f13c..ba1ef51 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,24 @@ +2012-02-29 Jan Kratochvil <jan.kratochvil@redhat.com> + + Support processors without SSSE3. + * gdb.reverse/i386-sse-reverse.c (sse_test): Move pabsb, pabsw and + pabsd into ... + (ssse3_test): ... a new function. + (main): Call ssse3_test. + * gdb.reverse/i386-sse-reverse.exp: New variable end_ssse3_test. + Update expected values everywhere. + (reverse-step to pabsd, verify xmm0 after reverse pabsd) + (verify xmm1 after reverse pabsd, verify xmm2 after reverse pabsd) + (reverse-step to pabsw, verify xmm0 after reverse pabsw) + (verify xmm1 after reverse pabsw, verify xmm2 after reverse pabsw) + (reverse-step to pabsb, verify xmm0 after reverse pabsb) + (verify xmm1 after reverse pabsb, verify xmm2 after reverse pabsb): + Move these tests lower. + (set breakpoint at end of ssse3_test, continue to end of ssse3_test) + (verify xmm0 at end of ssse3_test, verify xmm1 at end of ssse3_test) + (verify xmm2 at end of ssse3_test, continue to end of ssse3_test #2): + New tests. + 2012-02-29 Yao Qi <yao@codesourcery.com> Pedro Alves <palves@redhat.com> diff --git a/gdb/testsuite/gdb.reverse/i386-sse-reverse.c b/gdb/testsuite/gdb.reverse/i386-sse-reverse.c index 2691663..490eed3 100644 --- a/gdb/testsuite/gdb.reverse/i386-sse-reverse.c +++ b/gdb/testsuite/gdb.reverse/i386-sse-reverse.c @@ -59,9 +59,6 @@ sse_test (void) 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"); @@ -73,6 +70,25 @@ sse_test (void) } /* end sse_test */ void +ssse3_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 ("pabsb %xmm1, %xmm2"); + asm ("pabsw %xmm2, %xmm1"); + asm ("pabsd %xmm1, %xmm0"); +} /* end ssse3_test */ + +void sse4_test (void) { char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, @@ -96,6 +112,7 @@ int main () { sse_test (); + ssse3_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 index e344db4..97afd1e 100644 --- a/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp +++ b/gdb/testsuite/gdb.reverse/i386-sse-reverse.exp @@ -43,6 +43,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list 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 "] # Get things started. @@ -81,170 +82,128 @@ gdb_test_multiple "continue" $test { gdb_test "reverse-step" "xorps.*" "reverse-step to xorps" gdb_test "info register xmm0" \ - "xmm0 .*uint128 = 0x7f007f007fff7fff7f007f007fff7fff.*" \ + "xmm0 .*uint128 = 0xf000c00080008000f800c00080008000.*" \ "verify xmm0 at end of sse_test" gdb_test "info register xmm1" \ - "xmm1 .*uint128 = 0x00ff00ff0000000000ff00ff00000000.*" \ + "xmm1 .*uint128 = 0x70004000000000007800400000000000.*" \ "verify xmm1 at end of sse_test" gdb_test "info register xmm2" \ - "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \ + "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 = 0x7f007f007fff7fff7f007f007fff7fff.*" \ + "xmm0 .*uint128 = 0xf000c00080008000f800c00080008000.*" \ "verify xmm0 after reverse xorps" gdb_test "info register xmm1" \ - "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \ + "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \ "verify xmm1 after reverse xorps" gdb_test "info register xmm2" \ - "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \ + "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \ "verify xmm2 after reverse xorps" gdb_test "reverse-step" "unpckhps.*" "reverse-step to unpckhps" gdb_test "info register xmm0" \ - "xmm0 .*uint128 = 0x7fff7fff7fff7fff0108000001400000.*" \ + "xmm0 .*uint128 = 0x8000800080008000fff00000ffc00000.*" \ "verify xmm0 after reverse xorpd" gdb_test "info register xmm1" \ - "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \ + "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \ "verify xmm1 after reverse xorpd" gdb_test "info register xmm2" \ - "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \ + "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \ "verify xmm2 after reverse xorpd" gdb_test "reverse-step" "unpckhpd.*" "reverse-step to unpckhpd" gdb_test "info register xmm0" \ - "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \ + "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \ "verify xmm0 after reverse unpckhps" gdb_test "info register xmm1" \ - "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \ + "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \ "verify xmm1 after reverse unpckhps" gdb_test "info register xmm2" \ - "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \ + "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \ "verify xmm2 after reverse unpckhps" gdb_test "reverse-step" "ucomiss.*" "reverse-step to ucomiss" gdb_test "info register xmm0" \ - "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \ + "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \ "verify xmm0 after reverse unpckhpd" gdb_test "info register xmm1" \ - "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \ + "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \ "verify xmm1 after reverse unpckhpd" gdb_test "info register xmm2" \ - "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \ + "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \ "verify xmm2 after reverse unpckhpd" gdb_test "reverse-step" "ucomisd.*" "reverse-step to ucomisd" gdb_test "info register xmm0" \ - "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \ + "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \ "verify xmm0 after reverse ucomiss" gdb_test "info register xmm1" \ - "xmm1 .*uint128 = 0x7fff7fff7fff7fff7fff7fff7fff7fff.*" \ + "xmm1 .*uint128 = 0x80008000800080008000800080008000.*" \ "verify xmm1 after reverse ucomiss" gdb_test "info register xmm2" \ - "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \ + "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \ "verify xmm2 after reverse ucomiss" gdb_test "reverse-step" "packssdw.*" "reverse-step to packssdw" gdb_test "info register xmm0" \ - "xmm0 .*uint128 = 0x01080000014000000108000001400000.*" \ + "xmm0 .*uint128 = 0xfff00000ffc00000fff80000ffc00000.*" \ "verify xmm0 after reverse ucomisd" gdb_test "info register xmm1" \ - "xmm1 .*uint128 = 0x01080000014000000108000001400000.*" \ + "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \ "verify xmm1 after reverse ucomisd" gdb_test "info register xmm2" \ - "xmm2 .*uint128 = 0x7f007f007f007f007f007f007f007f00.*" \ + "xmm2 .*uint128 = 0xf000c000f800c000f000c000f000c000.*" \ "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" + "verify xmm0 after reverse packssdw" gdb_test "info register xmm1" \ "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \ - "verify xmm1 after reverse pabsw" + "verify xmm1 after reverse packssdw" gdb_test "info register xmm2" \ "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \ - "verify xmm2 after reverse pabsw" + "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 pabsb" + "verify xmm0 after reverse packsswb" gdb_test "info register xmm1" \ "xmm1 .*uint128 = 0xfff80000ffc00000fff80000ffc00000.*" \ - "verify xmm1 after reverse pabsb" + "verify xmm1 after reverse packsswb" gdb_test "info register xmm2" \ "xmm2 .*uint128 = 0xfff00000ffc00000fff00000ffc00000.*" \ - "verify xmm2 after reverse pabsb" + "verify xmm2 after reverse packsswb" gdb_test "reverse-step" "orpd.*" "reverse-step to orpd" @@ -625,12 +584,88 @@ gdb_test "info register xmm2" \ "verify xmm2 after reverse addps" -#sse4_test +#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" |