AMD的CPU寄存器是否不同? "rax"如何?与"eax"有何不同? [英] Does AMD have different CPU registers? How is "rax" different from "eax"?

查看:1530
本文介绍了AMD的CPU寄存器是否不同? "rax"如何?与"eax"有何不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读黑客:剥削的艺术".

I'm reading "Hacking: The Art of Exploitation".

在书中,寄存器与我在电脑上看到的寄存器不同.这些是我的cpu寄存器:

In the book the registers are different from the registers that I can see on my pc. These are my cpu registers:

rax, rbx, rcx, rdx, rsi, rdi, rbp, rsp, r8, r9, r10, r11, r12, r13, r14, r15, 撕裂 旗语 CS, ss, ds, es, fs, gs

rax, rbx, rcx, rdx, rsi, rdi, rbp, rsp, r8, r9, r10, r11, r12, r13, r14, r15, rip, eflags, cs, ss, ds, es, fs, gs

在书中,寄存器是:

eax, ecx, edx, ebx, 尤其是 ebp, 埃西 edi, ip 旗语 CS, ss, ds, es, fs, gs

eax, ecx, edx, ebx, esp, ebp, esi, edi, eip, eflags, cs, ss, ds, es, fs, gs

有人可以解释为什么他们与众不同吗?可能是因为我运行的是AMD CPU?

Can someone explain why they are different? It's possible because I'm running on a amd cpu?

在这种情况下,有人可以解释一下两种体系结构的寄存器之间的对应关系吗?

In this case can someone explain me the correspondence between the registers of the two architecture?

推荐答案

raxrbx等开头的以r开头的寄存器是引入的 64位寄存器.使用 AMD64扩展到现有的32位x86 ISA. ISA扩展随后被Intel采纳,并且通常以更中性的名称 x86-64 广为人知.基本上,过去十年中AMD和Intel发行的所有x86芯片都支持此ISA.

The registers starting with r as in rax, rbx, etc, are the 64-bit registers introduced with the AMD64 extension to the existing 32-bit x86 ISA. That ISA extension was subsequently adopted by Intel and is often known by the more neutral name x86-64. Essentially all x86 chips released in the last decade from AMD and Intel support this ISA.

诸如eaxebx等的寄存器是32位寄存器,它们既存在于原始的32位x86 ISA中,也存在于64位x86-64中.如果您的书仅将 指向这些寄存器,则很可能它没有涵盖64位扩展名(也许是在它之前写的).

Registers like eax, ebx, etc are the 32-bit registers which exist both in the original 32-bit x86 ISA, as well as the 64-bit x86-64. If your book refers only to those registers, it is likely that it doesn't cover the 64-bit extension (perhaps it was written before it).

请注意,由于32位和64位寄存器重叠,因此它们不是分开的寄存器:例如,64位rax的底部32位为eax,对于rbxebxr8r8d等.因此,对32位寄存器的修改会反映在相应的64位寄存器中,反之亦然.

Note that the 32-bit and the 64-bit registers are not separate registers since they overlap: the 64-bit rax, for example, has eax as its bottom 32-bits, and so on for rbx and ebx, r8 and r8d and so on. Therefore, modifications to a 32-bit register are reflected in the corresponding 64-bit register, and vice versa.

16位(ax等)和8位(al等)寄存器之间存在相似的关系.您可以在很多地方中找到所有详细信息.

A similar relationship exists among the 16-bit (ax, etc) and 8-bit (al, etc) registers. You can find all the gory details in many places.

这篇关于AMD的CPU寄存器是否不同? "rax"如何?与"eax"有何不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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