17.01.2013 Views

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

MIPS R10000 Microprocessor User's Manual - SGI TechPubs Library

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.

292 Chapter 14.<br />

14.30 ERET Instruction<br />

ERET<br />

31 26 25 24<br />

Format: ERET<br />

Description:<br />

Operation:<br />

Exceptions:<br />

ERET is the <strong>R10000</strong> instruction for returning from an interrupt, exception, or error trap.<br />

Unlike a branch or jump instruction, ERET does not execute the next instruction.<br />

ERET must not itself be placed in a branch delay slot.<br />

If the processor is servicing an error trap (SR 2 = 1), then load the PC from the ErrorEPC<br />

and clear the ERL bit of the Status register (SR 2 ). Otherwise (SR 2 = 0), load the PC from<br />

the EPC, and clear the EXL bit of the Status register (SR 1 ).<br />

An ERET executed between a LL and SC also causes the SC to fail.<br />

If there is no exception (EXL=0 and ERL=0 in the Status register), execution of an ERET<br />

instruction is meaningless.<br />

Execution of an ERET when ERL=0, regardless of the state of EXL, sets EXL to 0 and a<br />

jump is taken to the address presently held in the EPC register, even when there is no<br />

exception.<br />

Coprocessor unusable exception<br />

Exception Return<br />

Version 2.0 of January 29, 1997 <strong>MIPS</strong> <strong>R10000</strong> <strong>Microprocessor</strong> <strong>User's</strong> <strong>Manual</strong><br />

ERET<br />

COP0<br />

0 1 0 0 0 0<br />

CO<br />

1<br />

0<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />

ERET<br />

0 1 1 0 0 0<br />

6<br />

1<br />

19<br />

6<br />

32, 64 T: if SR 2 = 1 then<br />

PC ← ErrorEPC<br />

SR ← SR 31...3 || 0 || SR 1...0<br />

else<br />

PC ← EPC<br />

SR ← SR 31...2 || 0 || SR 0<br />

endif<br />

LLbit ← 0<br />

6 5<br />

0

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

Saved successfully!

Ooh no, something went wrong!