Search code examples
assemblypowerpc

What is the MTMSREE PowerPC op?


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.


Solution

  • 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

    • Luke H