컴퓨터 과학 & 영상처리 관련/임베디드
ldr 에서 pre-indexed(선증가), post-indexed(후증가)
꺄뜨르
2012. 4. 26. 01:45
ldr r0,[r1, #4]! //요거 그대로 해석해도 일단 r1+4하고 그 다음에 증가하는걸 알 수 있네
ldr r0,[r1],#4 요건...왜 !가 없냐? 왜?
ldm의 경우 !...머냐?
<Rn> Specifies the base register used by <addressing_mode>. Using R15 as the base register <Rn>
gives an UNPREDICTABLE result.
! Sets the W bit, causing the instruction to write a modified value back to its base register Rn
as specified in Addressing Mode 4 - Load and Store Multiple on page A5-41. If ! is omitted,
the W bit is 0 and the instruction does not change its base register in this way. (However, if
the base register is included in <registers>, it changes when a value is loaded into it.)