[Cortex-M0技术交流] cortex-m0 有没有空指令?

[复制链接]
 楼主| robotouch 发表于 2014-4-2 20:22 | 显示全部楼层 |阅读模式
请教前辈,cortex-m0 有没有空指令,类似于C51中的NOP这样的指令。不胜感谢!
john_lee 发表于 2014-4-3 12:45 | 显示全部楼层
没有专门的“空指令”,一般是用源寄存器和目的寄存器相同的 mov 指令代替,比如:mov r8, r8 等等。
amwrdfe 发表于 2014-4-3 12:59 | 显示全部楼层


Cortex-M0 instruction

3.7.8 NOP
No operation.
Syntax
NOP
Operation
NOP does nothing. NOP is not necessarily a time-consuming NOP. The processor might
remove it from the pipeline before it reaches the execution stage.
Use NOP for padding, for example to place the following instruction on a 64-bit boundary.
Restrictions
None
Condition flags
This instruction does not change the flags.
Examples
NOP ; No operation

 楼主| robotouch 发表于 2014-4-4 14:18 | 显示全部楼层
john_lee 发表于 2014-4-3 12:45
没有专门的“空指令”,一般是用源寄存器和目的寄存器相同的 mov 指令代替,比如:mov r8, r8 等等。 ...

谢谢前辈
 楼主| robotouch 发表于 2014-4-4 14:19 | 显示全部楼层
amwrdfe 发表于 2014-4-3 12:59


Cortex-M0 instruction

谢谢前辈
您需要登录后才可以回帖 登录 | 注册

本版积分规则

58

主题

313

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部