Encoding:

SPECIAL

000000

rs

0

000 0000 0000 0000

MTLO

010011

6

5

15

6

Format:

MTLO rs

MIPS32, removed in Release 6

Move to LO Register

Purpose:

Move to LO Register

To copy a GPR to the special purpose LO register.

Description:

 LO = GPR[rs]

The contents of GPR rs are loaded into special register LO.

Restrictions:

A computed result written to the HI/LO pair by DIV, DIVU, DDIV, DDIVU, DMULT, DMULTU, MULT, or MULTU must be read by MFHI or MFLO before a new result can be written into either HI or LO.

If an MTLO instruction is executed following one of these arithmetic instructions, but before an MFLO or MFHI instruction, the contents of HI are UNPREDICTABLE. The following example shows this illegal situation:

MULT  r2,r4 # start operation that will eventually write to HI,LO
...          # code not containing mfhi or mflo
MTLO  r6
...          # code not containing mfhi
MFHI  r3    # this mfhi would get an UNPREDICTABLE value

Availability and Compatibility:

This instruction has been removed in Release 6.

Operation:

LO = GPR[rs]

Exceptions:

None

Historical Information:

In MIPS I-III, if either of the two preceding instructions is MFHI, the result of that MFHI is UNPREDICTABLE.

Reads of the HI or LO special register must be separated from any subsequent instructions that write to them by two or more instructions. In MIPS IV and later, including MIPS32 and MIPS64, this restriction does not exist.