From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105677 invoked by alias); 3 Mar 2016 17:26:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 105628 invoked by uid 89); 3 Mar 2016 17:26:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*MI:23711, H*m:23711, UD:xml, 187 X-HELO: mga01.intel.com Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Mar 2016 17:26:14 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 03 Mar 2016 09:25:54 -0800 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 03 Mar 2016 09:25:53 -0800 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u23HPqPr030437; Thu, 3 Mar 2016 17:25:52 GMT Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id u23HPq3I023745; Thu, 3 Mar 2016 18:25:52 +0100 Received: (from wtedesch@localhost) by ulvlx001.iul.intel.com with œ id u23HPoxK023741; Thu, 3 Mar 2016 18:25:51 +0100 From: Walfred Tedeschi To: palves@redhat.com, brobecker@adacore.com Cc: gdb-patches@sourceware.org, Walfred Tedeschi 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 Message-Id: <1457025942-23711-1-git-send-email-walfred.tedeschi@intel.com> X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00051.txt.bz2 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