From: H.J. Lu Date: Fri, 14 Feb 2020 12:57:01 +0000 (-0800) Subject: x86: Document movsx/movsxd/movzx for AT&T syntax X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e6724dee4984e62e2f8e7da431f3b875ab14c4a;p=binutils-gdb.git x86: Document movsx/movsxd/movzx for AT&T syntax Document different mnemonics of movsx, movsxd and movzx in AT&T syntax. PR gas/25438 * doc/c-i386.texi: Document movsx, movsxd and movzx for AT&T syntax. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 8d5426d7641..67d137940f7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2020-02-14 H.J. Lu + + PR gas/25438 + * doc/c-i386.texi: Document movsx, movsxd and movzx for AT&T + syntax. + 2020-02-13 Fangrui Song H.J. Lu diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi index 4eaf53311fd..ba0df76d43a 100644 --- a/gas/doc/c-i386.texi +++ b/gas/doc/c-i386.texi @@ -835,6 +835,59 @@ are called @samp{cbtw}, @samp{cwtl}, @samp{cwtd}, @samp{cltd}, @samp{cltq}, and @samp{cqto} in AT&T naming. @code{@value{AS}} accepts either naming for these instructions. +@cindex extension instructions, i386 +@cindex i386 extension instructions +@cindex extension instructions, x86-64 +@cindex x86-64 extension instructions +The Intel-syntax extension instructions + +@itemize @bullet +@item +@samp{movsx} --- sign-extend @samp{reg8/mem8} to @samp{reg16}. + +@item +@samp{movsx} --- sign-extend @samp{reg8/mem8} to @samp{reg32}. + +@item +@samp{movsx} --- sign-extend @samp{reg8/mem8} to @samp{reg64} +(x86-64 only). + +@item +@samp{movsx} --- sign-extend @samp{reg16/mem16} to @samp{reg32} + +@item +@samp{movsx} --- sign-extend @samp{reg16/mem16} to @samp{reg64} +(x86-64 only). + +@item +@samp{movsxd} --- sign-extend @samp{reg32/mem32} to @samp{reg64} +(x86-64 only). + +@item +@samp{movzx} --- zero-extend @samp{reg8/mem8} to @samp{reg16}. + +@item +@samp{movzx} --- zero-extend @samp{reg8/mem8} to @samp{reg32}. + +@item +@samp{movzx} --- zero-extend @samp{reg8/mem8} to @samp{reg64} +(x86-64 only). + +@item +@samp{movzx} --- zero-extend @samp{reg16/mem16} to @samp{reg32} + +@item +@samp{movzx} --- zero-extend @samp{reg16/mem16} to @samp{reg64} +(x86-64 only). +@end itemize + +@noindent +are called @samp{movsbw/movsxb/movsx}, @samp{movsbl/movsxb/movsx}, +@samp{movsbq/movsb/movsx}, @samp{movswl/movsxw}, @samp{movswq/movsxw}, +@samp{movslq/movsxl}, @samp{movzbw/movzxb/movzx}, +@samp{movzbl/movzxb/movzx}, @samp{movzbq/movzxb/movzx}, +@samp{movzwl/movzxw} and @samp{movzwq/movzxw} in AT&T syntax. + @cindex jump instructions, i386 @cindex call instructions, i386 @cindex jump instructions, x86-64