Home | History | Annotate | Download | only in bpf_dsl

Lines Matching full:nodes

353   // Populate with 260 initial instruction nodes.
354 std::vector<CodeGen::Node> nodes;
355 nodes.push_back(MakeInstruction(BPF_RET + BPF_K, 0));
357 nodes.push_back(
358 MakeInstruction(BPF_ALU + BPF_ADD + BPF_K, i, nodes.back()));
364 nodes.push_back(MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 0,
365 nodes.rbegin()[jt], nodes.rbegin()[jf]));
366 RunTest(nodes.back());
380 // Populate with 260 initial instruction nodes.
381 std::vector<CodeGen::Node> nodes;
382 nodes.push_back(MakeInstruction(BPF_RET + BPF_K, 0));
384 nodes.push_back(
385 MakeInstruction(BPF_ALU + BPF_ADD + BPF_K, i, nodes.back()));
388 // Branching to nodes[0] and nodes[1] should require 3 new
391 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 0, nodes[0], nodes[1]);
392 EXPECT_EQ(nodes.back() + 3, one); // XXX: Implementation detail!
395 // Branching again to the same target nodes should require only one
398 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, nodes[0], nodes[1]);