关于push sp现在的cpu都是弹入进去的都是之前是值,即10h。为什么会这样:
这条指令是个特例,是为了代码精简优化等故意而为之,cpu运行这条指令是将sp的值临时保存起来,再将sp减2,再将保存的值放入[sp-2]。
关于这个问题,英特尔有特别解释:The PUSH ESP instruction pushes the value of the ESP register as it existed before the instruction was executed. Thus 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. The POP ESP instruction increments the stack pointer (ESP) before data at the old top of stack is written into the destination.