I am trying to figure out what this ARM assembly line does:
RSB r1, r2, r3, LSL #1
I am referring to RSB description from Keil help page but this example does not quite fit as it has more operands than the documentation.
The RSB instruction is a Reverse SuBtract without carry.
The documentation indicates the syntax:
RSB{S}{cond} {Rd}, Rn, Operand2
The following usage can then be explained:
RSB r1, r2, r3, LSL #1
r3, LSL #1
is Operand2 → r3 register logical left-shifted by 1 bit So the operation uses r1, r2 and r3 registers as follows: r1 = (r3 << 1) - r2