3
votes

What does it mean to have these 3 instructions as the source of a movl instruction?

(%esi, %ecx, 4)
1

1 Answers

5
votes

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.