14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Version</strong> <strong>2.03</strong><br />

Write MSR External Enable X-form Write MSR External Enable Immediate<br />

X-form<br />

wrtee RS<br />

wrteei RS<br />

31 RS /// /// 131 /<br />

0 6 11 16 21 31 31 RS /// E /// 163 /<br />

0 6 11 16 17 21 31<br />

MSR EE ← (RS) 48<br />

The content of (RS) 48 is placed into MSR EE .<br />

Alteration of the MSR EE bit is effective as soon as the<br />

instruction completes. Thus if MSR EE =0 and an External<br />

interrupt is pending, executing a wrtee instruction<br />

that sets MSR EE to 1 will cause the External interrupt to<br />

occur before the next instruction is executed, if no<br />

higher priority exception exists (Section 5.9, “Exception<br />

Priorities” on page 569).<br />

Execution of this instruction is privileged.<br />

Special Registers Altered:<br />

MSR<br />

MSR EE ← E<br />

The value specified in the E field is placed into MSR EE .<br />

Alteration of the MSR EE bit is effective as soon as the<br />

instruction completes. Thus if MSR EE =0 and an External<br />

interrupt is pending, executing a wrtee instruction<br />

that sets MSR EE to 1 will cause the External interrupt to<br />

occur before the next instruction is executed, if no<br />

higher priority exception exists (Section 5.9, “Exception<br />

Priorities” on page 569).<br />

Execution of this instruction is privileged.<br />

Special Registers Altered:<br />

MSR<br />

Programming Note<br />

wrtee and wrteei are used to provide atomic<br />

update of MSR EE . Typical usage is:<br />

mfmsr Rn #save EE in (Rn) 48<br />

wrteei 0 #turn off EE<br />

mfmsr Rn #save EE in (Rn) 48<br />

wrteei 0 #turn off EE<br />

: : :<br />

: #code with EE disabled<br />

wrtee Rn #restore EE without altering<br />

#other MSR bits that might<br />

#have changed<br />

506<br />

<strong>Power</strong> ISA -- Book III-E

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!