There are odd limitations accessing the byte registers
due to coding issues in the REX opcode
prefix used for the new registers: an instruction cannot reference a legacy high byte (AH, BH,
CH, DH) and one of the new byte registers at the same time (such as R11B) but it can use legacy
low bytes (AL, BL, CL, DL). This is enforced by changing (AH, BH, CH, DH) to (BPL, SPL,
DIL, SIL) for instructions using a REX prefix.
The 64-bit instruction pointer RIP points to the next instruction to be executed, and supports a
64-bit flat memory model. Memory address layout in current operating systems is covered later.
The stack pointer RSP points to the last item pushed onto the stack, which grows toward lower
addresses. The stack is used to store return addresses for subroutines, for passing parameters in
higher level languages such as C/C++, and for storing “shadow space” covered in calling
conventions.
The RFLAGS register stores flags used for results of operations and for controlling the
processor. This is formed from the x86 32-bit register EFLAGS by adding a higher 32 bits which
are reserved and currently unused. Table 1 lists the most useful flags. Most of the other flags are
used for operating system level tasks and should always be set to the value previously read.
Table 1 – Common Flags
Operation generated a carry or borrow
Last byte has even number of 1‟s, else 0
Denotes Binary Coded Decimal in-byte carry
Most significant bit of result is 1
Overflow on signed operation
Direction string instructions operate (increment or decrement)
Changeability denotes presence of CPUID instruction
The floating point unit (FPU) contains eight registers FPR0-FPR7, status and control registers,
and a few other specialized registers. FPR0-7 can each store one value of the types shown in
Table 2. Floating point operations conform to IEEE 754. Note that most C/C++ compilers
support the 32 and 64 bit types as float and double, but not the 80-bit one available from
assembly. These registers share space with the eight 64-bit MMX registers.
Table 2 – Floating Point Types
1.18*10^-38 to 3.40*10^38
2.23 *10^-308 to 1.79*10^308
3.37*10^-4932 to 1.18*10^4932