![](http://datasheet.mmic.net.cn/290000/X86-64_datasheet_16168481/X86-64_6.png)
X 8 6 -6 4
T M
T E C H N O L O G Y W H IT E P A P E R
Page 6
Extending x86 for the 64-bit World
AMD's 64-bit strategy is a straightforward extension to the current x86 instruction set. The
methodology is similar to that used to extend the 16-bit architecture to 32-bits.
The x86-64 architecture extends the standard x86 architecture by adding a new mode called
long
mode
. Long mode is enabled by a global control bit called LMA (for Long Mode Active). When
LMA is disabled, the processor operates as a standard x86 processor, and is compatible with all
existing 16- and 32-bit operating systems and applications. When Long Mode is activated
(LMA=1) the 64-bit processor extensions are enabled. This allows the system to auto configure
according to the capabilities of the machine and the processor.
64-Bit OS
(LMA)
64-Bit App
(CSD L Bit)
Data Size
(CSD D Bit)
CPU Mode
0
0
1
1
1
1
X
X
0
0
1
1
0
1
0
1
0
1
Standard 16-Bit Mode
Standard 32-Bit Mode
Compatibility 16-Bit Mode
Compatibility 32-Bit Mode
64-bit Mode
Reserved
Long Mode consists of two sub modes:
64-bit mode
and
compatibility mode.
The new modes are
encoded using two flags in the code segment descriptor. The first flag is the existing “D” bit that
controls the size of operands.
A second bit called the “L bit”, is a previously unused bit (bit 53)
in the CS descriptor, is used for determining if specific applications are 64-bit enabled or are run
in compatibility mode.
If long mode is active, CS.L = 1, and CS.D = 0, the processor is then set to run in 64-bit mode.
With this encoding, default operand size is 32-bits and default address size is 64-bits. Using
instruction prefixes, the default operand size can be overridden to 64-bits or 16-bits, and the
default address size can be overridden to 32-bits.
If long mode is active and CS.L=0 then the processor is set to run in compatibility mode.
Compatibility mode maintains binary compatibility with applications written in 16- and 32-bit
x86 modes. An operating system running natively in Long Mode can run existing 16- and 32-bit
applications by simply clearing the L bit in the code segment descriptor of the applications.