public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Indu Bhagat <indu.bhagat@oracle.com>
Cc: "Kong, Lingling" <lingling.kong@intel.com>,
	"binutils@sourceware.org" <binutils@sourceware.org>,
	"Cui, Lili" <lili.cui@intel.com>, "Hu, Lin1" <lin1.hu@intel.com>,
	"H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] opcodes: i386: fix dw2_regnum data type in reg_entry
Date: Mon, 22 Jan 2024 08:49:47 +0100	[thread overview]
Message-ID: <f2ae2da8-e103-4c92-8d4e-7fe1352b1086@suse.com> (raw)
In-Reply-To: <81971ec0-152c-4776-b56a-7d113cc01668@oracle.com>

On 20.01.2024 01:45, Indu Bhagat wrote:
> On 1/11/24 06:05, Jan Beulich wrote:
>> On 11.01.2024 14:27, H.J. Lu wrote:
>>> On Thu, Jan 11, 2024 at 12:05 AM Jan Beulich <jbeulich@suse.com> wrote:
>>>>
>>>> On 11.01.2024 08:59, Kong, Lingling wrote:
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Jan Beulich <jbeulich@suse.com>
>>>>>> Sent: Thursday, January 11, 2024 3:43 PM
>>>>>> To: Kong, Lingling <lingling.kong@intel.com>
>>>>>> Cc: binutils@sourceware.org; Indu Bhagat <indu.bhagat@oracle.com>; Cui, Lili
>>>>>> <lili.cui@intel.com>; H.J. Lu <hjl.tools@gmail.com>; Hu, Lin1
>>>>>> <lin1.hu@intel.com>
>>>>>> Subject: Re: [PATCH] opcodes: i386: fix dw2_regnum data type in reg_entry
>>>>>>
>>>>>> On 11.01.2024 02:35, Kong, Lingling wrote:
>>>>>>>
>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Jan Beulich <jbeulich@suse.com>
>>>>>>>> Sent: Tuesday, January 9, 2024 4:25 PM
>>>>>>>> To: Indu Bhagat <indu.bhagat@oracle.com>; Cui, Lili
>>>>>>>> <lili.cui@intel.com>; H.J. Lu <hjl.tools@gmail.com>; Kong, Lingling
>>>>>>>> <lingling.kong@intel.com>; Hu, Lin1 <lin1.hu@intel.com>
>>>>>>>> Cc: binutils@sourceware.org
>>>>>>>> Subject: Re: [PATCH] opcodes: i386: fix dw2_regnum data type in
>>>>>>>> reg_entry
>>>>>>>>
>>>>>>>> On 09.01.2024 02:12, Indu Bhagat wrote:
>>>>>>>>> The DWARF register numbers for the APX EGRPs start with 130.  The
>>>>>>>>> data type holding the same currently is signed char.
>>>>>>>>>
>>>>>>>>> ChangeLog:
>>>>>>>>>    * opcodes/i386-opc.h (reg_entry): Bump to signed short.
>>>>>>>>
>>>>>>>> So yes, something needs doing. But there are further questions to be
>>>>>>>> raised to the original authors: Was the code tested at all in this
>>>>>>>> regard? Why do numbers start at 130, when according to i386-reg.tbl
>>>>>>>> 128 and 129 are unused (and would hence be more natural to [also] use)?
>>>>>>>
>>>>>>> This is because for some historical reasons, some numbers(126-129) have been
>>>>>> agreed to be reserved.
>>>>>>> Details can be found in https://groups.google.com/g/x86-64-
>>>>>> abi/c/GS8LZf5nQFk.
>>>>>>
>>>>>> I'm sorry, there are no details there. There's merely mention of these four being
>>>>>> reserved, without supplying any reason (historical or not).
>>>>>
>>>>> Sorry, you could see https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/6207f9a2c0645f20a7ec591a09e4c382b1675784
>>>>> There are reserved  for Intel MPX (Memory Protection Extensions) provides 4 128-bit wide bound registers (reg{bnd0} - reg{bnd3}).
>>>>
>>>> Then why aren't these marked that way? The commit introducing them to
>>>> opcodes used Dw2Inval, and it was never changed from that (i.e. there
>>>> wasn't even deliberate undoing with respective justification).
>>>
>>> Leave them as reserved.  We have plenty.
>>
>> Hmm, the latter sentence doesn't fir what I meant: Why does / did
>> i386-reg.tbl not / never have those numbers? I could have seen that
>> they were there and then possibly have been purged, but even then
>> I would expect there a comment to have been left. So minimally what
>> I'd like to see / do is to add such comments.
> 
> Is the patch (opcodes: i386: fix dw2_regnum data type in reg_entry) OK 
> to commit now ?

To be honest - not sure. I'd like to look into avoiding the growth, by
switching to "unsigned char" instead. But that requires changes elsewhere,
because of the need to double-check uses of (and maybe further special-
case) Dw2Inval.

Jan

      reply	other threads:[~2024-01-22  7:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09  1:12 Indu Bhagat
2024-01-09  1:12 ` [PATCH] opcodes: gas: i386: use Rex2 as attribute not constraint Indu Bhagat
2024-01-09  8:14   ` Jan Beulich
2024-01-09  8:24 ` [PATCH] opcodes: i386: fix dw2_regnum data type in reg_entry Jan Beulich
2024-01-11  1:35   ` Kong, Lingling
2024-01-11  7:43     ` Jan Beulich
2024-01-11  7:59       ` Kong, Lingling
2024-01-11  8:05         ` Jan Beulich
2024-01-11 13:27           ` H.J. Lu
2024-01-11 14:05             ` Jan Beulich
2024-01-20  0:45               ` Indu Bhagat
2024-01-22  7:49                 ` Jan Beulich [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=f2ae2da8-e103-4c92-8d4e-7fe1352b1086@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=indu.bhagat@oracle.com \
    --cc=lili.cui@intel.com \
    --cc=lin1.hu@intel.com \
    --cc=lingling.kong@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).