public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Jiang, Haochen" <haochen.jiang@intel.com>
To: "Beulich, Jan" <JBeulich@suse.com>
Cc: "Lu, Hongjiu" <hongjiu.lu@intel.com>,
	"binutils@sourceware.org" <binutils@sourceware.org>,
	"Hu, Lin1" <lin1.hu@intel.com>, "Cui, Lili" <lili.cui@intel.com>
Subject: RE: [PATCH][v6] Support Intel USER_MSR
Date: Wed, 15 Nov 2023 07:41:22 +0000	[thread overview]
Message-ID: <SA1PR11MB59465097DDD885B77F931B0BECB1A@SA1PR11MB5946.namprd11.prod.outlook.com> (raw)
In-Reply-To: <757971fd-4101-4073-960a-9c78c7cc5e9c@suse.com>

> On 15.11.2023 04:34, Jiang, Haochen wrote:
> >>>> +
> >>>> +// USER_MSR instructions.
> >>>> +
> >>>> +urdmsr, 0xf20f38f8, USER_MSR|x64, RegMem|NoSuf|NoRex64,
> >> { Reg64,
> >>>> +Reg64 } urdmsr, 0xf2f8/0, USER_MSR|x64,
> >>>> +Modrm|Vex128|VexMap7|VexW0|NoSuf, { Imm32, Reg64 } uwrmsr,
> >>>> +0xf30f38f8, USER_MSR|x64, Modrm|NoSuf|NoRex64, { Reg64,
> Reg64 }
> >>>> +uwrmsr, 0xf3f8/0, USER_MSR|x64,
> Modrm|Vex128|VexMap7|VexW0|NoSuf,
> >>> {
> >>>> +Reg64, Imm32 }
> >>>
> >>> Actually I think the choice of Reg64 here for the operand specifying the
> MSR
> >>> index is misleading, even if in line with what the doc presently says in the
> >>> Opcode / Instruction column. For both insns the description says that only
> the
> >>> low 32 bits are used (and the Exceptions section confirms this). Such
> operands,
> >>> however, are expressed as Reg32 everywhere else. I'd like to suggest that
> the
> >>> spec be adjusted, and I'm heavily inclined to change binutils regardless.
> Thoughts?
> >
> > I suppose the reason why it is using Reg64 is because when the other
> operand is
> > register, it is rare not to align the register size. I checked SDE and ISE and only
> > got one case. And this reg size is inherited from that.
> 
> Only one? I know of two (MOVSX and MOVZX) without even needing to go
> look.

Oops, missing that due to the search string. There could be more.

> Both registers matching in size is sensible only if both also express the
> same kind of entity. (Moves between GPRs and MM/XMM registers are other
> examples, just that there it's also register "kind" that's different.)

That is the point we need to sync with our internal team.

Thx,
Haochen

> 
> Jan

  reply	other threads:[~2023-11-15  7:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10  7:24 [PATCH] " Hu, Lin1
2023-10-16 12:11 ` Jan Beulich
2023-10-18  7:51   ` Hu, Lin1
2023-10-19  8:36     ` Jan Beulich
2023-10-24  8:38       ` Hu, Lin1
2023-10-24  8:55         ` Jan Beulich
2023-10-24 10:01           ` Hu, Lin1
2023-10-24 12:02             ` Jan Beulich
2023-10-25  2:01               ` Hu, Lin1
2023-10-25  8:48                 ` Jan Beulich
2023-10-25  9:11                   ` [PATCH][v3] " Hu, Lin1
2023-10-25 11:43                     ` Jan Beulich
2023-10-26  6:14                       ` Hu, Lin1
2023-10-26  6:21                       ` [PATCH][v4] " Hu, Lin1
2023-10-26  8:31                         ` Jan Beulich
2023-10-26  9:08                           ` Hu, Lin1
2023-10-26  9:25                             ` Jan Beulich
2023-10-26 10:26                               ` Hu, Lin1
2023-10-27  9:00                               ` [PATCH][v5] " Hu, Lin1
2023-10-27 13:36                                 ` Jan Beulich
2023-10-30  5:50                                   ` Hu, Lin1
2023-10-30  8:31                                     ` Jan Beulich
2023-10-31  1:43                                       ` Hu, Lin1
2023-10-31  2:14                                       ` [PATCH][v6] " Hu, Lin1
2023-10-31  8:03                                         ` Jan Beulich
2023-10-31  8:35                                           ` Hu, Lin1
2023-11-14  7:14                                         ` Jan Beulich
2023-11-15  3:09                                           ` Hu, Lin1
2023-11-15  3:34                                             ` Jiang, Haochen
2023-11-15  7:36                                               ` Jan Beulich
2023-11-15  7:41                                                 ` Jiang, Haochen [this message]
2023-11-15  7:48                                             ` Jan Beulich

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=SA1PR11MB59465097DDD885B77F931B0BECB1A@SA1PR11MB5946.namprd11.prod.outlook.com \
    --to=haochen.jiang@intel.com \
    --cc=JBeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=hongjiu.lu@intel.com \
    --cc=lili.cui@intel.com \
    --cc=lin1.hu@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).