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: Document movsx/movsxd/movzx for AT&T syntax


On Fri, Feb 14, 2020 at 5:55 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 14.02.2020 13:24, H.J. Lu wrote:
> > Assembler has been this way from the start.  I am checking in
> > this patch to document different mnemonics of movsx, movsxd
> > and movzx in AT&T syntax.
>
> You do realize that there already was
>
> "Almost all instructions have the same names in AT&T and Intel format.
>  There are a few exceptions.  The sign extend and zero extend
>  instructions need two sizes to specify them.  They need a size to
>  sign/zero extend @emph{from} and a size to zero extend @emph{to}.  This
>  is accomplished by using two instruction mnemonic suffixes in AT&T
>  syntax.  Base names for sign extend and zero extend are
>  @samp{movs@dots{}} and @samp{movz@dots{}} in AT&T syntax (@samp{movsx}
>  and @samp{movzx} in Intel syntax).  The instruction mnemonic suffixes
>  are tacked on to this base name, the @emph{from} suffix before the
>  @emph{to} suffix.  Thus, @samp{movsbl %al, %edx} is AT&T syntax for
>  ``move sign extend @emph{from} %al @emph{to} %edx.''  Possible suffixes,
>  thus, are @samp{bl} (from byte to long), @samp{bw} (from byte to word),
>  @samp{wl} (from word to long), @samp{bq} (from byte to quadruple word),
>  @samp{wq} (from word to quadruple word), and @samp{lq} (from long to
>  quadruple word).
>
> ? Now we have the same thing said in two places.
>
> Jan

Thanks for catching it.  I will check in this patch.

-- 
H.J.
From 07d9838745fa0fcd4e4a92a090bdc467ff12cf0a Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Fri, 14 Feb 2020 06:09:28 -0800
Subject: [PATCH] Remove the old movsx and movzx documentation for AT&T syntax

	* doc/c-i386.texi: Remove the old movsx and movzx documentation
	for AT&T syntax.
---
 gas/ChangeLog       |  5 +++++
 gas/doc/c-i386.texi | 16 ----------------
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 39b1a38ca9..e30c0ddc00 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* doc/c-i386.texi: Remove the old movsx and movzx documentation
+	for AT&T syntax.
+
 2020-02-14  Jan Beulich  <jbeulich@suse.com>
 
 	PR gas/25438
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index ba0df76d43..235a3951db 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -750,22 +750,6 @@ operand.
 
 @end itemize
 
-Almost all instructions have the same names in AT&T and Intel format.
-There are a few exceptions.  The sign extend and zero extend
-instructions need two sizes to specify them.  They need a size to
-sign/zero extend @emph{from} and a size to zero extend @emph{to}.  This
-is accomplished by using two instruction mnemonic suffixes in AT&T
-syntax.  Base names for sign extend and zero extend are
-@samp{movs@dots{}} and @samp{movz@dots{}} in AT&T syntax (@samp{movsx}
-and @samp{movzx} in Intel syntax).  The instruction mnemonic suffixes
-are tacked on to this base name, the @emph{from} suffix before the
-@emph{to} suffix.  Thus, @samp{movsbl %al, %edx} is AT&T syntax for
-``move sign extend @emph{from} %al @emph{to} %edx.''  Possible suffixes,
-thus, are @samp{bl} (from byte to long), @samp{bw} (from byte to word),
-@samp{wl} (from word to long), @samp{bq} (from byte to quadruple word),
-@samp{wq} (from word to quadruple word), and @samp{lq} (from long to
-quadruple word).
-
 @cindex encoding options, i386
 @cindex encoding options, x86-64
 
-- 
2.24.1


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