Encoding:

EXTEND

11110

CP0

000

sel[2:0]

000

SETBIT_NORES

00111

I8

01100

MOVR32

111

000

01100

EXTEND

11110

CP0

000

sel[2:0]

000

SETBIT

00011

I8

01100

MOVR32

111

ry

01100

5

3

3

5

5

3

3

5

Format:

EI 

MIPS16e2

Enable Interrupts Extended

EI ry

MIPS16e2

Enable Interrupts Extended

Purpose:

Enable Interrupts Extended

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[ry] = Status; StatusIE = 1

The current value of the Status register is loaded into general register ry. The Interrupt Enable (IE) bit in the Status register is then set.

Restrictions:

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

Operation - EI:

The following operation pertains to the EI instruction.

StatusIE = 1

Operation - EI ry:

The following operation pertains to the EI ry instruction.

data = Status
GPR[XLat[ry]] = data
StatusIE = 1

Exceptions:

Coprocessor Unusable

Reserved Instruction

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.