mfc0
Move from coprocessor 0
Reads the second register, a Coprocessor 0 (CP0) control register, and places its value in the first, a general-purpose register.
Used in
- Exceptions and coprocessor 0MIPS assembly
Forms
mfc0 ,
Operands
$t1- Any general-purpose register,
$0to$31, using its numeric or named spelling, such as$8or$t0($zerois$0;$rais$31). $8- A coprocessor 0 register, written by number:
$8(vaddr),$12(status),$13(cause) or$14(epc).
CP0 registers hold exception, interrupt and timer state: register 8 (BadVAddr), 9 (Count), 11 (Compare), 12 (Status), 13 (Cause) and 14 (EPC).
# Set CP0 vaddr register 8 to 0x1234, then read it. Inspect $t0: 0x1234.
li $t1, 0x1234
mtc0 $t1, $8
mfc0 $t0, $8