public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Walfred Tedeschi <walfred.tedeschi@intel.com>
To: palves@redhat.com, brobecker@adacore.com
Cc: gdb-patches@sourceware.org,
	Walfred Tedeschi <walfred.tedeschi@intel.com>
Subject: [PATCH V2 0/2] Split tdesc_(amd64|i386)_mpx into tdesc(amd64|i386)_mpx_* and  tdesc(amd64|i386)_avx_mpx_*
Date: Thu, 03 Mar 2016 17:26:00 -0000	[thread overview]
Message-ID: <1457025942-23711-1-git-send-email-walfred.tedeschi@intel.com> (raw)

CPU features can occur in any combination. The current assumption that 
feature "A" implies in feature "B" does not necessarily hold.
 
This patch series construct an additional combination of the Intel(R) 
Memory Protection Extensions (MPX) with Intel(R) Advanced Vector 
Extensions (AVX).
 
Starting from the current implementation that has MPX combined with AVX.
A new target description having only MPX will be created using a two 
step approach as described below:
 
First step:
Mirror (i386|amd64)mpx target descriptors onto (i386|amd64)-avx-mpx 
ones.
 
Add a redundant target description for the MPX and AVX case using a 
combined feature name to reflect that, i.e. avx-mpx.  A new flag 2is 
also added to address MPX case without AVX.
 
 
Second step:
Refactor (i386|amd64)-mpx target descriptors.
 
AVX feature is removed from the set of files that described MPX alone 
feature.  Present on GDB code previous to this patch.
 
 
Tests were done with hardware having MPX and AVX as is.
For MPX standing alone tests were done forcing the XCR0 bits.

Difference since V1:
* Added -api support missing as reported by Marcin.

Thanks and regards,
-Fred

Walfred Tedeschi (2):
  Add redundant target descriptor for tdesc(amd64|i386)_avx_mpx_*
  Re-factor (i386|amd64)mpx target descriptors.

 gdb/amd64-linux-tdep.c                      |   7 +
 gdb/amd64-linux-tdep.h                      |   1 +
 gdb/amd64-tdep.c                            |   4 +
 gdb/common/x86-xstate.h                     |   5 +-
 gdb/features/Makefile                       |  18 +++
 gdb/features/i386/amd64-avx-mpx-linux.c     | 211 ++++++++++++++++++++++++++++
 gdb/features/i386/amd64-avx-mpx-linux.xml   |  19 +++
 gdb/features/i386/amd64-avx-mpx.c           | 206 +++++++++++++++++++++++++++
 gdb/features/i386/amd64-avx-mpx.xml         |  17 +++
 gdb/features/i386/amd64-mpx-linux.c         |  30 +---
 gdb/features/i386/amd64-mpx-linux.xml       |   1 -
 gdb/features/i386/amd64-mpx.c               |  30 +---
 gdb/features/i386/amd64-mpx.xml             |   1 -
 gdb/features/i386/i386-avx-mpx-linux.c      | 187 ++++++++++++++++++++++++
 gdb/features/i386/i386-avx-mpx-linux.xml    |  19 +++
 gdb/features/i386/i386-avx-mpx.c            | 182 ++++++++++++++++++++++++
 gdb/features/i386/i386-avx-mpx.xml          |  17 +++
 gdb/features/i386/i386-mpx-linux.c          |  22 +--
 gdb/features/i386/i386-mpx-linux.xml        |   1 -
 gdb/features/i386/i386-mpx.c                |  22 +--
 gdb/features/i386/i386-mpx.xml              |   1 -
 gdb/gdbserver/Makefile.in                   |  16 +++
 gdb/gdbserver/configure.srv                 |  20 +--
 gdb/gdbserver/linux-amd64-ipa.c             |   3 +
 gdb/gdbserver/linux-i386-ipa.c              |   2 +
 gdb/gdbserver/linux-x86-low.c               |  12 ++
 gdb/gdbserver/linux-x86-tdesc.h             |  11 +-
 gdb/i386-linux-tdep.c                       |   4 +
 gdb/i386-linux-tdep.h                       |   1 +
 gdb/i386-tdep.c                             |   4 +
 gdb/regformats/i386/amd64-avx-mpx-linux.dat |  85 +++++++++++
 gdb/regformats/i386/amd64-avx-mpx.dat       |  84 +++++++++++
 gdb/regformats/i386/amd64-mpx-linux.dat     |  16 ---
 gdb/regformats/i386/amd64-mpx.dat           |  16 ---
 gdb/regformats/i386/i386-avx-mpx-linux.dat  |  61 ++++++++
 gdb/regformats/i386/i386-avx-mpx.dat        |  60 ++++++++
 gdb/regformats/i386/i386-mpx-linux.dat      |   8 --
 gdb/regformats/i386/i386-mpx.dat            |   8 --
 gdb/x86-linux-nat.c                         |   7 +
 39 files changed, 1274 insertions(+), 145 deletions(-)
 create mode 100644 gdb/features/i386/amd64-avx-mpx-linux.c
 create mode 100644 gdb/features/i386/amd64-avx-mpx-linux.xml
 create mode 100644 gdb/features/i386/amd64-avx-mpx.c
 create mode 100644 gdb/features/i386/amd64-avx-mpx.xml
 create mode 100644 gdb/features/i386/i386-avx-mpx-linux.c
 create mode 100644 gdb/features/i386/i386-avx-mpx-linux.xml
 create mode 100644 gdb/features/i386/i386-avx-mpx.c
 create mode 100644 gdb/features/i386/i386-avx-mpx.xml
 create mode 100644 gdb/regformats/i386/amd64-avx-mpx-linux.dat
 create mode 100644 gdb/regformats/i386/amd64-avx-mpx.dat
 create mode 100644 gdb/regformats/i386/i386-avx-mpx-linux.dat
 create mode 100644 gdb/regformats/i386/i386-avx-mpx.dat

-- 
2.1.4

             reply	other threads:[~2016-03-03 17:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 17:26 Walfred Tedeschi [this message]
2016-03-03 17:25 ` [PATCH V2 2/2] Re-factor (i386|amd64)mpx target descriptors Walfred Tedeschi
2016-04-13 12:05   ` Pedro Alves
2016-03-03 17:26 ` [PATCH V2 1/2] Add redundant target descriptor for tdesc(amd64|i386)_avx_mpx_* Walfred Tedeschi
2016-04-13 12:05   ` Pedro Alves
2016-04-13 12:18     ` Walfred Tedeschi
2016-04-14 10:00     ` Walfred Tedeschi
2016-04-14 10:29 ` [PATCH V2 0/2] Split tdesc_(amd64|i386)_mpx into tdesc(amd64|i386)_mpx_* and tdesc(amd64|i386)_avx_mpx_* Yao Qi
2016-04-14 11:33   ` Pedro Alves
2016-04-14 12:21     ` Walfred Tedeschi
2016-04-14 13:28       ` Build xml target descriptions at run time Pedro Alves
     [not found]         ` <AC542571535E904D8E8ADAE745D60B19445BAAD1@IRSMSX104.ger.corp.intel.com>
2016-05-02 13:00           ` FW: " Walfred Tedeschi

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=1457025942-23711-1-git-send-email-walfred.tedeschi@intel.com \
    --to=walfred.tedeschi@intel.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).