How to load the two’s complement representation of -1 into Register 3 using one instruction?
i am working on ARM7 and NXP processor.
Hi thewal,
I have moved your question to the Processors community as they may be best placed to answer your question.
Thanks
Ryan
thanks i am new here !
If you use MOV the assembler will try various tricks to see if it can be done using shifting or using MVN
MOV r3, #-1
the assembler will turn this into
MVN r3, #0
which you can also write.
See the armasm documentation about loading literals, one can also use LDR r3,=-1 which will load the value from a literal pool if it can't be done in one instruction inline.
Using MOV32 r3,-1 will generate two instructions
that will help me. thanks..