arm64: selftests: Generate all the possible logical immediates as a header
Aarch64 has instructions to generate reasonably complicated 32 or 64 bit masks from only 13 bits of information. To test the in-kernel code that spots the pattern to produce the instruction encoding a golden set of values is needed. A header file containing these is large. Instead, generate every possible instruction encoding, and its decoded immediate, based on the arm-arm's DecodeBitMasks() pseudocode. These are output in a format that can be used in a header file for the test. Having the golden values in a header file allows them to be inspected, and checked against a trusted source. The generation program can be told to pass each value through objdump and compared. Unsat's jitterbug project has a python script that does this too, but the license isn't clear from the github repository. Link: https://lore.kernel.org/linux-arm-kernel/CAB-e3NRCJ_4+vkFPkMN67DwBBtO=sJw > CC: Luke Nelson <luke.r.nels@gmail.com> Signed-off-by:James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment