This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] x86: drop vex_encoding_vex2 enumerator


On Thu, Jan 16, 2020 at 12:36 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 15.01.2020 23:22, H.J. Lu wrote:
> > On Tue, Jan 14, 2020 at 11:42 PM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> Documentation clearly says "prefer {2,3}-byte VEX prefix for VEX
> >> instruction", as opposed to "encode with EVEX prefix" for {evex}. Hence
> >> there not being a way to VEX-encode an insn should not be an error (not
> >
> > We can't prefer any VEX prefix on non AVX instructions:
> >
> > {vex} inc %rax
> >
> > should be an error.
>
> How is this in line with what the documentation states? (I
> assume you mean {vex2} in your example; I could see a future
> {vex} as being mandatory just like {evex} is. If {vex2} is
> to be mandatory, what use is it for VEX-encodable insns? The
> 2-byte form will be preferred anyway.)
>
> >> even a warning), and with this the separate enumerator becomes unneeded.
> >> (Really I'm having trouble seeing what {vex2} would be useful for when
> >> it's just a suggestion hint, not one allowing the programmer to mandate
> >> the used encoding.)
> >
> > Please keep it for now.   We are planning to use it in the future.
>
> Then may I please ask that you update the documentation to
> clarify which pseudo prefixes are hints (and silently ignored
> when they cannot be fulfilled) and which ones are mandatory?
>

How about this?

-- 
H.J.
From 8f8b6e750f013a51ec15128781c17bba36ca6512 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 16 Jan 2020 14:27:03 -0800
Subject: [PATCH] x86: Update {vex2} and {vex3} documentation

There are 2-byte VEX prefix and 3-byte VEX prefix.  2-byte VEX prefix
can't encode all operands.  By default, assembler uses 2-byte VEX prefix
if possible.  {vex3} can be used to force 3-byte VEX prefix.  {vex2} is
nop at the moment.

	* doc/c-i386.texi: Update {vex2} and {vex3} documentation.
---
 gas/ChangeLog       | 4 ++++
 gas/doc/c-i386.texi | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index f2b49b7a89..94fb08c2f0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2020-01-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* doc/c-i386.texi: Update {vex2} and {vex3} documentation.
+
 2020-01-16  Andre Vieira  <andre.simoesdiasvieira@arm.com>
 
 	PR 25376
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index 4b25803013..37965607ec 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -758,10 +758,11 @@ Different encoding options can be specified via pseudo prefixes:
 @samp{@{store@}} -- prefer store-form instruction.
 
 @item
-@samp{@{vex2@}} -- prefer 2-byte VEX prefix for VEX instruction.
+@samp{@{vex2@}} -- encode with 2-byte VEX prefix for VEX instruction if
+possible.
 
 @item
-@samp{@{vex3@}} -- prefer 3-byte VEX prefix for VEX instruction.
+@samp{@{vex3@}} -- encode with 3-byte VEX prefix for VEX instruction
 
 @item
 @samp{@{evex@}} --  encode with EVEX prefix.
-- 
2.24.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]