有哪些x86指令会影响ESP的副作用? [英] What are the x86 instructions that affect ESP as a side effect?
问题描述
我知道call
和ret
会修改esp
的值,并且push
和pop
有许多变体,但是还有其他指令会影响堆栈指针吗? >
I know that call
and ret
will modify the value of esp
and that push
and pop
have a number of variants, but are there other instructions that will affect the stack pointer ?
推荐答案
以下说明修改了堆栈指针 1 :
The following instructions modify the stack pointer1:
-
call
-
enter
-
int n/into/int 3
-
iret/iretd
-
leave
-
pop
-
push
-
ret
-
sysenter
-
sysexit
-
pusha/pushad
-
popa/popad
-
pushf/pushfd/pushfq
-
popf/popfd/popfq
-
vmlaunch/vmresume
-
eexit
call
enter
int n/into/int 3
iret/iretd
leave
pop
push
ret
sysenter
sysexit
pusha/pushad
popa/popad
pushf/pushfd/pushfq
popf/popfd/popfq
vmlaunch/vmresume
eexit
我要把区分主要和副作用的负担留给您.
I leave to you the burden of telling primary and side effects apart.
请记住,任何能够生成异常的指令都可能会修改堆栈指针.
为了避免使您的问题变得无关紧要,我没有考虑过此类说明.
Keep in mind that any instruction capable of generating an exception can potentially modify the stack pointer.
I've not considered such instructions in order to avoid trivializing your question.
这些都是我在创建此答案时可以通过搜索英特尔手册找到的所有说明.
当我尽力检查手册时,我不会对那个清单发誓.
Those are all the instructions I can find by searching the Intel manuals at the time of creation of this answer.
While I did my best scrutinizing the manuals I wouldn't swear to that list.
1 SP
,ESP
或RSP
.
这篇关于有哪些x86指令会影响ESP的副作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!