From: Pedro Alves <palves@redhat.com>
To: Michael Sturm <michael.sturm@intel.com>,
mark.kettenis@xs4all.nl, eliz@gnu.org
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 2/5] Change xstate_bv handling to use 8 bytes of data.
Date: Thu, 26 Jan 2017 14:46:00 -0000 [thread overview]
Message-ID: <fcf666c5-1531-48de-e8dc-0ef15b3c2997@redhat.com> (raw)
In-Reply-To: <1481021894-29471-3-git-send-email-michael.sturm@intel.com>
On 12/06/2016 10:58 AM, Michael Sturm wrote:
> The size of the state-component bitmap as specified in
> Intel(R) 64 and IA-32 Architectures Software Developer's Manual,
> Chapter 13.4.2 is 8 bytes.
> So far, the data types used for xstate_bv_p (gdb_byte*),
> clear_bv (unsigned int) and tdep->xcr0 (uint64_t) were
> inconsistent. But, since the xstate components were still
> fitting into a single byte, the code still worked
> as expected.
> However, with the addition of the PKU feature (bit 9),
> using one byte for the bitmap will no longer be sufficient.
>
> This patch changes related code to use 64 bit data types
> consistently and changes read/write acces of the XSAVE
> header in the xsave buffer to use the endianess-aware
> functions extract_unsigned_integer and store_unsigned_integer.
The typing is a bit inconsistent, with some places using
unsigned long long, while others ULONGEST. It'd be nice to
use uint64_t if we exactly mean 64-bit.
But that's for another day. Meanwhile, this LGTM.
> * i387-tdep.c (i387_supply_xsave): Change type
> of clear_bv to ULONGEST. Replace gdb_byte *xstate_bv_p
> with ULONGEST xstate_bv and use extract_unsigned_integer
> and store_unsigned_integer to read/write its value from
> the xsave buffer. This is required to make sure that
> eventual differences in endianess between host and
> target are taken care off.
The "This is required ..." part belongs in the commit log.
The ChangeLogs only mention the "what", not the "why".
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-01-26 14:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 10:58 [PATCH v3 0/5] Add support for PKRU register to GDB and GDBServer Michael Sturm
2016-12-06 10:58 ` [PATCH v3 2/5] Change xstate_bv handling to use 8 bytes of data Michael Sturm
2017-01-26 14:46 ` Pedro Alves [this message]
2016-12-06 10:58 ` [PATCH v3 5/5] Add support for Intel PKRU register to GDB and GDBserver Michael Sturm
2016-12-08 15:35 ` Luis Machado
2017-01-26 15:38 ` Pedro Alves
2017-01-27 15:00 ` Sturm, Michael
2017-01-27 15:22 ` Pedro Alves
2017-02-01 12:34 ` Sturm, Michael
2016-12-06 10:58 ` [PATCH v3 3/5] Rename target descriptions to reflect actual content of description Michael Sturm
2017-01-26 14:50 ` Pedro Alves
2017-01-26 15:55 ` Sturm, Michael
2017-01-26 16:17 ` Pedro Alves
2016-12-06 10:58 ` [PATCH v3 1/5] Sync up x86-gcc-cpuid.h with cpuid.h from gcc-6 branch Michael Sturm
2016-12-07 18:28 ` Luis Machado
2016-12-08 12:16 ` Sturm, Michael
2016-12-08 15:35 ` Luis Machado
2017-01-26 14:29 ` Pedro Alves
2016-12-06 10:59 ` [PATCH v3 4/5] Add target description for avx-avx512 Michael Sturm
2017-01-26 14:57 ` Pedro Alves
2017-01-26 16:02 ` Sturm, Michael
[not found] ` <DB865139DDA33A4DA36CC4A460C112734740AE54@irsmsx105.ger.corp.intel.com>
2017-01-26 14:07 ` [PING][PATCH v3 0/5] Add support for PKRU register to GDB and GDBServer Sturm, Michael
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=fcf666c5-1531-48de-e8dc-0ef15b3c2997@redhat.com \
--to=palves@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=michael.sturm@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