C++
ATT Assembly
I\'m trying to understand the behavior of the following two instructions:
pushl %esp
As it says about push esp
in Intel® 64 and IA-32 Architectures Developer's Manual: Combined Volumes:
The PUSH ESP instruction pushes the value of the ESP register as it existed
before the instruction was executed. If a PUSH instruction uses a memory operand
in which the ESP register is used for computing the operand address, the address
of the operand is computed before the ESP register is decremented.
And as regards to pop esp
:
The POP ESP instruction increments the stack pointer (ESP) before data at the old
top of stack is written into the destination.