From patchwork Sat Jan 10 07:00:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 4606 Received: (qmail 22507 invoked by alias); 10 Jan 2015 07:00:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 22494 invoked by uid 89); 10 Jan 2015 07:00:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 10 Jan 2015 07:00:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 83C4A1165F1; Sat, 10 Jan 2015 02:00:39 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cId3Dg2Ka5AS; Sat, 10 Jan 2015 02:00:39 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C257611659B; Sat, 10 Jan 2015 02:00:38 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 4A73C48E89; Sat, 10 Jan 2015 11:00:35 +0400 (RET) Date: Sat, 10 Jan 2015 11:00:35 +0400 From: Joel Brobecker To: "Sturm, Michael" Cc: Andreas Arnez , "palves@redhat.com" , "eliz@gnu.org" , "mark.kettenis@xs4all.nl" , "Tedeschi, Walfred" , "gdb-patches@sourceware.org" Subject: Re: [PATCH V5 2/3] Add AVX512 register support to gdbserver. Message-ID: <20150110070035.GT5445@adacore.com> References: <1398258160-9070-1-git-send-email-michael.sturm@intel.com> <1398258160-9070-3-git-send-email-michael.sturm@intel.com> <87ppcgrh0o.fsf@br87z6lw.de.ibm.com> <20141213134146.GE5457@adacore.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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. From 3368c1e5ce12ea262ab3ff7a9154472503aadedb Mon Sep 17 00:00:00 2001 From: Joel Brobecker 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 + + * 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 * 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