OSDN Git Service

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)
commit68813605dea69ca0af26af7dd00384c78c1df05d
treec49be9bbe84c77025e923dee1fab14fe99b244b8
parent6fae2e8a1d9ee09e25aee6514b7544e059a8ee68
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