A SERVICE OF

logo

wrteei
Write External Enable Immediate
Preliminary PPC440x5 CPU Core User’s Manual
instrset.fm.
September 12, 2002 Page 447 of 589
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 Notes
Execution of this instruction is privileged.
This instruction is typically used as part of a code sequence which can provide the equivalent of an atomic
read-modify-write of the MSR, as follows:
mfmsr Rn #save EE in Rn[16]
wrteei 0 #Turn off EE (leaving other bits unchanged)
#Code with EE disabled
wrtee Rn #restore EE without affecting any MSR changes that occurred in the disabled code
wrteei E
31 E 163
0 6 16 17 21 31