This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to know the specific cycles of every arm instruction (armV7,cortex-a8) while executing in asm file?

how to know the specific cycles of every arm instruction (armV7,cortex-a8) while executing in asm form?

if there are some documents which describes it in detail?

In Chinese:

我目前用cortex-A8(armV7)来开发项目,由于一些算法需要在ARM端跑,算法需要优化,需要写arm汇编指令,

想知道,armv7每个指令执行消耗的周期,是否有这样的文档专门描述指令执行周期?

BRS,

Meng

  • The Technical Reference Manual gives instructions timings:

    Cortex-A8 Technical Reference Manual: Chapter 16. Instruction Cycle Timing

    Note, that the cycles needed by a particular instruction depends on the instructions that came before it.  So it's not as simple as just totalling the values for each instruction.

    Also the figures given in the TRM are for the execution of the instruction itself.  They don't take into account things like delays due to cache misses.

    EDIT: The other approach is to record the cycles needed using the Performance Monitor Unit.  This can work well for a block of instructions, but is not suited to measuring the cycles of a single instruction.  Also the number of cycles might vary between runs, again depending on things like cache misses.  It depends on what you care about.