From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFC] Trying to fix testsuite/gdb.arch/i386-sse.exp pattern problem
Date: Wed, 07 Nov 2007 14:37:00 -0000 [thread overview]
Message-ID: <000001c8214b$c2b4ed00$481ec700$@u-strasbg.fr> (raw)
On Cygwin, the i386-sse test always gives me 8 failures
on the int8 array values.
Are these failure also visible on i386 linux machines?
I suppose so, but couldn't test it.
It took me a long time to understand the complicated
regular expression used, but in the end, I suspect that
this regexpr is not adequate.
The current test is:
gdb_test "print \$xmm$r.v16_int8" \
".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \
"check int8 contents of %xmm$r"
But I suspect that the {15} refers to the expanded pattern,
which would mean that it would match a
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
while the patterns are different (some elements are non-zero).
I could not check this directly as
gdb return {0 <repeats 16 times>} if you set all 4 v4_float elements to
zero.
I tried to check v8_int16 instead, but still got no luck...
Using -v 5 times, I found out that gdb_test added a group start '('
character
before the pattern and a group end ')' after the pattern,
but even adding closing and opening groups still would not
make the test pass...
gdb_test "set var \$xmm0.v4_float\[0\] = 0" "" "set %xmm0"
gdb_test "set var \$xmm0.v4_float\[1\] = 0" "" "set %xmm0"
gdb_test "set var \$xmm0.v4_float\[2\] = 0" "" "set %xmm0"
gdb_test "set var \$xmm0.v4_float\[3\] = 0" "" "set %xmm0"
gdb_test "print \$xmm0.v8_int16" \
".* =) \\{(-?\[0-9\]+, ){7}(-?\[0-9\]+\\}.*" \
"check zeroed int8 contents of %xmm0"
Still fails, even though the result is {0, 0, 0, 0, 0, 0, 0, 0}.
Even this simple test fails:
gdb_test "print {0, 0, 0, 0}" ".* =) \\{(0, ){3}(0\\}.*" "test array"
I am really wondering if this pattern repetition
is working at all...
Installed tcl is version 8.4
I could correct the test, by putting explicitly the
16 patterns, which results in an horribly lengthy pattern,
but I was unable to break it into pieces to have shorter source lines.
Any ideas on ways to split the pattern string sent to gdb_test
over multiple lines are most welcomed.
Pierre Muller
ChangeLog entry:
2007-11-07 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.arch/i386-see.exp: Correct pattern to check v16_int8 array of
SSE registers.
Index: i386-sse.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-sse.exp,v
retrieving revision 1.8
diff -u -p -r1.8 i386-sse.exp
--- i386-sse.exp 5 Sep 2007 00:51:49 -0000 1.8
+++ i386-sse.exp 7 Nov 2007 13:48:37 -0000
@@ -84,7 +84,7 @@ foreach r {0 1 2 3 4 5 6 7} {
".. = \\{$r, $r.25, $r.5, $r.75\\}.*" \
"check float contents of %xmm$r"
gdb_test "print \$xmm$r.v16_int8" \
- ".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \
+ ".. = \\{-?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+,
-?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+,-?\[0-9\]+,
-?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+\\}.*"
\
"check int8 contents of %xmm$r"
}
next reply other threads:[~2007-11-07 14:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 14:37 Pierre Muller [this message]
2007-11-07 15:11 ` Daniel Jacobowitz
2007-11-08 9:50 ` Pierre Muller
2007-11-08 10:43 ` Andreas Schwab
2007-11-08 10:55 ` Pierre Muller
2007-11-08 12:38 ` 'Daniel Jacobowitz'
2007-11-08 13:31 ` Pierre Muller
2007-11-08 13:42 ` 'Daniel Jacobowitz'
2007-11-08 14:14 ` Pierre Muller
2007-11-08 14:27 ` 'Daniel Jacobowitz'
2007-11-08 14:51 ` Pierre Muller
2007-11-08 15:00 ` 'Daniel Jacobowitz'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001c8214b$c2b4ed00$481ec700$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox