4 ms·
This is also very common on ARM; they call it a "literal pool": https://developer.arm.com/documentation/dui0473/m/writing-arm-assembly-language/literal-pools ht
by NobodyNada 3y ago
This is also very common on ARM; they call it a "literal pool": https://developer.arm.com/documentation/dui0473/m/writing-arm-assembly-language/literal-pools https://developer.arm.com/documentation/dui0473/m/writing-ar...
- duskwuff 3y agoThe Thumb encoding for ARM also has some very clever encodings for inline constants: https://developer.arm.com/documentation/ddi0308/d/Thumb-Instructions/Immediate-constants/Encoding https://developer.arm.com/documentation/ddi0308/d/Thumb-Inst... Specifically, it can encode any 8-bit value rotated by any number of bits, as well as any value of the form 0x00XY00XY, 0xXY00XY00, or 0xXYXYXYXY. Combined with the use of inverted instructions (e.g. MVN instead of MOV, SUB instead of AND, BIC instead of AND, etc), this covers a surprising number of the 32-bit constants which are likely to appear in a program.