来自 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 Microprocessor Programmer's Reference Manual已修复,请参阅第 226 页。
关于x86 - 为什么 IRET 指令会将 EIP 加 4?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68421626/