# 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 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/07/7775558
- Thread: https://ratatoskr.run/netdev/2021/07/7774981/t.md

```text
On Thu, Jul 29, 2021 at 1:32 AM Yonghong Song [ref] wrote:
> > @@ -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.
```
