You are on page 1of 5

Arithmetic Instruction with 13 bit shifter

Pre ro 0 00000000
1 0 0000 0005
ADD ro ri LS L I
fo 0 0000 0000
rt 0 00000005
Bydoing LSL the original
content is retained and the
content
of rl is shifted left
once and adds with r l
fo 0 0000 0000
If I 0 0000 0005
SL I 0 0000 000A
TO 0 0000 00OF

Logical Instruction

Bitwise operation on 2 source registers

AND And 2 32
i
bit values
Ra Rs N
immediate value e
register

ORR Or Q 32 bit values


Rd Rs ORN
EOR EXOR 2 32 bit values
Rd Rs EORN

Ble Logical bit clear Foh


Rd Rs
1011
O
Pre 80 0 00000000 Pre rt 0131111
M 0 02040608 82 0130101
D 0 10305070 BIC ro M R2
DRR ro rl R2 F4 F E F E
O B l l l l

post 80 0 12345678 Post RD 001010


81 0 02040608 fl 0131111
12 0 10305070 52 080101

Logical Insting Update CPSR flags only if Ssuffin


is used

Every binary bit 1 in r2 clears corresponding bit


Intl

Comparison In.IN
CMN Compare Signed Flagsset as area
of Rio 1N

CMP Compare Unsigned Flags set as a


result
of Ru IN
TEG TestforEqualityof2 32 Flags set as a
N
bit values result
ofRafxor
TST Test bits 32 bit Rn AND N
of
Values

Note Non destructive operations


Updates CPSR
No effect on other registers
Can be used to change programflow using conditional
execution

Pree Cps R nzcvqift Usr


TO 0 00000004
f OX 00000004
CMP ro rl

CBR
Post n
Zarqift Usv
Multiple Instructions

MLA Multiply andAccumulate Rd CRmxRDtRn


MUL Multiply Rd Rn Rs
SMLAL Signed Multiply
Acclimate CRduignke.IE
2m RsI
dzeHighiRqeow

SMULL Signed Multiply Long Kdu Rdc Rm't Rs


UMNAL Unsigned Mutiply Accumulate
long
UMULL Unsigned Multiply Long

Pre 10 0 00000000 TO 0 00000000


fl 0 00000002 MI OX 00000000
82 0 0000 0002 D 0 1 000 0002
MUL RO rl r2 83 0 00000002
UMULL ro ri r2 r3
Post rD 000000042
0 r D OXE 0000004
fl OX 0000 0002 81 0 0000 0001
D 0 0000 0002 12 0 X F000 0002
D 0 0000 0002

Branch Instruction Changes the flow of execution i

used to call a routine


PC points to a new address
B Branch PC _label
BL Branchwith Link PC label
LR of n iI
Address

after BL
BX Branch Enchange PG kmdoxffe.i.AE
MovementfromThumbtoArm T Rmfoxo.o.ro cool
B LX Branch Exchange Address label is stored
with linkfkhumbtoarndinin.SI
asPCrelaliveoffset
must be with

32m13 ofbranching.IN
7 I

You might also like