ARM v7 ADD vs. LDR
Is there any difference between the following instruction (besides flags affection)?
开发者_运维知识库ADD R6, SP, #0xDC
and
LDR R6, [SP, #0xDC]
ADD adds numbers, LDR loads data from memory to registers.
ADD R6, SP, #0xDC -> R6 = SP + 0xDC
LDR R6, [SP, #0xDC] -> R6 = memory_contents_of_address(SP + 0xDC)
精彩评论