mfhi

Move from HI

Copies the special HI register into $t1.

Forms

  • mfhi

Operands

$t1
Any general-purpose register, $0 to $31, using its numeric or named spelling, such as $8 or $t0 ($zero is $0; $ra is $31).

HI holds the upper 32 bits of a multiply result or the remainder from a divide. Always read HI/LO before executing another multiply or divide, as those instructions overwrite them.

# Read the initialized HI/LO result after multiplication. Inspect $t2: 0.
li $t0, 6
li $t1, 7
mult $t0, $t1
mfhi $t2