E 和 R 前缀在英特尔 32 位和 64 位寄存器的名称中代表什么? [英] What do the E and R prefixes stand for in the names of Intel 32-bit and 64-bit registers?

查看:69
本文介绍了E 和 R 前缀在英特尔 32 位和 64 位寄存器的名称中代表什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

32 位寄存器名称以 E 开头,64 位寄存器名称以 R 开头.E 和 R 代表什么?选择这些字母有什么理由吗?

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?

此外,在 64 位寄存器中,我们也可以在任何低级调试器(例如 Windbg)中看到,最右边的位仍然使用与 64 位寄存器相同的名称,除了名称以 E 开头.例如64 位系统中 RAX 寄存器最右边的 32 位称为 EAX.

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.

那么,E 和 R 代表什么吗?还有,为什么注册后缀X?

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

推荐答案

  • R 仅代表register".AMD64 ISA 扩展添加了 8 个额外的通用寄存器,命名为 R8R15.原始 8 个寄存器的 64 位扩展版本添加了一个 R 前缀为了对称.

    • 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 代表extended"或enhanced".(维基百科说e扩展".)它们是 16-bit 寄存器,因为它们提供 16 个额外的位,总共 32 位.

      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 也表示extended"——或者它可能意味着 16,就像他的x十进制一样.* X 后缀的寄存器是 8 位寄存器的 16 位扩展版本.对于 8 位寄存器,L 后缀表示低",H 后缀表示高".

      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".

      因此,以一个特定的寄存器为例,您有 8 位 ALAH 寄存器,它们是 16 位的低字节和高字节AX寄存器,即32位EAX寄存器的低位字,即64位RAX的低位双字注册.

      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 用于助记符(例如 LXIDCX) 在 8080 上用于 处理一对的指令其他单独的 8 位寄存器作为 16 位整数,类似于 AX 表示 AH:AL 对的方式.因此,另一种可能的解释是 X 表示 pair,并且在后续处理器上命名高:低对时继续使用这种用法,包括 8086,它是一个完整的 168080 的位扩展.

      __
      * 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.

      这篇关于E 和 R 前缀在英特尔 32 位和 64 位寄存器的名称中代表什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆