Assembler Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All r ights reserved. 3-29
Shift operators
Shift operators act on numeric expressions, shifting or rotating the first operand by the
amount specified by the second.
Table3-7 shows the shift operator s.
Note
SHR
is a logical shift and does not propagate the sign bit.
Addition, subtraction, and logical operat ors
Addition and subtraction operators act on numeric expressions.
Logical operators act on numeric expressions. The operation is performed bitwise, that
is, independently on each bit of the operands to produce the result.
Table3-8 shows addition, subtraction, and logical operators.
Table3-7 Shift operators
Operator Usage Explanation
ROL A:ROL:B
Rotate A left by B bits
ROR A:ROR:B
Rotate A right by B bits
SHL A:SHL:B
Shift A left by B bits
SHR A:SHR:B
Shift A right by B bits
Table3-8 Addition, subtraction, and logical operators
Operator Usage Explanation
+A+B
Add A to B
-A-B
Subtract B from A
AND A:AND:B
Bitwise AND of A and B
OR A:OR:B
Bitwise OR of A and B
EOR A:EOR:B
Bitwise Exclusive OR of A and B