[英]Why would the IRET instruction increment EIP by 4?
来自 Intel 80386 程序员参考手册:
IRET is similar to RET except that IRET increments EIP
by an extra four bytes (because of the flags on the stack) and moves the
saved flags into the EFLAGS register.
我不完全明白为什么 IRET 会增加 EIP。 我所知道的是,在跳转到 ISR 之前,EFLAGS 被推送(除其他外); 当 ISR 完成(并调用 IRET)时,它会从堆栈中弹出。 这与 EIP 有什么关系?
这是手册中的一个错字,应该说“增加 ESP”。 i486 微处理器程序员参考手册对其进行了修复,请参见第 226 页。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.