Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hongjiu.lu@intel.com>
To: GDB <gdb-patches@sourceware.org>
Subject: Re: PATCH: Add common files for x86 XSAVE extended state
Date: Tue, 02 Mar 2010 19:47:00 -0000	[thread overview]
Message-ID: <20100302194559.GA14466@intel.com> (raw)
In-Reply-To: <20100302152826.GA28158@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?

Thanks.


H.J.
---
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 */


  parent reply	other threads:[~2010-03-02 19:47 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 [this message]
2010-03-03 23:23   ` Mark Kettenis

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=20100302194559.GA14466@intel.com \
    --to=hongjiu.lu@intel.com \
    --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