Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: hjl.tools@gmail.com
Cc: gdb-patches@sourceware.org
Subject: Re: PATCH: Add common files for x86 XSAVE extended state
Date: Wed, 03 Mar 2010 23:23:00 -0000	[thread overview]
Message-ID: <201003032323.o23NN400000171@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20100302194559.GA14466@intel.com> (hongjiu.lu@intel.com)

> Date: Tue, 2 Mar 2010 11:45:59 -0800
> From: "H.J. Lu" <hongjiu.lu@intel.com>
> 
> On Tue, Mar 02, 2010 at 07:28:26AM -0800, H.J. Lu wrote:
> > Hi,
> > 
> > This patch adds common files for x86 XSAVE extended state. They
> > are used by native x86 gdb and gdbserver to discover x86 XSAVE
> > extended state support. You can see IA32/Intel64 SDM at
> > 
> > http://developer.intel.com/products/processor/manuals/index.htm
> > 
> > for details. OK to install?
> > 
> > Thanks.
> > 
> > 
> > H.J.
> > ---
> > 2010-03-02  H.J. Lu  <hongjiu.lu@intel.com>
> > 
> > 	* common/i386-cpuid.h: New.
> > 	* common/i386-xstate.c: Likewise.
> > 	* common/i386-xstate.h: Likewise.
> > 
> 
> 
> Here is the updated patch to define macros used by native gdb and
> gdbserver.  There is no need for common/i386-xstate.c nor
> common/i386-cpuid.h.  OK to install?

Looks a lot less repulsive than the first diff.  But there are quite a
few oddities in there (what the heck are those strings good for?),
that make me question whether we want such a file at all.  Again,
difficult to review without seeing where and how this actually gets
used.

> 2010-03-02  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* common/i386-xstate.h: New.
> 
> diff --git a/gdb/common/i386-xstate.h b/gdb/common/i386-xstate.h
> new file mode 100644
> index 0000000..41c7ce1
> --- /dev/null
> +++ b/gdb/common/i386-xstate.h
> @@ -0,0 +1,48 @@
> +/* Common code for i386 XSAVE extended state.
> +
> +   Copyright (C) 2010 Free Software Foundation, Inc.
> +
> +   This file is part of GDB.
> +
> +   This program is free software; you can redistribute it and/or modify
> +   it under the terms of the GNU General Public License as published by
> +   the Free Software Foundation; either version 3 of the License, or
> +   (at your option) any later version.
> +
> +   This program is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   You should have received a copy of the GNU General Public License
> +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +#ifndef I386_XSTATE_H
> +#define I386_XSTATE_H 1
> +
> +/* The extended state feature bits.  */
> +#define bit_I386_XSTATE_X87		(1ULL << 0)
> +#define bit_I386_XSTATE_SSE		(1ULL << 1)
> +#define bit_I386_XSTATE_AVX		(1ULL << 2)
> +
> +/* Supported mask and size of the extended state.  */
> +#define I386_XSTATE_SSE_MASK	\
> +  (bit_I386_XSTATE_X87 | bit_I386_XSTATE_SSE)
> +#define I386_XSTATE_AVX_MASK	\
> +  (I386_XSTATE_SSE_MASK | bit_I386_XSTATE_AVX)
> +#define I386_XSTATE_MAX_MASK	\
> +  I386_XSTATE_AVX_MASK
> +
> +#define I386_XSTATE_SSE_MASK_STRING	"0x3"
> +#define I386_XSTATE_AVX_MASK_STRING	"0x7"
> +#define I386_XSTATE_MAX_MASK_STRING	"0x7"
> +
> +#define I386_XSTATE_SSE_SIZE		576
> +#define I386_XSTATE_AVX_SIZE		832
> +#define I386_XSTATE_MAX_SIZE		832
> +
> +#define I386_XSTATE_SSE_SIZE_STRING	"576"
> +#define I386_XSTATE_AVX_SIZE_STRING	"832"
> +#define I386_XSTATE_MAX_SIZE_STRING	"832"
> +
> +#endif /* I386_XSTATE_H */
> 


      reply	other threads:[~2010-03-03 23:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 15:28 H.J. Lu
2010-03-02 15:56 ` Mark Kettenis
2010-03-02 16:32   ` H.J. Lu
2010-03-02 19:47 ` H.J. Lu
2010-03-03 23:23   ` Mark Kettenis [this message]

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=201003032323.o23NN400000171@glazunov.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.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