From: Simon Marchi <simon.marchi@ericsson.com>
To: Jan Beulich <JBeulich@suse.com>, Simon Marchi <simon.marchi@polymtl.ca>
Cc: <tim.wiederhake@intel.com>, GDB <gdb-patches@sourceware.org>
Subject: Re: [PATCH] x86-64: fix ZMM register state tracking
Date: Tue, 25 Sep 2018 03:29:00 -0000 [thread overview]
Message-ID: <0e0d9f23-2cbf-eb5a-64fa-6cda3392053a@ericsson.com> (raw)
In-Reply-To: <5BA0FFB102000078001E97B0@prv1-mh.provo.novell.com>
On 2018-09-18 09:37 AM, Jan Beulich wrote:
>>>> On 10.09.18 at 15:01, <simon.marchi@polymtl.ca> wrote:
>> On 2018-09-10 07:25, Jan Beulich wrote:
>>>>>> Simon Marchi <simon.marchi@ericsson.com> 09/08/18 1:13 AM >>>
>>>> Would it be possible to update or create a test to exercise that?
>>>> arch-specific tests are in testsuite/gdb.arch.
>>>
>>> I'm sure it would be possible, but while I was happy to invest the time
>>> to
>>> fix the actual bug (because it affects work I'm doing), I'm afraid I
>>> don't have
>>> the time to learn how gdb test cases are to be constructed (I'm
>>> familiar
>>> only with the binutils / gas side of things).
>>
>> I understand. If you can provide:
>>
>> - a minimal source file (C + assembly in this case, I suppose)
>> - GDB commands to reproduce the bug
>> - actual and expected output
>
> Attached. vzero.s is the source file used (no C file needed). gdb.log
> is a transcript of a session with a broken gdb (the one installed on
> the system), while gdb.txt is a transcript for the fixed one that I've
> built myself.
>
>> I can take care of turning it in a GDB test case.
>
> Thanks.
>
> Jan
>
>
Hi Jan,
Thanks for the instructions. There is already a test covering AVX512
instructions, so I figured I would add it there. However, I don't
have a processor that supports AVX512, so I'm unable to run the test.
Here's a patch, can you try to confirm that the test fails without the
fix and passes with the fix? I probably screwed up somewhere, but it
should be pretty close.
You can run the test with
$ make check TESTS="gdb.arch/i386-avx512.exp"
in the gdb/ build directory. The gdb/testsuite/gdb.log file is useful
to look at in case something fails.
Feel free to integrate this in your eventual v2 if there is one, and
feel free to add a comment in the test to say what we are testing here,
as I am not too sure how to describe it.
Thanks!
Simon
From a167d21f452f6f3f19eac6623fa872fde1162128 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@ericsson.com>
Date: Mon, 24 Sep 2018 23:21:19 -0400
Subject: [PATCH] AVX512 test
---
gdb/testsuite/gdb.arch/i386-avx512.c | 5 +++++
gdb/testsuite/gdb.arch/i386-avx512.exp | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/gdb/testsuite/gdb.arch/i386-avx512.c b/gdb/testsuite/gdb.arch/i386-avx512.c
index 9349f09d62e..537adb3ab86 100644
--- a/gdb/testsuite/gdb.arch/i386-avx512.c
+++ b/gdb/testsuite/gdb.arch/i386-avx512.c
@@ -249,6 +249,11 @@ main (int argc, char **argv)
move back to array and check values. */
move_zmm_data_to_memory ();
asm ("nop"); /* sixth breakpoint here */
+
+ asm ("vpternlogd $0xff, %zmm0, %zmm0, %zmm0\n"
+ "vpternlogd $0xff, %zmm0, %zmm0, %zmm16\n"
+ "vzeroupper\n");
+ asm ("nop"); /* seventh breakpoint here */
}
return 0;
diff --git a/gdb/testsuite/gdb.arch/i386-avx512.exp b/gdb/testsuite/gdb.arch/i386-avx512.exp
index d806d5f9a94..de2f62c3e1f 100644
--- a/gdb/testsuite/gdb.arch/i386-avx512.exp
+++ b/gdb/testsuite/gdb.arch/i386-avx512.exp
@@ -174,3 +174,11 @@ for { set r 0 } { $r < $nr_regs } { incr r } {
".. = \\{f = \\{[expr $r + 30], [expr $r.125 + 30], [expr $r.25 + 20], [expr $r.375 + 20], [expr $r.5 + 10], [expr $r.625 + 10], [expr $r.75 + 10], [expr $r.875 + 10]\\}\\}.*" \
"check contents of zmm_data\[$r\] after writing XMM regs"
}
+
+gdb_test "break [gdb_get_line_number "seventh breakpoint here"]" \
+ "Breakpoint .* at .*i386-avx512.c.*" \
+ "set seventh breakpoint in main"
+gdb_continue_to_breakpoint "continue to seventh breakpoint in main"
+for { set r 16 } { $r < $nr_regs } { incr r } {
+ gdb_test "print \$zmm${r}.v16_int32" "{-1 <repeats 16 times>}"
+}
--
2.19.0
next prev parent reply other threads:[~2018-09-25 3:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 13:23 Jan Beulich
2018-09-07 23:13 ` Simon Marchi
2018-09-10 6:25 ` Jan Beulich
2018-09-10 13:01 ` Simon Marchi
2018-09-18 13:38 ` Jan Beulich
2018-09-25 3:29 ` Simon Marchi [this message]
2018-09-25 15:04 ` Jan Beulich
2018-10-02 19:20 ` Simon Marchi
2018-10-03 14:30 ` Jan Beulich
2018-10-03 14:41 ` Simon Marchi
2018-09-11 10:34 ` Pedro Alves
2018-09-11 11:34 ` Jan Beulich
2018-09-24 17:19 ` Metzger, Markus T
2018-09-25 7:47 ` Jan Beulich
2018-10-10 15:12 ` [PATCH v2] " Jan Beulich
2018-10-29 10:31 ` Ping: " Jan Beulich
[not found] ` <8bafd220c79c3936de8ce3d6421a9c01@polymtl.ca>
2018-11-07 9:07 ` Metzger, Markus T
2018-11-07 9:12 ` Jan Beulich
2018-11-07 13:18 ` Metzger, Markus T
2018-11-07 13:25 ` Jan Beulich
2018-11-07 14:18 ` Simon Marchi
[not found] ` <5BE41AE902000078001F993A@prv1-mh.provo.novell.com>
2018-11-08 16:24 ` Simon Marchi
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=0e0d9f23-2cbf-eb5a-64fa-6cda3392053a@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=JBeulich@suse.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=tim.wiederhake@intel.com \
/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