Reputation: 11
While looking some arm stuff in ida i came across this code
LSLS R3, R1
I know this is the left shift instruction but according to the arm website it should have Rs or #sh after it.
What does this mean? Is it just LSLS R3, R1, #0
?
Upvotes: 1
Views: 6794
Reputation: 1
in Thumb, LSL(S) third operand can't be #0.
Restrictions in Thumb code Thumb instructions must not use PC or SP. You cannot specify zero for the value in an LSL instruction in an IT block.sh https://developer.arm.com/documentation/dui0473/m/arm-and-thumb-instructions/lsl?lang=en
Upvotes: 0
Reputation: 3729
This is just a shortcut for:
LSLS r3, r3, r1
This is because in Thumb, the destination and first source registers need to be the same for most instructions.
Upvotes: 3