How to generate the machine code of Thumb instructions?
问题 I searched Google for generating machine code of ARM instructions, such as this one Converting very simple ARM instructions to binary/hex The answer referenced ARM7TDMI-S Data Sheet (ARM DDI 0084D). The diagram of data processing instructions is good enough. Unfortunately, it's for ARM instructions, not for Thumb/Thumb-2 instructions. Take the B instruction as an example. ARM Architecture Reference Manual - ARMv7-A and ARMv7-R edition section A8.8.18, Encoding T4: For the assembly code: B