From 27229b7b9321e15024101e321a19d8c84485531c Mon Sep 17 00:00:00 2001 From: LiliCui Date: Mon, 24 Jun 2019 09:42:21 +0800 Subject: [PATCH] i386: Document memory size reference in assembler gas/ChangeLog: 2019-06-21 Lili Cui * doc/c-i386.texi: Document x/y/z instruction sufffixes in AT&T syntax and xmmword/ymmword/zmmword/fword/tword/oword ptr in Intel syntax --- gas/doc/c-i386.texi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi index 9d821ae8e7..4f7cf9cd00 100644 --- a/gas/doc/c-i386.texi +++ b/gas/doc/c-i386.texi @@ -583,12 +583,18 @@ instruction, do @emph{not} have reversed order. @ref{i386-Bugs}. @item In AT&T syntax the size of memory operands is determined from the last character of the instruction mnemonic. Mnemonic suffixes of @samp{b}, -@samp{w}, @samp{l} and @samp{q} specify byte (8-bit), word (16-bit), long -(32-bit) and quadruple word (64-bit) memory references. Intel syntax accomplishes -this by prefixing memory operands (@emph{not} the instruction mnemonics) with -@samp{byte ptr}, @samp{word ptr}, @samp{dword ptr} and @samp{qword ptr}. Thus, -Intel @samp{mov al, byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T -syntax. +@samp{w}, @samp{l} and @samp{q} specify byte (8-bit), word (16-bit), +long (32-bit)and quadruple word (64-bit) memory references. +Mnemonic suffixes of @samp{x}, @samp{y} and @samp{z} specify +xmm (128-bit vector), ymm (256-bit vector) and zmm (512-bit vector) +memory references,only when there's no other way to disambiguate an +instruction. Intel syntax accomplishes this by prefixing memory +operands (@emph{not}the instruction mnemonics) with @samp{byte ptr}, +@samp{word ptr}, @samp{dword ptr}, @samp{qword ptr}, @samp{xmmword ptr}, +@samp{ymmword ptr} and @samp{zmmword ptr}. Thus, Intel syntax +@samp{mov al, byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in +AT&T syntax. In Intel syntax, @samp{fword ptr}, @samp{tword ptr} and +@samp{oword ptr} specify 48-bit, 80-bit and 128-bit memory references. In 64-bit code, @samp{movabs} can be used to encode the @samp{mov} instruction with the 64-bit displacement or immediate operand. -- 2.17.1