Home | History | Annotate | Download | only in seccomp-bpf

Lines Matching defs:head

195 void CodeGen::JoinInstructions(Instruction* head, Instruction* tail) {
199 if (BPF_CLASS(head->code) == BPF_JMP) {
200 if (BPF_OP(head->code) == BPF_JA) {
201 if (head->jt_ptr) {
204 head->jt_ptr = tail;
206 if (!head->jt_ptr && head->jf_ptr) {
207 head->jt_ptr = tail;
208 } else if (!head->jf_ptr && head->jt_ptr) {
209 head->jf_ptr = tail;
214 } else if (BPF_CLASS(head->code) == BPF_RET) {
216 } else if (head->next) {
219 head->next = tail;
309 BasicBlock* CodeGen::MakeBasicBlock(Instruction* head, Instruction* tail) {
310 // Iterate over all the instructions between "head" and "tail" and
313 for (;; head = head->next) {
314 bb->instructions.push_back(head);
315 if (head == tail) {
318 if (BPF_CLASS(head->code) == BPF_JMP) {
326 void CodeGen::AddBasicBlock(Instruction* head,
333 BranchTargets::const_iterator iter = branch_targets.find(head);
340 BasicBlock* bb = MakeBasicBlock(head, tail);
344 (*basic_blocks)[head] = bb;
360 Instruction* head = instructions;
361 for (Instruction* insn = head; insn;) {
371 AddBasicBlock(head, tail, branch_targets, basic_blocks, &first_block);
372 head = insn;
378 AddBasicBlock(head, insn, branch_targets, basic_blocks, &first_block);
400 head = insn;
409 AddBasicBlock(head, tail, branch_targets, basic_blocks, &first_block);
587 // into set of "head" nodes that no longer have any incoming branches.