T16: the 16-bit encodings
Bits 15:11 of the halfword choose the group. Most data-processing instructions here set the flags unless they are inside an IT block, where they do not: the decoder writes adds, movs, lsls outside a block and add, mov, lsl (with the condition) inside.
| Bits 15:11 | Group | Instructions |
|---|---|---|
| 00000, 00001, 00010 | Shift by immediate | lsls Rd, Rm, #imm5, lsrs, asrs (a shift of 0 is movs Rd, Rm for lsl; 32 for lsr and asr) |
| 00011 | Add, subtract | adds Rd, Rn, Rm, subs, adds Rd, Rn, #imm3, subs |
| 00100 to 00111 | Move, compare, add, subtract with an 8-bit immediate | movs Rd, #imm8, cmp, adds Rd, #imm8, subs |
| 01000 0 | Data processing (register) | Bits 9:6: and, eor, lsl, lsr, asr, adc, sbc, ror, tst, rsb (rsbs Rd, Rm, #0), cmp, cmn, orr, mul (muls Rd, Rm, Rd), bic, mvn |
| 01000 1 | Special data and branch exchange | add Rdn, Rm and mov Rd, Rm and cmp with any of r0 to r15 (a write to r15 is a branch), bx Rm, blx Rm |
| 01001 | Load literal | ldr Rd, [pc, #imm8 × 4] (the PC is rounded down to a multiple of 4) |
| 0101 | Load and store, register offset | bits 11:9: str, strh, strb, ldrsb, ldr, ldrh, ldrb, ldrsh: Rt, [Rn, Rm] |
| 011 B L | Load and store word and byte, immediate | str/ldr Rt, [Rn, #imm5 × 4]; strb/ldrb with #imm5 |
| 1000 L | Load and store halfword, immediate | strh/ldrh Rt, [Rn, #imm5 × 2] |
| 1001 L | Load and store, stack-relative | str/ldr Rt, [sp, #imm8 × 4] |
| 10100, 10101 | Address | adr Rd, label (add Rd, pc, #imm), add Rd, sp, #imm8 × 4 |
| 1011 | Miscellaneous | See the next table |
| 1100 L | Load and store multiple | stm Rn!, {list}, ldm Rn{!}, {list} (no writeback when Rn is in the load list) |
| 1101 | Conditional branch, udf, svc | b<cond> label (cond = bits 11:8 except 1110 and 1111, offset × 2 + 4), udf #imm8 (1110), svc #imm8 (1111) |
| 11100 | Unconditional branch | b label (11-bit offset × 2) |
| 11101, 11110, 11111 | First half of a T32 instruction | See below |
| Bits 15:8 of group 1011 | Instruction |
|---|---|
| 10110000 | add sp, #imm7 × 4 (bit 7 set: sub sp, #imm7 × 4) |
| 1011 x0x1 (bits 11, 9) | cbz Rn, label, cbnz: offset i:imm5 × 2 forward only (ARMv6-M no, ARMv7 and ARMv8-M yes) |
| 10110010 | sxth, sxtb, uxth, uxtb: Rd, Rm (bits 7:6) |
| 1011 010x, 1011 110x | push {list} (bit 8 adds lr), pop {list} (bit 8 adds pc: a return) |
| 10110110 0110 x aif | cpsie, cpsid with a, i, f (bit 4 chooses id); ARMv6 and M profile (i and f) |
| 10110110 0x01 0 e 000, 10110110 0101 e 000 | setpan (ARMv8.1, bit 3), setend (bit 3 set: be) |
| 10111010 | rev, rev16, revsh, and hlt #imm6 (bits 7:6 = 10, ARMv8) |
| 10111110 | bkpt #imm8 |
| 10111111 | Hints and IT: bits 3:0 = 0000: nop (0), yield (1), wfe (2), wfi (3), sev (4), sevl (5), else hint #n; bits 3:0 ≠ 0000: it |
IT blocks
it<x><y><z> cond (0xBF00 | firstcond << 4 | mask) makes the next one to four instructions conditional. firstcond is the condition of the first instruction. The mask has a 1 as terminator: its bits above the lowest set bit say, for the second, third and fourth instruction, whether it runs on the same condition (t, then) or the opposite (e, else); the opposite of a condition is the same code with bit 0 inverted. So 0xBF08 is it eq (one instruction), 0xBF04 is itt eq, 0xBF0C is ite eq, and 0xBF01 is itttt eq.
How the decoder tracks it. It keeps the architecture’s eight-bit ITSTATE (firstcond in bits 7:4, the mask in 3:0). Each instruction decoded under a non-zero mask gets its condition as a mnemonic suffix and no S suffix on the 16-bit data-processing instructions; afterwards the state moves on (if ITSTATE[2:0] is zero the block ends, else bits 4:0 shift left by one). In a listing that decodes at every halfword, the state at an offset is found by looking back up to eight bytes for an IT instruction whose block runs exactly to this offset; so a block is recognised wherever the view starts, and an instruction in the second half of a 32-bit one is read as it would be if reached from the IT in front.
UNPREDICTABLE IT words. An it whose firstcond is 1111 is UNPREDICTABLE, and so is one whose firstcond is 1110 (AL) when the mask has more than one bit set (ite al; itt al has one bit and is not flagged). This is the ARM ARM’s condition for IT, if firstcond == ‘1111’ || (firstcond == ‘1110’ && BitCount(mask) != 1), written from memory (the ARM ARM is not on this machine). The decoder shows such a word as the it it would be, with the status unpredictable and the condition written al for 1111 (GNU writes <und>); before 2026-11-19 firstcond 1111 was refused as .short. LLVM 22.1.8 warns about every firstcond 1111 word and about no firstcond 1110 word; GNU objdump 2.47 prints all of them as IT without comment. A halfword with mask 0 is not an IT but a hint (0xBF00 nop, then yield, wfe, wfi, sev, sevl and the reserved hints).
Inside the block: a conditional branch (b<cond> with its own condition) is UNPREDICTABLE except as the last instruction; it itself, and 16-bit movs Rd, Rm (lsl #0), are UNPREDICTABLE; bx, blx, b, pop {…, pc} and loads into the PC may only be the last instruction. ARMv8 deprecates IT blocks that hold more than one instruction or instructions other than a short list. The decoder flags the first three and does not flag the ARMv8 deprecation.
T32: the 32-bit encodings
With bits 12:11 of the first halfword (01 for 11101, 10 for 11110, 11 for 11111) and bits 10:4 (op2) and bit 15 of the second halfword, the groups are:
| Bits 12:11 | Bits 10:4 | Group |
|---|---|---|
| 01 | 00xx0xx | Load and store multiple (ldm, stm, push, pop, ldmdb, stmdb), srs, rfe |
| 01 | 00xx1xx | Load and store dual (ldrd, strd), exclusive (ldrex, strex and the b, h, d forms), load-acquire, store-release, table branch (tbb, tbh) |
| 01 | 01xxxxx | Data processing (shifted register): and, bic, orr, orn, eor, pkhbt, pkhtb, add, adc, sbc, sub, rsb and tst, teq, cmn, cmp, mov, mvn, shifts and rrx |
| 01 | 1xxxxxx | Coprocessor, VFP, Advanced SIMD |
| 10 | x0xxxxx, bit 15 = 0 | Data processing (modified immediate), with the immediate i:imm3:imm8 expanded by the Thumb rule (a byte, byte in alternate bytes, byte replicated, or a rotated 8-bit value with the top bit set) |
| 10 | x1xxxxx, bit 15 = 0 | Data processing (plain binary immediate): addw, subw, adr, movw, movt, ssat, usat, sbfx, ubfx, bfi, bfc |
| 10 | bit 15 = 1 | Branches and miscellaneous control: b<cond>.w, b.w, bl, blx, msr, mrs, hints, cps, barriers, bxj, eret/subs pc, lr, hvc, smc, udf.w |
| 11 | 000xxx0 | Store single data item (str, strb, strh and the T forms) |
| 11 | 00xx001, 00xx011, 00xx101 | Load byte, halfword, word, signed forms, and the preloads pld, pldw, pli |
| 11 | 010xxxx | Data processing (register): shifts by register, extends (sxtab, uxth …), parallel add and subtract, qadd, rev, rbit, clz, sel, crc32 |
| 11 | 0110xxx | Multiply, multiply-accumulate and absolute difference (mul, mla, mls, smul, smla, smuad, smlad, smmul, usad8 …) |
| 11 | 0111xxx | Long multiply and divide (smull, umull, smlal, umlal, umaal, smlald, sdiv, udiv) |
| 11 | 1xxxxxx | Coprocessor, VFP, Advanced SIMD |
The decoder writes the .w suffix as LLVM does: on instructions that also have a 16-bit encoding (add.w, mov.w, ldr.w, stm.w, b.w, nop.w), but not on those that have none (addw, movw, ldrd, sdiv, bfi, ldr r0, [r1, #-4]!).
A bl or blx in ARMv4T to ARMv6 is the same pair of halfwords with the J bits taken as 1.
T32 data processing
Shifted register: bits 8:5 of the first halfword select the operation as in A32 (0000 and, 0001 bic, 0010 orr or mov, 0011 orn or mvn, 0100 eor or teq, 0110 pkhbt and pkhtb, 1000 add or cmn, 1010 adc, 1011 sbc, 1101 sub or cmp, 1110 rsb); S is bit 4; the test instructions are the forms with Rd = 1111 and S = 1. The shift is in the second halfword (imm3 and imm2, type in bits 5:4). Modified immediate and plain binary immediate as in the table above; adr is addw or subw with Rn = pc.
T32 multiply
mul and mla (1111 1011 0000 Rn | Ra Rd 0000 Rm), mls (0001), smull, umull, smlal, umlal (1111 1011 1000 …), umaal (1111 1011 1110 … 0110), sdiv (1111 1011 1001 Rn | 1111 Rd 1111 Rm), udiv (1111 1011 1011 …). Divide needs ARMv7-M or ARMv7E-M or ARMv8, or the ARMv7-A virtualisation extensions. umaal belongs to the DSP extension: the decoder shows it as undefined on ARMv7-M and on ARMv8-M mainline without DSP, and accepts it on ARMv7-A, ARMv7E-M and ARMv8-M mainline with DSP (GNU/LLVM behaviour, not the ARM ARM: LLVM ARMInstrThumb2.td line 3100 gives t2UMAAL Requires<[IsThumb2, HasDSP]>; the ARM ARM was not reachable).
T32 DSP and multiply variants
smulbb family (1111 1011 0001 …), smuad and smlad (0010), smulwb (0011), smusd and smlsd (0100), smmul and smmla (0101), smmls (0110), usad8 and usada8 (0111), smlalbb and smlald and smlsld; qadd, qsub, qdadd, qdsub (1111 1010 1000 Rn | 1111 Rd 10 op Rm). They need the DSP extension on the M profile (ARMv7E-M, ARMv8-M mainline with DSP).
Membership of the DSP extension in this decoder (shown as undefined without it): the saturating q forms and sel, the parallel add and subtract family, all the multiplies of this section, smlal/smlald/smlsld, umaal, sxtb16/uxtb16 and every extend-and-add form (sxtah, uxtah, sxtab, uxtab, sxtab16, uxtab16). Plain ARMv7-M and ARMv8-M mainline without DSP have the plain sxtb, sxth, uxtb, uxth only. The exclusive doubleword instructions (ldrexd, strexd, ldaexd, stlexd) do not exist on any M-profile level. All of this follows LLVM (HasDSP, IsNotMClass), GNU/LLVM behaviour, not the ARM ARM; the sources are saved with their SHA-256 in samples/arm/sources.
T32 media instructions
Parallel add and subtract (1111 1010 1 op Rn | 1111 Rd 0 prefix Rm; the prefix in bits 6:4 of the second halfword is s 000, q 001, sh 010, u 100, uq 101, uh 110; the operation in bits 6:4 of the first is add8 000, add16 001, asx 010, sub8 100, sub16 101, sax 110), the extends sxth, uxtb16, uxtab and the rest (1111 1010 0 op Rn | 1111 Rd 1 rot Rm), rev, rev16, rbit, revsh, clz (the two copies of Rm, in bits 19:16 of the first halfword and 3:0 of the second, must be equal), sel, pkhbt, ssat, usat, ssat16, usat16, sbfx, ubfx, bfi, bfc, and crc32b/h/w, crc32cb/ch/cw (1111 1010 110 C Rn | 1111 Rd 10 sz Rm).
T32 load and store
Word, halfword and byte: first halfword 1111 1000 U S size L Rn (S is the sign bit of ldrsb and ldrsh; size 00 byte, 01 halfword, 10 word). Bit 7 of the first halfword set: a 12-bit positive offset (ldr.w Rt, [Rn, #imm12]). Otherwise the second halfword has bit 11 clear: register offset with lsl #0 to 3 (ldr.w Rt, [Rn, Rm, lsl #2]); or bit 11 set and P U W in bits 10:8: an 8-bit offset, pre-indexed, post-indexed or negative offset (ldr r0, [r1, #-4]!), or PUW = 110 the unprivileged ldrt, strt. Rn = pc is a literal load (ldr.w Rt, [pc, #±imm12]). With Rt = pc a byte or halfword load is a preload hint: pld (byte), pldw (halfword, unsigned), pli (signed byte); the other combinations are unallocated hints and shown as nop. ldrd and strd take an offset of imm8 × 4 with P, U and W in bits 8, 7, 5.
T32 load and store multiple
1110 100 op 0 W L Rn: op 01 is increment-after (ldm.w, stm.w; pop.w is ldm sp!), op 10 is decrement-before (ldmdb, stmdb; push.w is stmdb sp!), op 00 is srsdb (L = 0) and rfedb (L = 1), op 11 srsia and rfeia. The register list is the whole of the second halfword: SP in a list is UNPREDICTABLE, PC only in a load and not with LR.
T32 exclusive, acquire and release
strex Rd, Rt, [Rn, #imm8 × 4] (1110 1000 0100) and ldrex (0101); with bit 7 of the first halfword set: ldrexb, ldrexh, ldrexd, strexb, strexh, strexd (second halfword bits 7:4 = 0100, 0101, 0111), tbb and tbh (bits 7:4 = 0000, 0001), and the ARMv8 lda, ldab, ldah, stl, stlb, stlh (1000 to 1010), ldaex, stlex and their b, h, d forms (1100 to 1111).
T32 branches
b<cond>.w (1111 0 S cond imm6 | 10 J1 0 J2 imm11, 21-bit offset), b.w (1111 0 S imm10 | 10 J1 1 J2 imm11, 25-bit), bl (… 11 J1 1 J2 …), blx (… 11 J1 0 J2 …, ARM state, not in the M profile). I1 = NOT(J1 XOR S), I2 = NOT(J2 XOR S); the target is address + 4 + offset, rounded down to a multiple of 4 first for blx. udf.w #imm16 (1111 0111 1111 imm4 | 1010 imm12), hvc (1111 0111 1110 … | 1000 …), smc (1111 0111 1111 imm4 | 1000 0000 0000 0000), cbz and cbnz are 16-bit.
T32 status register
msr (1111 0011 100R Rn | 1000 mask 00 SYSm) and mrs (1111 0011 111R 1111 | 1000 Rd SYSm). On the A profile the fields are written as in A32; on the M profile the special register is named by SYSm: 0 apsr (iapsr 1, eapsr 2, xpsr 3), 5 ipsr, 6 epsr, 7 iepsr, 8 msp, 9 psp, 10 msplim, 11 psplim, 16 primask, 17 basepri, 18 basepri_max, 19 faultmask, 20 control, and the ARMv8-M non-secure aliases. Which profile has which: ARMv6-M and ARMv8-M baseline have 0 to 9, 16 and 20 only (no basepri, basepri_max or faultmask: SYSm 17 to 19 are undefined there); ARMv7-M and ARMv8-M mainline add 17 to 19; msplim, psplim (10, 11) and the _ns aliases (0x88 and up) exist only from ARMv8-M. The decoder shows the others as undefined (GNU/LLVM behaviour, not the ARM ARM: LLVM refuses mrs r0, faultmask on ARMv6-M). cpsie.w and cpsid.w (1111 0011 1010 1111 | 1000 0 imod M AIF mode), bxj, subs pc, lr, #imm8 (eret for imm8 = 0), setend and setpan are T16.
T32 hints and barriers
1111 0011 1010 1111 | 1000 0000 hint: nop.w, yield.w, wfe.w, wfi.w, sev.w, sevl.w, dbg #n, csdb, esb; barriers: 1111 0011 1011 1111 | 1000 1111 op option: clrex (0010), dsb (0100), dmb (0101), isb (0110), sb (0111). The options are written as in A32.
T32 coprocessor instructions
The same layout as A32 with the first halfword in the high half of the word and cond 1110 (1111 for the ‘2’ forms): mcr, mrc, cdp, ldc, stc, mcrr, mrrc (1110 1110, 1110 110x, 1110 1100 010x). Coprocessors 10 and 11 are VFP and Advanced SIMD: a word with coprocessor field 10 or 11 is decoded as a VFP or Advanced SIMD instruction or it is undefined; there is no generic ldc, stc, mcr, mrc or cdp to them at any level, except the long unindexed ldc2l/stc2l p10, cN, [Rn], {option} that LLVM keeps below ARMv8 (GNU/LLVM behaviour, not the ARM ARM). The ARMv8-A restrictions of the A32 page apply. Advanced SIMD element and structure loads and stores are the first halfword 1111 1001 xxx0 xxxx (vld1 to vld4, vst1 to vst4, every size, lane form and Rm form including a core register as Rm), decoded through the A32 table with the word mapped to 1111 0100.
Branch Future (ARMv8.1-M)
The Low Overhead Branch Extension of ARMv8.1-M has five instructions that tell the processor about a branch before it is reached (DDI 0553B.z C2.4.20 and C2.3.4.4.1). The instruction at address A names a branch point (the first instruction of the fallback code) and a target: when execution reaches the branch point the branch is taken instead of executing the instruction there, which saves the cost of a branch the processor did not know about. A processor may treat the instruction as a nop, so the fallback code at the branch point stays and does the same job. They are shown at the ARMv8.1-M Mainline level only; the first halfword is 1111 0 boff 1… with boff (bits 10:7) not zero: boff = 0000 is the loop instruction space (wls, dls, le, lctp).
| Instruction | Encoding (first halfword | second halfword) | Operands |
|---|---|---|
bf | 11110 boff 10 immA5 | 1110 immC immB10 1 | branch point, target |
bfl | 11110 boff immA7 | 1100 immC immB10 1 | branch point, target (the link register is set when the branch is taken: the branch point plus 4, the length of the bl that normally follows) |
bfx | 11110 boff 110 Rn | 1110 (0)×11 1 | branch point, register |
bflx | 11110 boff 111 Rn | 1110 (0)×11 1 | branch point, register (the link register is set to the branch point plus 2, the length of blx) |
bfcsel | 11110 boff 0 cond T immA1 | 1110 immC immB10 1 | branch point, target, else address, condition |
The branch point is A + 4 + 2 × boff (so boff = 1 is two bytes after the end of the instruction). The target is A + 4 + the offset immA:immB:immC:0 sign-extended (17 bits for bf, 19 for bfl, 13 for bfcsel; the offset has no bit 0, the architecture’s own form of the offset carries the Thumb bit there). bfx and bflx take the target from a register. bfcsel is a conditional select: when the condition (evaluated at the bfcsel, not at the branch point) passes it sets up the branch to the target, otherwise to the else address, which is the instruction after the one at the branch point (T = 0: a 2-byte instruction, T = 1: 4 bytes), unless another branch future is already pending. The decoder shows bf 0x106, 0xfe with both addresses, links the target in the disassembly, and adds a note on the branch point. Unpredictable: bfx and bflx with SP or PC, bfcsel inside an IT block or with the condition 111x, a non-zero should-be-zero bit. It was compared with llvm-objdump: every encoding the manual defines and 600,000 random words agree. The condition names are written as LLVM writes them (hs and lo for the carry conditions).
PACBTI (ARMv8.1-M)
The Pointer Authentication and Branch Target Identification Extension is an option of ARMv8.1-M Mainline (PACBTI in the decoder options of the ELF and Cortex-M viewers; the ELF viewer turns it on when Tag_PAC_extension or Tag_BTI_extension is not 0). Four instructions are hints (1111 0011 1010 (1111) | 10(0)0(0)000 hint8), so a processor without the extension executes them as nop, and the decoder shows them as hint.w #n unless the option is on: pacbti r12, lr, sp (hint 0x0d, computes a code for the return address LR with the stack pointer as modifier into R12, and is a landing pad), pac r12, lr, sp (0x1d, the same without the landing pad), aut r12, lr, sp (0x2d, checks the code in R12 and raises a UsageFault if it does not match) and bti (0x0f, a branch target landing pad). None is allowed in an IT block (unpredictable). Three more are in the T32 multiply space, with the register fields of smmla: autg Ra, Rn, Rm (1111 1011 0101 Rn | Ra 1111 0000 Rm; Ra = 1111 is smmul), bxaut Ra, Rn, Rm (the same with 0001: authenticates the address in Rn with modifier Rm against Ra and then branches there; it ends a block like bx), and pacg Rd, Rn, Rm (1111 1011 0110 Rn | 1111 Rd 0000 Rm: a general code of Rn and Rm into Rd). PC as Rn or Rm, and SP as Ra or Rd, are unpredictable; bxaut also with SP as Rn. The key registers are the mrs/msr special registers SYSm 0010 0000 to 0010 0011 pac_key_p_0 to pac_key_p_3 and 0010 0100 to 0010 0111 pac_key_u_0 to pac_key_u_3; the same with the top bit set (1010 0xxx) are the Non-secure views (_ns). Without the extension those SYSm values are unpredictable. Sources: DDI 0553B.z C2.4.17, C2.4.18, C2.4.28, C2.4.30, C2.4.135 to C2.4.137, C2.4.125 (MRS) and C2.4.126 (MSR); checked against llvm-mc encodings and 600,000 random words against llvm-objdump +pacbti.
Custom Datapath Extension (ARMv8-M Mainline)
The Custom Datapath Extension lets a chip put its own data-path instructions in the coprocessor encoding space (DDI 0553B.z B3.37, C2.4.51 to C2.4.56 and C2.4.338 to C2.4.343). Which of the coprocessors 0 to 7 are CDE coprocessors is a choice of the chip and the build attributes have no tag for it, so the decoder has an option, CDE coprocessors (a list such as p0, p1 or p0-p3; empty: none). For those coprocessors the words below are the CDE instructions, any other coprocessor word of that number is undefined, and the other coprocessors stay generic cdp, mcr, ldc and so on. Three classes by the number of register sources (none, one, two) and a dual form that writes a pair of consecutive general registers (an even register up to r10); the a forms also read the destination. Register 15 in a source or destination means the flags (apsr_nzcv). The immediate is the concatenation of the opcode fields, in the order in which they are written in the diagrams:
| Instruction | First halfword | Second halfword | Immediate |
|---|---|---|---|
cx1, cx1a, cx1d, cx1da | 111 A 1110 00 op1(6) | Rd 0 coproc op2 D op3(6) | 13 bits; D = 0 single, 1 dual |
cx2 … | 111 A 1110 01 op1(2) Rn | Rd 0 coproc op2 D op3(6) | 9 bits |
cx3 … | 111 A 1110 1 op1(3) Rn | Rm 0 coproc op2 D op3(2) Rd | 6 bits |
vcx1, vcx1a (S or D register: sz) | 111 A 110 sz 0 D 10 op1(4) | Vd 0 coproc op2 0 op3(6) | 11 bits |
vcx2 … | 111 A 110 sz 0 D 11 op1(4) | Vd 0 coproc op2 0 M op3 Vm | 6 bits |
vcx3 … | 111 A 110 sz 1 D op1(2) Vn | Vd 0 coproc N 0 M op2 Vm | 3 bits |
vcx1, vcx2, vcx3 with Q registers (Helium) | 111 A 110 op1 … (the sz bit is part of the immediate, bit 6 of the second halfword is 1) | as above with the register numbers D:Vd[3:1], and so on | 12, 7 and 4 bits; they can be predicated (vcx1t) |
The S and D register forms need the floating-point unit or Helium; the M-profile register file has D0 to D15, so a D register form with D, M or N set is undefined, as is a Q register form with D, M, N set or an odd Vd, Vm, Vn (LLVM accepts them; it was compared with llvm-objdump and every difference is that one). Unpredictable: SP as a destination or source, an odd or too high register of a dual form, a form that does not accumulate (no a) inside an IT block, and the vector forms inside an IT block. CDE is not in ARMv8-M Baseline.
ThumbEE (ARMv7-A and ARMv7-R, deprecated)
ThumbEE is a variant of Thumb for dynamically generated code. Every encoding below is from the Arm ARM ARMv7-A/R edition (DDI 0406C.d, chapter A9 and Table A6-15); neither LLVM nor GNU binutils decodes ThumbEE, so the test (test-arm-thumbee.mjs) uses words composed by hand from the bit diagrams. The ARMv8 manual (DDI 0487M.d) does not mention ThumbEE and the ARMv7-M and ARMv6-M manuals do not have it, so the decoder shows all of it as undefined at those levels. Arm deprecates ThumbEE from issue C.a of the manual but requires ARMv7-A implementations to keep it; it is optional in ARMv7-R, and the ARMv7-A level here covers both.
ENTERX and LEAVEX are two 32-bit instructions that exist in Thumb state and in ThumbEE state: enterx is 1111 0011 1011 (1111) | 10(0)0 (1111) 0001 (1111) (word 0xf3bf 0x8f1f) and leavex is the same with op 0000 (0x8f0f); they take the previously undefined slots 0000 and 0001 of the miscellaneous control table next to clrex, dsb, dmb, isb. They are not permitted in an IT block (unpredictable), and enterx is undefined in Hyp mode. enterx changes from Thumb to ThumbEE state; leavex changes back (in Thumb state it has no effect). The decoder shows them at the ARMv7-A level in Thumb state.
ThumbEE state is a decoder mode (mode: 'thumbee'; the layout and the ELF viewer do not switch to it, because the state change is dynamic and the ELF mapping symbols have no ThumbEE class, so a viewer cannot know where it starts). It is Thumb with these differences. 16-bit space 1100 xxxx, which is ldm and stm in Thumb, becomes (opcode = bits 11:8): 0000 hbp #imm3, #handler5; 0001 undefined; 001L hb and hbl #handler8; 01xx hblp #imm5, #handler5; 100x ldr Rt, [Rn, #-imm3 × 4] (array operations); 1010 chka Rn, Rm with N in bit 7 as the high bit of Rn (unpredictable with Rn = pc or Rm = sp or pc); 1011 ldr Rt, [r10, #imm5 × 4] (literal pool); 110x ldr Rt, [r9, #imm6 × 4] (frame); 111x str Rt, [r9, #imm6 × 4]. The handler branches go to TEEHBR + handler × 32 and are unpredictable in an IT block unless last; hbl and hblp put the return address in LR, hbp and hblp put the parameter in R8; chka branches to TEEHBR − 8 (IndexCheck) when Rn ≤ Rm unsigned. The register-offset forms scale the offset: ldr, str by lsl #2, ldrh, ldrsh, strh by lsl #1 (0101 000, 001, 100, 101, 111). BLX (immediate) is undefined. Null check: every instruction whose mnemonic starts LD, ST, VLD or VST, and PUSH, POP, TBB, TBH, VPUSH, VPOP, branches to the NullCheck handler (TEEHBR − 4) when its base register is zero; the decoder adds a note, it does not model the branch. Interworking to ARM state is not supported in ThumbEE state (the instructions that would do it are unpredictable), and bxj behaves as bx.
Jazelle is a different case: the Jazelle state executes Java virtual machine bytecodes, not Arm instructions. The architecture defines only the way in (bxj, which behaves as bx in the trivial implementation that every ARMv7-A with the Virtualization Extensions has) and the state bits; the hardware’s bytecode subset and its register conventions are the implementation’s “subarchitecture” and are explicitly “not described in this manual” (DDI 0406C.d A2.11, A2.11.1). So there is no Arm-defined Jazelle instruction table to decode; bxj is decoded.
The M profile
ARMv6-M has the T16 instructions except cbz, it, setend and the ARMv6 extends it does have (sxtb …, rev), plus bl, msr, mrs, dmb, dsb, isb and udf.w from T32. ARMv7-M adds all the T32 integer instructions except those of the DSP extension; ARMv7E-M adds the DSP instructions; ARMv8-M baseline adds divide, cbz, movw/movt, load-acquire and store-release; ARMv8-M mainline is ARMv7-M plus those, with TrustZone (sg, bxns, blxns, and tt, ttt, tta, ttat: 1110 1000 0100 Rn | 1111 Rd A T 00 0000, the strex encoding with Rt = pc, bit 7 = A and bit 6 = T; shown as tt Rd, Rn on the ARMv8-M levels, GNU/LLVM behaviour, not the ARM ARM; vlldm/vlstm are decoded, see the overview; ARMv8.1-M adds the instructions of branch future, PACBTI and Helium, and the Custom Datapath Extension is an option of ARMv8-M Mainline, see below). Plain ARMv7-M and ARMv6-M have no floating-point unit at all: VFP words are undefined there, whatever the VFP option says. The decoder shows an instruction of a later level as undefined for an earlier one; it does not model optional extensions that a particular core lacks.