什么是 MTMSREE PowerPC 操作?
我正在查看使用 MSVC 编译的 (Xenon) PowerPC 可执行文件的核心转储。我正在调试的函数有一个 MSVC 反汇编程序调用 mtmsree r13
的操作。 mtmsree
不在 PPC 的 IBM 文档中;这个操作是做什么的?
它紧跟在 mfmsr
后面,显然它正在将某些内容移动到机器状态寄存器,但我不知道 ee
后缀的含义是什么。这一定是微软给 PPC 文档所称的不同操作的某种可爱的昵称。
I'm looking at a core dump of a (Xenon) PowerPC executable compiled with MSVC. The function I'm debugging has an op that the MSVC disassembler calls mtmsree r13
. mtmsree
isn't in the IBM docs for the PPC; what does this op do?
It immediately follows a mfmsr
and obviously it's moving something to the machine state register, but I don't know what that ee
suffix is supposed to mean. It must be some sort of cutesy Microsoft nickname for an op the PPC docs call something different.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该指令是设置了 L 位 (0x00010000) 的 mtmsrd 指令的扩展形式。它不修改整个MSR,只修改EE(外部中断使能)和RI(可恢复中断)btis。它比 mtmsrd L=0 更快,因为它执行同步而不是上下文同步。这是一条特权指令,因此会导致操作系统异常,并且仍然很慢。
IBM 的 Book III:PowerPC Operating Environment Architecture v2.02(第 91 页)中有相关的公共文档,http://www.ibm.com/developerworks/power/library/pa-archguidev2/?S_TACT=105AGX16&S_CMP=LP
The instruction is an extended form of the mtmsrd instruction that has the L bit set (0x00010000). Instead of modifying the entire MSR, it only modifies the EE (External interrupt Enable) and RI (Recoverable Interrupt) btis. It is faster than mtmsrd L=0 as it execution synchronizing instead of context synchronizing. It is a priviledged instruction so will cause an exception to the os, and is .: still slow.
There is public documentation for this in IBM's Book III: PowerPC Operating Environment Architecture v2.02 (page 91), http://www.ibm.com/developerworks/power/library/pa-archguidev2/?S_TACT=105AGX16&S_CMP=LP
mtmsr 指令的位 21:30 是 0010010010,而不是 0010110010。
我的猜测是 mtmsree 是 Xenon 特定指令,仅设置 MSR 中的 EE 位。 Book E 机器有 wrtee 和 wrteei 指令来执行此操作。我希望我知道在哪里可以找到用于氙气的 PEM。
Bits 21:30 of the mtmsr instruction are 0010010010, not 0010110010.
My guess is that mtmsree is a Xenon-specific instruction that sets only the EE bit in the MSR. The Book E machines have the wrtee and wrteei instructions to do that. I wish I knew where to find a PEM for Xenon.
我拆解了该指令的机器代码 (
011111 01101 00001 00000 0010110010 0
),结果发现mtmsree
就是其他人所说的mtmsrd
。I picked apart the machine code for the instruction (
011111 01101 00001 00000 0010110010 0
) and it turns out thatmtmsree
is what everyone else just callsmtmsrd
.