mfc0
Move from coprocessor 0
Reads a Coprocessor 0 (CP0) control register and places its value in general-purpose register $t1.
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 state: register 8 (BadVAddr), 12 (Status), 13 (Cause), 14 (EPC), etc.
# Set CP0 vaddr register 8 to 0x1234, then read it. Inspect $t0: 0x1234.
li $t1, 0x1234
mtc0 $t1, $8
mfc0 $t0, $8