Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the E and R prefixes stand for in the names of Intel 32-bit and 64-bit registers?

The 32-bit register names start with an E and the 64-bit ones start with an R. What do the E and R stand for? Is there a reason for choosing these alphabets?

Also, in 64-bit registers, too, we can see in any low-level debugger such as Windbg that the right-most bits are still referred to by the same name as that of the 64-bit register except the name starts with an E. For e.g. the right-most 32 bits of the RAX register in a 64-bit system is referred to as EAX.

So, do the E and R stand for something? And also, why the suffix X for register?

like image 710
Water Cooler v2 Avatar asked May 12 '17 08:05

Water Cooler v2


People also ask

What does R stand for in RAX register?

So the letter R was used as a prefix to the 16 bit register name just as for 32 bit processors the letter E was used as a prefix to the 16 bit register name.

What are the 32-bit x86 arithmetic A registers called?

An x86 CPU has eight 32-bit general-purpose registers. For historical reasons, the registers are named { eax , ecx , edx , ebx , esp , ebp , esi , edi }.

What is the name of the 32 bits register used to reference the stack area of memory What is the name for the register in 16 bits?

The x86 processor maintains an instruction pointer (EIP) register that is a 32-bit value indicating the location in memory where the current instruction starts.


1 Answers

  • R just stands for "register". The AMD64 ISA extension added 8 additional general-purpose registers, named R8 through R15. The 64-bit extended versions of the original 8 registers had an R prefix added to them for symmetry.

  • E stands for "extended" or "enhanced". (Wikipedia says "extended".) They are the "extended" versions of the 16-bit registers, in that they offer 16 additional bits for 32 bits total.

  • X is also for "extended"—or perhaps it implies 16 as in hexadecimal.* The X-suffixed registers are the 16-bit extended versions of the 8-bit registers. For 8-bit registers, the L suffix means "low", and the H suffix means "high".

Therefore, taking one particular register as an example, you have the 8-bit AL and AH registers, which are the low and high bytes of the 16-bit AX register, which is the low word of the 32-bit EAX register, which is the low double-word of the 64-bit RAX register.

| 63 - 32 | 31 - 16 | 15 - 8 | 7 - 0 | ====================================== .         .         | AH     | AL    | .         .         | AX             | .         | EAX                      |  | RAX                                | ====================================== | 63 - 32 | 31 - 16 | 15 - 8 | 7 - 0 | 

__
* X was used in the mnemonics (such as LXI and DCX) on the 8080 for instructions that treated a pair of otherwise-separate 8-bit registers as a 16-bit integer, similar to how AX represents the AH:AL pair. Thus, another possible interpretation is that X means pair, and this usage was continued when naming the high:low pairs on subsequent processors, including the 8086, which was a full 16-bit extension of the 8080.

like image 63
Cody Gray Avatar answered Sep 24 '22 01:09

Cody Gray