ldr r11, [pc, #10]
mov lr, pc
mov pc, r11
I am trying to optimize it like this:
mov lr, pc
ldr pc, [pc, #10]
It calls the routine without problems, but doesn't return properly. Can anybody tell me what is wrong with the second code?
Regards,
Kornalius.
** Don't worry about the relative address location [pc, #10], it is a dummy location, it's just to get the idea!

PS: If you can find a way to optimize it even more, please let me know.