From: Joel Brobecker <brobecker@adacore.com>
To: Walfred Tedeschi <walfred.tedeschi@intel.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v1] Intel(R) MPX registers to the DWARF enumeration.
Date: Sun, 06 Dec 2015 16:35:00 -0000 [thread overview]
Message-ID: <20151206163527.GA4819@adacore.com> (raw)
In-Reply-To: <1445864086-4831-5-git-send-email-walfred.tedeschi@intel.com>
> Add registers as defined in the ABI adapted for MPX.
> As presented at:
> https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI
>
> 2013-05-06 Walfred Tedeschi <walfred.tedeschi@intel.com>
>
> * amd64-tdep.c (amd64_dwarf_regmap): Add mpx registers.
> * amd64-tdep.h (amd64_regnum): Add mpx registers.
Small nit: should we spell "MPX"?
BTW - the ABI document reference above seem to only indicate
registers 126-129 as "reserved" rather than bound registers 0-4.
Is that normal?
> ---
> gdb/amd64-tdep.c | 12 +++++++++++-
> gdb/amd64-tdep.h | 3 ++-
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
> index f0720c8..0fa4d54 100644
> --- a/gdb/amd64-tdep.c
> +++ b/gdb/amd64-tdep.c
> @@ -233,7 +233,17 @@ static int amd64_dwarf_regmap[] =
> /* Floating Point Control Registers. */
> AMD64_MXCSR_REGNUM,
> AMD64_FCTRL_REGNUM,
> - AMD64_FSTAT_REGNUM
> + AMD64_FSTAT_REGNUM,
> + -1, -1, -1, -1, /* 67 ... 70. */
> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 70 ... 80. */
> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 80 ... 90. */
> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 90 ... 100. */
> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 100 ... 110. */
> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 110 ... 120. */
> + -1, -1, -1, -1, -1, /*120 ... 125. */
> +
> + AMD64_BND0R_REGNUM, AMD64_BND0R_REGNUM + 1,
> + AMD64_BND0R_REGNUM + 2, AMD64_BND0R_REGNUM + 3
I'll admit this is a bit of a nitpicking, but I think it would
be useful to continue doing what we've been doing before,
which is document what the various range of register numbers
are for. And let's try to have them organized in banks of 8,
rather than 10.
Eg:
/* MMX Registers 16 - 31 (67 - 82). */
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
/* Reserved (83 - 117). */
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1,
/* Vector Mask Register 0 - 7 (118 - 125). */
-1, -1, -1, -1, -1, -1, -1, -1,
/* Bound Registers 0 - 3 (126 - 129). */
AMD64_BND0R_REGNUM, AMD64_BND0R_REGNUM + 1,
AMD64_BND0R_REGNUM + 2, AMD64_BND0R_REGNUM + 3,
(note that I added a comma at the end of the last register;
that way, if we add more later on, we don't have to modify
that line of code)
> };
>
> static const int amd64_dwarf_regmap_len =
> diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h
> index 704225e..76a89b9 100644
> --- a/gdb/amd64-tdep.h
> +++ b/gdb/amd64-tdep.h
> @@ -66,7 +66,8 @@ enum amd64_regnum
> AMD64_YMM0H_REGNUM, /* %ymm0h */
> AMD64_YMM15H_REGNUM = AMD64_YMM0H_REGNUM + 15,
> AMD64_BND0R_REGNUM = AMD64_YMM15H_REGNUM + 1,
> - AMD64_BND3R_REGNUM = AMD64_BND0R_REGNUM + 3,
> + AMD64_BND1R_REGNUM, AMD64_BND2R_REGNUM,
> + AMD64_BND3R_REGNUM,
> AMD64_BNDCFGU_REGNUM,
> AMD64_BNDSTATUS_REGNUM,
> AMD64_XMM16_REGNUM,
> --
> 2.1.4
--
Joel
next prev parent reply other threads:[~2015-12-06 16:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 15:09 [PATCH obv] Changing compiler flags for MPX tests Walfred Tedeschi
2015-10-26 16:10 ` [PATCH v1] Intel(R) MPX registers to the DWARF enumeration Walfred Tedeschi
2015-12-06 16:35 ` Joel Brobecker [this message]
2015-12-06 17:42 ` H.J. Lu
2015-12-07 8:29 ` Tedeschi, Walfred
2015-10-26 16:11 ` [PATCH v1] Synchronize siginfo type described in GDB with the kernel and glibc ones Walfred Tedeschi
2015-11-18 23:01 ` Joel Brobecker
2015-11-19 9:52 ` Tedeschi, Walfred
2015-11-19 13:27 ` Pedro Alves
2015-11-19 16:41 ` Tedeschi, Walfred
2015-11-19 17:07 ` Pedro Alves
2015-12-01 10:08 ` Tedeschi, Walfred
2015-12-01 12:08 ` Pedro Alves
2015-10-26 16:22 ` [PATCH v1] ABI changes for Intel(R) MPX Walfred Tedeschi
2015-10-26 19:07 ` Eli Zaretskii
2015-10-27 17:21 ` Tedeschi, Walfred
2015-12-06 16:16 ` Joel Brobecker
2015-10-26 16:25 ` [PATCH obv] Fix non stopping breakpoint on newer compilers Walfred Tedeschi
2015-11-04 14:42 ` Joel Brobecker
2015-10-26 16:26 ` [PATCH v1] Intel(R) MPX - Bound violation handling Walfred Tedeschi
2015-11-04 14:55 ` Joel Brobecker
2015-11-05 10:04 ` Tedeschi, Walfred
2015-11-19 0:01 ` Joel Brobecker
2015-12-14 17:43 ` Tedeschi, Walfred
2015-12-14 18:45 ` Pedro Alves
2015-12-15 11:01 ` Tedeschi, Walfred
2015-12-16 15:21 ` Tedeschi, Walfred
2015-12-16 16:52 ` Pedro Alves
2015-12-17 17:31 ` Tedeschi, Walfred
2015-12-21 17:23 ` Pedro Alves
2015-11-04 14:42 ` [PATCH obv] Changing compiler flags for MPX tests Joel Brobecker
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=20151206163527.GA4819@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=walfred.tedeschi@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