Instruction Set 9-197
wrteei
Write External Enable Immediate
wrteei
Write External Enable Immediate
MSR[EE] ← E
MSR[EE] is set to the value specified by the E field.
If instruction bit 31 contains 1, the contents of CR[CR0] are undefined.
Registers Altered
• MSR[EE]
Invalid Instruction Forms:
• Reserved fields
Programming Note
Execution of this instruction is privileged.
This instruction is used to provide an atomic update of MSR[EE]. Typical usage is:
mfmsr Rn #save EE in Rn[16]
wrteei 0 #Turn off EE
• #Code with EE disabled
•
•
wrtee Rn #restore EE without affecting any MSR changes that occurred in the disabled code
Architecture Note
This instruction part of the IBM PowerPC Embedded Operating Environment.
wrteei E
31 E 163
0 6 16 17 21 31