Re: [PATCH 07/14] bpf/tests: Add more ALU64 BPF_MUL tests
From: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Date: 2021-07-29 21:21:56
Also in:
netdev
From: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Date: 2021-07-29 21:21:56
Also in:
netdev
On Thu, Jul 29, 2021 at 1:32 AM Yonghong Song [off-list ref] wrote:
quoted
@@ -3051,6 +3051,31 @@ static struct bpf_test tests[] = { { }, { { 0, 2147483647 } }, }, + { + "ALU64_MUL_X: 64x64 multiply, low word", + .u.insns_int = { + BPF_LD_IMM64(R0, 0x0fedcba987654321LL), + BPF_LD_IMM64(R1, 0x123456789abcdef0LL), + BPF_ALU64_REG(BPF_MUL, R0, R1), + BPF_EXIT_INSN(), + }, + INTERNAL, + { }, + { { 0, 0xe5618cf0 } }Same here. Maybe capture the true 64-bit R0 value?
Same as the LSH/RSH/ARSH tests. Uses 32-bit shift to test high and low words in two runs.