ARM中CP的操作指令MCR/MRC详解

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中

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值