ARMv4/5 Opcode Map

Display mode

Back to Articles

Update, Nov 2023: Cliff Biffle has put together a Thumb-2 opcode map for M-profile ARM cores (Google Sheet), which may be more relevant to modern interests than the ARMv4/5 opcode map; my map remains below for posterity.


The following is a full opcode map of instructions for the ARM7 and ARM9 series of CPU cores. Instructions added for ARM9 are highlighted in blue, and instructions specific to the M-extension are shown in green. The Thumb instruction set is also included, in Table 2.

Table 1. ARM Opcode Map.
Bits
27-20
Bits 7-4
0123 4567 89AB CDEF
00 AND lli AND llr AND lri AND lrr AND ari AND arr AND rri AND rrr AND lli MUL AND lri STRH ptrm AND ari LDRD ptrm AND rri STRD ptrm
01 ANDS lli ANDS llr ANDS lri ANDS lrr ANDS ari ANDS arr ANDS rri ANDS rrr ANDS lli MULS ANDS lri LDRH ptrm ANDS ari LDRSB ptrm ANDS rri LDRSH ptrm
02 EOR lli EOR llr EOR lri EOR lrr EOR ari EOR arr EOR rri EOR rrr EOR lli MLA EOR lri STRH ptrm EOR ari LDRD ptrm EOR rri STRD ptrm
03 EORS lli EORS llr EORS lri EORS lrr EORS ari EORS arr EORS rri EORS rrr EORS lli MLAS EORS lri LDRH ptrm EORS ari LDRSB ptrm EORS rri LDRSH ptrm
04 SUB lli SUB llr SUB lri SUB lrr SUB ari SUB arr SUB rri SUB rrr SUB lli SUB lri STRH ptim SUB ari LDRD ptim SUB rri STRD ptim
05 SUBS lli SUBS llr SUBS lri SUBS lrr SUBS ari SUBS arr SUBS rri SUBS rrr SUBS lli SUBS lri LDRH ptim SUBS ari LDRSB ptim SUBS rri LDRSH ptim
06 RSB lli RSB llr RSB lri RSB lrr RSB ari RSB arr RSB rri RSB rrr RSB lli RSB lri STRH ptim RSB ari LDRD ptim RSB rri STRD ptim
07 RSBS lli RSBS llr RSBS lri RSBS lrr RSBS ari RSBS arr RSBS rri RSBS rrr RSBS lli RSBS lri LDRH ptim RSBS ari LDRSB ptim RSBS rri LDRSH ptim
08 ADD lli ADD llr ADD lri ADD lrr ADD ari ADD arr ADD rri ADD rrr ADD lli UMULL ADD lri STRH ptrp ADD ari LDRD ptrp ADD rri STRD ptrp
09 ADDS lli ADDS llr ADDS lri ADDS lrr ADDS ari ADDS arr ADDS rri ADDS rrr ADDS lli UMULLS ADDS lri LDRH ptrp ADDS ari LDRSB ptrp ADDS rri LDRSH ptrp
0A ADC lli ADC llr ADC lri ADC lrr ADC ari ADC arr ADC rri ADC rrr ADC lli UMLAL ADC lri STRH ptrp ADC ari LDRD ptrp ADC rri STRD ptrp
0B ADCS lli ADCS llr ADCS lri ADCS lrr ADCS ari ADCS arr ADCS rri ADCS rrr ADCS lli UMLALS ADCS lri LDRH ptrp ADCS ari LDRSB ptrp ADCS rri LDRSH ptrp
0C SBC lli SBC llr SBC lri SBC lrr SBC ari SBC arr SBC rri SBC rrr SBC lli SMULL SBC lri STRH ptip SBC ari LDRD ptip SBC rri STRD ptip
0D SBCS lli SBCS llr SBCS lri SBCS lrr SBCS ari SBCS arr SBCS rri SBCS rrr SBCS lli SMULLS SBCS lri LDRH ptip SBCS ari LDRSB ptip SBCS rri LDRSH ptip
0E RSC lli RSC llr RSC lri RSC lrr RSC ari RSC arr RSC rri RSC rrr RSC lli SMLAL RSC lri STRH ptip RSC ari LDRD ptip RSC rri STRD ptip
0F RSCS lli RSCS llr RSCS lri RSCS lrr RSCS ari RSCS arr RSCS rri RSCS rrr RSCS lli SMLALS RSCS lri LDRH ptip RSCS ari LDRSB ptip RSCS rri LDRSH ptip
10 MRS rc QADD SMLABB SWP SMLATB STRH ofrm SMLABT LDRD ofrm SMLATT STRD ofrm
11 TSTS lli TSTS llr TSTS lri TSTS lrr TSTS ari TSTS arr TSTS rri TSTS rrr TSTS lli TSTS lri LDRH ofrm TSTS ari LDRSB ofrm TSTS rri LDRSH ofrm
12 MSR rc BX BLX reg QSUB BKPT SMLAWB SMULWB STRH prrm SMLAWT LDRD prrm SMULWT STRD prrm
13 TEQS lli TEQS llr TEQS lri TEQS lrr TEQS ari TEQS arr TEQS rri TEQS rrr TEQS lli TEQS lri LDRH prrm TEQS ari LDRSB prrm TEQS rri LDRSH prrm
14 MRS rs QDADD SMLALBB SWPB SMLALTB STRH ofim SMLALBT LDRD ofim SMLALTT STRD ofim
15 CMPS lli CMPS llr CMPS lri CMPS lrr CMPS ari CMPS arr CMPS rri CMPS rrr CMPS lli CMPS lri LDRH ofim CMPS ari LDRSB ofim CMPS rri LDRSH ofim
16 MSR rs CLZ QDSUB SMULBB SMULTB STRH prim SMULBT LDRD prim SMULTT STRD prim
17 CMNS lli CMNS llr CMNS lri CMNS lrr CMNS ari CMNS arr CMNS rri CMNS rrr CMNS lli CMNS lri LDRH prim CMNS ari LDRSB prim CMNS rri LDRSH prim
18 ORR lli ORR llr ORR lri ORR lrr ORR ari ORR arr ORR rri ORR rrr ORR lli ORR lri STRH ofrp ORR ari LDRD ofrp ORR rri STRD ofrp
19 ORRS lli ORRS llr ORRS lri ORRS lrr ORRS ari ORRS arr ORRS rri ORRS rrr ORRS lli ORRS lri LDRH ofrp ORRS ari LDRSB ofrp ORRS rri LDRSH ofrp
1A MOV lli MOV llr MOV lri MOV lrr MOV ari MOV arr MOV rri MOV rrr MOV lli MOV lri STRH prrp MOV ari LDRD prrp MOV rri STRD prrp
1B MOVS lli MOVS llr MOVS lri MOVS lrr MOVS ari MOVS arr MOVS rri MOVS rrr MOVS lli MOVS lri LDRH prrp MOVS ari LDRSB prrp MOVS rri LDRSH prrp
1C BIC lli BIC llr BIC lri BIC lrr BIC ari BIC arr BIC rri BIC rrr BIC lli BIC lri STRH ofip BIC ari LDRD ofip BIC rri STRD ofip
1D BICS lli BICS llr BICS lri BICS lrr BICS ari BICS arr BICS rri BICS rrr BICS lli BICS lri LDRH ofip BICS ari LDRSB ofip BICS rri LDRSH ofip
1E MVN lli MVN llr MVN lri MVN lrr MVN ari MVN arr MVN rri MVN rrr MVN lli MVN lri STRH prip MVN ari LDRD prip MVN rri STRD prip
1F MVNS lli MVNS llr MVNS lri MVNS lrr MVNS ari MVNS arr MVNS rri MVNS rrr MVNS lli MVNS lri LDRH prip MVNS ari LDRSB prip MVNS rri LDRSH prip
20 AND imm
21 ANDS imm
22 EOR imm
23 EORS imm
24 SUB imm
25 SUBS imm
26 RSB imm
27 RSBS imm
28 ADD imm
29 ADDS imm
2A ADC imm
2B ADCS imm
2C SBC imm
2D SBCS imm
2E RSC imm
2F RSCS imm
30
31 TSTS imm
32 MSR ic
33 TEQS imm
34
35 CMPS imm
36 MSR is
37 CMNS imm
38 ORR imm
39 ORRS imm
3A MOV imm
3B MOVS imm
3C BIC imm
3D BICS imm
3E MVN imm
3F MVNS imm
40 STR ptim
41 LDR ptim
42 STRT ptim
43 LDRT ptim
44 STRB ptim
45 LDRB ptim
46 STRBT ptim
47 LDRBT ptim
48 STR ptip
49 LDR ptip
4A STRT ptip
4B LDRT ptip
4C STRB ptip
4D LDRB ptip
4E STRBT ptip
4F LDRBT ptip
50 STR ofim
51 LDR ofim
52 STR prim
53 LDR prim
54 STRB ofim
55 LDRB ofim
56 STRB prim
57 LDRB prim
58 STR ofip
59 LDR ofip
5A STR prip
5B LDR prip
5C STRB ofip
5D LDRB ofip
5E STRB prip
5F LDRB prip
60 STR ptrmll STR ptrmlr STR ptrmar STR ptrmrr STR ptrmll STR ptrmlr STR ptrmar STR ptrmrr
61 LDR ptrmll LDR ptrmlr LDR ptrmar LDR ptrmrr LDR ptrmll LDR ptrmlr LDR ptrmar LDR ptrmrr
62 STRT ptrmll STRT ptrmlr STRT ptrmar STRT ptrmrr STRT ptrmll STRT ptrmlr STRT ptrmar STRT ptrmrr
63 LDRT ptrmll LDRT ptrmlr LDRT ptrmar LDRT ptrmrr LDRT ptrmll LDRT ptrmlr LDRT ptrmar LDRT ptrmrr
64 STRB ptrmll STRB ptrmlr STRB ptrmar STRB ptrmrr STRB ptrmll STRB ptrmlr STRB ptrmar STRB ptrmrr
65 LDRB ptrmll LDRB ptrmlr LDRB ptrmar LDRB ptrmrr LDRB ptrmll LDRB ptrmlr LDRB ptrmar LDRB ptrmrr
66 STRBT ptrmll STRBT ptrmlr STRBT ptrmar STRBT ptrmrr STRBT ptrmll STRBT ptrmlr STRBT ptrmar STRBT ptrmrr
67 LDRBT ptrmll LDRBT ptrmlr LDRBT ptrmar LDRBT ptrmrr LDRBT ptrmll LDRBT ptrmlr LDRBT ptrmar LDRBT ptrmrr
68 STR ptrpll STR ptrplr STR ptrpar STR ptrprr STR ptrpll STR ptrplr STR ptrpar STR ptrprr
69 LDR ptrpll LDR ptrplr LDR ptrpar LDR ptrprr LDR ptrpll LDR ptrplr LDR ptrpar LDR ptrprr
6A STRT ptrpll STRT ptrplr STRT ptrpar STRT ptrprr STRT ptrpll STRT ptrplr STRT ptrpar STRT ptrprr
6B LDRT ptrpll LDRT ptrplr LDRT ptrpar LDRT ptrprr LDRT ptrpll LDRT ptrplr LDRT ptrpar LDRT ptrprr
6C STRB ptrpll STRB ptrplr STRB ptrpar STRB ptrprr STRB ptrpll STRB ptrplr STRB ptrpar STRB ptrprr
6D LDRB ptrpll LDRB ptrplr LDRB ptrpar LDRB ptrprr LDRB ptrpll LDRB ptrplr LDRB ptrpar LDRB ptrprr
6E STRBT ptrpll STRBT ptrplr STRBT ptrpar STRBT ptrprr STRBT ptrpll STRBT ptrplr STRBT ptrpar STRBT ptrprr
6F LDRBT ptrpll LDRBT ptrplr LDRBT ptrpar LDRBT ptrprr LDRBT ptrpll LDRBT ptrplr LDRBT ptrpar LDRBT ptrprr
70 STR ofrmll STR ofrmlr STR ofrmar STR ofrmrr STR ofrmll STR ofrmlr STR ofrmar STR ofrmrr
71 LDR ofrmll LDR ofrmlr LDR ofrmar LDR ofrmrr LDR ofrmll LDR ofrmlr LDR ofrmar LDR ofrmrr
72 STR prrmll STR prrmlr STR prrmar STR prrmrr STR prrmll STR prrmlr STR prrmar STR prrmrr
73 LDR prrmll LDR prrmlr LDR prrmar LDR prrmrr LDR prrmll LDR prrmlr LDR prrmar LDR prrmrr
74 STRB ofrmll STRB ofrmlr STRB ofrmar STRB ofrmrr STRB ofrmll STRB ofrmlr STRB ofrmar STRB ofrmrr
75 LDRB ofrmll LDRB ofrmlr LDRB ofrmar LDRB ofrmrr LDRB ofrmll LDRB ofrmlr LDRB ofrmar LDRB ofrmrr
76 STRB prrmll STRB prrmlr STRB prrmar STRB prrmrr STRB prrmll STRB prrmlr STRB prrmar STRB prrmrr
77 LDRB prrmll LDRB prrmlr LDRB prrmar LDRB prrmrr LDRB prrmll LDRB prrmlr LDRB prrmar LDRB prrmrr
78 STR ofrpll STR ofrplr STR ofrpar STR ofrprr STR ofrpll STR ofrplr STR ofrpar STR ofrprr
79 LDR ofrpll LDR ofrplr LDR ofrpar LDR ofrprr LDR ofrpll LDR ofrplr LDR ofrpar LDR ofrprr
7A STR prrpll STR prrplr STR prrpar STR prrprr STR prrpll STR prrplr STR prrpar STR prrprr
7B LDR prrpll LDR prrplr LDR prrpar LDR prrprr LDR prrpll LDR prrplr LDR prrpar LDR prrprr
7C STRB ofrpll STRB ofrplr STRB ofrpar STRB ofrprr STRB ofrpll STRB ofrplr STRB ofrpar STRB ofrprr
7D LDRB ofrpll LDRB ofrplr LDRB ofrpar LDRB ofrprr LDRB ofrpll LDRB ofrplr LDRB ofrpar LDRB ofrprr
7E STRB prrpll STRB prrplr STRB prrpar STRB prrprr STRB prrpll STRB prrplr STRB prrpar STRB prrprr
7F LDRB prrpll LDRB prrplr LDRB prrpar LDRB prrprr LDRB prrpll LDRB prrplr LDRB prrpar LDRB prrprr
80 STMDA
81 LDMDA
82 STMDA w
83 LDMDA w
84 STMDA u
85 LDMDA u
86 STMDA uw
87 LDMDA uw
88 STMIA
89 LDMIA
8A STMIA w
8B LDMIA w
8C STMIA u
8D LDMIA u
8E STMIA uw
8F LDMIA uw
90 STMDB
91 LDMDB
92 STMDB w
93 LDMDB w
94 STMDB u
95 LDMDB u
96 STMDB uw
97 LDMDB uw
98 STMIB
99 LDMIB
9A STMIB w
9B LDMIB w
9C STMIB u
9D LDMIB u
9E STMIB uw
9F LDMIB uw
A0 B
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0 BL
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
C0 STC ofm
C1 LDC ofm
C2 STC prm
C3 LDC prm
C4 STC ofm
C5 LDC ofm
C6 STC prm
C7 LDC prm
C8 STC ofp
C9 LDC ofp
CA STC prp
CB LDC prp
CC STC ofp
CD LDC ofp
CE STC prp
CF LDC prp
D0 STC unm
D1 LDC unm
D2 STC ptm
D3 LDC ptm
D4 STC unm
D5 LDC unm
D6 STC ptm
D7 LDC ptm
D8 STC unp
D9 LDC unp
DA STC ptp
DB LDC ptp
DC STC unp
DD LDC unp
DE STC ptp
DF LDC ptp
E0 CDP MCR CDP MCR CDP MCR CDP MCR CDP MCR CDP MCR CDP MCR CDP MCR
E1 MRC MRC MRC MRC MRC MRC MRC MRC
E2 MCR MCR MCR MCR MCR MCR MCR MCR
E3 MRC MRC MRC MRC MRC MRC MRC MRC
E4 MCR MCR MCR MCR MCR MCR MCR MCR
E5 MRC MRC MRC MRC MRC MRC MRC MRC
E6 MCR MCR MCR MCR MCR MCR MCR MCR
E7 MRC MRC MRC MRC MRC MRC MRC MRC
E8 MCR MCR MCR MCR MCR MCR MCR MCR
E9 MRC MRC MRC MRC MRC MRC MRC MRC
EA MCR MCR MCR MCR MCR MCR MCR MCR
EB MRC MRC MRC MRC MRC MRC MRC MRC
EC MCR MCR MCR MCR MCR MCR MCR MCR
ED MRC MRC MRC MRC MRC MRC MRC MRC
EE MCR MCR MCR MCR MCR MCR MCR MCR
EF MRC MRC MRC MRC MRC MRC MRC MRC
F0 SWI
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
Table 2. Thumb Opcode Map.
Bits
15-12
Bits 11-8
0123 4567 89AB CDEF
0 LSL imm LSR imm
1 ASR imm ADD reg SUB reg ADD imm3 SUB imm3
2 MOV i8r0 MOV i8r1 MOV i8r2 MOV i8r3 MOV i8r4 MOV i8r5 MOV i8r6 MOV i8r7 CMP i8r0 CMP i8r1 CMP i8r2 CMP i8r3 CMP i8r4 CMP i8r5 CMP i8r6 CMP i8r7
3 ADD i8r0 ADD i8r1 ADD i8r2 ADD i8r3 ADD i8r4 ADD i8r5 ADD i8r6 ADD i8r7 SUB i8r0 SUB i8r1 SUB i8r2 SUB i8r3 SUB i8r4 SUB i8r5 SUB i8r6 SUB i8r7
4 DP g1 DP g2 DP g3 DP g4 ADDH CMPH MOVH BX reg LDRPC r0 LDRPC r1 LDRPC r2 LDRPC r3 LDRPC r4 LDRPC r5 LDRPC r6 LDRPC r7
5 STR reg STRH reg STRB reg LDRSB reg LDR reg LDRH reg LDRB reg LDRSH reg
6 STR imm5 LDR imm5
7 STRB imm5 LDRB imm5
8 STRH imm5 LDRH imm5
9 STRSP r0 STRSP r1 STRSP r2 STRSP r3 STRSP r4 STRSP r5 STRSP r6 STRSP r7 LDRSP r0 LDRSP r1 LDRSP r2 LDRSP r3 LDRSP r4 LDRSP r5 LDRSP r6 LDRSP r7
A ADDPC r0 ADDPC r1 ADDPC r2 ADDPC r3 ADDPC r4 ADDPC r5 ADDPC r6 ADDPC r7 ADDSP r0 ADDSP r1 ADDSP r2 ADDSP r3 ADDSP r4 ADDSP r5 ADDSP r6 ADDSP r7
B ADDSP imm7 PUSH PUSH lr POP POP pc BKPT
C STMIA r0 STMIA r1 STMIA r2 STMIA r3 STMIA r4 STMIA r5 STMIA r6 STMIA r7 LDMIA r0 LDMIA r1 LDMIA r2 LDMIA r3 LDMIA r4 LDMIA r5 LDMIA r6 LDMIA r7
D BEQ BNE BCS BCC BMI BPL BVS BVC BHI BLS BGE BLT BGT BLE SWI
E B BLX off
F BL setup BL off
Table 2A. Thumb Opcode Map - Register/Register Data Processing.
Bits
9-8
Bits 7-6
0123
0 AND EOR LSL LSR
1 ASR ADD SUB ROR
2 TST NEG CMP CMN
3 ORR MUL BIC MVN