Module-6 Thumb Instruction Set
Module-6 Thumb Instruction Set
Module-6 Thumb Instruction Set
Thumb Instruction
Set
Thumb Instruction Set
Thumb Instruction
Thumb Registers
Branch instruction
Stack instruction
SWI instruction
THUMB INSTRUCTION
Thumb encodes a subset of the 32-bit ARM instructions
into a 16-bit instruction set space.
The PUSH register list also can include the link register
lr; similarly the POP register list can include the pc.
x = (a + b) - c;
ADR r4,a
LDR r0,[r4]
ADR r4,b
LDR r1,[r4]
ADD r3,r0,r1
ADR r4,c
LDR r2,[r4]
SUB r3,r3,r2
ADR r4,x
STR r3,[r4]
y = a*(b+c);
ADR r4,b
LDR r0,[r4]
ADR r4,c
LDR r1,[r4]
ADD r2,r0,r1
ADR r4,a
LDR r0,[r4]
MUL r2,r2,r0
ADR r4,y
STR r2,[r4]
Programs
if (i == 0)
{
i = i +10;
}
SUBS R1, R1, #0
ADDEQ R1, R1, #10
CMP R1,#0
ADDEQ R1, R1, #10
Programs