Memory References - Red Hat ENTERPRISE LINUX 4 - USING AS Using Manual

Gnu assembler
Hide thumbs Also See for ENTERPRISE LINUX 4 - USING AS:
Table of Contents

Advertisement

130
The bus lock prefix
only valid with certain instructions; see a 80386 manual for details).
The wait for coprocessor prefix
This should never be needed for the 80386/80387 combination.
The
,
, and
rep
repe
times (
times if the current address size is 16-bits).
%cx
The
family of prefixes is used by x86-64 to encode extensions to i386 instruction set. The
rex
prefix has four bits -- an operand size overwrite (
64-bit and X, Y and Z extensions bits used to extend the register set.
You may write the
bits set. By omitting the
no need to write the prefixes explicitly, since gas will automatically generate them based on the
instruction operands.

21.6. Memory References

An Intel syntax indirect memory reference of the form
:[
+
section
base
index
is translated into the AT&T syntax
:
(
section
disp
base
where
and
base
index
ment, and
, taking the values 1, 2, 4, and 8, multiplies
scale
operand. If no
scale
register for the memory operand, and may override the default section register (see a 80386 manual
for section register defaults). Note that section overrides in AT&T syntax must be preceded by a
you specify a section override which coincides with the default section register,
any section register override prefixes to assemble the given instruction. Thus, section overrides can be
specified to emphasize which section register is used for a given memory operand.
Here are some examples of Intel and AT&T style memory references:
AT&T:
, Intel:
-4(%ebp)
is
;
base
%ebp
disp
ing with
as the base register).
%ebp
AT&T:
foo(,%eax,4)
is
index
%eax
register here defaults to
AT&T:
; Intel
foo(,1)
This uses the value pointed to by
missing, but there is only one
inhibits interrupts during execution of the instruction it precedes. (This is
lock
waits for the coprocessor to complete the current instruction.
wait
prefixes are added to string instructions to make them repeat
repne
prefixes directly. The
rex
,
,
or
64
x
y
z
*
+
scale
disp
,
,
)
index
scale
are the optional 32-bit base and index registers,
is specified,
scale
[ebp - 4]
is
.
-4
section
index
, Intel:
[foo + eax*4]
(scaled by a
scale
.
%ds
[foo]
foo
. This is a syntactic exception.
,
Chapter 21. 80386 Dependent Features
) used to change operand size from 32-bit to
64
instruction emits
rex64xyz
you may write other prefixes as well. Normally, there is
]
is taken to be 1.
section
is missing, and the default section is used (
,
are both missing.
scale
4);
is
. All other fields are missing. The section
disp
foo
as a memory operand. Note that
prefix with all the
rex
is the optional displace-
disp
to calculate the address of the
index
specifies the optional section
as
and
base
%ecx
rex
. If
%
does not output
for address-
%ss
are both
index

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 4

Table of Contents