| |||||||
Technical Support On-Line Manuals RealView Assembler User's Guide | Loading constants into registers
You cannot load an arbitrary 32-bit immediate constant into a register in a single instruction without performing a data load from memory. This is because ARM and Thumb-2 instructions are only 32 bits long. You can load any 32-bit value into a register with a data load, but there are more direct and efficient ways to load many commonly-used constants. You can include many commonly-used constants directly as operands within data processing instructions, without a separate load operation. The range of constants that you can include as operands in 16-bit Thumb instructions is much smaller. In ARMv6T2 and above, you can load any 32-bit value into a register with two instructions, a The following sections describe:
| ||||||
| |||||||