Re: [PATCH 2/3] arm64: insn: Add tests for aarch64_insn_gen_logical_immediate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 27, 2022 at 04:21:26PM +0000, James Morse wrote:
> Aarch64 has instructions to generate reasonably complicated 32 or 64
> bit masks from only 13 bits of information.
> aarch64_insn_gen_logical_immediate() has to created the immediate
> encoding by spotting the patterns in the 32 or 64 bit immediate.
> 
> Despite attempts to validate or model this code, or use it as-is outside
> the kernel tree, bugs still exist.
> 
> Add a self test module that tests this code in place against a golden
> set of values.
> 
> Signed-off-by: James Morse <james.morse@xxxxxxx>
> ---
>  arch/arm64/Kconfig.debug                   |  3 +
>  arch/arm64/Makefile                        |  2 +
>  arch/arm64/lib/Makefile                    |  2 +
>  arch/arm64/lib/insn.c                      |  3 +
>  arch/arm64/lib/test_insn.c                 | 90 ++++++++++++++++++++++

Can we put the new tests under tools/testing/selftests/arm64 as well,
please? It looks like there's precedence for having modules in there (e.g.
bpf_testmod.c).

In the meantime, I'll pick up patch 3.

Cheers,

Will



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux