x86简单mov指令 [英] x86 simple mov instruction
问题描述
这是一个简单的问题,但我在Google上找不到可靠的答案.
This is a simple question but I can't find reliable answers on google.
此说明是什么意思:
movl %eax, (%esi, %ecx, 4)
是否会将寄存器eax
中的值移动到(%esi, %ecx, 4)
指向的内存中的值?
Is it move the value at register eax
to the value in memory that (%esi, %ecx, 4)
is pointing too?
(%esi, %ecx, 4)
用于数组.因此,这意味着Array [Xs + 4i],其中Xs是Array内存中的起点,而i只是整数数组中的偏移量.
(%esi, %ecx, 4)
is for an array. So it means Array[Xs + 4i] where Xs is the starting point in memory for the Array and i is just an offset in the integer array.
推荐答案
完全正确.这是AT& T语法,因此源首先出现,然后是目的地.因此,它将eax
寄存器的内容存储到存储位置esi + 4*ecx
.
Exactly correct. This is AT&T syntax, so the source comes first, then the destination. Thus, it stores the contents of the eax
register to the memory location esi + 4*ecx
.
如果您想将其视为一个数组,它会将eax
存储到基于esi
的4字节对象数组的第ecx
个条目.
If you like to think of this as an array, it stores eax
to the ecx
th entry of an array of 4-byte objects based at esi
.
这篇关于x86简单mov指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!