]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/tests: Add test of ALU shifts with operand register aliasing
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Fri, 1 Oct 2021 13:03:47 +0000 (15:03 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Oct 2021 15:04:26 +0000 (17:04 +0200)
commitf1662b02370b7b36400f1a155d6096c3ec0ebadd
treec49be9bbe84c77025e923dee1fab14fe99b244b8
parentfdd75e3032b9bde1b4a4ab569049cbb65ee82648
bpf/tests: Add test of ALU shifts with operand register aliasing

This patch adds a tests of ALU32 and ALU64 LSH/RSH/ARSH operations for the
case when the two operands are the same register. Mainly intended to test
JITs that implement ALU64 shifts with 32-bit CPU instructions.

Also renamed related helper functions for consistency with the new tests.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211001130348.3670534-10-johan.almbladh@anyfinetworks.com
lib/test_bpf.c