In an ARM assembly, immediate elements are encoded with an 8-bit rotated value, which means that we can only encode
(0-256)^2n.
Now my problem is that I want to clear the upper 16-bit values of r0 and replace it with the half-layer saved by r1. But due to the limited range of immediate I have to do: -
bic r0, r0, #0xff000000
bic r0, r0, #0x00ff0000
add r0, r0, r1, LSL #16
Is it possible to replace two bic instructions with one instruction? 0xffff0000 is not applicable. Perhaps I should use a different logical operation to clear the upper 16-bit?
thank
EDIT: Sorry, I forgot to say that the first 16 bits of r1 are empty and I am using ARM7TDMI
source
share