what does "movl (%esi, %ecx, 4), eax" imply?
What does it mean to have these 开发者_如何学C3 instructions as the source of a movl instruction?
(%esi, %ecx, 4)
It means:
Calculate Address = (ESI + ECX * 4). Read the value into EAX from 32-bit value at that memory address.
From the linked article:
GAS instructions generally have the form:
mnemonic source, destination
.
See: http://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax
Personally I prefer the more readable MASM syntax
mov EAX, dword ptr [ESI + ECX * 4]
^ ^
| +-- source in a readable syntax
+-------- destination
Which has the form: mnemonic destination, source
(exactly the other way round).
Comment
Oh and what you call instructions, are really parameters
.
The instruction is the whole statement.
精彩评论