新的 X86_64 处理器寄存器的名称是什么? [英] What are the names of the new X86_64 processors registers?

查看:34
本文介绍了新的 X86_64 处理器寄存器的名称是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以找到该架构上用于汇编的新寄存器的名称?

Where can I find the names of the new registers for assembly on this architecture?

我指的是 X86 中的寄存器,如 EAX、ESP、EBX 等.但我希望它们是 64 位的.

I am referring to registers in X86 like EAX, ESP, EBX, etc. But I'd like them in 64bit.

我认为它们与反汇编 C 代码时不同,我得到的是 r 而不是 e.

I don't think they are the same as when I disassemble my C code, I get r's instead of e's.

推荐答案

旧的 32 位寄存器已经扩展到 64 位,r 寄存器 (rax,rbxrsp 等等).

The old 32-bit registers have been extended to 64 bits, the r registers (rax, rbx, rsp and so on).

此外,还有一些额外的通用寄存器 r8r15 也可以作为(例如)r8d 访问>r8wr8b(分别为低 32 位双字、16 位字和 8 位字节).b 后缀是原始的 AMD 命名法,但有时您会看到它写为低字节"的 l(小写 L).

In addition, there's some extra general purpose registers r8 through r15 which can also be accessed as (for example) r8d, r8w and r8b (the lower 32-bit double-word, 16-bit word and 8-bit byte respectively). The b suffix is the original AMD nomenclature but you'll sometimes see it written as l (lower case L) for "low byte".

我自己倾向于使用 b 后缀(即使当前的低字节寄存器是 albl 等)因为它匹配 d/w = double/word 名称并且 l 可能会被误认为 long.或者,更糟糕的是,数字 1,导致您质疑注册号 81 到底是什么:-)

I tend to prefer the b suffix myself (even though the current low-byte registers are al, bl, and so on) since it matches the d/w = double/word names and l could potentially be mistaken for long. Or, worse, the digit 1, leading you to question what the heck register number 81 is :-)

旧的 16 位寄存器的高字节仍然可以访问,在许多情况下,如 ahbh 等(尽管这似乎不是新的 r8r15 寄存器的情况).有一些新的指令编码,特别是那些使用REX前缀的,不能访问那些原始的高字节,但其他的仍然可以自由使用它们.

The high bytes of the old 16-bit registers are still accessible, under many circumstances, as ah, bh, and so on (though this appears to not be the case for the new r8 through r15 registers). There are some new instruction encodings, specifically those using the REX prefix, that can not access those original high bytes, but others are still free to use them.

此外,还有一些新的 SSE 寄存器,xmm8xmm15.

In addition, there's some new SSE registers, xmm8 though xmm15.

eipeflags 寄存器也被扩展到 riprflags(尽管高 32 位rflags 的数量,目前,仍未使用).

The eip and eflags registers have also been extended to rip and rflags(though the high 32 bits of rflags are, for now, still unused).

请参阅维基百科页面MSDN 了解更多详情.

See the wikipedia page and MSDN for more details.

对于特定的 C 编译器,asm 关键字是否支持这些,我不能说.我所做的小程序(现在大约一年一天)是在程序集而不是 C 中完成的.

Whether these are supported in the asm keyword for a particular C compiler, I couldn't say. What little assembly I do (and it's becoming about one day a year) is done in assembly rather than C.

相关:

这篇关于新的 X86_64 处理器寄存器的名称是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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