Lines Matching refs:MakeInstruction
114 CodeGen::Node MakeInstruction(uint16_t code, in MakeInstruction() function in sandbox::__anon67a4ef620111::ProgramTest
118 CodeGen::Node res = gen_.MakeInstruction(code, k, jt, jf); in MakeInstruction()
181 CodeGen::Node head = MakeInstruction(BPF_RET + BPF_K, 0); in TEST_F()
190 CodeGen::Node head = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 42, in TEST_F()
191 MakeInstruction(BPF_RET + BPF_K, 1), in TEST_F()
192 MakeInstruction(BPF_RET + BPF_K, 0)); in TEST_F()
201 CodeGen::Node ret = MakeInstruction(BPF_RET + BPF_K, 0); in TEST_F()
202 CodeGen::Node head = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 42, ret, ret); in TEST_F()
220 CodeGen::Node insn0 = MakeInstruction(BPF_RET + BPF_K, 42); in TEST_F()
221 CodeGen::Node insn1 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 42, insn0); in TEST_F()
225 CodeGen::Node insn3 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 42, in TEST_F()
226 MakeInstruction(BPF_RET + BPF_K, 42)); in TEST_F()
230 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 42, insn2, insn3); in TEST_F()
231 CodeGen::Node insn5 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 23, insn4); in TEST_F()
240 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 42, insn5, insn4); in TEST_F()
264 CodeGen::Node i7 = MakeInstruction(BPF_RET + BPF_K, 1); in TEST_F()
265 CodeGen::Node i6 = MakeInstruction(BPF_RET + BPF_K, 0); in TEST_F()
266 CodeGen::Node i5 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, i6, i7); in TEST_F()
267 CodeGen::Node i4 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 0, i5); in TEST_F()
268 CodeGen::Node i3 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 2, i4, i5); in TEST_F()
269 CodeGen::Node i2 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 0, i3); in TEST_F()
270 CodeGen::Node i1 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, i2, i3); in TEST_F()
271 CodeGen::Node i0 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 1, i1); in TEST_F()
288 CodeGen::Node i5 = MakeInstruction(BPF_RET + BPF_K, 1); in TEST_F()
289 CodeGen::Node i4 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 0, i5); in TEST_F()
290 CodeGen::Node i3 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 2, i4, i5); in TEST_F()
291 CodeGen::Node i2 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 0, i3); in TEST_F()
292 CodeGen::Node i1 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, i2, i3); in TEST_F()
293 CodeGen::Node i0 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 1, i1); in TEST_F()
314 CodeGen::Node i7 = MakeInstruction(BPF_RET + BPF_K, 1); in TEST_F()
315 CodeGen::Node i6 = MakeInstruction(BPF_RET + BPF_K, 0); in TEST_F()
316 CodeGen::Node i5 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, i6, i7); in TEST_F()
317 CodeGen::Node i4 = MakeInstruction(BPF_RET + BPF_K, 42); in TEST_F()
318 CodeGen::Node i3 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 2, i4, i5); in TEST_F()
319 CodeGen::Node i2 = MakeInstruction(BPF_RET + BPF_K, 42); in TEST_F()
320 CodeGen::Node i1 = MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, i2, i3); in TEST_F()
321 CodeGen::Node i0 = MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 1, i1); in TEST_F()
328 CodeGen::Node a = MakeInstruction(BPF_RET + BPF_K, 0); in TEST_F()
329 EXPECT_EQ(a, MakeInstruction(BPF_RET + BPF_K, 0)); in TEST_F()
330 CodeGen::Node b = MakeInstruction(BPF_RET + BPF_K, 1); in TEST_F()
331 EXPECT_EQ(a, MakeInstruction(BPF_RET + BPF_K, 0)); in TEST_F()
332 EXPECT_EQ(b, MakeInstruction(BPF_RET + BPF_K, 1)); in TEST_F()
333 EXPECT_EQ(b, MakeInstruction(BPF_RET + BPF_K, 1)); in TEST_F()
337 MakeInstruction(BPF_LD + BPF_W + BPF_ABS, 0, in TEST_F()
338 MakeInstruction(BPF_JMP + BPF_JSET + BPF_K, 0x100, a, b)); in TEST_F()
339 EXPECT_EQ(c, MakeInstruction( in TEST_F()
341 MakeInstruction(BPF_JMP + BPF_JSET + BPF_K, 0x100, a, b))); in TEST_F()
355 nodes.push_back(MakeInstruction(BPF_RET + BPF_K, 0)); in TEST_F()
358 MakeInstruction(BPF_ALU + BPF_ADD + BPF_K, i, nodes.back())); in TEST_F()
364 nodes.push_back(MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 0, in TEST_F()
382 nodes.push_back(MakeInstruction(BPF_RET + BPF_K, 0)); in TEST_F()
385 MakeInstruction(BPF_ALU + BPF_ADD + BPF_K, i, nodes.back())); in TEST_F()
391 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 0, nodes[0], nodes[1]); in TEST_F()
398 MakeInstruction(BPF_JMP + BPF_JEQ + BPF_K, 1, nodes[0], nodes[1]); in TEST_F()