ARM instruction evaluator: Learn more

| Home | About | Learn more | Feedback |
Use the form to select an instruction to run. The elements are as follows:
This allows you to lookup an ARM instruction. The assembly code syntax will be displayed, together with information about architecture version support. The tool will attempt to provide an example instruction, which can then be run by pressing the "run" button. Example code will fail to appear when instructions are not available for the currently selected architecture.
This selects the required version of the ARM architecture. Later versions provide more instructions. Be aware that when running instructions the result may correspond with an Undefined exception, e.g. 0xE16F1F12. Instruction behaviour can vary between architecture versions, especially with respect to Unpredictable code. The model does not support micro-controller architecture variants (e.g. ARMv7-M), which have a somewhat different underlying programmer's model.
Instruction Set
The ARM architecture supports multiple instruction sets. Standard ARM instructions are 32-bits wide and Thumb instructions are 16-bits wide. ARMv4 does not support the Thumb instruction set. The latest designs support Thumb-2, which provides double width (two 16-bit halfword) Thumb instructions. The Jazelle, Advanced SIMD and VFP extensions are not supported.
Processor mode
These modes correspond with running different types of code: regular "unprivileged" user code ("usr" mode) and "privileged" operating system code. System calls enable users to run privileged code, e.g. svc. Hardware interrupts will also change the current mode, but these are not available yet.
Byte order
When performing memory operations, the byte order determines the memory location for the bytes that form 16-bit, 32-bit and 64-bit words The precise configuration of byte ordering will be implementation dependent.
If-Then block
In architectures with Thumb-2 support, Thumb instructions are "conditionally" run when they are in an "IT block". This is the block of (up to four) instructions that follow an IT instruction. Consider, for example, the following segment of Thumb-2 code:
cmp r3,r4
itet eq
subeq r1,r2
addne r2,r3
muleq r2,r1
To run the sub instruction you must first select "then-else-then" and "eq" from the menus. The add is run with "then-else" and "ne" selected, and the mul is run with "then" and "eq". Instructions that are outside of an IT block should be run with "Outside" selected.
Machine code
This is the hexadecimal encoding of an instruction. All op-codes are treated as being little-endian. The correct check-box must be selected to run machine code.
Assembly code
This accepts ARM UAL (Universal Assembler Language) syntax. (The old ARM syntax, e.g. addeqs, is not accepted.) The correct check-box must be selected to run assembly code.