Thread (43 messages) 43 messages, 2 authors, 2021-07-29

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

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help