The difference between MOV and LDR
来源:互联网 发布:wow 3.3数据库 编辑:程序博客网 时间:2024/06/08 18:22
Although the MOV/MVN mechansim will load a large range of constants
into a register, sometimes this mechansim will not generate the required
constant.
*Therefore, the assembler also provides a method which will loadANY32bit constant:
•LDR rd,=numeric constant
*If the constant can be constructed using either a MOV or MVN then thiswill be the instruction actually generated.
*Otherwise, the assembler will produce an LDR instruction with a PC relativeaddress to read the constant from a literal pool.
•LDR r0,=0x42 ; generates MOV r0,#0x42
•LDR r0,=0x55555555 ; generate LDR r0,[pc, offset to lit pool]
*As this mechanism will always generate the best instruction for a givencase, it is the recommended way of loading constants.
mov指令限制了立即数的长度为8位,也就是不能超过512。而ldr伪指令没有这个限制。如果使用ldr伪指令时,后面跟的立即数没有超过8位,那么在实际汇编的时候该ldr伪指令是被转换为mov指令的。
http://blog.csdn.net/tommy123_woo/article/details/7456006
- The difference between MOV and LDR
- difference between ldr and ldr.w
- The difference between (()) and ().
- the difference between "./" and "sh"
- the difference between the SOURCELIBS and TARGETLIBS
- The difference between Const and ReadOnly
- The difference between Failure and Success
- The difference between Process and Procedure
- The difference between GetDC and GetWindowDC
- The difference between Chinese and American
- The difference between J2ee and Ruby
- The difference between SendMessage and PostMessage
- The difference between lint and gcc
- The difference between sizeof and strlen
- The Difference Between Internet, Intranet, and Extranet
- The difference between CLOCK_MONOTONIC and CLOCK_REALTIME
- The difference between UTF8 and AL32UTF8
- Learn the difference between SCSI and IDE
- Java基础_DOS命令、Java跨平台性、技术架构、环境搭建和运行、注释、需求分析
- Exchange 2010 邮箱大小限制原则
- 吐吐槽,swt的相关dll文件!
- 台式机集成显卡与独立显卡一起工作!!
- hibernate二级缓存
- The difference between MOV and LDR
- QT 编译常见错误:usr/bin/ld: cannot find
- ACE学习之定时器(Timer)
- Android短信转发默认不需要转发号码修改方法
- Shell脚本调试技术
- 动态监听配置示例
- 面试题43:丑数
- 边看边写(排列组合及丑数问题 )
- 多态的三个必要条件