什么是"mov offset(%rip),%rax"?做? [英] what does "mov offset(%rip), %rax" do?

查看:264
本文介绍了什么是"mov offset(%rip),%rax"?做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

rax是否获得偏移量加上该指令的地址或下一条指令的地址?从微代码的角度来看,如果答案是下一条指令,则可能会更容易.

Does rax get offset plus the address of this instruction, or the next? From a microcode point of view it might be easier if the answer was the next instruction.

推荐答案

下一个.这是x86上的一般规则(另请参见分支).

The next. That's a general rule on x86 (see also branches).

在英特尔手册第2卷第2.2.1.6节"RIP相对寻址"中:

In Intel's manual volume 2 section 2.2.1.6 RIP-Relative Addressing:

一种新的寻址形式,即RIP相对(相对指令指针)寻址,是在64位模式下实现的.通过在下一条指令的64位RIP上添加位移来形成有效地址.

A new addressing form, RIP-relative (relative instruction-pointer) addressing, is implemented in 64-bit mode. An effective address is formed by adding displacement to the 64-bit RIP of the next instruction.

这篇关于什么是"mov offset(%rip),%rax"?做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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