Chapter 21. 80386 Dependent Features
129
the 6 section registers
%cs
(code section),
%ds
(data section),
%ss
(stack section),
%es
,
%fs
, and
%gs
.
the 3 processor control registers
%cr0
,
%cr2
, and
%cr3
.
the 6 debug registers
%db0
,
%db1
,
%db2
,
%db3
,
%db6
, and
%db7
.
the 2 test registers
%tr6
and
%tr7
.
the 8 floating point register stack
%st
or equivalently
%st(0)
,
%st(1)
,
%st(2)
,
%st(3)
,
%st(4)
,
%st(5)
,
%st(6)
, and
%st(7)
. These registers are overloaded by 8 MMX registers
%mm0
,
%mm1
,
%mm2
,
%mm3
,
%mm4
,
%mm5
,
%mm6
and
%mm7
.
the 8 SSE registers registers
%xmm0
,
%xmm1
,
%xmm2
,
%xmm3
,
%xmm4
,
%xmm5
,
%xmm6
and
%xmm7
.
The AMD x86 64 architecture extends the register set by:
enhancing the 8 32 bit registers to 64 bit:
%rax
(the accumulator),
%rbx
,
%rcx
,
%rdx
,
%rdi
,
%rsi
,
%rbp
(the frame pointer),
%rsp
(the stack pointer)
the 8 extended registers
%r8
%r15
.
the 8 32 bit low ends of the extended registers:
%r8d
%r15d
the 8 16 bit low ends of the extended registers:
%r8w
%r15w
the 8 8 bit low ends of the extended registers:
%r8b
%r15b
the 4 8 bit registers:
%sil
,
%dil
,
%bpl
,
%spl
.
the 8 debug registers:
%db8
%db15
.
the 8 SSE registers:
%xmm8
%xmm15
.
21.5. Instruction Prefixes
Instruction prefixes are used to modify the following instruction. They are used to repeat string in 
structions, to provide section overrides, to perform bus lock operations, and to change operand and
address sizes. (Most instructions that normally operate on 32 bit operands will use 16 bit operands if
the instruction has an "operand size" prefix.) Instruction prefixes are best written on the same line as
the instruction they act upon. For example, the
scas
(scan string) instruction is repeated with:
repne scas %es:(%edi),%al
You may also place prefixes on the lines immediately preceding the instruction, but this circumvents
checks that
as
does with prefixes, and will not work with all prefixes.
Here is a list of instruction prefixes:
Section override prefixes
cs
,
ds
,
ss
,
es
,
fs
,
gs
. These are automatically added by specifying using
the
section
:
memory operand
form for memory references.
Operand/Address size prefixes
data16
and
addr16
change 32 bit operands/addresses into 16 bit
operands/addresses, while
data32
and
addr32
change 16 bit ones (in a
.code16
section) into
32 bit operands/addresses. These prefixes must appear on the same line of code as the instruction
they modify. For example, in a 16 bit
.code16
section, you might write:
addr32 jmpl *(%ebx)






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

canadian web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved