I am trying to work my way through an Intel assembly file and I ran into a bit of code I don’t understand.
# Save current stack pointer to old thread's stack, if any.
movl SWITCH_CUR(%esp), %eax
movl %esp, (%eax,%edx,1)
I understand that the first line moves the value of 12 offset from register %esp into the register %eax.
But I don’t understand what the second line does it moves %esp into what.
Is (%eax,%edx,1) a logical and operation? Or addition?
Any help would be great.
Thanks
The meaning is
The number can be 1, 2, 4 or 8.
See http://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax