1. MCR, 將ARM中normal register的值傳向CP register.
format: mcr cpx, op1, src_reg, dst_reg1, dst_reg2, op2 /* op, operation code; src, source; dst, destination */
cpx: Integer in the range 0~15 defining coprocessor.
op1: Integer in the range 0~7 selecting different coprocessor functions
src_reg: Integer in the range 0~15 defining GP register in the processor core containing the value to read or write
dst_reg1: Integer in the range 0~15 defining the target coprocessor register.
dst_reg1: integer in the range 0~15 selecting across banks of 16 coprocessor registers
op2: integer in the range 0~7 selecting different coprocessor functions.
e.g. mcr p15, 0, r0, c7, c7, 0 /* flush V3/V4 cache */
explain: 此操作將r0中的值傳入cp15的c7中
2. MRC, 將ARM中CP register的值傳向normal register 中。
format: mrc cpx, op1, dst_reg, src_reg1, src_reg2, op2
e.g. mrc p15, 0, r0, c1, c0, 0
explain: 此操作將p15中c1和c0的值存入到r0中