aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/test_bpf.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 9a67456ba29a..413890815d3e 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -1735,6 +1735,27 @@ static struct bpf_test tests[] = {
1735 { }, 1735 { },
1736 { { 1, 0 } }, 1736 { { 1, 0 } },
1737 }, 1737 },
1738 {
1739 "load 64-bit immediate",
1740 .u.insns_int = {
1741 BPF_LD_IMM64(R1, 0x567800001234L),
1742 BPF_MOV64_REG(R2, R1),
1743 BPF_MOV64_REG(R3, R2),
1744 BPF_ALU64_IMM(BPF_RSH, R2, 32),
1745 BPF_ALU64_IMM(BPF_LSH, R3, 32),
1746 BPF_ALU64_IMM(BPF_RSH, R3, 32),
1747 BPF_ALU64_IMM(BPF_MOV, R0, 0),
1748 BPF_JMP_IMM(BPF_JEQ, R2, 0x5678, 1),
1749 BPF_EXIT_INSN(),
1750 BPF_JMP_IMM(BPF_JEQ, R3, 0x1234, 1),
1751 BPF_EXIT_INSN(),
1752 BPF_ALU64_IMM(BPF_MOV, R0, 1),
1753 BPF_EXIT_INSN(),
1754 },
1755 INTERNAL,
1756 { },
1757 { { 0, 1 } }
1758 },
1738}; 1759};
1739 1760
1740static struct net_device dev; 1761static struct net_device dev;