Introduction
The 32-bit ARM architecture has two instruction sets that a program can switch between: A32, the original fixed 32-bit ARM instructions, and Thumb, which started as 16-bit instructions (T16) and gained 32-bit ones (T32, called Thumb-2) with ARMv6T2 and ARMv7. The Cortex-M microcontrollers (and the Raspberry Pi Pico’s RP2040) run Thumb only; Cortex-A and Cortex-R processors, and the ARM7TDMI of the Game Boy Advance, run both. Floating point (VFP) and SIMD (Advanced SIMD, called NEON) use coprocessor numbers 10 and 11 in both sets.
These pages describe the instruction sets as the explorer’s own disassembler reads them. The decoder is in
explorer/cpu/arm/ and is our own code; llvm-objdump and GNU objdump only check it. A decoded
instruction in the viewer links to the group of its entry on these pages.
What the disassembly asks for
An ELF file with machine number 40 (EM_ARM) opens with this decoder. The options bar offers:
- Mode: ARM state, Thumb state, or “From the file” (the default). From the file means: the mapping
symbols
$a(ARM code),$t(Thumb code) and$d(data) that the toolchain writes decide each byte; a stripped file without them is read as Thumb when the build attributes or the architecture say the file is for the M profile, or when the entry point has bit 0 set, else as ARM. Bytes under$dare not decoded. See interworking. - Architecture: which encodings are valid, from ARMv4T to ARMv8-A and the M profile (table below). The default reads
Tag_CPU_archandTag_CPU_arch_profilefrom the section.ARM.attributes, else ARMv8-A, which has every AArch32 encoding that LLVM knows. An instruction of a later architecture is shown as undefined. - VFP and Advanced SIMD: decode coprocessors 10 and 11 as floating point (see VFP and NEON).
- Floating-point unit: which version of the unit the instructions are checked against: VFPv2, VFPv3, VFPv4, the single-precision FPv4-SP of a Cortex-M4F, FPv5-SP of a Cortex-M33, FPv5-D16 of a Cortex-M7, FP-ARMv8 and the NEON combinations (default: from
Tag_FP_archandTag_ABI_HardFP_use, else everything the architecture level allows; see the unit table). A unit without double precision refuses the double-precision arithmetic; FPv4 has novrint,vselorvmaxnm. The Cortex-M and UF2 viewers have the same choice for the M-profile units (FPU version). - Helium (MVE): the M-profile Vector Extension of ARMv8.1-M (default: from
Tag_MVE_arch, else off; see the Helium section). - PACBTI: the pointer authentication and branch target identification instructions of ARMv8.1-M (default: on when
Tag_PAC_extensionorTag_BTI_extensionis not 0, else off; see PACBTI). Without it the hints are shown ashint #n. - CDE coprocessors: which of the coprocessors 0 to 7 are Custom Datapath Extension coprocessors, a list such as
p0, p1(default: none; the build attributes have no tag for it; see the CDE section). The Cortex-M viewer has the same options. The Branch Future instructions of ARMv8.1-M are always decoded at that level. - Pseudo-instructions:
push,popand the shift mnemonics, or the instruction as encoded (see pseudo-instructions).
An A32 instruction starts on a 4-byte boundary, a Thumb one on a 2-byte boundary; the explorer decodes at every such offset and lays the results out in columns, so code reached through a jump into the middle of a 32-bit Thumb instruction can be read. Inside an IT block the condition of each instruction comes from the IT instruction in front of it: the layout looks back up to eight bytes for it, so the answer does not depend on where the listing starts.
Architecture levels
| Level | Instruction sets | What it adds to the one before | Cores |
|---|---|---|---|
| ARMv4T | A32, T16 | Thumb state, bx, halfword and signed loads and stores | ARM7TDMI, ARM9TDMI |
| ARMv5TE | A32, T16 | clz, blx, bkpt, ldrd/strd, pld, saturating and 16-bit multiply (DSP) | ARM926EJ-S, XScale |
| ARMv6 (v6K) | A32, T16 | Media instructions (parallel add and subtract, pack, extend, saturate, reverse), ldrex/strex, cps, srs/rfe, setend, umaal | ARM1136, ARM1176 |
| ARMv6-M | T16 and a few T32 (bl, msr, mrs, dmb, dsb, isb) | The M profile baseline: no ARM state | Cortex-M0, M0+, RP2040 |
| ARMv7-A, -R | A32, T16, T32 | All 32-bit Thumb encodings, movw/movt, bit-field instructions, cbz, IT blocks, dmb/dsb/isb, pldw, VFPv3 and NEON | Cortex-A8, A9, A7, A15, R4, R5 |
| ARMv7-M | T16, T32 | Thumb-2 for microcontrollers, hardware divide | Cortex-M3 |
| ARMv7E-M | T16, T32 | The DSP instructions, optional floating point: FPv4-SP (single precision, with VFMA) on a Cortex-M4F, FPv5 (single or double precision) on a Cortex-M7 | Cortex-M4, M7 |
| ARMv8-A AArch32 | A32, T16, T32 | crc32, load-acquire and store-release, hlt, sevl, vsel, vrint*, vcvta/n/p/m, AES and SHA; removes swp, the ‘2’ coprocessor forms, and coprocessors 0 to 13 except 10 and 11 (see coprocessor) | Cortex-A53, A57, A72 in 32-bit state |
| ARMv8-M baseline, mainline | T16, T32 | Load-acquire and store-release, cbz on the baseline, TrustZone state | Cortex-M23; Cortex-M33 |
| ARMv8.1-M mainline | T16, T32 | ARMv8-M mainline with the DSP instructions and half-precision floating point, the low-overhead loops and branches (wls, dls, le, lctp, branch future), clrm, vscclrm, vlldm/vlstm with D0 to D31, and the options Helium (MVE) and PACBTI | Cortex-M55, M85 |
Status of an encoding
Every decoded instruction carries a status, drawn in the viewer with a highlight and a note.
| Status | Meaning |
|---|---|
| documented | A defined encoding, written as the manual defines it. |
| unpredictable | The encoding exists, but a field that must be zero or one is not, or a register such as SP or PC is used where it must not be. The manual says the result is UNPREDICTABLE; the decoder still shows the instruction and says why. LLVM often refuses such words and GNU objdump shows them; the tests count them apart. |
| deprecated | Defined but not to be used: swp, setend. |
| reserved | An unallocated hint: it executes as a NOP and is shown as nop; reserved Thumb hints 6 to 15 are shown as hint #n. |
| undefined | Not an instruction at the chosen architecture level: shown as .word or .short. |
How it is checked
The decoder is compared with llvm-objdump (LLVM 22.1.8) and with GNU arm-none-eabi-objdump (binutils 2.47), both
reading the same bytes: every 16-bit Thumb halfword, a structured sweep of every first halfword of a 32-bit Thumb instruction with random second
halves, the same for the A32 opcode space (every value of bits 27 to 20 and 7 to 4, with random fills and the conditions E, F and random), and several
million random words from a fixed seed. IT blocks are compared separately: 20,000 random blocks with every first condition and every mask. ELF files built
with clang for Cortex-M0+, M3, M4F, M33, Cortex-A7 (ARM and Thumb, hard and soft float), ARM926 and Cortex-A53, and real ARM files (a shared
library, a position-independent program, a static Thumb program), are compared instruction by instruction through the ELF viewer.
The numbers are in 6502/progress-arm32.md in the project notes.
Where LLVM and the manual differ the decoder follows the manual and says so: LLVM has no disassembly for mul, mla and the long multiplies
below ARMv6 (the architecture has them since ARMv2/v3M), prints __brkdiv0 and trap for udf #0xf9 and udf #0xfe, and
refuses most UNPREDICTABLE words that the decoder shows.
Checked against the Arm ARM (2026-11-19). The Arm architecture manual (DDI 0487M.d) and the Arm AArch32 instruction XML of the same release (2026-09) are now the primary source for the A32 and T32
encodings at the ARMv8-A level. A script builds words from all 2,220 encodings of the XML (A32 1,099, T32 32-bit 1,038, T16 83), runs the decode rules of each, and compares: about 430,000 words per run
(scripts/arm/xml-a32-compare.mjs, parser-test/test-arm-arm.mjs). What it settled: bits that the XML draws as fixed values (not as should-be-zero) make the other values unallocated, so
the register-offset forms of ldr/str and their byte, halfword and signed forms with bits 11:6 not zero, smlad, smlsd, smuad and smusd with
bits 7:5 not zero, vmov of two core registers with bits 7:6 not zero, cps with no flags and no mode, cps bit 5 and setend bits 7:4, a conditional
udf and strd with the PC as base are undefined, not unpredictable; unallocated hints (A32 hints above the defined ones, T16 hints 6 to 15, memory hints) execute as NOPs (DDI 0403E section A5)
and are shown with the status reserved; the T32 srs with a register other than SP is CONSTRAINED UNPREDICTABLE (the XML draws it as should-be bits); and from Armv8 the use of R13 is not
UNPREDICTABLE (DDI 0487M.d K1.1.2). It also found four decoder bugs, now fixed: 64-bit Advanced SIMD shifts with a small imm6, the narrowing shifts vrshrn/vqrshrn/vqrshrun,
aese and aesmc, and setpan (T16 words with the should-be bits wrong, A32 missing). A second pass the same day added the half-precision (FEAT_FP16) forms of VFP and Advanced SIMD, the bf16 conversions,
vlldm/vlstm and Helium (MVE, see the half-precision section and the Helium section of the VFP page), and the
CONSTRAINED UNPREDICTABLE rules of the XML that depend on registers (cpu/arm/unpred.js: the PC or a writeback register in loads, stores, load and store multiple, multiplies, bit-field
extracts, saturates, T32 data processing and the others): of 430,000 words per run the XML calls about 10,500 unpredictable where the decoder said documented before, about 1,600 after that pass and
none after a third one (the same day): the Advanced SIMD structure loads and stores with the PC or a list past D31, the T32 loads and stores, load and store multiple, msr with an empty mask, dbg,
setend, cps and hint bits, the exclusives, the extends, parallel add and subtract, crc32, shifts by a register, vmrs and vmsr and the banked
mrs/msr registers (which are decoded for every register number now) were added; the same third pass added Branch Future, PACBTI and the Custom Datapath Extension. The words that the XML
calls unpredictable and the decoder showed as undefined (2,359 per run, all but a few breaking a should-be-zero or should-be-one cell of the encoding) are now shown as the instruction with the cell put right and the status
unpredictable (DDI 0487M.d K1.1: executing as if the cell had its required value is one of the permitted outcomes); the table is cpu/arm/sbx.js (74 encoding patterns) and the count in test-arm-arm.mjs is 0. The M-profile manuals (DDI 0403E Armv7-M, DDI 0419E Armv6-M, DDI 0553B.z Armv8-M and Armv8.1-M) were read for these decisions: pldw is not in Armv7-M (A7.7.94 to A7.7.98
list PLD and PLI only) but is in the Armv8-M Main Extension (C2.4.140); udf.w (encoding T2) is defined in Armv6-M (A6.7.72) and in both Armv8-M profiles (C2.4.259), llvm refuses it; msr apsr_nzcvq is
mask 10, apsr_g mask 01 and needs the DSP extension (DDI 0403E Table B5-2; the decoder had the two swapped); the generic coprocessor instructions do not exist for coprocessors 8 to 11, 14 and 15 at
Armv8-M (CDP and the others, “SEE Floating-point and MVE”); the floating-point unit of the M profile has D0 to D15; blx with an immediate and cdp2 and the other condition-1111
coprocessor forms are Armv5T (DDI 0406C A8.8.25 encoding A2) and rfe, srs are Armv6 (B9.3.13, B9.3.15, encoding A1 “ARMv6*, ARMv7”), which is where the decoder gates them.
Not described
Known
- Which coprocessors are CDE coprocessors is not in the file: there is no build-attribute tag for the Custom Datapath Extension, so the decoder takes it from an option. The execution rules of the ARMv8.1-M extensions (the loop and branch future state, the PAC keys, EPSR.B) are not modelled: the decoder describes the encodings.
- Floating-point unit versions (the unit table): the units are checked word by word against LLVM, not against a unit’s own manual for every instruction. Not covered: VFPv1, the VFPv3 “XD” and single-precision-only forms of the A profile (
vfpv3xd,vfpv3xd-fp16:vfpv3-d16with-fp64is not an option value), and the Cortex-M7 choice between its single- and double-precision unit (an image does not say which: the default allows both; the build attributeTag_ABI_HardFP_usedoes when the file has it). The Game Boy Advance, Nintendo DS and Linux zImage viewers have no unit choice (their cores have no VFP or use the level default), and a UF2 family names the unit only when its core is a Cortex-M4F or a Cortex-M33 (every other core decodes everything of its level). - Jazelle:
bxjis decoded. The Jazelle state runs Java bytecodes whose hardware subset is the implementation’s own “subarchitecture”, which the Arm ARM says it does not describe (DDI 0406C.d A2.11.1), so there is nothing Arm-defined to decode. ThumbEE (ARMv7-A and ARMv7-R) is decoded as a decoder mode, together withenterxandleavex(the ThumbEE section); the layout, the ELF viewer and the Cortex-M viewer never switch to it, because the state change is dynamic and the ELF mapping symbols have no ThumbEE class. - ARMv8-M Security Extension:
sg,bxnsandblxnsare decoded, and so are the special-register names of the M profile (msp_nsand so on);tt,ttt,ttaandttatare decoded (1110 1000 0100 Rn | 1111 Rd A T 00 0000; GNU/LLVM behaviour, not the ARM ARM);vlldm,vlstm(DDI 0553B.z C2.4.367 and C2.4.368) and, at ARMv8.1-M,vscclrmare decoded. - ARMv8.3 FEAT_JSCVT:
vjcvt.s32.f64 Sd, Dmis decoded in A32 and T32 at the ARMv8-A level (GNUarm-dis.cline 1120 and LLVMARMInstrVFP.tdVJCVT; GNU/LLVM behaviour, not the ARM ARM) and is undefined below it. - Version gating kept on purpose (LLVM and GNU decode these on older levels, the decoder does not):
blxwith an immediate and the condition-1111 coprocessor forms (cdp2,ldc2,mcr2…) are ARMv5 and show as undefined on ARMv4T;rfeandsrsare ARMv6 and show as undefined on ARMv5TE. The versions are checked in the Arm ARM (2026-11-19): BLX (immediate) encoding A2 and CDP2/LDC2/MCR2 … are “ARMv5T*, ARMv6*, ARMv7” (DDI 0406C A8.8.25 and the instruction pages), RFE and SRS encoding A1 are “ARMv6*, ARMv7” (B9.3.13 and B9.3.15); the test sweeps against LLVM list these words as an explained difference. - Per-instruction register read and write sets (the decoder gives text, targets, flow, status; not a list of registers an instruction reads and writes).
Unknown
- Whether LLVM’s rule that coprocessors 0 to 13 do not exist in ARMv8-A AArch32 (and that
cdpandldcto coprocessor 15 are refused) is exactly the architecture’s: it was settled for the M profile (see above) but the A-profile statement of DDI 0487M.d G1.20 was only read for the cp10/cp11 case; GNU objdump accepts all of them, and the decoder follows LLVM for the ARMv8-A level. - The exact set of encodings an ARMv7-A core without the divide extension treats as undefined: the ARMv7-A level here has no
sdiv/udivin A32, which is the LLVM default, but implementations differ.
Links
- ARM Architecture Reference Manual ARMv7-A and ARMv7-R (DDI 0406), the source for A32, T16, T32 and VFPv3/v4, and chapter A9 for ThumbEE (issue C.d was read);
- ARM Architecture Reference Manual for A-profile architecture (DDI 0487), for AArch32 in ARMv8 (issue M.d was read), and the machine-readable A-profile instruction set XML (AArch32 and AArch64, release 2026-09) that every encoding of the A32 and T32 tables was compared with;
- ARMv7-M Architecture Reference Manual (DDI 0403, issue E.e), ARMv6-M (DDI 0419, issue E) and Armv8-M and Armv8.1-M (DDI 0553, issue B.z);
- ELF for the Arm Architecture (mapping symbols) and Addenda to the Arm EABI (build attributes).