Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: "Sturm, Michael" <michael.sturm@intel.com>
Cc: Andreas Arnez <arnez@linux.vnet.ibm.com>,
	"palves@redhat.com" <palves@redhat.com>,
	"eliz@gnu.org" <eliz@gnu.org>,
	"mark.kettenis@xs4all.nl" <mark.kettenis@xs4all.nl>,
	"Tedeschi, Walfred" <walfred.tedeschi@intel.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH V5 2/3] Add AVX512 register support to gdbserver.
Date: Sat, 10 Jan 2015 07:00:00 -0000	[thread overview]
Message-ID: <20150110070035.GT5445@adacore.com> (raw)
In-Reply-To: <DB865139DDA33A4DA36CC4A460C1127331C0851E@irsmsx105.ger.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

Hello,

> Sorry for the late reply! Yes, the proposed change is correct. Thanks
> a lot for catching this bug!

Thanks for confirming.

Attached is the patch I ended up pushing.

gdb/gdbserver/ChangeLog:

        * i387-fp.c (i387_cache_to_xsave): In look over
        num_avx512_zmmh_high_registers, replace use of struct i387_xsave
        zmmh_low_space field by use of zmmh_high_space.

Tested on x86_64-linux, using boards/native-gdbserver.exp.

-- 
Joel

[-- Attachment #2: 0001-Fix-use-of-wrong-struct-i387_xsave-field-in-i387_cac.patch --]
[-- Type: text/x-diff, Size: 1691 bytes --]

From 3368c1e5ce12ea262ab3ff7a9154472503aadedb Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Sat, 10 Jan 2015 09:50:44 +0400
Subject: [PATCH] Fix use of wrong struct i387_xsave field in
 i387_cache_to_xsave

gdb/gdbserver/ChangeLog:

        * i387-fp.c (i387_cache_to_xsave): In look over
        num_avx512_zmmh_high_registers, replace use of struct i387_xsave
        zmmh_low_space field by use of zmmh_high_space.

Tested on x86_64-linux, using boards/native-gdbserver.exp.
---
 gdb/gdbserver/ChangeLog | 6 ++++++
 gdb/gdbserver/i387-fp.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 180e341..d126748 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-10  Joel Brobecker  <brobecker@adacore.com>
+
+	* i387-fp.c (i387_cache_to_xsave): In look over
+	num_avx512_zmmh_high_registers, replace use of struct i387_xsave
+	zmmh_low_space field by use of zmmh_high_space.
+
 2015-01-09  Pedro Alves  <palves@redhat.com>
 
 	* linux-low.c (step_over_bkpt): Move higher up in the file.
diff --git a/gdb/gdbserver/i387-fp.c b/gdb/gdbserver/i387-fp.c
index a4c218d..ddfec6e 100644
--- a/gdb/gdbserver/i387-fp.c
+++ b/gdb/gdbserver/i387-fp.c
@@ -454,7 +454,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
       for (i = 0; i < num_avx512_zmmh_high_registers; i++)
 	{
 	  collect_register (regcache, i + zmm16h_regnum, raw);
-	  p = ((char *) &fp->zmmh_low_space[0]) + 32 + i * 64;
+	  p = ((char *) &fp->zmmh_high_space[0]) + 32 + i * 64;
 	  if (memcmp (raw, p, 32) != 0)
 	    {
 	      xstate_bv |= X86_XSTATE_ZMM;
-- 
1.9.1


  reply	other threads:[~2015-01-10  7:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 13:03 [PATCH V5 0/3] Intel(R) AVX-512 register support Michael Sturm
2014-04-23 13:03 ` [PATCH V5 3/3] Add AVX512 feature description to GDB manual Michael Sturm
2013-12-03 12:37   ` [PATCH v3 1/1] Documentation for MPX Walfred Tedeschi
2013-12-03 12:52     ` Eli Zaretskii
2014-08-04 16:57     ` Incorrect placement of two Intel gdb/NEWS items Jan Kratochvil
2014-08-04 19:17       ` Eli Zaretskii
2014-08-04 19:40         ` [commit+7.8] " Jan Kratochvil
2014-04-23 13:03 ` [PATCH V5 2/3] Add AVX512 register support to gdbserver Michael Sturm
2014-11-21 10:21   ` Andreas Arnez
2014-12-13 13:41     ` Joel Brobecker
2015-01-08 10:01       ` Sturm, Michael
2015-01-10  7:00         ` Joel Brobecker [this message]
2014-04-23 13:04 ` [PATCH V5 1/3] Add AVX512 registers support to GDB Michael Sturm
2014-04-24 11:33   ` Pedro Alves
2014-04-24 11:48   ` Pedro Alves
2014-04-24 11:49 ` [PATCH V5 0/3] Intel(R) AVX-512 register support Pedro Alves

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=20150110070035.GT5445@adacore.com \
    --to=brobecker@adacore.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=michael.sturm@intel.com \
    --cc=palves@redhat.com \
    --cc=walfred.tedeschi@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