是什么给定行做臂总成,什么是每个变量的目的是什么? [英] what does the given line do in arm assembly and what is the purpose of each variable?

查看:187
本文介绍了是什么给定行做臂总成,什么是每个变量的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问这个线组装的手臂呢?

what does this line in assembly arm does?

mrc p15, 0, %0, c9, c13, 0" : : "r" (counter)

谁是 P15 是不是应该是 R15 所有其他的什么?

who is p15 isn't it should be r15 what are all the others?

什么谁是 C9,C1 什么是每个参数的作用是什么?

what is :: who are c9, c1 what is the role of each argument?

推荐答案

虽然 MRC 是一个通用的协处理器,运算间的指令, CP15 控制处理器的 - 它所有的现代ARM CPU有这个已经使用了ARM是扩展指令片为单位进行设置,如高速缓存的手段, MMU,性能监控和许多其他之外。

Whilst MRC is a generic co-processor inter-op instruction, cp15 is the control processor - which all modern ARM CPUs have and this has been used by ARM was a means of extending the instruction set for on-chip units such as the cache, MMU, performance monitoring and lots else besides.

在一个时间以你的指令了一下:

Taking your instruction a bit at a time:

MRC P15,0,0%,C9,C13,0:R(计数器)

根据<一href=\"http://infocenter.arm.com/help/topic/com.arm.doc.ddi0464d/DDI0464D_cortex_a7_mpcore_r0p3_trm.pdf\"相对=nofollow>的ARM Cortex A7 MPCore的参考的指令格式为:

MRC {COND} P15,&LT;欧普code_1&GT中,&lt;路&GT中,&lt; CR n的&GT中,&lt; CRM和GT中,&lt;欧普code_2&GT;

和上页4-11这个被描述为CPU寄存器转移到性能监视器计数寄存器(我猜数= 0 ,这是一个复位性能计数器)。

And on Page 4-11 this is described as a transfer of a CPU register to the performance monitor count register (I guess count=0 and this is a reset of the performance counter).

作为内联汇编的语法。参考为86概述 - 这可能是相似的手臂。

As for the syntax of inline assembler. refer to this for a x86 overview - which is probably similar to ARM.

:R(计数器)表示指令有:


  • 在寄存器中无输出,需要在一个局部变量来结束

  • 从注意到变量计数输入,寄存器这是应作为 0%

  • 有没有副作用,编译器应该是知道的(则会覆盖)

  • No output in a register that needs to end up in a local variable
  • Takes input from variable counter, and the register this is in should be used as %0.
  • There are no side effects the compiler ought to be aware of (clobbers)

这篇关于是什么给定行做臂总成,什么是每个变量的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆