什么是有效地址? [英] What is an effective address?

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

问题描述

在阅读英特尔时64和IA-32体系结构软件开发人员手册,LEA指令(加载有效地址)的操作部分使用称为EffectiveAddress(SRC)的计算,在其他任何地方都未定义.

While reading the Intel 64 and IA-32 Architectures Software Developer’s Manual, the operation section for the LEA instruction (load effective address) uses a calculation called EffectiveAddress(SRC) which is not defined anywhere else.

有效地址的定义是什么,EffectiveAddress(SRC)的作用是什么?

What is the definition of effective address and what does EffectiveAddress(SRC) do?

推荐答案

相同文档状态的第3.7.5节(指定偏移量)如下:

Section 3.7.5 (Specifying an Offset) of the same document states:

内存地址的偏移量部分可以直接指定为 静态值(称为位移)或通过地址计算 由以下一项或多项组成:

The offset part of a memory address can be specified directly as a static value (called a displacement) or through an address computation made up of one or more of the following components:

  • 位移-一个8位,16位或32位值.
  • Base —通用寄存器中的值.
  • Index —通用寄存器中的值.
  • 比例因子-2、4或8的值乘以索引值.
  • Displacement — An 8-, 16-, or 32-bit value.
  • Base — The value in a general-purpose register.
  • Index — The value in a general-purpose register.
  • Scale factor — A value of 2, 4, or 8 that is multiplied by the index value.

由于添加了这些分量而产生的偏移量称为 有效地址.这些成分中的每一个都可以具有正数 或负(2s补码)值(缩放比例除外) 因素.

The offset which results from adding these components is called an effective address. Each of these components can have either a positive or negative (2s complement) value, with the exception of the scaling factor.

EffectiveAddress 使用以下方法计算有效地址:

Base + (Index*Scale) + Displacement

这篇关于什么是有效地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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