Tue Jul 14 11:00:16 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
* doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather than temporary real.
This commit is contained in:
parent
4b987239ea
commit
83d0817a9f
2 changed files with 32 additions and 21 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Jul 14 11:00:16 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
|
||||||
|
|
||||||
|
* doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather
|
||||||
|
than temporary real.
|
||||||
|
|
||||||
Mon Jul 13 13:55:42 1998 Ian Lance Taylor <ian@cygnus.com>
|
Mon Jul 13 13:55:42 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* write.c (subsegs_finish): Don't align the segments if there were
|
* write.c (subsegs_finish): Don't align the segments if there were
|
||||||
|
|
|
@ -77,7 +77,7 @@ reversed order. @ref{i386-Bugs}.
|
||||||
In AT&T syntax the size of memory operands is determined from the last
|
In AT&T syntax the size of memory operands is determined from the last
|
||||||
character of the opcode name. Opcode suffixes of @samp{b}, @samp{w},
|
character of the opcode name. Opcode suffixes of @samp{b}, @samp{w},
|
||||||
and @samp{l} specify byte (8-bit), word (16-bit), and long (32-bit)
|
and @samp{l} specify byte (8-bit), word (16-bit), and long (32-bit)
|
||||||
memory references. Intel syntax accomplishes this by prefixes memory
|
memory references. Intel syntax accomplishes this by prefixing memory
|
||||||
operands (@emph{not} the opcodes themselves) with @samp{byte ptr},
|
operands (@emph{not} the opcodes themselves) with @samp{byte ptr},
|
||||||
@samp{word ptr}, and @samp{dword ptr}. Thus, Intel @samp{mov al, byte
|
@samp{word ptr}, and @samp{dword ptr}. Thus, Intel @samp{mov al, byte
|
||||||
ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T syntax.
|
ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T syntax.
|
||||||
|
@ -215,19 +215,18 @@ to repeat string instructions, to provide section overrides, to perform
|
||||||
bus lock operations, and to give operand and address size (16-bit
|
bus lock operations, and to give operand and address size (16-bit
|
||||||
operands are specified in an instruction by prefixing what would
|
operands are specified in an instruction by prefixing what would
|
||||||
normally be 32-bit operands with a ``operand size'' opcode prefix).
|
normally be 32-bit operands with a ``operand size'' opcode prefix).
|
||||||
Opcode prefixes are usually given as single-line instructions with no
|
Opcode prefixes are best written on the same line as the instruction
|
||||||
operands, and must directly precede the instruction they act upon. For
|
they act upon. For example, the @samp{scas} (scan string) instruction is
|
||||||
example, the @samp{scas} (scan string) instruction is repeated with:
|
repeated with:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
repne
|
repne scas %es:(%edi),%al
|
||||||
scas
|
|
||||||
@end smallexample
|
|
||||||
@noindent
|
|
||||||
or
|
|
||||||
@smallexample
|
|
||||||
repne/scas
|
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
You may also place prefixes on the lines immediately preceding the
|
||||||
|
opcode, but this circumvents checks that @code{@value{AS}} does with
|
||||||
|
prefixes, and will not work with all prefixes.
|
||||||
|
|
||||||
Here is a list of opcode prefixes:
|
Here is a list of opcode prefixes:
|
||||||
|
|
||||||
@cindex section override prefixes, i386
|
@cindex section override prefixes, i386
|
||||||
|
@ -242,7 +241,13 @@ using the @var{section}:@var{memory-operand} form for memory references.
|
||||||
Operand/Address size prefixes @samp{data16} and @samp{addr16}
|
Operand/Address size prefixes @samp{data16} and @samp{addr16}
|
||||||
change 32-bit operands/addresses into 16-bit operands/addresses,
|
change 32-bit operands/addresses into 16-bit operands/addresses,
|
||||||
while @samp{data32} and @samp{addr32} change 16-bit ones (in a
|
while @samp{data32} and @samp{addr32} change 16-bit ones (in a
|
||||||
@code{.code16} section) into 32-bit operands/addresses.
|
@code{.code16} section) into 32-bit operands/addresses. These prefixes
|
||||||
|
@emph{must} appear on the same line of code as the opcode they modify.
|
||||||
|
For example, in a 16-bit @code{.code16} section, you might write:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
addr32 jmpl *(%ebx)
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
@cindex bus lock prefixes, i386
|
@cindex bus lock prefixes, i386
|
||||||
@cindex inhibiting interrupts, i386
|
@cindex inhibiting interrupts, i386
|
||||||
|
@ -289,7 +294,7 @@ to calculate the address of the operand. If no @var{scale} is
|
||||||
specified, @var{scale} is taken to be 1. @var{section} specifies the
|
specified, @var{scale} is taken to be 1. @var{section} specifies the
|
||||||
optional section register for the memory operand, and may override the
|
optional section register for the memory operand, and may override the
|
||||||
default section register (see a 80386 manual for section register
|
default section register (see a 80386 manual for section register
|
||||||
defaults). Note that section overrides in AT&T syntax @emph{must} have
|
defaults). Note that section overrides in AT&T syntax @emph{must}
|
||||||
be preceded by a @samp{%}. If you specify a section override which
|
be preceded by a @samp{%}. If you specify a section override which
|
||||||
coincides with the default section register, @code{@value{AS}} does @emph{not}
|
coincides with the default section register, @code{@value{AS}} does @emph{not}
|
||||||
output any section register override prefixes to assemble the given
|
output any section register override prefixes to assemble the given
|
||||||
|
@ -376,9 +381,9 @@ types. Constructors build these data types into memory.
|
||||||
Floating point constructors are @samp{.float} or @samp{.single},
|
Floating point constructors are @samp{.float} or @samp{.single},
|
||||||
@samp{.double}, and @samp{.tfloat} for 32-, 64-, and 80-bit formats.
|
@samp{.double}, and @samp{.tfloat} for 32-, 64-, and 80-bit formats.
|
||||||
These correspond to opcode suffixes @samp{s}, @samp{l}, and @samp{t}.
|
These correspond to opcode suffixes @samp{s}, @samp{l}, and @samp{t}.
|
||||||
@samp{t} stands for temporary real, and that the 80387 only supports
|
@samp{t} stands for 80-bit real. The 80387 only supports this format
|
||||||
this format via the @samp{fldt} (load temporary real to stack top) and
|
via the @samp{fldt} (load 80-bit real to stack top) and @samp{fstpt}
|
||||||
@samp{fstpt} (store temporary real and pop stack) instructions.
|
(store 80-bit real and pop stack) instructions.
|
||||||
|
|
||||||
@cindex @code{word} directive, i386
|
@cindex @code{word} directive, i386
|
||||||
@cindex @code{long} directive, i386
|
@cindex @code{long} directive, i386
|
||||||
|
@ -386,11 +391,12 @@ this format via the @samp{fldt} (load temporary real to stack top) and
|
||||||
@cindex @code{quad} directive, i386
|
@cindex @code{quad} directive, i386
|
||||||
@item
|
@item
|
||||||
Integer constructors are @samp{.word}, @samp{.long} or @samp{.int}, and
|
Integer constructors are @samp{.word}, @samp{.long} or @samp{.int}, and
|
||||||
@samp{.quad} for the 16-, 32-, and 64-bit integer formats. The corresponding
|
@samp{.quad} for the 16-, 32-, and 64-bit integer formats. The
|
||||||
opcode suffixes are @samp{s} (single), @samp{l} (long), and @samp{q}
|
corresponding opcode suffixes are @samp{s} (single), @samp{l} (long),
|
||||||
(quad). As with the temporary real format the 64-bit @samp{q} format is
|
and @samp{q} (quad). As with the 80-bit real format, the 64-bit
|
||||||
only present in the @samp{fildq} (load quad integer to stack top) and
|
@samp{q} format is only present in the @samp{fildq} (load quad integer
|
||||||
@samp{fistpq} (store quad integer and pop stack) instructions.
|
to stack top) and @samp{fistpq} (store quad integer and pop stack)
|
||||||
|
instructions.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
Register to register operations should not use opcode suffixes.
|
Register to register operations should not use opcode suffixes.
|
||||||
|
|
Loading…
Add table
Reference in a new issue