汇编 – iret和iretd之间的区别是什么?

汇编 – iret和iretd之间的区别是什么?,第1张

概述我想模拟 Linux x86_64服务器上的iret条件. 我发现有三条指令 > iret: *** 作数大小16 > iretd: *** 作数大小32 > iretq: *** 作数大小为64 我无法区分它们,以及使用哪一个. 谢谢任何人的帮助!! 我有另外一个关于模拟iret的问题,你能看看吗?http://stackoverflow.com/questions/11756274/how-to-simulate-a 我想模拟 Linux x86_64服务器上的iret条件.
我发现有三条指令

> iret: *** 作数大小16
> iretd: *** 作数大小32
> iretq: *** 作数大小为64

我无法区分它们,以及使用哪一个.
谢谢任何人的帮助!!

我有另外一个关于模拟iret的问题,你能看看吗?http://stackoverflow.com/questions/11756274/how-to-simulate-a-iret-on-linux-x86-64

解决方法 从这 link:

IRET returns from an interrupt (harDWare or software) by means of
popPing IP (or EIP),CS,and the flags off the stack and then
continuing execution from the new CS:IP.

IRETW pops IP,CS and the flags as 2 bytes each,taking 6 bytes off
the stack in total. IRETD pops EIP as 4 bytes,pops a further 4 bytes
of which the top two are discarded and the bottom two go into CS,and
pops the flags as 4 bytes as well,taking 12 bytes off the stack.

IRET is a shorthand for either IRETW or IRETD,depending on the
default BITS setting at the time.

与IRETQ非常相似

总结

以上是内存溢出为你收集整理的汇编 – iret和iretd之间区别是什么?全部内容,希望文章能够帮你解决汇编 – iret和iretd之间的区别是什么?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1027163.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存