Single instruction to mask off upper half word of register

Note: This was originally posted on 3rd December 2012 at http://forums.arm.com

Hi,

I've been looking around for a single Arm instruction that takes the word stored in a general purpose register and masks off the upper half word (top 16 bits).

There are probably other ways of doing this, for example:
LDR R1 = 0xFFFF
AND R0, R0, R1

But is there a specific instruction that does this? I was looking at LDRH but this instruction does not accept a register as an operand, only constants.

Thanks!
Jawad
Parents Reply Children
No data
More questions in this forum