Encoding:

POOL32A

000000

0

00000

rs

EI

0101011101

POOL32AXf

111100

6

5

5

10

6

Format:

EI 

microMIPS

Enable Interrupts

EI rs

microMIPS

Enable Interrupts

Purpose:

Enable Interrupts

To return the previous value of the Status register and enable interrupts. If EI is specified without an argument, GPR r0 is implied, which discards the previous value of the Status register.

Description:

 GPR[rt] = Status; StatusIE = 1

The current value of the Status register is sign-extended and loaded into general register rt. The Interrupt Enable (IE) bit in the Status register is then set.

Restrictions:

If access to Coprocessor 0 is not enabled, a Coprocessor Unusable Exception is signaled.

In implementations prior to Release 2 of the architecture, this instruction resulted in a Reserved Instruction exception.

Operation:

data = Status
GPR[rs] = sign_extend(data)
StatusIE = 1

Exceptions:

Coprocessor Unusable

Reserved Instruction (Release 1 implementations)

Programming Notes:

The effects of this instruction are identical to those accomplished by the sequence of reading Status into a GPR, setting the IE bit, and writing the result back to Status. Unlike the multiple instruction sequence, however, the EI instruction cannot be aborted in the middle by an interrupt or exception.

This instruction creates an execution hazard between the change to the Status register and the point where the change to the interrupt enable takes effect. This hazard is cleared by the EHB, JALR.HB, JR.HB, or ERET instructions. Software must not assume that a fixed latency will clear the execution hazard.