Hacker News new | past | comments | ask | show | jobs | submit login

From what I can tell, yes. ldr r0, =0x20200000 loads from memory. In C, r0 = *0x20200000; what we would want is just r0 = 0x20200000; or mov r0, #0x20200000



They have it right, LDR acts differently if it's a register argument or register plus offset vs a immediate.

The immediate pseudo-instruction:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....

The regular form:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: