...
Use bseti when profitable. Many cases of poor constant synthesis are failure to use bseti.Use "uw" variants of shifts/arithmetic instructions when the constant has bit 0x80000000 set.Use shNadd for constants evenly divisible by 9, 5 or 3.Use blcri in conjunction with lui or addi to clear a small number of bits, particularly in the high 33 bits of a 64bit wordAdjust constant so low 13 bits are 0x1800, recursively re-synthesize and restore low bits with trailing addi.Synthesize C' from C using bit inversion. Synthesize C', then invert the result. If that's better than synthesizing C directly, then use the inversion sequence.- Use pack for repeating constants
Depends on reassociation of constant in logical ops with shiftsDepends on basic Zbkb support
- Use pack as synthesis of last resort
...
Page Properties | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Updates
- Lyut's patterns to allow generation of pack, packw, packh automatically have been integrated.
- Reassociation of constants in logical ops with shifts integrated upstream
- Using pack to handle constants with equal high/low halves implemented
- Synthesizing the inverted constant, then inverting the result integrated upstream
- Adjusting the constant to have 0s in the low bits, synthesizing, then restoring low bits with addi integrated upstream.
...