This question already has an answer here:
这个问题已经有了答案:
- What do the E and R prefixes stand for in the names of Intel 32-bit and 64-bit registers? 1 answer
- 在Intel 32位和64位寄存器的名称中,E和R前缀代表什么?1回答
The x86 assembler language has had to change as the x86 processor architecture has changed from 8bit to 16bit to 32bit and now 64bit.
x86汇编语言必须改变,因为x86处理器体系结构已经从8位更改为16位,现在为32位,现在为64位。
I know that in 32bit assembler register names (EAX, EBX, etc.), the E prefix for each of the names stands for Extended meaning the 32bit form of the register rather than the 16bit form (AX, BX, etc.).
我知道在32位汇编寄存器的名称(EAX, EBX,等等)中,每个名称的E前缀都代表寄存器的32位形式,而不是16位形式(AX, BX,等等)。
What does the R prefix for these register names stand for in 64bit?
这些寄存器名称的R前缀在64位中代表什么?
2 个解决方案
#1
16
I think it's just R for "register", since there are additional registers R8 - R15 on x86-64, and R is a common prefix on many CPU architectures where registers are numbered.
我认为它只是“寄存器”的R,因为在x86-64上有额外的寄存器R8 - R15,而R在许多CPU架构上是一个常见的前缀,寄存器被编号。
#2
4
The original Intel x86 processors, the 8080 processor, were 8 bit processors designed with an eye for for applications such as special purpose, small computers (cash registers for instance) or equipment controllers rather than general purpose computers (competitors included the Motorola 6800). The following 8086 processor family (8086 and cost reduced 8088) were 16 bit microprocessors which continued the Intel 8080 architecture while extending it with 16 bit additions with an eye towards more general purpose uses of the processor.
最初的Intel x86处理器,8080处理器,是8位处理器,专门设计用于特殊用途,小型计算机(例如现金注册)或设备控制器,而不是通用计算机(竞争者包括摩托罗拉6800)。以下8086处理器家族(8086和成本减少8088)是16位微处理器,它延续了Intel 8080体系结构,同时扩展了16位,以更通用的处理器用途。
The Intel 8080 and the Intel 8086 processors had a limited number of registers, most of which had special purposes hence they had specific names such as A, B or AX, BX in their assembly language (competitors such as the Motorola 6800 had similar conventions). General purpose computers such as the IBM 360/370 family or the DEC VAX used more generic names for components like registers (e.g. R0, R1, etc.) since the registers were general purpose (Motorola 68000 32 bit processor used in many higher end workstations in the 1980s was similar with eight data registers named D0 through D7).
Intel 8080和Intel 8086处理器的寄存器数量有限,大多数都有特殊的用途,因此他们有特定的名称,比如a、B或AX,在汇编语言中有BX(竞争对手,如摩托罗拉6800有类似的约定)。通用计算机如IBM 360/370的家庭或DEC VAX使用更通用的名称的组件(比如寄存器(例如R0,R1等)自从寄存器被通用(摩托罗拉68000 32位处理器使用在许多高端工作站在1980年代类似的有八个数据寄存器被任命为D0通过D7)。
As Intel has continued evolving the x86 processor over the years since the 1970s, it has also tried to maintain backwards compatibility even as the target applications of the x86 has expanded from specialized, micro-controller applications to general purpose computers. During this evolution, the number of registers has expanded and many of the originally special purpose registers have evolved towards general purpose usage as Intel also introduced the idea of processor chip operating modes with the 80286 to help with backwards compatibility.
自上世纪70年代以来,随着Intel不断改进x86处理器,它也试图保持向后兼容性,即使x86的目标应用程序已经从专门的微控制器应用扩展到通用计算机。在这一演进过程中,寄存器的数量有所增加,许多原本专用的寄存器已经发展成通用的用途,因为Intel也引入了处理器芯片的操作模式,使用80286来帮助向后兼容。
With the 64 bit processors, Intel needed some way of identifying a 64 bit transfer versus a 32 bit or other transfer in the assembly language. At the same time Intel was introducing additional, general purpose registers. Using a common industry naming convention for general purpose register, the letter R, followed by a number was an easy decision.
使用64位处理器,Intel需要某种方式来识别64位传输,而不是32位或其他的汇编语言传输。与此同时,英特尔还推出了额外的通用寄存器。使用通用的行业命名惯例为通用寄存器,字母R,后面跟着一个数字是一个简单的决定。
However Intel was also faced with having to maintain backward compatibility for the older registers. 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. At the same time the design of the 64 bit register operations were done a bit differently than what was done for the 32 bit register operations for previous generations.
然而,英特尔也面临着必须保持对旧寄存器的向后兼容性。因此,字母R被用作16位寄存器名称的前缀,就像32位处理器一样,字母E被用作16位寄存器名称的前缀。与此同时,64位寄存器操作的设计与前几代的32位寄存器操作的设计稍有不同。
With the change from 8 bit processor to 16 bit processor, the registers were extended from 8 bits to 16 bits so the names have the letter X after the register name such as AX, BX, etc. These registers could be treated as two 8 bit registers (16 bit AX register was composed of 8 bit AH and 8 bit AL where the H represents High or most significant bits of the AX register and L represents Low or least significant bits of the AX register).
与更改从8位处理器到16位处理器,从8位寄存器是扩展到16位的名字注册后的字母X的名字如AX,BX等等。这些寄存器可以被视为两个8位寄存器(16位AX寄存器是由8位啊和8位AL H代表高或者最重要的比特AX寄存器和L代表低或AX注册的最低有效位)。
With the change from 16 bit to 32 bit processor, the registers were extended from 16 bits to 32 bits so the names have the letter E as a prefix such as EAX, EBX, etc. These registers could be treated as having two separate 16 bit components (least significant 16 bits accessed using the 16 bit name such as EAX -> AX, EBX -> BX, etc.) or four 8 bit registers (least significant 16 bits accessed as two 8 bit registers such as EAX -> AH and AL, EBX -> BH and BL, etc.) when register shifting and bitwise operations were used to move 16 bit values between the upper 16 bits and the lower 16 bit of a 32 bit register such as EAX, EBX, etc. This maintained, to some degree, what had been done with the change from 8 bit to 16 bit however direct access to the upper 16 bits of the 32 bit registers was not available the way that direct access to the upper 8 bits of the 16 bit registers in the 8086/8080 had been provided.
改变从16位、32位的处理器,从16位扩展到32位的寄存器的名称具有字母E作为前缀,如EAX,EBX等等。这些寄存器可以被视为两个独立的16位组件(最低有效16位访问使用16位名称如EAX - > AX,EBX - > BX,等等)或四个8位寄存器(最低有效16位访问两个8位寄存器如EAX - >啊和半岛,EBX - > BH和提单,等)当寄存器和位操作被用来转移16位的值上16位和低16位的32位寄存器如EAX,EBX,等等。这个维护,在某种程度上,已经完成了从8位到16位然而直接访问上32位寄存器的16位没有直接访问的方式上的8位16位寄存器在8086/8080已经提供。
Section 3.7.2.1 of Volume 1: Basic Architecture of the Intel 64 and IA-32 Architectures Software Developer's Manual which has this to say about 64 bit mode.
卷1的第3.7.2.1节:Intel 64和IA-32架构软件开发人员手册的基本架构,其中包含64位模式。
Register operands in 64-bit mode can be any of the following:
• 64-bit general-purpose registers (RAX, RBX, RCX, RDX, RSI, RDI, RSP, RBP, or R8-R15)
• 32-bit general-purpose registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP, or R8D-R15D)
• 16-bit general-purpose registers (AX, BX, CX, DX, SI, DI, SP, BP, or R8W-R15W)
• 8-bit general-purpose registers: AL, BL, CL, DL, SIL, DIL, SPL, BPL, and R8L-R15L are available using REX
prefixes; AL, BL, CL, DL, AH, BH, CH, DH are available without using REX prefixes.
• Segment registers (CS, DS, SS, ES, FS, and GS)
• RFLAGS register
• x87 FPU registers (ST0 through ST7, status word, control word, tag word, data operand pointer, and instruction
pointer)
• MMX registers (MM0 through MM7)
• XMM registers (XMM0 through XMM15) and the MXCSR register
• Control registers (CR0, CR2, CR3, CR4, and CR8) and system table pointer registers (GDTR, LDTR, IDTR, and
task register)
• Debug registers (DR0, DR1, DR2, DR3, DR6, and DR7)
• MSR registers
• RDX:RAX register pair representing a 128-bit operand
See the question and answer for x86_64 registers rax/eax/ax/al overwriting full register contents as well as Why do most x64 instructions zero the upper part of a 32 bit register which provide some explanation about how the 64 bit register operation differ from the 32 bit register operation.
请查看x86_64寄存器的问题和答案:rax/eax/ax/al重写完整的寄存器内容,以及为什么大多数x64指令为零的32位寄存器的上半部分提供了一些解释,说明64位寄存器操作与32位寄存器操作的区别。
#1
16
I think it's just R for "register", since there are additional registers R8 - R15 on x86-64, and R is a common prefix on many CPU architectures where registers are numbered.
我认为它只是“寄存器”的R,因为在x86-64上有额外的寄存器R8 - R15,而R在许多CPU架构上是一个常见的前缀,寄存器被编号。
#2
4
The original Intel x86 processors, the 8080 processor, were 8 bit processors designed with an eye for for applications such as special purpose, small computers (cash registers for instance) or equipment controllers rather than general purpose computers (competitors included the Motorola 6800). The following 8086 processor family (8086 and cost reduced 8088) were 16 bit microprocessors which continued the Intel 8080 architecture while extending it with 16 bit additions with an eye towards more general purpose uses of the processor.
最初的Intel x86处理器,8080处理器,是8位处理器,专门设计用于特殊用途,小型计算机(例如现金注册)或设备控制器,而不是通用计算机(竞争者包括摩托罗拉6800)。以下8086处理器家族(8086和成本减少8088)是16位微处理器,它延续了Intel 8080体系结构,同时扩展了16位,以更通用的处理器用途。
The Intel 8080 and the Intel 8086 processors had a limited number of registers, most of which had special purposes hence they had specific names such as A, B or AX, BX in their assembly language (competitors such as the Motorola 6800 had similar conventions). General purpose computers such as the IBM 360/370 family or the DEC VAX used more generic names for components like registers (e.g. R0, R1, etc.) since the registers were general purpose (Motorola 68000 32 bit processor used in many higher end workstations in the 1980s was similar with eight data registers named D0 through D7).
Intel 8080和Intel 8086处理器的寄存器数量有限,大多数都有特殊的用途,因此他们有特定的名称,比如a、B或AX,在汇编语言中有BX(竞争对手,如摩托罗拉6800有类似的约定)。通用计算机如IBM 360/370的家庭或DEC VAX使用更通用的名称的组件(比如寄存器(例如R0,R1等)自从寄存器被通用(摩托罗拉68000 32位处理器使用在许多高端工作站在1980年代类似的有八个数据寄存器被任命为D0通过D7)。
As Intel has continued evolving the x86 processor over the years since the 1970s, it has also tried to maintain backwards compatibility even as the target applications of the x86 has expanded from specialized, micro-controller applications to general purpose computers. During this evolution, the number of registers has expanded and many of the originally special purpose registers have evolved towards general purpose usage as Intel also introduced the idea of processor chip operating modes with the 80286 to help with backwards compatibility.
自上世纪70年代以来,随着Intel不断改进x86处理器,它也试图保持向后兼容性,即使x86的目标应用程序已经从专门的微控制器应用扩展到通用计算机。在这一演进过程中,寄存器的数量有所增加,许多原本专用的寄存器已经发展成通用的用途,因为Intel也引入了处理器芯片的操作模式,使用80286来帮助向后兼容。
With the 64 bit processors, Intel needed some way of identifying a 64 bit transfer versus a 32 bit or other transfer in the assembly language. At the same time Intel was introducing additional, general purpose registers. Using a common industry naming convention for general purpose register, the letter R, followed by a number was an easy decision.
使用64位处理器,Intel需要某种方式来识别64位传输,而不是32位或其他的汇编语言传输。与此同时,英特尔还推出了额外的通用寄存器。使用通用的行业命名惯例为通用寄存器,字母R,后面跟着一个数字是一个简单的决定。
However Intel was also faced with having to maintain backward compatibility for the older registers. 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. At the same time the design of the 64 bit register operations were done a bit differently than what was done for the 32 bit register operations for previous generations.
然而,英特尔也面临着必须保持对旧寄存器的向后兼容性。因此,字母R被用作16位寄存器名称的前缀,就像32位处理器一样,字母E被用作16位寄存器名称的前缀。与此同时,64位寄存器操作的设计与前几代的32位寄存器操作的设计稍有不同。
With the change from 8 bit processor to 16 bit processor, the registers were extended from 8 bits to 16 bits so the names have the letter X after the register name such as AX, BX, etc. These registers could be treated as two 8 bit registers (16 bit AX register was composed of 8 bit AH and 8 bit AL where the H represents High or most significant bits of the AX register and L represents Low or least significant bits of the AX register).
与更改从8位处理器到16位处理器,从8位寄存器是扩展到16位的名字注册后的字母X的名字如AX,BX等等。这些寄存器可以被视为两个8位寄存器(16位AX寄存器是由8位啊和8位AL H代表高或者最重要的比特AX寄存器和L代表低或AX注册的最低有效位)。
With the change from 16 bit to 32 bit processor, the registers were extended from 16 bits to 32 bits so the names have the letter E as a prefix such as EAX, EBX, etc. These registers could be treated as having two separate 16 bit components (least significant 16 bits accessed using the 16 bit name such as EAX -> AX, EBX -> BX, etc.) or four 8 bit registers (least significant 16 bits accessed as two 8 bit registers such as EAX -> AH and AL, EBX -> BH and BL, etc.) when register shifting and bitwise operations were used to move 16 bit values between the upper 16 bits and the lower 16 bit of a 32 bit register such as EAX, EBX, etc. This maintained, to some degree, what had been done with the change from 8 bit to 16 bit however direct access to the upper 16 bits of the 32 bit registers was not available the way that direct access to the upper 8 bits of the 16 bit registers in the 8086/8080 had been provided.
改变从16位、32位的处理器,从16位扩展到32位的寄存器的名称具有字母E作为前缀,如EAX,EBX等等。这些寄存器可以被视为两个独立的16位组件(最低有效16位访问使用16位名称如EAX - > AX,EBX - > BX,等等)或四个8位寄存器(最低有效16位访问两个8位寄存器如EAX - >啊和半岛,EBX - > BH和提单,等)当寄存器和位操作被用来转移16位的值上16位和低16位的32位寄存器如EAX,EBX,等等。这个维护,在某种程度上,已经完成了从8位到16位然而直接访问上32位寄存器的16位没有直接访问的方式上的8位16位寄存器在8086/8080已经提供。
Section 3.7.2.1 of Volume 1: Basic Architecture of the Intel 64 and IA-32 Architectures Software Developer's Manual which has this to say about 64 bit mode.
卷1的第3.7.2.1节:Intel 64和IA-32架构软件开发人员手册的基本架构,其中包含64位模式。
Register operands in 64-bit mode can be any of the following:
• 64-bit general-purpose registers (RAX, RBX, RCX, RDX, RSI, RDI, RSP, RBP, or R8-R15)
• 32-bit general-purpose registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP, or R8D-R15D)
• 16-bit general-purpose registers (AX, BX, CX, DX, SI, DI, SP, BP, or R8W-R15W)
• 8-bit general-purpose registers: AL, BL, CL, DL, SIL, DIL, SPL, BPL, and R8L-R15L are available using REX
prefixes; AL, BL, CL, DL, AH, BH, CH, DH are available without using REX prefixes.
• Segment registers (CS, DS, SS, ES, FS, and GS)
• RFLAGS register
• x87 FPU registers (ST0 through ST7, status word, control word, tag word, data operand pointer, and instruction
pointer)
• MMX registers (MM0 through MM7)
• XMM registers (XMM0 through XMM15) and the MXCSR register
• Control registers (CR0, CR2, CR3, CR4, and CR8) and system table pointer registers (GDTR, LDTR, IDTR, and
task register)
• Debug registers (DR0, DR1, DR2, DR3, DR6, and DR7)
• MSR registers
• RDX:RAX register pair representing a 128-bit operand
See the question and answer for x86_64 registers rax/eax/ax/al overwriting full register contents as well as Why do most x64 instructions zero the upper part of a 32 bit register which provide some explanation about how the 64 bit register operation differ from the 32 bit register operation.
请查看x86_64寄存器的问题和答案:rax/eax/ax/al重写完整的寄存器内容,以及为什么大多数x64指令为零的32位寄存器的上半部分提供了一些解释,说明64位寄存器操作与32位寄存器操作的区别。