All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite
@ 2021-10-01 13:03 Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 01/10] bpf/tests: Add tests of BPF_LDX and BPF_STX with small sizes Johan Almbladh
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch set adds a number of new tests to the test_bpf.ko test suite.
The new tests focus on the behaviour of operations with different
combinations of register operands, and in particular, when two or more
register operands are in fact the same register. It also verifies things
like a src register not being zero-extended in-place in ALU32 operations,
and that operations implemented with function calls do not clobber any
other eBPF registers.

Johan Almbladh (10):
  bpf/tests: Add tests of BPF_LDX and BPF_STX with small sizes
  bpf/tests: Add zero-extension checks in BPF_ATOMIC tests
  bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes
  bpf/tests: Add tests to check source register zero-extension
  bpf/tests: Add more tests for ALU and ATOMIC register clobbering
  bpf/tests: Minor restructuring of ALU tests
  bpf/tests: Add exhaustive tests of ALU register combinations
  bpf/tests: Add exhaustive tests of BPF_ATOMIC register combinations
  bpf/tests: Add test of ALU shifts with operand register aliasing
  bpf/tests: Add test of LDX_MEM with operand aliasing

 lib/test_bpf.c | 2803 ++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 2571 insertions(+), 232 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 01/10] bpf/tests: Add tests of BPF_LDX and BPF_STX with small sizes
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 02/10] bpf/tests: Add zero-extension checks in BPF_ATOMIC tests Johan Almbladh
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch adds a series of tests to verify the behavior of BPF_LDX and
BPF_STX with BPF_B//W sizes in isolation. In particular, it checks that
BPF_LDX zero-extendeds the result, and that BPF_STX does not overwrite
adjacent bytes in memory.

BPF_ST and operations on BPF_DW size are deemed to be sufficiently
tested by existing tests.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 254 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 254 insertions(+)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 21ea1ab253a1..a838a6179ca4 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -6907,6 +6907,260 @@ static struct bpf_test tests[] = {
 		{ },
 		{ { 0, (u32) (cpu_to_le64(0xfedcba9876543210ULL) >> 32) } },
 	},
+	/* BPF_LDX_MEM B/H/W/DW */
+	{
+		"BPF_LDX_MEM | BPF_B",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x0102030405060708ULL),
+			BPF_LD_IMM64(R2, 0x0000000000000008ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_LDX_MEM(BPF_B, R0, R10, -1),
+#else
+			BPF_LDX_MEM(BPF_B, R0, R10, -8),
+#endif
+			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_LDX_MEM | BPF_B, MSB set",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8182838485868788ULL),
+			BPF_LD_IMM64(R2, 0x0000000000000088ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_LDX_MEM(BPF_B, R0, R10, -1),
+#else
+			BPF_LDX_MEM(BPF_B, R0, R10, -8),
+#endif
+			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_LDX_MEM | BPF_H",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x0102030405060708ULL),
+			BPF_LD_IMM64(R2, 0x0000000000000708ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_LDX_MEM(BPF_H, R0, R10, -2),
+#else
+			BPF_LDX_MEM(BPF_H, R0, R10, -8),
+#endif
+			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_LDX_MEM | BPF_H, MSB set",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8182838485868788ULL),
+			BPF_LD_IMM64(R2, 0x0000000000008788ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_LDX_MEM(BPF_H, R0, R10, -2),
+#else
+			BPF_LDX_MEM(BPF_H, R0, R10, -8),
+#endif
+			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_LDX_MEM | BPF_W",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x0102030405060708ULL),
+			BPF_LD_IMM64(R2, 0x0000000005060708ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_LDX_MEM(BPF_W, R0, R10, -4),
+#else
+			BPF_LDX_MEM(BPF_W, R0, R10, -8),
+#endif
+			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_LDX_MEM | BPF_W, MSB set",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8182838485868788ULL),
+			BPF_LD_IMM64(R2, 0x0000000085868788ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_LDX_MEM(BPF_W, R0, R10, -4),
+#else
+			BPF_LDX_MEM(BPF_W, R0, R10, -8),
+#endif
+			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	/* BPF_STX_MEM B/H/W/DW */
+	{
+		"BPF_STX_MEM | BPF_B",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
+			BPF_LD_IMM64(R2, 0x0102030405060708ULL),
+			BPF_LD_IMM64(R3, 0x8090a0b0c0d0e008ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_STX_MEM(BPF_B, R10, R2, -1),
+#else
+			BPF_STX_MEM(BPF_B, R10, R2, -8),
+#endif
+			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
+			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_STX_MEM | BPF_B, MSB set",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
+			BPF_LD_IMM64(R2, 0x8182838485868788ULL),
+			BPF_LD_IMM64(R3, 0x8090a0b0c0d0e088ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_STX_MEM(BPF_B, R10, R2, -1),
+#else
+			BPF_STX_MEM(BPF_B, R10, R2, -8),
+#endif
+			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
+			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_STX_MEM | BPF_H",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
+			BPF_LD_IMM64(R2, 0x0102030405060708ULL),
+			BPF_LD_IMM64(R3, 0x8090a0b0c0d00708ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_STX_MEM(BPF_H, R10, R2, -2),
+#else
+			BPF_STX_MEM(BPF_H, R10, R2, -8),
+#endif
+			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
+			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_STX_MEM | BPF_H, MSB set",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
+			BPF_LD_IMM64(R2, 0x8182838485868788ULL),
+			BPF_LD_IMM64(R3, 0x8090a0b0c0d08788ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_STX_MEM(BPF_H, R10, R2, -2),
+#else
+			BPF_STX_MEM(BPF_H, R10, R2, -8),
+#endif
+			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
+			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_STX_MEM | BPF_W",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
+			BPF_LD_IMM64(R2, 0x0102030405060708ULL),
+			BPF_LD_IMM64(R3, 0x8090a0b005060708ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_STX_MEM(BPF_W, R10, R2, -4),
+#else
+			BPF_STX_MEM(BPF_W, R10, R2, -8),
+#endif
+			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
+			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	{
+		"BPF_STX_MEM | BPF_W, MSB set",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
+			BPF_LD_IMM64(R2, 0x8182838485868788ULL),
+			BPF_LD_IMM64(R3, 0x8090a0b085868788ULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+#ifdef __BIG_ENDIAN
+			BPF_STX_MEM(BPF_W, R10, R2, -4),
+#else
+			BPF_STX_MEM(BPF_W, R10, R2, -8),
+#endif
+			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
+			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
 	/* BPF_ST(X) | BPF_MEM | BPF_B/H/W/DW */
 	{
 		"ST_MEM_B: Store/Load byte: max negative",
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 02/10] bpf/tests: Add zero-extension checks in BPF_ATOMIC tests
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 01/10] bpf/tests: Add tests of BPF_LDX and BPF_STX with small sizes Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 03/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes Johan Almbladh
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch updates the existing tests of BPF_ATOMIC operations to verify
that a 32-bit register operand is properly zero-extended. In particular,
it checks the operation on archs that require 32-bit operands to be
properly zero-/sign-extended or the result is undefined, e.g. MIPS64.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index a838a6179ca4..f6983ad7b981 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -7398,15 +7398,20 @@ static struct bpf_test tests[] = {
 	 * Individual tests are expanded from template macros for all
 	 * combinations of ALU operation, word size and fetching.
 	 */
+#define BPF_ATOMIC_POISON(width) ((width) == BPF_W ? (0xbaadf00dULL << 32) : 0)
+
 #define BPF_ATOMIC_OP_TEST1(width, op, logic, old, update, result)	\
 {									\
 	"BPF_ATOMIC | " #width ", " #op ": Test: "			\
 		#old " " #logic " " #update " = " #result,		\
 	.u.insns_int = {						\
-		BPF_ALU32_IMM(BPF_MOV, R5, update),			\
+		BPF_LD_IMM64(R5, (update) | BPF_ATOMIC_POISON(width)),	\
 		BPF_ST_MEM(width, R10, -40, old),			\
 		BPF_ATOMIC_OP(width, op, R10, R5, -40),			\
 		BPF_LDX_MEM(width, R0, R10, -40),			\
+		BPF_ALU64_REG(BPF_MOV, R1, R0),				\
+		BPF_ALU64_IMM(BPF_RSH, R1, 32),				\
+		BPF_ALU64_REG(BPF_OR, R0, R1),				\
 		BPF_EXIT_INSN(),					\
 	},								\
 	INTERNAL,							\
@@ -7420,11 +7425,14 @@ static struct bpf_test tests[] = {
 		#old " " #logic " " #update " = " #result,		\
 	.u.insns_int = {						\
 		BPF_ALU64_REG(BPF_MOV, R1, R10),			\
-		BPF_ALU32_IMM(BPF_MOV, R0, update),			\
+		BPF_LD_IMM64(R0, (update) | BPF_ATOMIC_POISON(width)),	\
 		BPF_ST_MEM(BPF_W, R10, -40, old),			\
 		BPF_ATOMIC_OP(width, op, R10, R0, -40),			\
 		BPF_ALU64_REG(BPF_MOV, R0, R10),			\
 		BPF_ALU64_REG(BPF_SUB, R0, R1),				\
+		BPF_ALU64_REG(BPF_MOV, R1, R0),				\
+		BPF_ALU64_IMM(BPF_RSH, R1, 32),				\
+		BPF_ALU64_REG(BPF_OR, R0, R1),				\
 		BPF_EXIT_INSN(),					\
 	},								\
 	INTERNAL,							\
@@ -7438,10 +7446,13 @@ static struct bpf_test tests[] = {
 		#old " " #logic " " #update " = " #result,		\
 	.u.insns_int = {						\
 		BPF_ALU64_REG(BPF_MOV, R0, R10),			\
-		BPF_ALU32_IMM(BPF_MOV, R1, update),			\
+		BPF_LD_IMM64(R1, (update) | BPF_ATOMIC_POISON(width)),	\
 		BPF_ST_MEM(width, R10, -40, old),			\
 		BPF_ATOMIC_OP(width, op, R10, R1, -40),			\
 		BPF_ALU64_REG(BPF_SUB, R0, R10),			\
+		BPF_ALU64_REG(BPF_MOV, R1, R0),				\
+		BPF_ALU64_IMM(BPF_RSH, R1, 32),				\
+		BPF_ALU64_REG(BPF_OR, R0, R1),				\
 		BPF_EXIT_INSN(),					\
 	},								\
 	INTERNAL,                                                       \
@@ -7454,10 +7465,10 @@ static struct bpf_test tests[] = {
 	"BPF_ATOMIC | " #width ", " #op ": Test fetch: "		\
 		#old " " #logic " " #update " = " #result,		\
 	.u.insns_int = {						\
-		BPF_ALU32_IMM(BPF_MOV, R3, update),			\
+		BPF_LD_IMM64(R3, (update) | BPF_ATOMIC_POISON(width)),	\
 		BPF_ST_MEM(width, R10, -40, old),			\
 		BPF_ATOMIC_OP(width, op, R10, R3, -40),			\
-		BPF_ALU64_REG(BPF_MOV, R0, R3),                         \
+		BPF_ALU32_REG(BPF_MOV, R0, R3),                         \
 		BPF_EXIT_INSN(),					\
 	},								\
 	INTERNAL,                                                       \
@@ -7555,6 +7566,7 @@ static struct bpf_test tests[] = {
 	BPF_ATOMIC_OP_TEST2(BPF_DW, BPF_XCHG, xchg, 0x12, 0xab, 0xab),
 	BPF_ATOMIC_OP_TEST3(BPF_DW, BPF_XCHG, xchg, 0x12, 0xab, 0xab),
 	BPF_ATOMIC_OP_TEST4(BPF_DW, BPF_XCHG, xchg, 0x12, 0xab, 0xab),
+#undef BPF_ATOMIC_POISON
 #undef BPF_ATOMIC_OP_TEST1
 #undef BPF_ATOMIC_OP_TEST2
 #undef BPF_ATOMIC_OP_TEST3
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 03/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 01/10] bpf/tests: Add tests of BPF_LDX and BPF_STX with small sizes Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 02/10] bpf/tests: Add zero-extension checks in BPF_ATOMIC tests Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 04/10] bpf/tests: Add tests to check source register zero-extension Johan Almbladh
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch adds a series of test to verify the operation of BPF_ATOMIC
with BPF_DW and BPF_W sizes, for all power-of-two magnitudes of the
register value operand.

Also fixes a confusing typo in the comment for a related test.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 504 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 503 insertions(+), 1 deletion(-)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index f6983ad7b981..84efb23e09d0 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -796,7 +796,7 @@ static int __bpf_fill_pattern(struct bpf_test *self, void *arg,
 /*
  * Exhaustive tests of ALU operations for all combinations of power-of-two
  * magnitudes of the operands, both for positive and negative values. The
- * test is designed to verify e.g. the JMP and JMP32 operations for JITs that
+ * test is designed to verify e.g. the ALU and ALU64 operations for JITs that
  * emit different code depending on the magnitude of the immediate value.
  */
 
@@ -1137,6 +1137,306 @@ static int bpf_fill_alu32_mod_reg(struct bpf_test *self)
 	return __bpf_fill_alu32_reg(self, BPF_MOD);
 }
 
+/*
+ * Exhaustive tests of atomic operations for all power-of-two operand
+ * magnitudes, both for positive and negative values.
+ */
+
+static int __bpf_emit_atomic64(struct bpf_test *self, void *arg,
+			       struct bpf_insn *insns, s64 dst, s64 src)
+{
+	int op = *(int *)arg;
+	u64 keep, fetch, res;
+	int i = 0;
+
+	if (!insns)
+		return 21;
+
+	switch (op) {
+	case BPF_XCHG:
+		res = src;
+		break;
+	default:
+		__bpf_alu_result(&res, dst, src, BPF_OP(op));
+	}
+
+	keep = 0x0123456789abcdefULL;
+	if (op & BPF_FETCH)
+		fetch = dst;
+	else
+		fetch = src;
+
+	i += __bpf_ld_imm64(&insns[i], R0, keep);
+	i += __bpf_ld_imm64(&insns[i], R1, dst);
+	i += __bpf_ld_imm64(&insns[i], R2, src);
+	i += __bpf_ld_imm64(&insns[i], R3, res);
+	i += __bpf_ld_imm64(&insns[i], R4, fetch);
+	i += __bpf_ld_imm64(&insns[i], R5, keep);
+
+	insns[i++] = BPF_STX_MEM(BPF_DW, R10, R1, -8);
+	insns[i++] = BPF_ATOMIC_OP(BPF_DW, op, R10, R2, -8);
+	insns[i++] = BPF_LDX_MEM(BPF_DW, R1, R10, -8);
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R1, R3, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R2, R4, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R0, R5, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	return i;
+}
+
+static int __bpf_emit_atomic32(struct bpf_test *self, void *arg,
+			       struct bpf_insn *insns, s64 dst, s64 src)
+{
+	int op = *(int *)arg;
+	u64 keep, fetch, res;
+	int i = 0;
+
+	if (!insns)
+		return 21;
+
+	switch (op) {
+	case BPF_XCHG:
+		res = src;
+		break;
+	default:
+		__bpf_alu_result(&res, (u32)dst, (u32)src, BPF_OP(op));
+	}
+
+	keep = 0x0123456789abcdefULL;
+	if (op & BPF_FETCH)
+		fetch = (u32)dst;
+	else
+		fetch = src;
+
+	i += __bpf_ld_imm64(&insns[i], R0, keep);
+	i += __bpf_ld_imm64(&insns[i], R1, (u32)dst);
+	i += __bpf_ld_imm64(&insns[i], R2, src);
+	i += __bpf_ld_imm64(&insns[i], R3, (u32)res);
+	i += __bpf_ld_imm64(&insns[i], R4, fetch);
+	i += __bpf_ld_imm64(&insns[i], R5, keep);
+
+	insns[i++] = BPF_STX_MEM(BPF_W, R10, R1, -4);
+	insns[i++] = BPF_ATOMIC_OP(BPF_W, op, R10, R2, -4);
+	insns[i++] = BPF_LDX_MEM(BPF_W, R1, R10, -4);
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R1, R3, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R2, R4, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R0, R5, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	return i;
+}
+
+static int __bpf_emit_cmpxchg64(struct bpf_test *self, void *arg,
+				struct bpf_insn *insns, s64 dst, s64 src)
+{
+	int i = 0;
+
+	if (!insns)
+		return 23;
+
+	i += __bpf_ld_imm64(&insns[i], R0, ~dst);
+	i += __bpf_ld_imm64(&insns[i], R1, dst);
+	i += __bpf_ld_imm64(&insns[i], R2, src);
+
+	/* Result unsuccessful */
+	insns[i++] = BPF_STX_MEM(BPF_DW, R10, R1, -8);
+	insns[i++] = BPF_ATOMIC_OP(BPF_DW, BPF_CMPXCHG, R10, R2, -8);
+	insns[i++] = BPF_LDX_MEM(BPF_DW, R3, R10, -8);
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R1, R3, 2);
+	insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R0, R3, 2);
+	insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	/* Result successful */
+	insns[i++] = BPF_ATOMIC_OP(BPF_DW, BPF_CMPXCHG, R10, R2, -8);
+	insns[i++] = BPF_LDX_MEM(BPF_DW, R3, R10, -8);
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R2, R3, 2);
+	insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R0, R1, 2);
+	insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	return i;
+}
+
+static int __bpf_emit_cmpxchg32(struct bpf_test *self, void *arg,
+				struct bpf_insn *insns, s64 dst, s64 src)
+{
+	int i = 0;
+
+	if (!insns)
+		return 27;
+
+	i += __bpf_ld_imm64(&insns[i], R0, ~dst);
+	i += __bpf_ld_imm64(&insns[i], R1, (u32)dst);
+	i += __bpf_ld_imm64(&insns[i], R2, src);
+
+	/* Result unsuccessful */
+	insns[i++] = BPF_STX_MEM(BPF_W, R10, R1, -4);
+	insns[i++] = BPF_ATOMIC_OP(BPF_W, BPF_CMPXCHG, R10, R2, -4);
+	insns[i++] = BPF_ZEXT_REG(R0), /* Zext always inserted by verifier */
+	insns[i++] = BPF_LDX_MEM(BPF_W, R3, R10, -4);
+
+	insns[i++] = BPF_JMP32_REG(BPF_JEQ, R1, R3, 2);
+	insns[i++] = BPF_MOV32_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R0, R3, 2);
+	insns[i++] = BPF_MOV32_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	/* Result successful */
+	i += __bpf_ld_imm64(&insns[i], R0, dst);
+	insns[i++] = BPF_ATOMIC_OP(BPF_W, BPF_CMPXCHG, R10, R2, -4);
+	insns[i++] = BPF_ZEXT_REG(R0), /* Zext always inserted by verifier */
+	insns[i++] = BPF_LDX_MEM(BPF_W, R3, R10, -4);
+
+	insns[i++] = BPF_JMP32_REG(BPF_JEQ, R2, R3, 2);
+	insns[i++] = BPF_MOV32_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	insns[i++] = BPF_JMP_REG(BPF_JEQ, R0, R1, 2);
+	insns[i++] = BPF_MOV32_IMM(R0, __LINE__);
+	insns[i++] = BPF_EXIT_INSN();
+
+	return i;
+}
+
+static int __bpf_fill_atomic64(struct bpf_test *self, int op)
+{
+	return __bpf_fill_pattern(self, &op, 64, 64,
+				  0, PATTERN_BLOCK2,
+				  &__bpf_emit_atomic64);
+}
+
+static int __bpf_fill_atomic32(struct bpf_test *self, int op)
+{
+	return __bpf_fill_pattern(self, &op, 64, 64,
+				  0, PATTERN_BLOCK2,
+				  &__bpf_emit_atomic32);
+}
+
+/* 64-bit atomic operations */
+static int bpf_fill_atomic64_add(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_ADD);
+}
+
+static int bpf_fill_atomic64_and(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_AND);
+}
+
+static int bpf_fill_atomic64_or(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_OR);
+}
+
+static int bpf_fill_atomic64_xor(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_XOR);
+}
+
+static int bpf_fill_atomic64_add_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_ADD | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_and_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_AND | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_or_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_OR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_xor_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_XOR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_xchg(struct bpf_test *self)
+{
+	return __bpf_fill_atomic64(self, BPF_XCHG);
+}
+
+static int bpf_fill_cmpxchg64(struct bpf_test *self)
+{
+	return __bpf_fill_pattern(self, NULL, 64, 64, 0, PATTERN_BLOCK2,
+				  &__bpf_emit_cmpxchg64);
+}
+
+/* 32-bit atomic operations */
+static int bpf_fill_atomic32_add(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_ADD);
+}
+
+static int bpf_fill_atomic32_and(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_AND);
+}
+
+static int bpf_fill_atomic32_or(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_OR);
+}
+
+static int bpf_fill_atomic32_xor(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_XOR);
+}
+
+static int bpf_fill_atomic32_add_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_ADD | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_and_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_AND | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_or_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_OR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_xor_fetch(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_XOR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_xchg(struct bpf_test *self)
+{
+	return __bpf_fill_atomic32(self, BPF_XCHG);
+}
+
+static int bpf_fill_cmpxchg32(struct bpf_test *self)
+{
+	return __bpf_fill_pattern(self, NULL, 64, 64, 0, PATTERN_BLOCK2,
+				  &__bpf_emit_cmpxchg32);
+}
+
 /*
  * Test the two-instruction 64-bit immediate load operation for all
  * power-of-two magnitudes of the immediate operand. For each MSB, a block
@@ -10721,6 +11021,208 @@ static struct bpf_test tests[] = {
 		{ { 0, 1 } },
 		.fill_helper = bpf_fill_ld_imm64,
 	},
+	/* 64-bit ATOMIC magnitudes */
+	{
+		"ATOMIC_DW_ADD: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_add,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_AND: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_and,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_OR: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_or,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_XOR: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_xor,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_ADD_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_add_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_AND_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_and_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_OR_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_or_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_XOR_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_xor_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_XCHG: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_xchg,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_DW_CMPXCHG: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_cmpxchg64,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	/* 64-bit atomic magnitudes */
+	{
+		"ATOMIC_W_ADD: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_add,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_AND: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_and,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_OR: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_or,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_XOR: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_xor,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_ADD_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_add_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_AND_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_and_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_OR_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_or_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_XOR_FETCH: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_xor_fetch,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_XCHG: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_xchg,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
+	{
+		"ATOMIC_W_CMPXCHG: all operand magnitudes",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_cmpxchg32,
+		.stack_depth = 8,
+		.nr_testruns = NR_PATTERN_RUNS,
+	},
 	/* JMP immediate magnitudes */
 	{
 		"JMP_JSET_K: all immediate value magnitudes",
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 04/10] bpf/tests: Add tests to check source register zero-extension
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (2 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 03/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 05/10] bpf/tests: Add more tests for ALU and ATOMIC register clobbering Johan Almbladh
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch adds tests to check that the source register is preserved when
zero-extending a 32-bit value. In particular, it checks that the source
operand is not zero-extended in-place.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 143 insertions(+)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 84efb23e09d0..c7db90112ef0 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -10586,6 +10586,149 @@ static struct bpf_test tests[] = {
 		{},
 		{ { 0, 2 } },
 	},
+	/* Checking that ALU32 src is not zero extended in place */
+#define BPF_ALU32_SRC_ZEXT(op)					\
+	{							\
+		"ALU32_" #op "_X: src preserved in zext",	\
+		.u.insns_int = {				\
+			BPF_LD_IMM64(R1, 0x0123456789acbdefULL),\
+			BPF_LD_IMM64(R2, 0xfedcba9876543210ULL),\
+			BPF_ALU64_REG(BPF_MOV, R0, R1),		\
+			BPF_ALU32_REG(BPF_##op, R2, R1),	\
+			BPF_ALU64_REG(BPF_SUB, R0, R1),		\
+			BPF_ALU64_REG(BPF_MOV, R1, R0),		\
+			BPF_ALU64_IMM(BPF_RSH, R1, 32),		\
+			BPF_ALU64_REG(BPF_OR, R0, R1),		\
+			BPF_EXIT_INSN(),			\
+		},						\
+		INTERNAL,					\
+		{ },						\
+		{ { 0, 0 } },					\
+	}
+	BPF_ALU32_SRC_ZEXT(MOV),
+	BPF_ALU32_SRC_ZEXT(AND),
+	BPF_ALU32_SRC_ZEXT(OR),
+	BPF_ALU32_SRC_ZEXT(XOR),
+	BPF_ALU32_SRC_ZEXT(ADD),
+	BPF_ALU32_SRC_ZEXT(SUB),
+	BPF_ALU32_SRC_ZEXT(MUL),
+	BPF_ALU32_SRC_ZEXT(DIV),
+	BPF_ALU32_SRC_ZEXT(MOD),
+#undef BPF_ALU32_SRC_ZEXT
+	/* Checking that ATOMIC32 src is not zero extended in place */
+#define BPF_ATOMIC32_SRC_ZEXT(op)					\
+	{								\
+		"ATOMIC_W_" #op ": src preserved in zext",		\
+		.u.insns_int = {					\
+			BPF_LD_IMM64(R0, 0x0123456789acbdefULL),	\
+			BPF_ALU64_REG(BPF_MOV, R1, R0),			\
+			BPF_ST_MEM(BPF_W, R10, -4, 0),			\
+			BPF_ATOMIC_OP(BPF_W, BPF_##op, R10, R1, -4),	\
+			BPF_ALU64_REG(BPF_SUB, R0, R1),			\
+			BPF_ALU64_REG(BPF_MOV, R1, R0),			\
+			BPF_ALU64_IMM(BPF_RSH, R1, 32),			\
+			BPF_ALU64_REG(BPF_OR, R0, R1),			\
+			BPF_EXIT_INSN(),				\
+		},							\
+		INTERNAL,						\
+		{ },							\
+		{ { 0, 0 } },						\
+		.stack_depth = 8,					\
+	}
+	BPF_ATOMIC32_SRC_ZEXT(ADD),
+	BPF_ATOMIC32_SRC_ZEXT(AND),
+	BPF_ATOMIC32_SRC_ZEXT(OR),
+	BPF_ATOMIC32_SRC_ZEXT(XOR),
+#undef BPF_ATOMIC32_SRC_ZEXT
+	/* Checking that CMPXCHG32 src is not zero extended in place */
+	{
+		"ATOMIC_W_CMPXCHG: src preserved in zext",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x0123456789acbdefULL),
+			BPF_ALU64_REG(BPF_MOV, R2, R1),
+			BPF_ALU64_REG(BPF_MOV, R0, 0),
+			BPF_ST_MEM(BPF_W, R10, -4, 0),
+			BPF_ATOMIC_OP(BPF_W, BPF_CMPXCHG, R10, R1, -4),
+			BPF_ALU64_REG(BPF_SUB, R1, R2),
+			BPF_ALU64_REG(BPF_MOV, R2, R1),
+			BPF_ALU64_IMM(BPF_RSH, R2, 32),
+			BPF_ALU64_REG(BPF_OR, R1, R2),
+			BPF_ALU64_REG(BPF_MOV, R0, R1),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
+	/* Checking that JMP32 immediate src is not zero extended in place */
+#define BPF_JMP32_IMM_ZEXT(op)					\
+	{							\
+		"JMP32_" #op "_K: operand preserved in zext",	\
+		.u.insns_int = {				\
+			BPF_LD_IMM64(R0, 0x0123456789acbdefULL),\
+			BPF_ALU64_REG(BPF_MOV, R1, R0),		\
+			BPF_JMP32_IMM(BPF_##op, R0, 1234, 1),	\
+			BPF_JMP_A(0), /* Nop */			\
+			BPF_ALU64_REG(BPF_SUB, R0, R1),		\
+			BPF_ALU64_REG(BPF_MOV, R1, R0),		\
+			BPF_ALU64_IMM(BPF_RSH, R1, 32),		\
+			BPF_ALU64_REG(BPF_OR, R0, R1),		\
+			BPF_EXIT_INSN(),			\
+		},						\
+		INTERNAL,					\
+		{ },						\
+		{ { 0, 0 } },					\
+	}
+	BPF_JMP32_IMM_ZEXT(JEQ),
+	BPF_JMP32_IMM_ZEXT(JNE),
+	BPF_JMP32_IMM_ZEXT(JSET),
+	BPF_JMP32_IMM_ZEXT(JGT),
+	BPF_JMP32_IMM_ZEXT(JGE),
+	BPF_JMP32_IMM_ZEXT(JLT),
+	BPF_JMP32_IMM_ZEXT(JLE),
+	BPF_JMP32_IMM_ZEXT(JSGT),
+	BPF_JMP32_IMM_ZEXT(JSGE),
+	BPF_JMP32_IMM_ZEXT(JSGT),
+	BPF_JMP32_IMM_ZEXT(JSLT),
+	BPF_JMP32_IMM_ZEXT(JSLE),
+#undef BPF_JMP2_IMM_ZEXT
+	/* Checking that JMP32 dst & src are not zero extended in place */
+#define BPF_JMP32_REG_ZEXT(op)					\
+	{							\
+		"JMP32_" #op "_X: operands preserved in zext",	\
+		.u.insns_int = {				\
+			BPF_LD_IMM64(R0, 0x0123456789acbdefULL),\
+			BPF_LD_IMM64(R1, 0xfedcba9876543210ULL),\
+			BPF_ALU64_REG(BPF_MOV, R2, R0),		\
+			BPF_ALU64_REG(BPF_MOV, R3, R1),		\
+			BPF_JMP32_IMM(BPF_##op, R0, R1, 1),	\
+			BPF_JMP_A(0), /* Nop */			\
+			BPF_ALU64_REG(BPF_SUB, R0, R2),		\
+			BPF_ALU64_REG(BPF_SUB, R1, R3),		\
+			BPF_ALU64_REG(BPF_OR, R0, R1),		\
+			BPF_ALU64_REG(BPF_MOV, R1, R0),		\
+			BPF_ALU64_IMM(BPF_RSH, R1, 32),		\
+			BPF_ALU64_REG(BPF_OR, R0, R1),		\
+			BPF_EXIT_INSN(),			\
+		},						\
+		INTERNAL,					\
+		{ },						\
+		{ { 0, 0 } },					\
+	}
+	BPF_JMP32_REG_ZEXT(JEQ),
+	BPF_JMP32_REG_ZEXT(JNE),
+	BPF_JMP32_REG_ZEXT(JSET),
+	BPF_JMP32_REG_ZEXT(JGT),
+	BPF_JMP32_REG_ZEXT(JGE),
+	BPF_JMP32_REG_ZEXT(JLT),
+	BPF_JMP32_REG_ZEXT(JLE),
+	BPF_JMP32_REG_ZEXT(JSGT),
+	BPF_JMP32_REG_ZEXT(JSGE),
+	BPF_JMP32_REG_ZEXT(JSGT),
+	BPF_JMP32_REG_ZEXT(JSLT),
+	BPF_JMP32_REG_ZEXT(JSLE),
+#undef BPF_JMP2_REG_ZEXT
 	/* Exhaustive test of ALU64 shift operations */
 	{
 		"ALU64_LSH_K: all shift values",
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 05/10] bpf/tests: Add more tests for ALU and ATOMIC register clobbering
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (3 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 04/10] bpf/tests: Add tests to check source register zero-extension Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 06/10] bpf/tests: Minor restructuring of ALU tests Johan Almbladh
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch expands the register-clobbering-during-function-call tests
to cover more all ALU32/64 MUL, DIV and MOD operations and all ATOMIC
operations. In short, if a JIT implements a complex operation with
a call to an external function, it must make sure to save and restore
all its caller-saved registers that may be clobbered by the call.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 267 ++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 197 insertions(+), 70 deletions(-)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index c7db90112ef0..201f34060eef 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -3744,76 +3744,6 @@ static struct bpf_test tests[] = {
 		{ },
 		{ { 0, -1 } }
 	},
-	{
-		/*
-		 * Register (non-)clobbering test, in the case where a 32-bit
-		 * JIT implements complex ALU64 operations via function calls.
-		 * If so, the function call must be invisible in the eBPF
-		 * registers. The JIT must then save and restore relevant
-		 * registers during the call. The following tests check that
-		 * the eBPF registers retain their values after such a call.
-		 */
-		"INT: Register clobbering, R1 updated",
-		.u.insns_int = {
-			BPF_ALU32_IMM(BPF_MOV, R0, 0),
-			BPF_ALU32_IMM(BPF_MOV, R1, 123456789),
-			BPF_ALU32_IMM(BPF_MOV, R2, 2),
-			BPF_ALU32_IMM(BPF_MOV, R3, 3),
-			BPF_ALU32_IMM(BPF_MOV, R4, 4),
-			BPF_ALU32_IMM(BPF_MOV, R5, 5),
-			BPF_ALU32_IMM(BPF_MOV, R6, 6),
-			BPF_ALU32_IMM(BPF_MOV, R7, 7),
-			BPF_ALU32_IMM(BPF_MOV, R8, 8),
-			BPF_ALU32_IMM(BPF_MOV, R9, 9),
-			BPF_ALU64_IMM(BPF_DIV, R1, 123456789),
-			BPF_JMP_IMM(BPF_JNE, R0, 0, 10),
-			BPF_JMP_IMM(BPF_JNE, R1, 1, 9),
-			BPF_JMP_IMM(BPF_JNE, R2, 2, 8),
-			BPF_JMP_IMM(BPF_JNE, R3, 3, 7),
-			BPF_JMP_IMM(BPF_JNE, R4, 4, 6),
-			BPF_JMP_IMM(BPF_JNE, R5, 5, 5),
-			BPF_JMP_IMM(BPF_JNE, R6, 6, 4),
-			BPF_JMP_IMM(BPF_JNE, R7, 7, 3),
-			BPF_JMP_IMM(BPF_JNE, R8, 8, 2),
-			BPF_JMP_IMM(BPF_JNE, R9, 9, 1),
-			BPF_ALU32_IMM(BPF_MOV, R0, 1),
-			BPF_EXIT_INSN(),
-		},
-		INTERNAL,
-		{ },
-		{ { 0, 1 } }
-	},
-	{
-		"INT: Register clobbering, R2 updated",
-		.u.insns_int = {
-			BPF_ALU32_IMM(BPF_MOV, R0, 0),
-			BPF_ALU32_IMM(BPF_MOV, R1, 1),
-			BPF_ALU32_IMM(BPF_MOV, R2, 2 * 123456789),
-			BPF_ALU32_IMM(BPF_MOV, R3, 3),
-			BPF_ALU32_IMM(BPF_MOV, R4, 4),
-			BPF_ALU32_IMM(BPF_MOV, R5, 5),
-			BPF_ALU32_IMM(BPF_MOV, R6, 6),
-			BPF_ALU32_IMM(BPF_MOV, R7, 7),
-			BPF_ALU32_IMM(BPF_MOV, R8, 8),
-			BPF_ALU32_IMM(BPF_MOV, R9, 9),
-			BPF_ALU64_IMM(BPF_DIV, R2, 123456789),
-			BPF_JMP_IMM(BPF_JNE, R0, 0, 10),
-			BPF_JMP_IMM(BPF_JNE, R1, 1, 9),
-			BPF_JMP_IMM(BPF_JNE, R2, 2, 8),
-			BPF_JMP_IMM(BPF_JNE, R3, 3, 7),
-			BPF_JMP_IMM(BPF_JNE, R4, 4, 6),
-			BPF_JMP_IMM(BPF_JNE, R5, 5, 5),
-			BPF_JMP_IMM(BPF_JNE, R6, 6, 4),
-			BPF_JMP_IMM(BPF_JNE, R7, 7, 3),
-			BPF_JMP_IMM(BPF_JNE, R8, 8, 2),
-			BPF_JMP_IMM(BPF_JNE, R9, 9, 1),
-			BPF_ALU32_IMM(BPF_MOV, R0, 1),
-			BPF_EXIT_INSN(),
-		},
-		INTERNAL,
-		{ },
-		{ { 0, 1 } }
-	},
 	{
 		/*
 		 * Test 32-bit JITs that implement complex ALU64 operations as
@@ -10586,6 +10516,203 @@ static struct bpf_test tests[] = {
 		{},
 		{ { 0, 2 } },
 	},
+	/*
+	 * Register (non-)clobbering tests for the case where a JIT implements
+	 * complex ALU or ATOMIC operations via function calls. If so, the
+	 * function call must be transparent to the eBPF registers. The JIT
+	 * must therefore save and restore relevant registers across the call.
+	 * The following tests check that the eBPF registers retain their
+	 * values after such an operation. Mainly intended for complex ALU
+	 * and atomic operation, but we run it for all. You never know...
+	 *
+	 * Note that each operations should be tested twice with different
+	 * destinations, to check preservation for all registers.
+	 */
+#define BPF_TEST_CLOBBER_ALU(alu, op, dst, src)			\
+	{							\
+		#alu "_" #op " to " #dst ": no clobbering",	\
+		.u.insns_int = {				\
+			BPF_ALU64_IMM(BPF_MOV, R0, R0),		\
+			BPF_ALU64_IMM(BPF_MOV, R1, R1),		\
+			BPF_ALU64_IMM(BPF_MOV, R2, R2),		\
+			BPF_ALU64_IMM(BPF_MOV, R3, R3),		\
+			BPF_ALU64_IMM(BPF_MOV, R4, R4),		\
+			BPF_ALU64_IMM(BPF_MOV, R5, R5),		\
+			BPF_ALU64_IMM(BPF_MOV, R6, R6),		\
+			BPF_ALU64_IMM(BPF_MOV, R7, R7),		\
+			BPF_ALU64_IMM(BPF_MOV, R8, R8),		\
+			BPF_ALU64_IMM(BPF_MOV, R9, R9),		\
+			BPF_##alu(BPF_ ##op, dst, src),		\
+			BPF_ALU32_IMM(BPF_MOV, dst, dst),	\
+			BPF_JMP_IMM(BPF_JNE, R0, R0, 10),	\
+			BPF_JMP_IMM(BPF_JNE, R1, R1, 9),	\
+			BPF_JMP_IMM(BPF_JNE, R2, R2, 8),	\
+			BPF_JMP_IMM(BPF_JNE, R3, R3, 7),	\
+			BPF_JMP_IMM(BPF_JNE, R4, R4, 6),	\
+			BPF_JMP_IMM(BPF_JNE, R5, R5, 5),	\
+			BPF_JMP_IMM(BPF_JNE, R6, R6, 4),	\
+			BPF_JMP_IMM(BPF_JNE, R7, R7, 3),	\
+			BPF_JMP_IMM(BPF_JNE, R8, R8, 2),	\
+			BPF_JMP_IMM(BPF_JNE, R9, R9, 1),	\
+			BPF_ALU64_IMM(BPF_MOV, R0, 1),		\
+			BPF_EXIT_INSN(),			\
+		},						\
+		INTERNAL,					\
+		{ },						\
+		{ { 0, 1 } }					\
+	}
+	/* ALU64 operations, register clobbering */
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, AND, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, AND, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, OR, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, OR, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, XOR, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, XOR, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, LSH, R8, 12),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, LSH, R9, 12),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, RSH, R8, 12),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, RSH, R9, 12),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, ARSH, R8, 12),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, ARSH, R9, 12),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, ADD, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, ADD, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, SUB, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, SUB, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, MUL, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, MUL, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, DIV, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, DIV, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, MOD, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU64_IMM, MOD, R9, 123456789),
+	/* ALU32 immediate operations, register clobbering */
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, AND, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, AND, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, OR, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, OR, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, XOR, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, XOR, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, LSH, R8, 12),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, LSH, R9, 12),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, RSH, R8, 12),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, RSH, R9, 12),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, ARSH, R8, 12),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, ARSH, R9, 12),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, ADD, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, ADD, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, SUB, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, SUB, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, MUL, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, MUL, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, DIV, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, DIV, R9, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, MOD, R8, 123456789),
+	BPF_TEST_CLOBBER_ALU(ALU32_IMM, MOD, R9, 123456789),
+	/* ALU64 register operations, register clobbering */
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, AND, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, AND, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, OR, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, OR, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, XOR, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, XOR, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, LSH, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, LSH, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, RSH, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, RSH, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, ARSH, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, ARSH, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, ADD, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, ADD, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, SUB, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, SUB, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, MUL, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, MUL, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, DIV, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, DIV, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, MOD, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU64_REG, MOD, R9, R1),
+	/* ALU32 register operations, register clobbering */
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, AND, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, AND, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, OR, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, OR, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, XOR, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, XOR, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, LSH, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, LSH, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, RSH, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, RSH, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, ARSH, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, ARSH, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, ADD, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, ADD, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, SUB, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, SUB, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, MUL, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, MUL, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, DIV, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, DIV, R9, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, MOD, R8, R1),
+	BPF_TEST_CLOBBER_ALU(ALU32_REG, MOD, R9, R1),
+#undef BPF_TEST_CLOBBER_ALU
+#define BPF_TEST_CLOBBER_ATOMIC(width, op)			\
+	{							\
+		"Atomic_" #width " " #op ": no clobbering",	\
+		.u.insns_int = {				\
+			BPF_ALU64_IMM(BPF_MOV, R0, 0),		\
+			BPF_ALU64_IMM(BPF_MOV, R1, 1),		\
+			BPF_ALU64_IMM(BPF_MOV, R2, 2),		\
+			BPF_ALU64_IMM(BPF_MOV, R3, 3),		\
+			BPF_ALU64_IMM(BPF_MOV, R4, 4),		\
+			BPF_ALU64_IMM(BPF_MOV, R5, 5),		\
+			BPF_ALU64_IMM(BPF_MOV, R6, 6),		\
+			BPF_ALU64_IMM(BPF_MOV, R7, 7),		\
+			BPF_ALU64_IMM(BPF_MOV, R8, 8),		\
+			BPF_ALU64_IMM(BPF_MOV, R9, 9),		\
+			BPF_ST_MEM(width, R10, -8,		\
+				   (op) == BPF_CMPXCHG ? 0 :	\
+				   (op) & BPF_FETCH ? 1 : 0),	\
+			BPF_ATOMIC_OP(width, op, R10, R1, -8),	\
+			BPF_JMP_IMM(BPF_JNE, R0, 0, 10),	\
+			BPF_JMP_IMM(BPF_JNE, R1, 1, 9),		\
+			BPF_JMP_IMM(BPF_JNE, R2, 2, 8),		\
+			BPF_JMP_IMM(BPF_JNE, R3, 3, 7),		\
+			BPF_JMP_IMM(BPF_JNE, R4, 4, 6),		\
+			BPF_JMP_IMM(BPF_JNE, R5, 5, 5),		\
+			BPF_JMP_IMM(BPF_JNE, R6, 6, 4),		\
+			BPF_JMP_IMM(BPF_JNE, R7, 7, 3),		\
+			BPF_JMP_IMM(BPF_JNE, R8, 8, 2),		\
+			BPF_JMP_IMM(BPF_JNE, R9, 9, 1),		\
+			BPF_ALU64_IMM(BPF_MOV, R0, 1),		\
+			BPF_EXIT_INSN(),			\
+		},						\
+		INTERNAL,					\
+		{ },						\
+		{ { 0, 1 } },					\
+		.stack_depth = 8,				\
+	}
+	/* 64-bit atomic operations, register clobbering */
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_ADD),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_AND),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_OR),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_XOR),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_ADD | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_AND | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_OR | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_XOR | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_XCHG),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_DW, BPF_CMPXCHG),
+	/* 32-bit atomic operations, register clobbering */
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_ADD),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_AND),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_OR),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_XOR),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_ADD | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_AND | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_OR | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_XOR | BPF_FETCH),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_XCHG),
+	BPF_TEST_CLOBBER_ATOMIC(BPF_W, BPF_CMPXCHG),
+#undef BPF_TEST_CLOBBER_ATOMIC
 	/* Checking that ALU32 src is not zero extended in place */
 #define BPF_ALU32_SRC_ZEXT(op)					\
 	{							\
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 06/10] bpf/tests: Minor restructuring of ALU tests
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (4 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 05/10] bpf/tests: Add more tests for ALU and ATOMIC register clobbering Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 07/10] bpf/tests: Add exhaustive tests of ALU register combinations Johan Almbladh
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch moves the ALU LSH/RSH/ARSH reference computations into the
common reference value function. Also fix typo in constants so they
now have the intended values.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 137 +++++++++++++++++++++++--------------------------
 1 file changed, 65 insertions(+), 72 deletions(-)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 201f34060eef..919323a3b69f 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -538,6 +538,57 @@ static int bpf_fill_max_jmp_never_taken(struct bpf_test *self)
 	return __bpf_fill_max_jmp(self, BPF_JLT, 0);
 }
 
+/* ALU result computation used in tests */
+static bool __bpf_alu_result(u64 *res, u64 v1, u64 v2, u8 op)
+{
+	*res = 0;
+	switch (op) {
+	case BPF_MOV:
+		*res = v2;
+		break;
+	case BPF_AND:
+		*res = v1 & v2;
+		break;
+	case BPF_OR:
+		*res = v1 | v2;
+		break;
+	case BPF_XOR:
+		*res = v1 ^ v2;
+		break;
+	case BPF_LSH:
+		*res = v1 << v2;
+		break;
+	case BPF_RSH:
+		*res = v1 >> v2;
+		break;
+	case BPF_ARSH:
+		*res = v1 >> v2;
+		if (v2 > 0 && v1 > S64_MAX)
+			*res |= ~0ULL << (64 - v2);
+		break;
+	case BPF_ADD:
+		*res = v1 + v2;
+		break;
+	case BPF_SUB:
+		*res = v1 - v2;
+		break;
+	case BPF_MUL:
+		*res = v1 * v2;
+		break;
+	case BPF_DIV:
+		if (v2 == 0)
+			return false;
+		*res = div64_u64(v1, v2);
+		break;
+	case BPF_MOD:
+		if (v2 == 0)
+			return false;
+		div64_u64_rem(v1, v2, res);
+		break;
+	}
+	return true;
+}
+
 /* Test an ALU shift operation for all valid shift values */
 static int __bpf_fill_alu_shift(struct bpf_test *self, u8 op,
 				u8 mode, bool alu32)
@@ -576,37 +627,19 @@ static int __bpf_fill_alu_shift(struct bpf_test *self, u8 op,
 					insn[i++] = BPF_ALU32_IMM(op, R1, imm);
 				else
 					insn[i++] = BPF_ALU32_REG(op, R1, R2);
-				switch (op) {
-				case BPF_LSH:
-					val = (u32)reg << imm;
-					break;
-				case BPF_RSH:
-					val = (u32)reg >> imm;
-					break;
-				case BPF_ARSH:
-					val = (u32)reg >> imm;
-					if (imm > 0 && (reg & 0x80000000))
-						val |= ~(u32)0 << (32 - imm);
-					break;
-				}
+
+				if (op == BPF_ARSH)
+					reg = (s32)reg;
+				else
+					reg = (u32)reg;
+				__bpf_alu_result(&val, reg, imm, op);
+				val = (u32)val;
 			} else {
 				if (mode == BPF_K)
 					insn[i++] = BPF_ALU64_IMM(op, R1, imm);
 				else
 					insn[i++] = BPF_ALU64_REG(op, R1, R2);
-				switch (op) {
-				case BPF_LSH:
-					val = (u64)reg << imm;
-					break;
-				case BPF_RSH:
-					val = (u64)reg >> imm;
-					break;
-				case BPF_ARSH:
-					val = (u64)reg >> imm;
-					if (imm > 0 && reg < 0)
-						val |= ~(u64)0 << (64 - imm);
-					break;
-				}
+				__bpf_alu_result(&val, reg, imm, op);
 			}
 
 			/*
@@ -799,46 +832,6 @@ static int __bpf_fill_pattern(struct bpf_test *self, void *arg,
  * test is designed to verify e.g. the ALU and ALU64 operations for JITs that
  * emit different code depending on the magnitude of the immediate value.
  */
-
-static bool __bpf_alu_result(u64 *res, u64 v1, u64 v2, u8 op)
-{
-	*res = 0;
-	switch (op) {
-	case BPF_MOV:
-		*res = v2;
-		break;
-	case BPF_AND:
-		*res = v1 & v2;
-		break;
-	case BPF_OR:
-		*res = v1 | v2;
-		break;
-	case BPF_XOR:
-		*res = v1 ^ v2;
-		break;
-	case BPF_ADD:
-		*res = v1 + v2;
-		break;
-	case BPF_SUB:
-		*res = v1 - v2;
-		break;
-	case BPF_MUL:
-		*res = v1 * v2;
-		break;
-	case BPF_DIV:
-		if (v2 == 0)
-			return false;
-		*res = div64_u64(v1, v2);
-		break;
-	case BPF_MOD:
-		if (v2 == 0)
-			return false;
-		div64_u64_rem(v1, v2, res);
-		break;
-	}
-	return true;
-}
-
 static int __bpf_emit_alu64_imm(struct bpf_test *self, void *arg,
 				struct bpf_insn *insns, s64 dst, s64 imm)
 {
@@ -7881,7 +7874,7 @@ static struct bpf_test tests[] = {
 		"BPF_ATOMIC | BPF_DW, BPF_CMPXCHG: Test successful return",
 		.u.insns_int = {
 			BPF_LD_IMM64(R1, 0x0123456789abcdefULL),
-			BPF_LD_IMM64(R2, 0xfecdba9876543210ULL),
+			BPF_LD_IMM64(R2, 0xfedcba9876543210ULL),
 			BPF_ALU64_REG(BPF_MOV, R0, R1),
 			BPF_STX_MEM(BPF_DW, R10, R1, -40),
 			BPF_ATOMIC_OP(BPF_DW, BPF_CMPXCHG, R10, R2, -40),
@@ -7898,7 +7891,7 @@ static struct bpf_test tests[] = {
 		"BPF_ATOMIC | BPF_DW, BPF_CMPXCHG: Test successful store",
 		.u.insns_int = {
 			BPF_LD_IMM64(R1, 0x0123456789abcdefULL),
-			BPF_LD_IMM64(R2, 0xfecdba9876543210ULL),
+			BPF_LD_IMM64(R2, 0xfedcba9876543210ULL),
 			BPF_ALU64_REG(BPF_MOV, R0, R1),
 			BPF_STX_MEM(BPF_DW, R10, R0, -40),
 			BPF_ATOMIC_OP(BPF_DW, BPF_CMPXCHG, R10, R2, -40),
@@ -7916,7 +7909,7 @@ static struct bpf_test tests[] = {
 		"BPF_ATOMIC | BPF_DW, BPF_CMPXCHG: Test failure return",
 		.u.insns_int = {
 			BPF_LD_IMM64(R1, 0x0123456789abcdefULL),
-			BPF_LD_IMM64(R2, 0xfecdba9876543210ULL),
+			BPF_LD_IMM64(R2, 0xfedcba9876543210ULL),
 			BPF_ALU64_REG(BPF_MOV, R0, R1),
 			BPF_ALU64_IMM(BPF_ADD, R0, 1),
 			BPF_STX_MEM(BPF_DW, R10, R1, -40),
@@ -7934,7 +7927,7 @@ static struct bpf_test tests[] = {
 		"BPF_ATOMIC | BPF_DW, BPF_CMPXCHG: Test failure store",
 		.u.insns_int = {
 			BPF_LD_IMM64(R1, 0x0123456789abcdefULL),
-			BPF_LD_IMM64(R2, 0xfecdba9876543210ULL),
+			BPF_LD_IMM64(R2, 0xfedcba9876543210ULL),
 			BPF_ALU64_REG(BPF_MOV, R0, R1),
 			BPF_ALU64_IMM(BPF_ADD, R0, 1),
 			BPF_STX_MEM(BPF_DW, R10, R1, -40),
@@ -7953,11 +7946,11 @@ static struct bpf_test tests[] = {
 		"BPF_ATOMIC | BPF_DW, BPF_CMPXCHG: Test side effects",
 		.u.insns_int = {
 			BPF_LD_IMM64(R1, 0x0123456789abcdefULL),
-			BPF_LD_IMM64(R2, 0xfecdba9876543210ULL),
+			BPF_LD_IMM64(R2, 0xfedcba9876543210ULL),
 			BPF_ALU64_REG(BPF_MOV, R0, R1),
 			BPF_STX_MEM(BPF_DW, R10, R1, -40),
 			BPF_ATOMIC_OP(BPF_DW, BPF_CMPXCHG, R10, R2, -40),
-			BPF_LD_IMM64(R0, 0xfecdba9876543210ULL),
+			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
 			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
 			BPF_ALU64_REG(BPF_SUB, R0, R2),
 			BPF_EXIT_INSN(),
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 07/10] bpf/tests: Add exhaustive tests of ALU register combinations
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (5 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 06/10] bpf/tests: Minor restructuring of ALU tests Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 08/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC " Johan Almbladh
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch replaces the current register combination test with new
exhaustive tests. Before, only a subset of register combinations was
tested for ALU64 DIV. Now, all combinatons of operand registers are
tested, including the case when they are the same, and for all ALU32
and ALU64 operations.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 834 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 763 insertions(+), 71 deletions(-)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 919323a3b69f..924bf4c9783c 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -1130,6 +1130,381 @@ static int bpf_fill_alu32_mod_reg(struct bpf_test *self)
 	return __bpf_fill_alu32_reg(self, BPF_MOD);
 }
 
+/*
+ * Test JITs that implement complex ALU operations as function
+ * calls, and must re-arrange operands for argument passing.
+ */
+static int __bpf_fill_alu_imm_regs(struct bpf_test *self, u8 op, bool alu32)
+{
+	int len = 2 + 10 * 10;
+	struct bpf_insn *insns;
+	u64 dst, res;
+	int i = 0;
+	u32 imm;
+	int rd;
+
+	insns = kmalloc_array(len, sizeof(*insns), GFP_KERNEL);
+	if (!insns)
+		return -ENOMEM;
+
+	/* Operand and result values according to operation */
+	if (alu32)
+		dst = 0x76543210U;
+	else
+		dst = 0x7edcba9876543210ULL;
+	imm = 0x01234567U;
+
+	if (op == BPF_LSH || op == BPF_RSH || op == BPF_ARSH)
+		imm &= 31;
+
+	__bpf_alu_result(&res, dst, imm, op);
+
+	if (alu32)
+		res = (u32)res;
+
+	/* Check all operand registers */
+	for (rd = R0; rd <= R9; rd++) {
+		i += __bpf_ld_imm64(&insns[i], rd, dst);
+
+		if (alu32)
+			insns[i++] = BPF_ALU32_IMM(op, rd, imm);
+		else
+			insns[i++] = BPF_ALU64_IMM(op, rd, imm);
+
+		insns[i++] = BPF_JMP32_IMM(BPF_JEQ, rd, res, 2);
+		insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+		insns[i++] = BPF_EXIT_INSN();
+
+		insns[i++] = BPF_ALU64_IMM(BPF_RSH, rd, 32);
+		insns[i++] = BPF_JMP32_IMM(BPF_JEQ, rd, res >> 32, 2);
+		insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+		insns[i++] = BPF_EXIT_INSN();
+	}
+
+	insns[i++] = BPF_MOV64_IMM(R0, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	self->u.ptr.insns = insns;
+	self->u.ptr.len = len;
+	BUG_ON(i != len);
+
+	return 0;
+}
+
+/* ALU64 K registers */
+static int bpf_fill_alu64_mov_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_MOV, false);
+}
+
+static int bpf_fill_alu64_and_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_AND, false);
+}
+
+static int bpf_fill_alu64_or_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_OR, false);
+}
+
+static int bpf_fill_alu64_xor_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_XOR, false);
+}
+
+static int bpf_fill_alu64_lsh_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_LSH, false);
+}
+
+static int bpf_fill_alu64_rsh_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_RSH, false);
+}
+
+static int bpf_fill_alu64_arsh_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_ARSH, false);
+}
+
+static int bpf_fill_alu64_add_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_ADD, false);
+}
+
+static int bpf_fill_alu64_sub_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_SUB, false);
+}
+
+static int bpf_fill_alu64_mul_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_MUL, false);
+}
+
+static int bpf_fill_alu64_div_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_DIV, false);
+}
+
+static int bpf_fill_alu64_mod_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_MOD, false);
+}
+
+/* ALU32 K registers */
+static int bpf_fill_alu32_mov_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_MOV, true);
+}
+
+static int bpf_fill_alu32_and_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_AND, true);
+}
+
+static int bpf_fill_alu32_or_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_OR, true);
+}
+
+static int bpf_fill_alu32_xor_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_XOR, true);
+}
+
+static int bpf_fill_alu32_lsh_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_LSH, true);
+}
+
+static int bpf_fill_alu32_rsh_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_RSH, true);
+}
+
+static int bpf_fill_alu32_arsh_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_ARSH, true);
+}
+
+static int bpf_fill_alu32_add_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_ADD, true);
+}
+
+static int bpf_fill_alu32_sub_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_SUB, true);
+}
+
+static int bpf_fill_alu32_mul_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_MUL, true);
+}
+
+static int bpf_fill_alu32_div_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_DIV, true);
+}
+
+static int bpf_fill_alu32_mod_imm_regs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_imm_regs(self, BPF_MOD, true);
+}
+
+/*
+ * Test JITs that implement complex ALU operations as function
+ * calls, and must re-arrange operands for argument passing.
+ */
+static int __bpf_fill_alu_reg_pairs(struct bpf_test *self, u8 op, bool alu32)
+{
+	int len = 2 + 10 * 10 * 12;
+	u64 dst, src, res, same;
+	struct bpf_insn *insns;
+	int rd, rs;
+	int i = 0;
+
+	insns = kmalloc_array(len, sizeof(*insns), GFP_KERNEL);
+	if (!insns)
+		return -ENOMEM;
+
+	/* Operand and result values according to operation */
+	if (alu32) {
+		dst = 0x76543210U;
+		src = 0x01234567U;
+	} else {
+		dst = 0x7edcba9876543210ULL;
+		src = 0x0123456789abcdefULL;
+	}
+
+	if (op == BPF_LSH || op == BPF_RSH || op == BPF_ARSH)
+		src &= 31;
+
+	__bpf_alu_result(&res, dst, src, op);
+	__bpf_alu_result(&same, src, src, op);
+
+	if (alu32) {
+		res = (u32)res;
+		same = (u32)same;
+	}
+
+	/* Check all combinations of operand registers */
+	for (rd = R0; rd <= R9; rd++) {
+		for (rs = R0; rs <= R9; rs++) {
+			u64 val = rd == rs ? same : res;
+
+			i += __bpf_ld_imm64(&insns[i], rd, dst);
+			i += __bpf_ld_imm64(&insns[i], rs, src);
+
+			if (alu32)
+				insns[i++] = BPF_ALU32_REG(op, rd, rs);
+			else
+				insns[i++] = BPF_ALU64_REG(op, rd, rs);
+
+			insns[i++] = BPF_JMP32_IMM(BPF_JEQ, rd, val, 2);
+			insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+			insns[i++] = BPF_EXIT_INSN();
+
+			insns[i++] = BPF_ALU64_IMM(BPF_RSH, rd, 32);
+			insns[i++] = BPF_JMP32_IMM(BPF_JEQ, rd, val >> 32, 2);
+			insns[i++] = BPF_MOV64_IMM(R0, __LINE__);
+			insns[i++] = BPF_EXIT_INSN();
+		}
+	}
+
+	insns[i++] = BPF_MOV64_IMM(R0, 1);
+	insns[i++] = BPF_EXIT_INSN();
+
+	self->u.ptr.insns = insns;
+	self->u.ptr.len = len;
+	BUG_ON(i != len);
+
+	return 0;
+}
+
+/* ALU64 X register combinations */
+static int bpf_fill_alu64_mov_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_MOV, false);
+}
+
+static int bpf_fill_alu64_and_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_AND, false);
+}
+
+static int bpf_fill_alu64_or_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_OR, false);
+}
+
+static int bpf_fill_alu64_xor_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_XOR, false);
+}
+
+static int bpf_fill_alu64_lsh_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_LSH, false);
+}
+
+static int bpf_fill_alu64_rsh_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_RSH, false);
+}
+
+static int bpf_fill_alu64_arsh_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_ARSH, false);
+}
+
+static int bpf_fill_alu64_add_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_ADD, false);
+}
+
+static int bpf_fill_alu64_sub_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_SUB, false);
+}
+
+static int bpf_fill_alu64_mul_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_MUL, false);
+}
+
+static int bpf_fill_alu64_div_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_DIV, false);
+}
+
+static int bpf_fill_alu64_mod_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_MOD, false);
+}
+
+/* ALU32 X register combinations */
+static int bpf_fill_alu32_mov_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_MOV, true);
+}
+
+static int bpf_fill_alu32_and_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_AND, true);
+}
+
+static int bpf_fill_alu32_or_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_OR, true);
+}
+
+static int bpf_fill_alu32_xor_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_XOR, true);
+}
+
+static int bpf_fill_alu32_lsh_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_LSH, true);
+}
+
+static int bpf_fill_alu32_rsh_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_RSH, true);
+}
+
+static int bpf_fill_alu32_arsh_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_ARSH, true);
+}
+
+static int bpf_fill_alu32_add_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_ADD, true);
+}
+
+static int bpf_fill_alu32_sub_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_SUB, true);
+}
+
+static int bpf_fill_alu32_mul_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_MUL, true);
+}
+
+static int bpf_fill_alu32_div_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_DIV, true);
+}
+
+static int bpf_fill_alu32_mod_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_alu_reg_pairs(self, BPF_MOD, true);
+}
+
 /*
  * Exhaustive tests of atomic operations for all power-of-two operand
  * magnitudes, both for positive and negative values.
@@ -3737,77 +4112,6 @@ static struct bpf_test tests[] = {
 		{ },
 		{ { 0, -1 } }
 	},
-	{
-		/*
-		 * Test 32-bit JITs that implement complex ALU64 operations as
-		 * function calls R0 = f(R1, R2), and must re-arrange operands.
-		 */
-#define NUMER 0xfedcba9876543210ULL
-#define DENOM 0x0123456789abcdefULL
-		"ALU64_DIV X: Operand register permutations",
-		.u.insns_int = {
-			/* R0 / R2 */
-			BPF_LD_IMM64(R0, NUMER),
-			BPF_LD_IMM64(R2, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R0, R2),
-			BPF_JMP_IMM(BPF_JEQ, R0, NUMER / DENOM, 1),
-			BPF_EXIT_INSN(),
-			/* R1 / R0 */
-			BPF_LD_IMM64(R1, NUMER),
-			BPF_LD_IMM64(R0, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R1, R0),
-			BPF_JMP_IMM(BPF_JEQ, R1, NUMER / DENOM, 1),
-			BPF_EXIT_INSN(),
-			/* R0 / R1 */
-			BPF_LD_IMM64(R0, NUMER),
-			BPF_LD_IMM64(R1, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R0, R1),
-			BPF_JMP_IMM(BPF_JEQ, R0, NUMER / DENOM, 1),
-			BPF_EXIT_INSN(),
-			/* R2 / R0 */
-			BPF_LD_IMM64(R2, NUMER),
-			BPF_LD_IMM64(R0, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R2, R0),
-			BPF_JMP_IMM(BPF_JEQ, R2, NUMER / DENOM, 1),
-			BPF_EXIT_INSN(),
-			/* R2 / R1 */
-			BPF_LD_IMM64(R2, NUMER),
-			BPF_LD_IMM64(R1, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R2, R1),
-			BPF_JMP_IMM(BPF_JEQ, R2, NUMER / DENOM, 1),
-			BPF_EXIT_INSN(),
-			/* R1 / R2 */
-			BPF_LD_IMM64(R1, NUMER),
-			BPF_LD_IMM64(R2, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R1, R2),
-			BPF_JMP_IMM(BPF_JEQ, R1, NUMER / DENOM, 1),
-			BPF_EXIT_INSN(),
-			/* R1 / R1 */
-			BPF_LD_IMM64(R1, NUMER),
-			BPF_ALU64_REG(BPF_DIV, R1, R1),
-			BPF_JMP_IMM(BPF_JEQ, R1, 1, 1),
-			BPF_EXIT_INSN(),
-			/* R2 / R2 */
-			BPF_LD_IMM64(R2, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R2, R2),
-			BPF_JMP_IMM(BPF_JEQ, R2, 1, 1),
-			BPF_EXIT_INSN(),
-			/* R3 / R4 */
-			BPF_LD_IMM64(R3, NUMER),
-			BPF_LD_IMM64(R4, DENOM),
-			BPF_ALU64_REG(BPF_DIV, R3, R4),
-			BPF_JMP_IMM(BPF_JEQ, R3, NUMER / DENOM, 1),
-			BPF_EXIT_INSN(),
-			/* Successful return */
-			BPF_LD_IMM64(R0, 1),
-			BPF_EXIT_INSN(),
-		},
-		INTERNAL,
-		{ },
-		{ { 0, 1 } },
-#undef NUMER
-#undef DENOM
-	},
 #ifdef CONFIG_32BIT
 	{
 		"INT: 32-bit context pointer word order and zero-extension",
@@ -10849,6 +11153,394 @@ static struct bpf_test tests[] = {
 	BPF_JMP32_REG_ZEXT(JSLT),
 	BPF_JMP32_REG_ZEXT(JSLE),
 #undef BPF_JMP2_REG_ZEXT
+	/* ALU64 K register combinations */
+	{
+		"ALU64_MOV_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_mov_imm_regs,
+	},
+	{
+		"ALU64_AND_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_and_imm_regs,
+	},
+	{
+		"ALU64_OR_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_or_imm_regs,
+	},
+	{
+		"ALU64_XOR_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_xor_imm_regs,
+	},
+	{
+		"ALU64_LSH_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_lsh_imm_regs,
+	},
+	{
+		"ALU64_RSH_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_rsh_imm_regs,
+	},
+	{
+		"ALU64_ARSH_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_arsh_imm_regs,
+	},
+	{
+		"ALU64_ADD_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_add_imm_regs,
+	},
+	{
+		"ALU64_SUB_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_sub_imm_regs,
+	},
+	{
+		"ALU64_MUL_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_mul_imm_regs,
+	},
+	{
+		"ALU64_DIV_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_div_imm_regs,
+	},
+	{
+		"ALU64_MOD_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_mod_imm_regs,
+	},
+	/* ALU32 K registers */
+	{
+		"ALU32_MOV_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_mov_imm_regs,
+	},
+	{
+		"ALU32_AND_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_and_imm_regs,
+	},
+	{
+		"ALU32_OR_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_or_imm_regs,
+	},
+	{
+		"ALU32_XOR_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_xor_imm_regs,
+	},
+	{
+		"ALU32_LSH_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_lsh_imm_regs,
+	},
+	{
+		"ALU32_RSH_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_rsh_imm_regs,
+	},
+	{
+		"ALU32_ARSH_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_arsh_imm_regs,
+	},
+	{
+		"ALU32_ADD_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_add_imm_regs,
+	},
+	{
+		"ALU32_SUB_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_sub_imm_regs,
+	},
+	{
+		"ALU32_MUL_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_mul_imm_regs,
+	},
+	{
+		"ALU32_DIV_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_div_imm_regs,
+	},
+	{
+		"ALU32_MOD_K: registers",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_mod_imm_regs,
+	},
+	/* ALU64 X register combinations */
+	{
+		"ALU64_MOV_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_mov_reg_pairs,
+	},
+	{
+		"ALU64_AND_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_and_reg_pairs,
+	},
+	{
+		"ALU64_OR_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_or_reg_pairs,
+	},
+	{
+		"ALU64_XOR_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_xor_reg_pairs,
+	},
+	{
+		"ALU64_LSH_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_lsh_reg_pairs,
+	},
+	{
+		"ALU64_RSH_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_rsh_reg_pairs,
+	},
+	{
+		"ALU64_ARSH_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_arsh_reg_pairs,
+	},
+	{
+		"ALU64_ADD_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_add_reg_pairs,
+	},
+	{
+		"ALU64_SUB_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_sub_reg_pairs,
+	},
+	{
+		"ALU64_MUL_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_mul_reg_pairs,
+	},
+	{
+		"ALU64_DIV_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_div_reg_pairs,
+	},
+	{
+		"ALU64_MOD_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_mod_reg_pairs,
+	},
+	/* ALU32 X register combinations */
+	{
+		"ALU32_MOV_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_mov_reg_pairs,
+	},
+	{
+		"ALU32_AND_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_and_reg_pairs,
+	},
+	{
+		"ALU32_OR_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_or_reg_pairs,
+	},
+	{
+		"ALU32_XOR_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_xor_reg_pairs,
+	},
+	{
+		"ALU32_LSH_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_lsh_reg_pairs,
+	},
+	{
+		"ALU32_RSH_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_rsh_reg_pairs,
+	},
+	{
+		"ALU32_ARSH_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_arsh_reg_pairs,
+	},
+	{
+		"ALU32_ADD_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_add_reg_pairs,
+	},
+	{
+		"ALU32_SUB_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_sub_reg_pairs,
+	},
+	{
+		"ALU32_MUL_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_mul_reg_pairs,
+	},
+	{
+		"ALU32_DIV_X: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_div_reg_pairs,
+	},
+	{
+		"ALU32_MOD_X register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_mod_reg_pairs,
+	},
 	/* Exhaustive test of ALU64 shift operations */
 	{
 		"ALU64_LSH_K: all shift values",
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 08/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC register combinations
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (6 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 07/10] bpf/tests: Add exhaustive tests of ALU register combinations Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 09/10] bpf/tests: Add test of ALU shifts with operand register aliasing Johan Almbladh
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch adds tests of all register combinations for BPF_ATOMIC
operations on both BPF_W and BPF_DW sizes.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 422 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 422 insertions(+)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 924bf4c9783c..40db4cee4f51 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -1805,6 +1805,246 @@ static int bpf_fill_cmpxchg32(struct bpf_test *self)
 				  &__bpf_emit_cmpxchg32);
 }
 
+/*
+ * Test JITs that implement ATOMIC operations as function calls or
+ * other primitives, and must re-arrange operands for argument passing.
+ */
+static int __bpf_fill_atomic_reg_pairs(struct bpf_test *self, u8 width, u8 op)
+{
+	struct bpf_insn *insn;
+	int len = 2 + 34 * 10 * 10;
+	u64 mem, upd, res;
+	int rd, rs, i = 0;
+
+	insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL);
+	if (!insn)
+		return -ENOMEM;
+
+	/* Operand and memory values */
+	if (width == BPF_DW) {
+		mem = 0x0123456789abcdefULL;
+		upd = 0xfedcba9876543210ULL;
+	} else { /* BPF_W */
+		mem = 0x01234567U;
+		upd = 0x76543210U;
+	}
+
+	/* Memory updated according to operation */
+	switch (op) {
+	case BPF_XCHG:
+		res = upd;
+		break;
+	case BPF_CMPXCHG:
+		res = mem;
+		break;
+	default:
+		__bpf_alu_result(&res, mem, upd, BPF_OP(op));
+	}
+
+	/* Test all operand registers */
+	for (rd = R0; rd <= R9; rd++) {
+		for (rs = R0; rs <= R9; rs++) {
+			u64 cmp, src;
+
+			/* Initialize value in memory */
+			i += __bpf_ld_imm64(&insn[i], R0, mem);
+			insn[i++] = BPF_STX_MEM(width, R10, R0, -8);
+
+			/* Initialize registers in order */
+			i += __bpf_ld_imm64(&insn[i], R0, ~mem);
+			i += __bpf_ld_imm64(&insn[i], rs, upd);
+			insn[i++] = BPF_MOV64_REG(rd, R10);
+
+			/* Perform atomic operation */
+			insn[i++] = BPF_ATOMIC_OP(width, op, rd, rs, -8);
+			if (op == BPF_CMPXCHG && width == BPF_W)
+				insn[i++] = BPF_ZEXT_REG(R0);
+
+			/* Check R0 register value */
+			if (op == BPF_CMPXCHG)
+				cmp = mem;  /* Expect value from memory */
+			else if (R0 == rd || R0 == rs)
+				cmp = 0;    /* Aliased, checked below */
+			else
+				cmp = ~mem; /* Expect value to be preserved */
+			if (cmp) {
+				insn[i++] = BPF_JMP32_IMM(BPF_JEQ, R0,
+							   (u32)cmp, 2);
+				insn[i++] = BPF_MOV32_IMM(R0, __LINE__);
+				insn[i++] = BPF_EXIT_INSN();
+				insn[i++] = BPF_ALU64_IMM(BPF_RSH, R0, 32);
+				insn[i++] = BPF_JMP32_IMM(BPF_JEQ, R0,
+							   cmp >> 32, 2);
+				insn[i++] = BPF_MOV32_IMM(R0, __LINE__);
+				insn[i++] = BPF_EXIT_INSN();
+			}
+
+			/* Check source register value */
+			if (rs == R0 && op == BPF_CMPXCHG)
+				src = 0;   /* Aliased with R0, checked above */
+			else if (rs == rd && (op == BPF_CMPXCHG ||
+					      !(op & BPF_FETCH)))
+				src = 0;   /* Aliased with rd, checked below */
+			else if (op == BPF_CMPXCHG)
+				src = upd; /* Expect value to be preserved */
+			else if (op & BPF_FETCH)
+				src = mem; /* Expect fetched value from mem */
+			else /* no fetch */
+				src = upd; /* Expect value to be preserved */
+			if (src) {
+				insn[i++] = BPF_JMP32_IMM(BPF_JEQ, rs,
+							   (u32)src, 2);
+				insn[i++] = BPF_MOV32_IMM(R0, __LINE__);
+				insn[i++] = BPF_EXIT_INSN();
+				insn[i++] = BPF_ALU64_IMM(BPF_RSH, rs, 32);
+				insn[i++] = BPF_JMP32_IMM(BPF_JEQ, rs,
+							   src >> 32, 2);
+				insn[i++] = BPF_MOV32_IMM(R0, __LINE__);
+				insn[i++] = BPF_EXIT_INSN();
+			}
+
+			/* Check destination register value */
+			if (!(rd == R0 && op == BPF_CMPXCHG) &&
+			    !(rd == rs && (op & BPF_FETCH))) {
+				insn[i++] = BPF_JMP_REG(BPF_JEQ, rd, R10, 2);
+				insn[i++] = BPF_MOV32_IMM(R0, __LINE__);
+				insn[i++] = BPF_EXIT_INSN();
+			}
+
+			/* Check value in memory */
+			if (rs != rd) {                  /* No aliasing */
+				i += __bpf_ld_imm64(&insn[i], R1, res);
+			} else if (op == BPF_XCHG) {     /* Aliased, XCHG */
+				insn[i++] = BPF_MOV64_REG(R1, R10);
+			} else if (op == BPF_CMPXCHG) {  /* Aliased, CMPXCHG */
+				i += __bpf_ld_imm64(&insn[i], R1, mem);
+			} else {                        /* Aliased, ALU oper */
+				i += __bpf_ld_imm64(&insn[i], R1, mem);
+				insn[i++] = BPF_ALU64_REG(BPF_OP(op), R1, R10);
+			}
+
+			insn[i++] = BPF_LDX_MEM(width, R0, R10, -8);
+			if (width == BPF_DW)
+				insn[i++] = BPF_JMP_REG(BPF_JEQ, R0, R1, 2);
+			else /* width == BPF_W */
+				insn[i++] = BPF_JMP32_REG(BPF_JEQ, R0, R1, 2);
+			insn[i++] = BPF_MOV32_IMM(R0, __LINE__);
+			insn[i++] = BPF_EXIT_INSN();
+		}
+	}
+
+	insn[i++] = BPF_MOV64_IMM(R0, 1);
+	insn[i++] = BPF_EXIT_INSN();
+
+	self->u.ptr.insns = insn;
+	self->u.ptr.len = i;
+	BUG_ON(i > len);
+
+	return 0;
+}
+
+/* 64-bit atomic register tests */
+static int bpf_fill_atomic64_add_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_ADD);
+}
+
+static int bpf_fill_atomic64_and_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_AND);
+}
+
+static int bpf_fill_atomic64_or_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_OR);
+}
+
+static int bpf_fill_atomic64_xor_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_XOR);
+}
+
+static int bpf_fill_atomic64_add_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_ADD | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_and_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_AND | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_or_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_OR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_xor_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_XOR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic64_xchg_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_XCHG);
+}
+
+static int bpf_fill_atomic64_cmpxchg_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_DW, BPF_CMPXCHG);
+}
+
+/* 32-bit atomic register tests */
+static int bpf_fill_atomic32_add_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_ADD);
+}
+
+static int bpf_fill_atomic32_and_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_AND);
+}
+
+static int bpf_fill_atomic32_or_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_OR);
+}
+
+static int bpf_fill_atomic32_xor_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_XOR);
+}
+
+static int bpf_fill_atomic32_add_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_ADD | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_and_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_AND | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_or_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_OR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_xor_fetch_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_XOR | BPF_FETCH);
+}
+
+static int bpf_fill_atomic32_xchg_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_XCHG);
+}
+
+static int bpf_fill_atomic32_cmpxchg_reg_pairs(struct bpf_test *self)
+{
+	return __bpf_fill_atomic_reg_pairs(self, BPF_W, BPF_CMPXCHG);
+}
+
 /*
  * Test the two-instruction 64-bit immediate load operation for all
  * power-of-two magnitudes of the immediate operand. For each MSB, a block
@@ -11976,6 +12216,188 @@ static struct bpf_test tests[] = {
 		{ { 0, 1 } },
 		.fill_helper = bpf_fill_ld_imm64,
 	},
+	/* 64-bit ATOMIC register combinations */
+	{
+		"ATOMIC_DW_ADD: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_add_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_AND: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_and_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_OR: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_or_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_XOR: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_xor_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_ADD_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_add_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_AND_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_and_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_OR_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_or_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_XOR_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_xor_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_XCHG: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_xchg_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_DW_CMPXCHG: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic64_cmpxchg_reg_pairs,
+		.stack_depth = 8,
+	},
+	/* 32-bit ATOMIC register combinations */
+	{
+		"ATOMIC_W_ADD: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_add_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_AND: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_and_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_OR: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_or_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_XOR: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_xor_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_ADD_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_add_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_AND_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_and_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_OR_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_or_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_XOR_FETCH: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_xor_fetch_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_XCHG: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_xchg_reg_pairs,
+		.stack_depth = 8,
+	},
+	{
+		"ATOMIC_W_CMPXCHG: register combinations",
+		{ },
+		INTERNAL,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_atomic32_cmpxchg_reg_pairs,
+		.stack_depth = 8,
+	},
 	/* 64-bit ATOMIC magnitudes */
 	{
 		"ATOMIC_DW_ADD: all operand magnitudes",
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 09/10] bpf/tests: Add test of ALU shifts with operand register aliasing
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (7 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 08/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC " Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 13:03 ` [PATCH bpf-next 10/10] bpf/tests: Add test of LDX_MEM with operand aliasing Johan Almbladh
  2021-10-01 15:10 ` [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite patchwork-bot+netdevbpf
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch adds a tests of ALU32 and ALU64 LSH/RSH/ARSH operations for the
case when the two operands are the same register. Mainly intended to test
JITs that implement ALU64 shifts with 32-bit CPU instructions.

Also renamed related helper functions for consistency with the new tests.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 162 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 149 insertions(+), 13 deletions(-)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 40db4cee4f51..dfcbdff714b6 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -660,37 +660,37 @@ static int __bpf_fill_alu_shift(struct bpf_test *self, u8 op,
 
 	self->u.ptr.insns = insn;
 	self->u.ptr.len = len;
-	BUG_ON(i > len);
+	BUG_ON(i != len);
 
 	return 0;
 }
 
-static int bpf_fill_alu_lsh_imm(struct bpf_test *self)
+static int bpf_fill_alu64_lsh_imm(struct bpf_test *self)
 {
 	return __bpf_fill_alu_shift(self, BPF_LSH, BPF_K, false);
 }
 
-static int bpf_fill_alu_rsh_imm(struct bpf_test *self)
+static int bpf_fill_alu64_rsh_imm(struct bpf_test *self)
 {
 	return __bpf_fill_alu_shift(self, BPF_RSH, BPF_K, false);
 }
 
-static int bpf_fill_alu_arsh_imm(struct bpf_test *self)
+static int bpf_fill_alu64_arsh_imm(struct bpf_test *self)
 {
 	return __bpf_fill_alu_shift(self, BPF_ARSH, BPF_K, false);
 }
 
-static int bpf_fill_alu_lsh_reg(struct bpf_test *self)
+static int bpf_fill_alu64_lsh_reg(struct bpf_test *self)
 {
 	return __bpf_fill_alu_shift(self, BPF_LSH, BPF_X, false);
 }
 
-static int bpf_fill_alu_rsh_reg(struct bpf_test *self)
+static int bpf_fill_alu64_rsh_reg(struct bpf_test *self)
 {
 	return __bpf_fill_alu_shift(self, BPF_RSH, BPF_X, false);
 }
 
-static int bpf_fill_alu_arsh_reg(struct bpf_test *self)
+static int bpf_fill_alu64_arsh_reg(struct bpf_test *self)
 {
 	return __bpf_fill_alu_shift(self, BPF_ARSH, BPF_X, false);
 }
@@ -725,6 +725,86 @@ static int bpf_fill_alu32_arsh_reg(struct bpf_test *self)
 	return __bpf_fill_alu_shift(self, BPF_ARSH, BPF_X, true);
 }
 
+/*
+ * Test an ALU register shift operation for all valid shift values
+ * for the case when the source and destination are the same.
+ */
+static int __bpf_fill_alu_shift_same_reg(struct bpf_test *self, u8 op,
+					 bool alu32)
+{
+	int bits = alu32 ? 32 : 64;
+	int len = 3 + 6 * bits;
+	struct bpf_insn *insn;
+	int i = 0;
+	u64 val;
+
+	insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL);
+	if (!insn)
+		return -ENOMEM;
+
+	insn[i++] = BPF_ALU64_IMM(BPF_MOV, R0, 0);
+
+	for (val = 0; val < bits; val++) {
+		u64 res;
+
+		/* Perform operation */
+		insn[i++] = BPF_ALU64_IMM(BPF_MOV, R1, val);
+		if (alu32)
+			insn[i++] = BPF_ALU32_REG(op, R1, R1);
+		else
+			insn[i++] = BPF_ALU64_REG(op, R1, R1);
+
+		/* Compute the reference result */
+		__bpf_alu_result(&res, val, val, op);
+		if (alu32)
+			res = (u32)res;
+		i += __bpf_ld_imm64(&insn[i], R2, res);
+
+		/* Check the actual result */
+		insn[i++] = BPF_JMP_REG(BPF_JEQ, R1, R2, 1);
+		insn[i++] = BPF_EXIT_INSN();
+	}
+
+	insn[i++] = BPF_ALU64_IMM(BPF_MOV, R0, 1);
+	insn[i++] = BPF_EXIT_INSN();
+
+	self->u.ptr.insns = insn;
+	self->u.ptr.len = len;
+	BUG_ON(i != len);
+
+	return 0;
+}
+
+static int bpf_fill_alu64_lsh_same_reg(struct bpf_test *self)
+{
+	return __bpf_fill_alu_shift_same_reg(self, BPF_LSH, false);
+}
+
+static int bpf_fill_alu64_rsh_same_reg(struct bpf_test *self)
+{
+	return __bpf_fill_alu_shift_same_reg(self, BPF_RSH, false);
+}
+
+static int bpf_fill_alu64_arsh_same_reg(struct bpf_test *self)
+{
+	return __bpf_fill_alu_shift_same_reg(self, BPF_ARSH, false);
+}
+
+static int bpf_fill_alu32_lsh_same_reg(struct bpf_test *self)
+{
+	return __bpf_fill_alu_shift_same_reg(self, BPF_LSH, true);
+}
+
+static int bpf_fill_alu32_rsh_same_reg(struct bpf_test *self)
+{
+	return __bpf_fill_alu_shift_same_reg(self, BPF_RSH, true);
+}
+
+static int bpf_fill_alu32_arsh_same_reg(struct bpf_test *self)
+{
+	return __bpf_fill_alu_shift_same_reg(self, BPF_ARSH, true);
+}
+
 /*
  * Common operand pattern generator for exhaustive power-of-two magnitudes
  * tests. The block size parameters can be adjusted to increase/reduce the
@@ -11788,7 +11868,7 @@ static struct bpf_test tests[] = {
 		INTERNAL | FLAG_NO_DATA,
 		{ },
 		{ { 0, 1 } },
-		.fill_helper = bpf_fill_alu_lsh_imm,
+		.fill_helper = bpf_fill_alu64_lsh_imm,
 	},
 	{
 		"ALU64_RSH_K: all shift values",
@@ -11796,7 +11876,7 @@ static struct bpf_test tests[] = {
 		INTERNAL | FLAG_NO_DATA,
 		{ },
 		{ { 0, 1 } },
-		.fill_helper = bpf_fill_alu_rsh_imm,
+		.fill_helper = bpf_fill_alu64_rsh_imm,
 	},
 	{
 		"ALU64_ARSH_K: all shift values",
@@ -11804,7 +11884,7 @@ static struct bpf_test tests[] = {
 		INTERNAL | FLAG_NO_DATA,
 		{ },
 		{ { 0, 1 } },
-		.fill_helper = bpf_fill_alu_arsh_imm,
+		.fill_helper = bpf_fill_alu64_arsh_imm,
 	},
 	{
 		"ALU64_LSH_X: all shift values",
@@ -11812,7 +11892,7 @@ static struct bpf_test tests[] = {
 		INTERNAL | FLAG_NO_DATA,
 		{ },
 		{ { 0, 1 } },
-		.fill_helper = bpf_fill_alu_lsh_reg,
+		.fill_helper = bpf_fill_alu64_lsh_reg,
 	},
 	{
 		"ALU64_RSH_X: all shift values",
@@ -11820,7 +11900,7 @@ static struct bpf_test tests[] = {
 		INTERNAL | FLAG_NO_DATA,
 		{ },
 		{ { 0, 1 } },
-		.fill_helper = bpf_fill_alu_rsh_reg,
+		.fill_helper = bpf_fill_alu64_rsh_reg,
 	},
 	{
 		"ALU64_ARSH_X: all shift values",
@@ -11828,7 +11908,7 @@ static struct bpf_test tests[] = {
 		INTERNAL | FLAG_NO_DATA,
 		{ },
 		{ { 0, 1 } },
-		.fill_helper = bpf_fill_alu_arsh_reg,
+		.fill_helper = bpf_fill_alu64_arsh_reg,
 	},
 	/* Exhaustive test of ALU32 shift operations */
 	{
@@ -11879,6 +11959,62 @@ static struct bpf_test tests[] = {
 		{ { 0, 1 } },
 		.fill_helper = bpf_fill_alu32_arsh_reg,
 	},
+	/*
+	 * Exhaustive test of ALU64 shift operations when
+	 * source and destination register are the same.
+	 */
+	{
+		"ALU64_LSH_X: all shift values with the same register",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_lsh_same_reg,
+	},
+	{
+		"ALU64_RSH_X: all shift values with the same register",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_rsh_same_reg,
+	},
+	{
+		"ALU64_ARSH_X: all shift values with the same register",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu64_arsh_same_reg,
+	},
+	/*
+	 * Exhaustive test of ALU32 shift operations when
+	 * source and destination register are the same.
+	 */
+	{
+		"ALU32_LSH_X: all shift values with the same register",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_lsh_same_reg,
+	},
+	{
+		"ALU32_RSH_X: all shift values with the same register",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_rsh_same_reg,
+	},
+	{
+		"ALU32_ARSH_X: all shift values with the same register",
+		{ },
+		INTERNAL | FLAG_NO_DATA,
+		{ },
+		{ { 0, 1 } },
+		.fill_helper = bpf_fill_alu32_arsh_same_reg,
+	},
 	/* ALU64 immediate magnitudes */
 	{
 		"ALU64_MOV_K: all immediate value magnitudes",
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH bpf-next 10/10] bpf/tests: Add test of LDX_MEM with operand aliasing
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (8 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 09/10] bpf/tests: Add test of ALU shifts with operand register aliasing Johan Almbladh
@ 2021-10-01 13:03 ` Johan Almbladh
  2021-10-01 15:10 ` [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite patchwork-bot+netdevbpf
  10 siblings, 0 replies; 13+ messages in thread
From: Johan Almbladh @ 2021-10-01 13:03 UTC (permalink / raw)
  To: ast, daniel, andrii
  Cc: kafai, songliubraving, yhs, john.fastabend, kpsingh, iii, paul,
	yangtiezhu, netdev, bpf, Johan Almbladh

This patch adds a set of tests of BPF_LDX_MEM where both operand registers
are the same register. Mainly testing 32-bit JITs that may load a 64-bit
value in two 32-bit loads, and must not overwrite the address register.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
---
 lib/test_bpf.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index dfcbdff714b6..b9fc330fc83b 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -11133,6 +11133,64 @@ static struct bpf_test tests[] = {
 		{},
 		{ { 0, 2 } },
 	},
+	/* BPF_LDX_MEM with operand aliasing */
+	{
+		"LDX_MEM_B: operand register aliasing",
+		.u.insns_int = {
+			BPF_ST_MEM(BPF_B, R10, -8, 123),
+			BPF_MOV64_REG(R0, R10),
+			BPF_LDX_MEM(BPF_B, R0, R0, -8),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 123 } },
+		.stack_depth = 8,
+	},
+	{
+		"LDX_MEM_H: operand register aliasing",
+		.u.insns_int = {
+			BPF_ST_MEM(BPF_H, R10, -8, 12345),
+			BPF_MOV64_REG(R0, R10),
+			BPF_LDX_MEM(BPF_H, R0, R0, -8),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 12345 } },
+		.stack_depth = 8,
+	},
+	{
+		"LDX_MEM_W: operand register aliasing",
+		.u.insns_int = {
+			BPF_ST_MEM(BPF_W, R10, -8, 123456789),
+			BPF_MOV64_REG(R0, R10),
+			BPF_LDX_MEM(BPF_W, R0, R0, -8),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 123456789 } },
+		.stack_depth = 8,
+	},
+	{
+		"LDX_MEM_DW: operand register aliasing",
+		.u.insns_int = {
+			BPF_LD_IMM64(R1, 0x123456789abcdefULL),
+			BPF_STX_MEM(BPF_DW, R10, R1, -8),
+			BPF_MOV64_REG(R0, R10),
+			BPF_LDX_MEM(BPF_DW, R0, R0, -8),
+			BPF_ALU64_REG(BPF_SUB, R0, R1),
+			BPF_MOV64_REG(R1, R0),
+			BPF_ALU64_IMM(BPF_RSH, R1, 32),
+			BPF_ALU64_REG(BPF_OR, R0, R1),
+			BPF_EXIT_INSN(),
+		},
+		INTERNAL,
+		{ },
+		{ { 0, 0 } },
+		.stack_depth = 8,
+	},
 	/*
 	 * Register (non-)clobbering tests for the case where a JIT implements
 	 * complex ALU or ATOMIC operations via function calls. If so, the
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite
  2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
                   ` (9 preceding siblings ...)
  2021-10-01 13:03 ` [PATCH bpf-next 10/10] bpf/tests: Add test of LDX_MEM with operand aliasing Johan Almbladh
@ 2021-10-01 15:10 ` patchwork-bot+netdevbpf
  10 siblings, 0 replies; 13+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-01 15:10 UTC (permalink / raw)
  To: Johan Almbladh
  Cc: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, iii, paul, yangtiezhu, netdev, bpf

Hello:

This series was applied to bpf/bpf-next.git (refs/heads/master):

On Fri,  1 Oct 2021 15:03:38 +0200 you wrote:
> This patch set adds a number of new tests to the test_bpf.ko test suite.
> The new tests focus on the behaviour of operations with different
> combinations of register operands, and in particular, when two or more
> register operands are in fact the same register. It also verifies things
> like a src register not being zero-extended in-place in ALU32 operations,
> and that operations implemented with function calls do not clobber any
> other eBPF registers.
> 
> [...]

Here is the summary with links:
  - [bpf-next,01/10] bpf/tests: Add tests of BPF_LDX and BPF_STX with small sizes
    https://git.kernel.org/bpf/bpf-next/c/caaaa1667bf1
  - [bpf-next,02/10] bpf/tests: Add zero-extension checks in BPF_ATOMIC tests
    https://git.kernel.org/bpf/bpf-next/c/89b63462765c
  - [bpf-next,03/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes
    https://git.kernel.org/bpf/bpf-next/c/f68e8efd7fa5
  - [bpf-next,04/10] bpf/tests: Add tests to check source register zero-extension
    https://git.kernel.org/bpf/bpf-next/c/0bbaa02b4816
  - [bpf-next,05/10] bpf/tests: Add more tests for ALU and ATOMIC register clobbering
    https://git.kernel.org/bpf/bpf-next/c/e2f9797b3c73
  - [bpf-next,06/10] bpf/tests: Minor restructuring of ALU tests
    https://git.kernel.org/bpf/bpf-next/c/e42fc3c2c40e
  - [bpf-next,07/10] bpf/tests: Add exhaustive tests of ALU register combinations
    https://git.kernel.org/bpf/bpf-next/c/daed6083f4fb
  - [bpf-next,08/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC register combinations
    https://git.kernel.org/bpf/bpf-next/c/6fae2e8a1d9e
  - [bpf-next,09/10] bpf/tests: Add test of ALU shifts with operand register aliasing
    https://git.kernel.org/bpf/bpf-next/c/68813605dea6
  - [bpf-next,10/10] bpf/tests: Add test of LDX_MEM with operand aliasing
    https://git.kernel.org/bpf/bpf-next/c/7bceeb95726b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH bpf-next 07/10] bpf/tests: Add exhaustive tests of ALU register combinations
@ 2021-11-11 23:21 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2021-11-11 23:21 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 422624 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211001130348.3670534-8-johan.almbladh@anyfinetworks.com>
References: <20211001130348.3670534-8-johan.almbladh@anyfinetworks.com>
TO: Johan Almbladh <johan.almbladh@anyfinetworks.com>

Hi Johan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Johan-Almbladh/bpf-tests-Extend-eBPF-JIT-test-suite/20211001-213027
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
:::::: branch date: 6 weeks ago
:::::: commit date: 6 weeks ago
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/278ec42838bdb02527941c5c3e5d3e5bbb7892f5
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Johan-Almbladh/bpf-tests-Extend-eBPF-JIT-test-suite/20211001-213027
        git checkout 278ec42838bdb02527941c5c3e5d3e5bbb7892f5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   lib/test_bpf.c:7314:24: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] result @@     got restricted __be32 [usertype] @@
   lib/test_bpf.c:7314:24: sparse:     expected unsigned int [usertype] result
   lib/test_bpf.c:7314:24: sparse:     got restricted __be32 [usertype]
   lib/test_bpf.c:7325:25: sparse: sparse: cast from restricted __be64
   lib/test_bpf.c:7337:31: sparse: sparse: restricted __be64 degrades to integer
   lib/test_bpf.c:7349:24: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] result @@     got restricted __le16 [usertype] @@
   lib/test_bpf.c:7349:24: sparse:     expected unsigned int [usertype] result
   lib/test_bpf.c:7349:24: sparse:     got restricted __le16 [usertype]
   lib/test_bpf.c:7363:24: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] result @@     got restricted __le32 [usertype] @@
   lib/test_bpf.c:7363:24: sparse:     expected unsigned int [usertype] result
   lib/test_bpf.c:7363:24: sparse:     got restricted __le32 [usertype]
   lib/test_bpf.c:7374:25: sparse: sparse: cast from restricted __le64
   lib/test_bpf.c:7386:31: sparse: sparse: restricted __le64 degrades to integer
   lib/test_bpf.c:7398:25: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] result @@     got restricted __le16 [usertype] @@
   lib/test_bpf.c:7398:25: sparse:     expected unsigned int [usertype] result
   lib/test_bpf.c:7398:25: sparse:     got restricted __le16 [usertype]
   lib/test_bpf.c:7412:24: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] result @@     got restricted __le32 [usertype] @@
   lib/test_bpf.c:7412:24: sparse:     expected unsigned int [usertype] result
   lib/test_bpf.c:7412:24: sparse:     got restricted __le32 [usertype]
   lib/test_bpf.c:7423:25: sparse: sparse: cast from restricted __le64
   lib/test_bpf.c:7435:31: sparse: sparse: restricted __le64 degrades to integer
   lib/test_bpf.c:4474:25: sparse: sparse: cast truncates bits from constant value (567800001234 becomes 1234)
   lib/test_bpf.c:4485:25: sparse: sparse: cast truncates bits from constant value (1ffffffff becomes ffffffff)
   lib/test_bpf.c:4562:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:4640:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:4656:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:4781:25: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
   lib/test_bpf.c:4959:25: sparse: sparse: cast truncates bits from constant value (100000000 becomes 0)
   lib/test_bpf.c:5269:25: sparse: sparse: cast truncates bits from constant value (fedcba987654321 becomes 87654321)
   lib/test_bpf.c:5270:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef0 becomes 9abcdef0)
   lib/test_bpf.c:5281:25: sparse: sparse: cast truncates bits from constant value (fedcba987654321 becomes 87654321)
   lib/test_bpf.c:5282:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef0 becomes 9abcdef0)
   lib/test_bpf.c:5404:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:5415:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:5802:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:5840:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:5856:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:5857:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:5888:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:5904:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:5905:25: sparse: sparse: cast truncates bits from constant value (123456780a0c0e0 becomes 80a0c0e0)
   lib/test_bpf.c:6014:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6052:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:6053:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:6068:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:6100:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6101:25: sparse: sparse: cast truncates bits from constant value (12345678fafcfef becomes 8fafcfef)
   lib/test_bpf.c:6116:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6226:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6264:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:6265:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:6280:25: sparse: sparse: cast truncates bits from constant value (ffffffff0000 becomes ffff0000)
   lib/test_bpf.c:6281:25: sparse: sparse: cast truncates bits from constant value (ffff00000000ffff becomes ffff)
   lib/test_bpf.c:6312:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6313:25: sparse: sparse: cast truncates bits from constant value (123456786a4c2e0 becomes 86a4c2e0)
   lib/test_bpf.c:6328:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6329:25: sparse: sparse: cast truncates bits from constant value (fedcba98795b3d1f becomes 795b3d1f)
   lib/test_bpf.c:6405:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6417:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6430:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6442:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6455:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6467:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6480:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6492:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6572:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6583:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6595:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6606:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6618:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6629:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6641:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6713:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6725:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6738:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6750:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6763:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6775:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6788:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6800:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6880:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6891:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6903:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6914:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6926:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6937:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6949:25: sparse: sparse: cast truncates bits from constant value (123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6973:25: sparse: sparse: cast truncates bits from constant value (ff00ff0000000000 becomes 0)
   lib/test_bpf.c:6985:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:6997:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7010:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7022:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7035:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7047:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7060:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7072:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7108:25: sparse: sparse: cast truncates bits from constant value (ff00ff0000000000 becomes 0)
   lib/test_bpf.c:7119:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7130:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7142:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
>> lib/test_bpf.c:7153:25: sparse: sparse: cast truncates bits from constant value (f123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7165:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7176:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7188:25: sparse: sparse: cast truncates bits from constant value (8123456789abcdef becomes 89abcdef)
   lib/test_bpf.c:7245:25: sparse: sparse: too many warnings

vim +7153 lib/test_bpf.c

a7d2e752e52050f Johan Almbladh     2021-09-14  2658  
a5a36544de38057 Johan Almbladh     2021-09-14  2659  
64a8946b447e418 Alexei Starovoitov 2014-05-08  2660  static struct bpf_test tests[] = {
64a8946b447e418 Alexei Starovoitov 2014-05-08  2661  	{
64a8946b447e418 Alexei Starovoitov 2014-05-08  2662  		"TAX",
ece80490e2c1cef Andrew Morton      2014-05-22  2663  		.u.insns = {
64a8946b447e418 Alexei Starovoitov 2014-05-08  2664  			BPF_STMT(BPF_LD | BPF_IMM, 1),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2665  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2666  			BPF_STMT(BPF_LD | BPF_IMM, 2),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2667  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2668  			BPF_STMT(BPF_ALU | BPF_NEG, 0), /* A == -3 */
64a8946b447e418 Alexei Starovoitov 2014-05-08  2669  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2670  			BPF_STMT(BPF_LD | BPF_LEN, 0),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2671  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2672  			BPF_STMT(BPF_MISC | BPF_TAX, 0), /* X == len - 3 */
64a8946b447e418 Alexei Starovoitov 2014-05-08  2673  			BPF_STMT(BPF_LD | BPF_B | BPF_IND, 1),
64a8946b447e418 Alexei Starovoitov 2014-05-08  2674  			BPF_STMT(BPF_RET | BPF_A, 0)
64a8946b447e418 Alexei Starovoitov 2014-05-08  2675  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2676  		CLASSIC,
64a8946b447e418 Alexei Starovoitov 2014-05-08  2677  		{ 10, 20, 30, 40, 50 },
64a8946b447e418 Alexei Starovoitov 2014-05-08  2678  		{ { 2, 10 }, { 3, 20 }, { 4, 30 } },
64a8946b447e418 Alexei Starovoitov 2014-05-08  2679  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2680  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2681  		"TXA",
ece80490e2c1cef Andrew Morton      2014-05-22  2682  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2683  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2684  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2685  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2686  			BPF_STMT(BPF_RET | BPF_A, 0) /* A == len * 2 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2687  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2688  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2689  		{ 10, 20, 30, 40, 50 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2690  		{ { 1, 2 }, { 3, 6 }, { 4, 8 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2691  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2692  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2693  		"ADD_SUB_MUL_K",
ece80490e2c1cef Andrew Morton      2014-05-22  2694  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2695  			BPF_STMT(BPF_LD | BPF_IMM, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2696  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2697  			BPF_STMT(BPF_LDX | BPF_IMM, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2698  			BPF_STMT(BPF_ALU | BPF_SUB | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2699  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 0xffffffff),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2700  			BPF_STMT(BPF_ALU | BPF_MUL | BPF_K, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2701  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2702  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2703  		CLASSIC | FLAG_NO_DATA,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2704  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2705  		{ { 0, 0xfffffffd } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2706  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2707  	{
6867b17b26d80cf Denis Kirjanov     2014-12-01  2708  		"DIV_MOD_KX",
ece80490e2c1cef Andrew Morton      2014-05-22  2709  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2710  			BPF_STMT(BPF_LD | BPF_IMM, 8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2711  			BPF_STMT(BPF_ALU | BPF_DIV | BPF_K, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2712  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2713  			BPF_STMT(BPF_LD | BPF_IMM, 0xffffffff),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2714  			BPF_STMT(BPF_ALU | BPF_DIV | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2715  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2716  			BPF_STMT(BPF_LD | BPF_IMM, 0xffffffff),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2717  			BPF_STMT(BPF_ALU | BPF_DIV | BPF_K, 0x70000000),
6867b17b26d80cf Denis Kirjanov     2014-12-01  2718  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
6867b17b26d80cf Denis Kirjanov     2014-12-01  2719  			BPF_STMT(BPF_LD | BPF_IMM, 0xffffffff),
6867b17b26d80cf Denis Kirjanov     2014-12-01  2720  			BPF_STMT(BPF_ALU | BPF_MOD | BPF_X, 0),
6867b17b26d80cf Denis Kirjanov     2014-12-01  2721  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
6867b17b26d80cf Denis Kirjanov     2014-12-01  2722  			BPF_STMT(BPF_LD | BPF_IMM, 0xffffffff),
6867b17b26d80cf Denis Kirjanov     2014-12-01  2723  			BPF_STMT(BPF_ALU | BPF_MOD | BPF_K, 0x70000000),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2724  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2725  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2726  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2727  		CLASSIC | FLAG_NO_DATA,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2728  		{ },
6867b17b26d80cf Denis Kirjanov     2014-12-01  2729  		{ { 0, 0x20000000 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2730  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2731  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2732  		"AND_OR_LSH_K",
ece80490e2c1cef Andrew Morton      2014-05-22  2733  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2734  			BPF_STMT(BPF_LD | BPF_IMM, 0xff),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2735  			BPF_STMT(BPF_ALU | BPF_AND | BPF_K, 0xf0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2736  			BPF_STMT(BPF_ALU | BPF_LSH | BPF_K, 27),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2737  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2738  			BPF_STMT(BPF_LD | BPF_IMM, 0xf),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2739  			BPF_STMT(BPF_ALU | BPF_OR | BPF_K, 0xf0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2740  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2741  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2742  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2743  		CLASSIC | FLAG_NO_DATA,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2744  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2745  		{ { 0, 0x800000ff }, { 1, 0x800000ff } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2746  	},
e9d9450497f77ee Chema Gonzalez     2014-05-30  2747  	{
e9d9450497f77ee Chema Gonzalez     2014-05-30  2748  		"LD_IMM_0",
e9d9450497f77ee Chema Gonzalez     2014-05-30  2749  		.u.insns = {
e9d9450497f77ee Chema Gonzalez     2014-05-30  2750  			BPF_STMT(BPF_LD | BPF_IMM, 0), /* ld #0 */
e9d9450497f77ee Chema Gonzalez     2014-05-30  2751  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0, 1, 0),
e9d9450497f77ee Chema Gonzalez     2014-05-30  2752  			BPF_STMT(BPF_RET | BPF_K, 0),
e9d9450497f77ee Chema Gonzalez     2014-05-30  2753  			BPF_STMT(BPF_RET | BPF_K, 1),
e9d9450497f77ee Chema Gonzalez     2014-05-30  2754  		},
e9d9450497f77ee Chema Gonzalez     2014-05-30  2755  		CLASSIC,
e9d9450497f77ee Chema Gonzalez     2014-05-30  2756  		{ },
e9d9450497f77ee Chema Gonzalez     2014-05-30  2757  		{ { 1, 1 } },
e9d9450497f77ee Chema Gonzalez     2014-05-30  2758  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2759  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2760  		"LD_IND",
ece80490e2c1cef Andrew Morton      2014-05-22  2761  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2762  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2763  			BPF_STMT(BPF_LD | BPF_H | BPF_IND, MAX_K),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2764  			BPF_STMT(BPF_RET | BPF_K, 1)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2765  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2766  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2767  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2768  		{ { 1, 0 }, { 10, 0 }, { 60, 0 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2769  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2770  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2771  		"LD_ABS",
ece80490e2c1cef Andrew Morton      2014-05-22  2772  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2773  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS, 1000),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2774  			BPF_STMT(BPF_RET | BPF_K, 1)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2775  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2776  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2777  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2778  		{ { 1, 0 }, { 10, 0 }, { 60, 0 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2779  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2780  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2781  		"LD_ABS_LL",
ece80490e2c1cef Andrew Morton      2014-05-22  2782  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2783  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_LL_OFF),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2784  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2785  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_LL_OFF + 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2786  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2787  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2788  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2789  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2790  		{ 1, 2, 3 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2791  		{ { 1, 0 }, { 2, 3 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2792  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2793  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2794  		"LD_IND_LL",
ece80490e2c1cef Andrew Morton      2014-05-22  2795  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2796  			BPF_STMT(BPF_LD | BPF_IMM, SKF_LL_OFF - 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2797  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2798  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2799  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2800  			BPF_STMT(BPF_LD | BPF_B | BPF_IND, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2801  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2802  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2803  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2804  		{ 1, 2, 3, 0xff },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2805  		{ { 1, 1 }, { 3, 3 }, { 4, 0xff } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2806  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2807  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2808  		"LD_ABS_NET",
ece80490e2c1cef Andrew Morton      2014-05-22  2809  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2810  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_NET_OFF),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2811  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2812  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, SKF_NET_OFF + 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2813  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2814  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2815  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2816  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2817  		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2818  		{ { 15, 0 }, { 16, 3 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2819  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2820  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2821  		"LD_IND_NET",
ece80490e2c1cef Andrew Morton      2014-05-22  2822  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2823  			BPF_STMT(BPF_LD | BPF_IMM, SKF_NET_OFF - 15),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2824  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2825  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2826  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2827  			BPF_STMT(BPF_LD | BPF_B | BPF_IND, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2828  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2829  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2830  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2831  		{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2832  		{ { 14, 0 }, { 15, 1 }, { 17, 3 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2833  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2834  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2835  		"LD_PKTTYPE",
ece80490e2c1cef Andrew Morton      2014-05-22  2836  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2837  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2838  				 SKF_AD_OFF + SKF_AD_PKTTYPE),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2839  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SKB_TYPE, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2840  			BPF_STMT(BPF_RET | BPF_K, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2841  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2842  				 SKF_AD_OFF + SKF_AD_PKTTYPE),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2843  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SKB_TYPE, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2844  			BPF_STMT(BPF_RET | BPF_K, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2845  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2846  				 SKF_AD_OFF + SKF_AD_PKTTYPE),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2847  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SKB_TYPE, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2848  			BPF_STMT(BPF_RET | BPF_K, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2849  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2850  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2851  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2852  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2853  		{ { 1, 3 }, { 10, 3 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2854  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2855  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2856  		"LD_MARK",
ece80490e2c1cef Andrew Morton      2014-05-22  2857  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2858  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2859  				 SKF_AD_OFF + SKF_AD_MARK),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2860  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2861  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2862  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2863  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2864  		{ { 1, SKB_MARK}, { 10, SKB_MARK} },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2865  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2866  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2867  		"LD_RXHASH",
ece80490e2c1cef Andrew Morton      2014-05-22  2868  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2869  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2870  				 SKF_AD_OFF + SKF_AD_RXHASH),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2871  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2872  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2873  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2874  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2875  		{ { 1, SKB_HASH}, { 10, SKB_HASH} },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2876  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2877  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2878  		"LD_QUEUE",
ece80490e2c1cef Andrew Morton      2014-05-22  2879  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2880  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2881  				 SKF_AD_OFF + SKF_AD_QUEUE),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2882  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2883  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2884  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2885  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2886  		{ { 1, SKB_QUEUE_MAP }, { 10, SKB_QUEUE_MAP } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2887  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2888  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2889  		"LD_PROTOCOL",
ece80490e2c1cef Andrew Morton      2014-05-22  2890  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2891  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2892  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 20, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2893  			BPF_STMT(BPF_RET | BPF_K, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2894  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2895  				 SKF_AD_OFF + SKF_AD_PROTOCOL),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2896  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2897  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2898  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 30, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2899  			BPF_STMT(BPF_RET | BPF_K, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2900  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2901  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2902  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2903  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2904  		{ 10, 20, 30 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2905  		{ { 10, ETH_P_IP }, { 100, ETH_P_IP } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2906  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2907  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2908  		"LD_VLAN_TAG",
ece80490e2c1cef Andrew Morton      2014-05-22  2909  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2910  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2911  				 SKF_AD_OFF + SKF_AD_VLAN_TAG),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2912  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2913  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2914  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2915  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2916  		{
0c4b2d370514cb4 Michał Mirosław    2018-11-10  2917  			{ 1, SKB_VLAN_TCI },
0c4b2d370514cb4 Michał Mirosław    2018-11-10  2918  			{ 10, SKB_VLAN_TCI }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2919  		},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2920  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2921  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2922  		"LD_VLAN_TAG_PRESENT",
ece80490e2c1cef Andrew Morton      2014-05-22  2923  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2924  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2925  				 SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2926  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2927  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2928  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2929  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2930  		{
0c4b2d370514cb4 Michał Mirosław    2018-11-10  2931  			{ 1, SKB_VLAN_PRESENT },
0c4b2d370514cb4 Michał Mirosław    2018-11-10  2932  			{ 10, SKB_VLAN_PRESENT }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2933  		},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2934  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2935  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2936  		"LD_IFINDEX",
ece80490e2c1cef Andrew Morton      2014-05-22  2937  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2938  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2939  				 SKF_AD_OFF + SKF_AD_IFINDEX),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2940  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2941  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2942  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2943  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2944  		{ { 1, SKB_DEV_IFINDEX }, { 10, SKB_DEV_IFINDEX } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2945  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2946  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2947  		"LD_HATYPE",
ece80490e2c1cef Andrew Morton      2014-05-22  2948  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2949  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2950  				 SKF_AD_OFF + SKF_AD_HATYPE),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2951  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2952  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2953  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2954  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2955  		{ { 1, SKB_DEV_TYPE }, { 10, SKB_DEV_TYPE } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2956  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2957  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2958  		"LD_CPU",
ece80490e2c1cef Andrew Morton      2014-05-22  2959  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2960  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2961  				 SKF_AD_OFF + SKF_AD_CPU),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2962  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2963  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2964  				 SKF_AD_OFF + SKF_AD_CPU),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2965  			BPF_STMT(BPF_ALU | BPF_SUB | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2966  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2967  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2968  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2969  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2970  		{ { 1, 0 }, { 10, 0 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2971  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2972  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2973  		"LD_NLATTR",
ece80490e2c1cef Andrew Morton      2014-05-22  2974  		.u.insns = {
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2975  			BPF_STMT(BPF_LDX | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2976  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2977  			BPF_STMT(BPF_LDX | BPF_IMM, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2978  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2979  				 SKF_AD_OFF + SKF_AD_NLATTR),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2980  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2981  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  2982  		CLASSIC,
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2983  #ifdef __BIG_ENDIAN
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2984  		{ 0xff, 0xff, 0, 4, 0, 2, 0, 4, 0, 3 },
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2985  #else
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2986  		{ 0xff, 0xff, 4, 0, 2, 0, 4, 0, 3, 0 },
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2987  #endif
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2988  		{ { 4, 0 }, { 20, 6 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2989  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2990  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2991  		"LD_NLATTR_NEST",
ece80490e2c1cef Andrew Morton      2014-05-22  2992  		.u.insns = {
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2993  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2994  			BPF_STMT(BPF_LDX | BPF_IMM, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2995  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2996  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  2997  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2998  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  2999  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3000  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3001  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3002  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3003  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3004  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3005  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3006  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3007  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3008  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3009  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3010  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3011  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3012  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3013  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3014  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3015  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3016  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3017  				 SKF_AD_OFF + SKF_AD_NLATTR_NEST),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3018  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3019  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3020  		CLASSIC,
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3021  #ifdef __BIG_ENDIAN
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3022  		{ 0xff, 0xff, 0, 12, 0, 1, 0, 4, 0, 2, 0, 4, 0, 3 },
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3023  #else
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3024  		{ 0xff, 0xff, 12, 0, 1, 0, 4, 0, 2, 0, 4, 0, 3, 0 },
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3025  #endif
df6d0f983a59c33 Alexei Starovoitov 2014-06-06  3026  		{ { 4, 0 }, { 20, 10 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3027  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3028  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3029  		"LD_PAYLOAD_OFF",
ece80490e2c1cef Andrew Morton      2014-05-22  3030  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3031  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3032  				 SKF_AD_OFF + SKF_AD_PAY_OFFSET),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3033  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3034  				 SKF_AD_OFF + SKF_AD_PAY_OFFSET),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3035  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3036  				 SKF_AD_OFF + SKF_AD_PAY_OFFSET),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3037  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3038  				 SKF_AD_OFF + SKF_AD_PAY_OFFSET),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3039  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3040  				 SKF_AD_OFF + SKF_AD_PAY_OFFSET),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3041  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3042  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3043  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3044  		/* 00:00:00:00:00:00 > 00:00:00:00:00:00, ethtype IPv4 (0x0800),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3045  		 * length 98: 127.0.0.1 > 127.0.0.1: ICMP echo request,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3046  		 * id 9737, seq 1, length 64
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3047  		 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3048  		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3049  		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3050  		  0x08, 0x00,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3051  		  0x45, 0x00, 0x00, 0x54, 0xac, 0x8b, 0x40, 0x00, 0x40,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3052  		  0x01, 0x90, 0x1b, 0x7f, 0x00, 0x00, 0x01 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3053  		{ { 30, 0 }, { 100, 42 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3054  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3055  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3056  		"LD_ANC_XOR",
ece80490e2c1cef Andrew Morton      2014-05-22  3057  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3058  			BPF_STMT(BPF_LD | BPF_IMM, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3059  			BPF_STMT(BPF_LDX | BPF_IMM, 300),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3060  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3061  				 SKF_AD_OFF + SKF_AD_ALU_XOR_X),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3062  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3063  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3064  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3065  		{ },
098454362a06029 Nathan Chancellor  2019-08-18  3066  		{ { 4, 0xA ^ 300 }, { 20, 0xA ^ 300 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3067  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3068  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3069  		"SPILL_FILL",
ece80490e2c1cef Andrew Morton      2014-05-22  3070  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3071  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3072  			BPF_STMT(BPF_LD | BPF_IMM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3073  			BPF_STMT(BPF_ALU | BPF_RSH, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3074  			BPF_STMT(BPF_ALU | BPF_XOR | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3075  			BPF_STMT(BPF_ST, 1), /* M1 = 1 ^ len */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3076  			BPF_STMT(BPF_ALU | BPF_XOR | BPF_K, 0x80000000),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3077  			BPF_STMT(BPF_ST, 2), /* M2 = 1 ^ len ^ 0x80000000 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3078  			BPF_STMT(BPF_STX, 15), /* M3 = len */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3079  			BPF_STMT(BPF_LDX | BPF_MEM, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3080  			BPF_STMT(BPF_LD | BPF_MEM, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3081  			BPF_STMT(BPF_ALU | BPF_XOR | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3082  			BPF_STMT(BPF_LDX | BPF_MEM, 15),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3083  			BPF_STMT(BPF_ALU | BPF_XOR | BPF_X, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3084  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3085  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3086  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3087  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3088  		{ { 1, 0x80000001 }, { 2, 0x80000002 }, { 60, 0x80000000 ^ 60 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3089  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3090  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3091  		"JEQ",
ece80490e2c1cef Andrew Morton      2014-05-22  3092  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3093  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3094  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3095  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_X, 0, 0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3096  			BPF_STMT(BPF_RET | BPF_K, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3097  			BPF_STMT(BPF_RET | BPF_K, MAX_K)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3098  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3099  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3100  		{ 3, 3, 3, 3, 3 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3101  		{ { 1, 0 }, { 3, 1 }, { 4, MAX_K } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3102  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3103  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3104  		"JGT",
ece80490e2c1cef Andrew Morton      2014-05-22  3105  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3106  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3107  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3108  			BPF_JUMP(BPF_JMP | BPF_JGT | BPF_X, 0, 0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3109  			BPF_STMT(BPF_RET | BPF_K, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3110  			BPF_STMT(BPF_RET | BPF_K, MAX_K)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3111  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3112  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3113  		{ 4, 4, 4, 3, 3 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3114  		{ { 2, 0 }, { 3, 1 }, { 4, MAX_K } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3115  	},
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3116  	{
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3117  		"JGE (jt 0), test 1",
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3118  		.u.insns = {
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3119  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3120  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3121  			BPF_JUMP(BPF_JMP | BPF_JGE | BPF_X, 0, 0, 1),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3122  			BPF_STMT(BPF_RET | BPF_K, 1),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3123  			BPF_STMT(BPF_RET | BPF_K, MAX_K)
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3124  		},
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3125  		CLASSIC,
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3126  		{ 4, 4, 4, 3, 3 },
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3127  		{ { 2, 0 }, { 3, 1 }, { 4, 1 } },
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3128  	},
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3129  	{
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3130  		"JGE (jt 0), test 2",
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3131  		.u.insns = {
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3132  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3133  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 2),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3134  			BPF_JUMP(BPF_JMP | BPF_JGE | BPF_X, 0, 0, 1),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3135  			BPF_STMT(BPF_RET | BPF_K, 1),
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3136  			BPF_STMT(BPF_RET | BPF_K, MAX_K)
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3137  		},
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3138  		CLASSIC,
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3139  		{ 4, 4, 5, 3, 3 },
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3140  		{ { 4, 1 }, { 5, 1 }, { 6, MAX_K } },
92b31a9af73b3a3 Daniel Borkmann    2017-08-10  3141  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3142  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3143  		"JGE",
ece80490e2c1cef Andrew Morton      2014-05-22  3144  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3145  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3146  			BPF_STMT(BPF_LD | BPF_B | BPF_IND, MAX_K),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3147  			BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 1, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3148  			BPF_STMT(BPF_RET | BPF_K, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3149  			BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 2, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3150  			BPF_STMT(BPF_RET | BPF_K, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3151  			BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 3, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3152  			BPF_STMT(BPF_RET | BPF_K, 30),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3153  			BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 4, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3154  			BPF_STMT(BPF_RET | BPF_K, 40),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3155  			BPF_STMT(BPF_RET | BPF_K, MAX_K)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3156  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3157  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3158  		{ 1, 2, 3, 4, 5 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3159  		{ { 1, 20 }, { 3, 40 }, { 5, MAX_K } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3160  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3161  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3162  		"JSET",
ece80490e2c1cef Andrew Morton      2014-05-22  3163  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3164  			BPF_JUMP(BPF_JMP | BPF_JA, 0, 0, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3165  			BPF_JUMP(BPF_JMP | BPF_JA, 1, 1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3166  			BPF_JUMP(BPF_JMP | BPF_JA, 0, 0, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3167  			BPF_JUMP(BPF_JMP | BPF_JA, 0, 0, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3168  			BPF_STMT(BPF_LDX | BPF_LEN, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3169  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3170  			BPF_STMT(BPF_ALU | BPF_SUB | BPF_K, 4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3171  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3172  			BPF_STMT(BPF_LD | BPF_W | BPF_IND, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3173  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 1, 0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3174  			BPF_STMT(BPF_RET | BPF_K, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3175  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0x80000000, 0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3176  			BPF_STMT(BPF_RET | BPF_K, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3177  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3178  			BPF_STMT(BPF_RET | BPF_K, 30),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3179  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3180  			BPF_STMT(BPF_RET | BPF_K, 30),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3181  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3182  			BPF_STMT(BPF_RET | BPF_K, 30),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3183  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3184  			BPF_STMT(BPF_RET | BPF_K, 30),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3185  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0xffffff, 1, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3186  			BPF_STMT(BPF_RET | BPF_K, 30),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3187  			BPF_STMT(BPF_RET | BPF_K, MAX_K)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3188  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3189  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3190  		{ 0, 0xAA, 0x55, 1 },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3191  		{ { 4, 10 }, { 5, 20 }, { 6, MAX_K } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3192  	},
64a8946b447e418 Alexei Starovoitov 2014-05-08  3193  	{
64a8946b447e418 Alexei Starovoitov 2014-05-08  3194  		"tcpdump port 22",
ece80490e2c1cef Andrew Morton      2014-05-22  3195  		.u.insns = {
ce25b68b74593bb Daniel Borkmann    2014-05-26  3196  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 12),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3197  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x86dd, 0, 8), /* IPv6 */
ce25b68b74593bb Daniel Borkmann    2014-05-26  3198  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 20),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3199  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x84, 2, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3200  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x6, 1, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3201  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x11, 0, 17),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3202  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 54),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3203  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 14, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3204  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 56),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3205  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 12, 13),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3206  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x0800, 0, 12), /* IPv4 */
ce25b68b74593bb Daniel Borkmann    2014-05-26  3207  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 23),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3208  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x84, 2, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3209  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x6, 1, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3210  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x11, 0, 8),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3211  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 20),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3212  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0x1fff, 6, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3213  			BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 14),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3214  			BPF_STMT(BPF_LD | BPF_H | BPF_IND, 14),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3215  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 2, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3216  			BPF_STMT(BPF_LD | BPF_H | BPF_IND, 16),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3217  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 0, 1),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3218  			BPF_STMT(BPF_RET | BPF_K, 0xffff),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3219  			BPF_STMT(BPF_RET | BPF_K, 0),
64a8946b447e418 Alexei Starovoitov 2014-05-08  3220  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3221  		CLASSIC,
64a8946b447e418 Alexei Starovoitov 2014-05-08  3222  		/* 3c:07:54:43:e5:76 > 10:bf:48:d6:43:d6, ethertype IPv4(0x0800)
64a8946b447e418 Alexei Starovoitov 2014-05-08  3223  		 * length 114: 10.1.1.149.49700 > 10.1.2.10.22: Flags [P.],
64a8946b447e418 Alexei Starovoitov 2014-05-08  3224  		 * seq 1305692979:1305693027, ack 3650467037, win 65535,
64a8946b447e418 Alexei Starovoitov 2014-05-08  3225  		 * options [nop,nop,TS val 2502645400 ecr 3971138], length 48
64a8946b447e418 Alexei Starovoitov 2014-05-08  3226  		 */
64a8946b447e418 Alexei Starovoitov 2014-05-08  3227  		{ 0x10, 0xbf, 0x48, 0xd6, 0x43, 0xd6,
64a8946b447e418 Alexei Starovoitov 2014-05-08  3228  		  0x3c, 0x07, 0x54, 0x43, 0xe5, 0x76,
64a8946b447e418 Alexei Starovoitov 2014-05-08  3229  		  0x08, 0x00,
64a8946b447e418 Alexei Starovoitov 2014-05-08  3230  		  0x45, 0x10, 0x00, 0x64, 0x75, 0xb5,
64a8946b447e418 Alexei Starovoitov 2014-05-08  3231  		  0x40, 0x00, 0x40, 0x06, 0xad, 0x2e, /* IP header */
64a8946b447e418 Alexei Starovoitov 2014-05-08  3232  		  0x0a, 0x01, 0x01, 0x95, /* ip src */
64a8946b447e418 Alexei Starovoitov 2014-05-08  3233  		  0x0a, 0x01, 0x02, 0x0a, /* ip dst */
64a8946b447e418 Alexei Starovoitov 2014-05-08  3234  		  0xc2, 0x24,
64a8946b447e418 Alexei Starovoitov 2014-05-08  3235  		  0x00, 0x16 /* dst port */ },
64a8946b447e418 Alexei Starovoitov 2014-05-08  3236  		{ { 10, 0 }, { 30, 0 }, { 100, 65535 } },
64a8946b447e418 Alexei Starovoitov 2014-05-08  3237  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3238  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3239  		"tcpdump complex",
ece80490e2c1cef Andrew Morton      2014-05-22  3240  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3241  			/* tcpdump -nei eth0 'tcp port 22 and (((ip[2:2] -
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3242  			 * ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0) and
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3243  			 * (len > 115 or len < 30000000000)' -d
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3244  			 */
ce25b68b74593bb Daniel Borkmann    2014-05-26  3245  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 12),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3246  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x86dd, 30, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3247  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x800, 0, 29),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3248  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 23),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3249  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x6, 0, 27),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3250  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 20),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3251  			BPF_JUMP(BPF_JMP | BPF_JSET | BPF_K, 0x1fff, 25, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3252  			BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 14),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3253  			BPF_STMT(BPF_LD | BPF_H | BPF_IND, 14),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3254  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 2, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3255  			BPF_STMT(BPF_LD | BPF_H | BPF_IND, 16),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3256  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 22, 0, 20),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3257  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 16),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3258  			BPF_STMT(BPF_ST, 1),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3259  			BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 14),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3260  			BPF_STMT(BPF_ALU | BPF_AND | BPF_K, 0xf),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3261  			BPF_STMT(BPF_ALU | BPF_LSH | BPF_K, 2),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3262  			BPF_STMT(BPF_MISC | BPF_TAX, 0x5), /* libpcap emits K on TAX */
ce25b68b74593bb Daniel Borkmann    2014-05-26  3263  			BPF_STMT(BPF_LD | BPF_MEM, 1),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3264  			BPF_STMT(BPF_ALU | BPF_SUB | BPF_X, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3265  			BPF_STMT(BPF_ST, 5),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3266  			BPF_STMT(BPF_LDX | BPF_B | BPF_MSH, 14),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3267  			BPF_STMT(BPF_LD | BPF_B | BPF_IND, 26),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3268  			BPF_STMT(BPF_ALU | BPF_AND | BPF_K, 0xf0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3269  			BPF_STMT(BPF_ALU | BPF_RSH | BPF_K, 2),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3270  			BPF_STMT(BPF_MISC | BPF_TAX, 0x9), /* libpcap emits K on TAX */
ce25b68b74593bb Daniel Borkmann    2014-05-26  3271  			BPF_STMT(BPF_LD | BPF_MEM, 5),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3272  			BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_X, 0, 4, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3273  			BPF_STMT(BPF_LD | BPF_LEN, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3274  			BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, 0x73, 1, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3275  			BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0xfc23ac00, 1, 0),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3276  			BPF_STMT(BPF_RET | BPF_K, 0xffff),
ce25b68b74593bb Daniel Borkmann    2014-05-26  3277  			BPF_STMT(BPF_RET | BPF_K, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3278  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3279  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3280  		{ 0x10, 0xbf, 0x48, 0xd6, 0x43, 0xd6,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3281  		  0x3c, 0x07, 0x54, 0x43, 0xe5, 0x76,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3282  		  0x08, 0x00,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3283  		  0x45, 0x10, 0x00, 0x64, 0x75, 0xb5,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3284  		  0x40, 0x00, 0x40, 0x06, 0xad, 0x2e, /* IP header */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3285  		  0x0a, 0x01, 0x01, 0x95, /* ip src */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3286  		  0x0a, 0x01, 0x02, 0x0a, /* ip dst */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3287  		  0xc2, 0x24,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3288  		  0x00, 0x16 /* dst port */ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3289  		{ { 10, 0 }, { 30, 0 }, { 100, 65535 } },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3290  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3291  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3292  		"RET_A",
ece80490e2c1cef Andrew Morton      2014-05-22  3293  		.u.insns = {
53b0fe36ab7c6eb Zhen Lei           2021-07-07  3294  			/* check that uninitialized X and A contain zeros */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3295  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3296  			BPF_STMT(BPF_RET | BPF_A, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3297  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3298  		CLASSIC,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3299  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3300  		{ {1, 0}, {2, 0} },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3301  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3302  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3303  		"INT: ADD trivial",
ece80490e2c1cef Andrew Morton      2014-05-22  3304  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3305  			BPF_ALU64_IMM(BPF_MOV, R1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3306  			BPF_ALU64_IMM(BPF_ADD, R1, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3307  			BPF_ALU64_IMM(BPF_MOV, R2, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3308  			BPF_ALU64_REG(BPF_SUB, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3309  			BPF_ALU64_IMM(BPF_ADD, R1, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3310  			BPF_ALU64_IMM(BPF_MUL, R1, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3311  			BPF_ALU64_REG(BPF_MOV, R0, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3312  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3313  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3314  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3315  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3316  		{ { 0, 0xfffffffd } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3317  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3318  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3319  		"INT: MUL_X",
ece80490e2c1cef Andrew Morton      2014-05-22  3320  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3321  			BPF_ALU64_IMM(BPF_MOV, R0, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3322  			BPF_ALU64_IMM(BPF_MOV, R1, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3323  			BPF_ALU64_IMM(BPF_MOV, R2, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3324  			BPF_ALU64_REG(BPF_MUL, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3325  			BPF_JMP_IMM(BPF_JEQ, R1, 0xfffffffd, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3326  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3327  			BPF_ALU64_IMM(BPF_MOV, R0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3328  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3329  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3330  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3331  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3332  		{ { 0, 1 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3333  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3334  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3335  		"INT: MUL_X2",
ece80490e2c1cef Andrew Morton      2014-05-22  3336  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3337  			BPF_ALU32_IMM(BPF_MOV, R0, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3338  			BPF_ALU32_IMM(BPF_MOV, R1, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3339  			BPF_ALU32_IMM(BPF_MOV, R2, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3340  			BPF_ALU64_REG(BPF_MUL, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3341  			BPF_ALU64_IMM(BPF_RSH, R1, 8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3342  			BPF_JMP_IMM(BPF_JEQ, R1, 0x2ffffff, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3343  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3344  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3345  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3346  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3347  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3348  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3349  		{ { 0, 1 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3350  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3351  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3352  		"INT: MUL32_X",
ece80490e2c1cef Andrew Morton      2014-05-22  3353  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3354  			BPF_ALU32_IMM(BPF_MOV, R0, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3355  			BPF_ALU64_IMM(BPF_MOV, R1, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3356  			BPF_ALU32_IMM(BPF_MOV, R2, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3357  			BPF_ALU32_REG(BPF_MUL, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3358  			BPF_ALU64_IMM(BPF_RSH, R1, 8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3359  			BPF_JMP_IMM(BPF_JEQ, R1, 0xffffff, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3360  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3361  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3362  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3363  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3364  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3365  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3366  		{ { 0, 1 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3367  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3368  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3369  		/* Have to test all register combinations, since
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3370  		 * JITing of different registers will produce
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3371  		 * different asm code.
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3372  		 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3373  		"INT: ADD 64-bit",
ece80490e2c1cef Andrew Morton      2014-05-22  3374  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3375  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3376  			BPF_ALU64_IMM(BPF_MOV, R1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3377  			BPF_ALU64_IMM(BPF_MOV, R2, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3378  			BPF_ALU64_IMM(BPF_MOV, R3, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3379  			BPF_ALU64_IMM(BPF_MOV, R4, 4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3380  			BPF_ALU64_IMM(BPF_MOV, R5, 5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3381  			BPF_ALU64_IMM(BPF_MOV, R6, 6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3382  			BPF_ALU64_IMM(BPF_MOV, R7, 7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3383  			BPF_ALU64_IMM(BPF_MOV, R8, 8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3384  			BPF_ALU64_IMM(BPF_MOV, R9, 9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3385  			BPF_ALU64_IMM(BPF_ADD, R0, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3386  			BPF_ALU64_IMM(BPF_ADD, R1, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3387  			BPF_ALU64_IMM(BPF_ADD, R2, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3388  			BPF_ALU64_IMM(BPF_ADD, R3, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3389  			BPF_ALU64_IMM(BPF_ADD, R4, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3390  			BPF_ALU64_IMM(BPF_ADD, R5, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3391  			BPF_ALU64_IMM(BPF_ADD, R6, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3392  			BPF_ALU64_IMM(BPF_ADD, R7, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3393  			BPF_ALU64_IMM(BPF_ADD, R8, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3394  			BPF_ALU64_IMM(BPF_ADD, R9, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3395  			BPF_ALU64_IMM(BPF_SUB, R0, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3396  			BPF_ALU64_IMM(BPF_SUB, R1, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3397  			BPF_ALU64_IMM(BPF_SUB, R2, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3398  			BPF_ALU64_IMM(BPF_SUB, R3, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3399  			BPF_ALU64_IMM(BPF_SUB, R4, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3400  			BPF_ALU64_IMM(BPF_SUB, R5, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3401  			BPF_ALU64_IMM(BPF_SUB, R6, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3402  			BPF_ALU64_IMM(BPF_SUB, R7, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3403  			BPF_ALU64_IMM(BPF_SUB, R8, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3404  			BPF_ALU64_IMM(BPF_SUB, R9, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3405  			BPF_ALU64_REG(BPF_ADD, R0, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3406  			BPF_ALU64_REG(BPF_ADD, R0, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3407  			BPF_ALU64_REG(BPF_ADD, R0, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3408  			BPF_ALU64_REG(BPF_ADD, R0, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3409  			BPF_ALU64_REG(BPF_ADD, R0, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3410  			BPF_ALU64_REG(BPF_ADD, R0, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3411  			BPF_ALU64_REG(BPF_ADD, R0, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3412  			BPF_ALU64_REG(BPF_ADD, R0, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3413  			BPF_ALU64_REG(BPF_ADD, R0, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3414  			BPF_ALU64_REG(BPF_ADD, R0, R9), /* R0 == 155 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3415  			BPF_JMP_IMM(BPF_JEQ, R0, 155, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3416  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3417  			BPF_ALU64_REG(BPF_ADD, R1, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3418  			BPF_ALU64_REG(BPF_ADD, R1, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3419  			BPF_ALU64_REG(BPF_ADD, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3420  			BPF_ALU64_REG(BPF_ADD, R1, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3421  			BPF_ALU64_REG(BPF_ADD, R1, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3422  			BPF_ALU64_REG(BPF_ADD, R1, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3423  			BPF_ALU64_REG(BPF_ADD, R1, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3424  			BPF_ALU64_REG(BPF_ADD, R1, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3425  			BPF_ALU64_REG(BPF_ADD, R1, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3426  			BPF_ALU64_REG(BPF_ADD, R1, R9), /* R1 == 456 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3427  			BPF_JMP_IMM(BPF_JEQ, R1, 456, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3428  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3429  			BPF_ALU64_REG(BPF_ADD, R2, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3430  			BPF_ALU64_REG(BPF_ADD, R2, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3431  			BPF_ALU64_REG(BPF_ADD, R2, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3432  			BPF_ALU64_REG(BPF_ADD, R2, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3433  			BPF_ALU64_REG(BPF_ADD, R2, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3434  			BPF_ALU64_REG(BPF_ADD, R2, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3435  			BPF_ALU64_REG(BPF_ADD, R2, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3436  			BPF_ALU64_REG(BPF_ADD, R2, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3437  			BPF_ALU64_REG(BPF_ADD, R2, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3438  			BPF_ALU64_REG(BPF_ADD, R2, R9), /* R2 == 1358 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3439  			BPF_JMP_IMM(BPF_JEQ, R2, 1358, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3440  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3441  			BPF_ALU64_REG(BPF_ADD, R3, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3442  			BPF_ALU64_REG(BPF_ADD, R3, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3443  			BPF_ALU64_REG(BPF_ADD, R3, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3444  			BPF_ALU64_REG(BPF_ADD, R3, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3445  			BPF_ALU64_REG(BPF_ADD, R3, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3446  			BPF_ALU64_REG(BPF_ADD, R3, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3447  			BPF_ALU64_REG(BPF_ADD, R3, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3448  			BPF_ALU64_REG(BPF_ADD, R3, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3449  			BPF_ALU64_REG(BPF_ADD, R3, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3450  			BPF_ALU64_REG(BPF_ADD, R3, R9), /* R3 == 4063 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3451  			BPF_JMP_IMM(BPF_JEQ, R3, 4063, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3452  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3453  			BPF_ALU64_REG(BPF_ADD, R4, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3454  			BPF_ALU64_REG(BPF_ADD, R4, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3455  			BPF_ALU64_REG(BPF_ADD, R4, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3456  			BPF_ALU64_REG(BPF_ADD, R4, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3457  			BPF_ALU64_REG(BPF_ADD, R4, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3458  			BPF_ALU64_REG(BPF_ADD, R4, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3459  			BPF_ALU64_REG(BPF_ADD, R4, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3460  			BPF_ALU64_REG(BPF_ADD, R4, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3461  			BPF_ALU64_REG(BPF_ADD, R4, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3462  			BPF_ALU64_REG(BPF_ADD, R4, R9), /* R4 == 12177 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3463  			BPF_JMP_IMM(BPF_JEQ, R4, 12177, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3464  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3465  			BPF_ALU64_REG(BPF_ADD, R5, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3466  			BPF_ALU64_REG(BPF_ADD, R5, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3467  			BPF_ALU64_REG(BPF_ADD, R5, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3468  			BPF_ALU64_REG(BPF_ADD, R5, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3469  			BPF_ALU64_REG(BPF_ADD, R5, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3470  			BPF_ALU64_REG(BPF_ADD, R5, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3471  			BPF_ALU64_REG(BPF_ADD, R5, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3472  			BPF_ALU64_REG(BPF_ADD, R5, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3473  			BPF_ALU64_REG(BPF_ADD, R5, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3474  			BPF_ALU64_REG(BPF_ADD, R5, R9), /* R5 == 36518 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3475  			BPF_JMP_IMM(BPF_JEQ, R5, 36518, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3476  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3477  			BPF_ALU64_REG(BPF_ADD, R6, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3478  			BPF_ALU64_REG(BPF_ADD, R6, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3479  			BPF_ALU64_REG(BPF_ADD, R6, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3480  			BPF_ALU64_REG(BPF_ADD, R6, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3481  			BPF_ALU64_REG(BPF_ADD, R6, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3482  			BPF_ALU64_REG(BPF_ADD, R6, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3483  			BPF_ALU64_REG(BPF_ADD, R6, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3484  			BPF_ALU64_REG(BPF_ADD, R6, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3485  			BPF_ALU64_REG(BPF_ADD, R6, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3486  			BPF_ALU64_REG(BPF_ADD, R6, R9), /* R6 == 109540 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3487  			BPF_JMP_IMM(BPF_JEQ, R6, 109540, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3488  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3489  			BPF_ALU64_REG(BPF_ADD, R7, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3490  			BPF_ALU64_REG(BPF_ADD, R7, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3491  			BPF_ALU64_REG(BPF_ADD, R7, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3492  			BPF_ALU64_REG(BPF_ADD, R7, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3493  			BPF_ALU64_REG(BPF_ADD, R7, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3494  			BPF_ALU64_REG(BPF_ADD, R7, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3495  			BPF_ALU64_REG(BPF_ADD, R7, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3496  			BPF_ALU64_REG(BPF_ADD, R7, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3497  			BPF_ALU64_REG(BPF_ADD, R7, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3498  			BPF_ALU64_REG(BPF_ADD, R7, R9), /* R7 == 328605 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3499  			BPF_JMP_IMM(BPF_JEQ, R7, 328605, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3500  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3501  			BPF_ALU64_REG(BPF_ADD, R8, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3502  			BPF_ALU64_REG(BPF_ADD, R8, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3503  			BPF_ALU64_REG(BPF_ADD, R8, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3504  			BPF_ALU64_REG(BPF_ADD, R8, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3505  			BPF_ALU64_REG(BPF_ADD, R8, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3506  			BPF_ALU64_REG(BPF_ADD, R8, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3507  			BPF_ALU64_REG(BPF_ADD, R8, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3508  			BPF_ALU64_REG(BPF_ADD, R8, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3509  			BPF_ALU64_REG(BPF_ADD, R8, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3510  			BPF_ALU64_REG(BPF_ADD, R8, R9), /* R8 == 985799 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3511  			BPF_JMP_IMM(BPF_JEQ, R8, 985799, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3512  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3513  			BPF_ALU64_REG(BPF_ADD, R9, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3514  			BPF_ALU64_REG(BPF_ADD, R9, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3515  			BPF_ALU64_REG(BPF_ADD, R9, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3516  			BPF_ALU64_REG(BPF_ADD, R9, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3517  			BPF_ALU64_REG(BPF_ADD, R9, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3518  			BPF_ALU64_REG(BPF_ADD, R9, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3519  			BPF_ALU64_REG(BPF_ADD, R9, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3520  			BPF_ALU64_REG(BPF_ADD, R9, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3521  			BPF_ALU64_REG(BPF_ADD, R9, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3522  			BPF_ALU64_REG(BPF_ADD, R9, R9), /* R9 == 2957380 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3523  			BPF_ALU64_REG(BPF_MOV, R0, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3524  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3525  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3526  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3527  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3528  		{ { 0, 2957380 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3529  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3530  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3531  		"INT: ADD 32-bit",
ece80490e2c1cef Andrew Morton      2014-05-22  3532  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3533  			BPF_ALU32_IMM(BPF_MOV, R0, 20),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3534  			BPF_ALU32_IMM(BPF_MOV, R1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3535  			BPF_ALU32_IMM(BPF_MOV, R2, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3536  			BPF_ALU32_IMM(BPF_MOV, R3, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3537  			BPF_ALU32_IMM(BPF_MOV, R4, 4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3538  			BPF_ALU32_IMM(BPF_MOV, R5, 5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3539  			BPF_ALU32_IMM(BPF_MOV, R6, 6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3540  			BPF_ALU32_IMM(BPF_MOV, R7, 7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3541  			BPF_ALU32_IMM(BPF_MOV, R8, 8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3542  			BPF_ALU32_IMM(BPF_MOV, R9, 9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3543  			BPF_ALU64_IMM(BPF_ADD, R1, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3544  			BPF_ALU64_IMM(BPF_ADD, R2, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3545  			BPF_ALU64_IMM(BPF_ADD, R3, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3546  			BPF_ALU64_IMM(BPF_ADD, R4, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3547  			BPF_ALU64_IMM(BPF_ADD, R5, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3548  			BPF_ALU64_IMM(BPF_ADD, R6, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3549  			BPF_ALU64_IMM(BPF_ADD, R7, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3550  			BPF_ALU64_IMM(BPF_ADD, R8, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3551  			BPF_ALU64_IMM(BPF_ADD, R9, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3552  			BPF_ALU32_REG(BPF_ADD, R0, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3553  			BPF_ALU32_REG(BPF_ADD, R0, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3554  			BPF_ALU32_REG(BPF_ADD, R0, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3555  			BPF_ALU32_REG(BPF_ADD, R0, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3556  			BPF_ALU32_REG(BPF_ADD, R0, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3557  			BPF_ALU32_REG(BPF_ADD, R0, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3558  			BPF_ALU32_REG(BPF_ADD, R0, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3559  			BPF_ALU32_REG(BPF_ADD, R0, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3560  			BPF_ALU32_REG(BPF_ADD, R0, R9), /* R0 == 155 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3561  			BPF_JMP_IMM(BPF_JEQ, R0, 155, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3562  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3563  			BPF_ALU32_REG(BPF_ADD, R1, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3564  			BPF_ALU32_REG(BPF_ADD, R1, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3565  			BPF_ALU32_REG(BPF_ADD, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3566  			BPF_ALU32_REG(BPF_ADD, R1, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3567  			BPF_ALU32_REG(BPF_ADD, R1, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3568  			BPF_ALU32_REG(BPF_ADD, R1, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3569  			BPF_ALU32_REG(BPF_ADD, R1, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3570  			BPF_ALU32_REG(BPF_ADD, R1, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3571  			BPF_ALU32_REG(BPF_ADD, R1, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3572  			BPF_ALU32_REG(BPF_ADD, R1, R9), /* R1 == 456 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3573  			BPF_JMP_IMM(BPF_JEQ, R1, 456, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3574  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3575  			BPF_ALU32_REG(BPF_ADD, R2, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3576  			BPF_ALU32_REG(BPF_ADD, R2, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3577  			BPF_ALU32_REG(BPF_ADD, R2, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3578  			BPF_ALU32_REG(BPF_ADD, R2, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3579  			BPF_ALU32_REG(BPF_ADD, R2, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3580  			BPF_ALU32_REG(BPF_ADD, R2, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3581  			BPF_ALU32_REG(BPF_ADD, R2, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3582  			BPF_ALU32_REG(BPF_ADD, R2, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3583  			BPF_ALU32_REG(BPF_ADD, R2, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3584  			BPF_ALU32_REG(BPF_ADD, R2, R9), /* R2 == 1358 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3585  			BPF_JMP_IMM(BPF_JEQ, R2, 1358, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3586  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3587  			BPF_ALU32_REG(BPF_ADD, R3, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3588  			BPF_ALU32_REG(BPF_ADD, R3, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3589  			BPF_ALU32_REG(BPF_ADD, R3, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3590  			BPF_ALU32_REG(BPF_ADD, R3, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3591  			BPF_ALU32_REG(BPF_ADD, R3, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3592  			BPF_ALU32_REG(BPF_ADD, R3, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3593  			BPF_ALU32_REG(BPF_ADD, R3, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3594  			BPF_ALU32_REG(BPF_ADD, R3, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3595  			BPF_ALU32_REG(BPF_ADD, R3, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3596  			BPF_ALU32_REG(BPF_ADD, R3, R9), /* R3 == 4063 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3597  			BPF_JMP_IMM(BPF_JEQ, R3, 4063, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3598  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3599  			BPF_ALU32_REG(BPF_ADD, R4, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3600  			BPF_ALU32_REG(BPF_ADD, R4, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3601  			BPF_ALU32_REG(BPF_ADD, R4, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3602  			BPF_ALU32_REG(BPF_ADD, R4, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3603  			BPF_ALU32_REG(BPF_ADD, R4, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3604  			BPF_ALU32_REG(BPF_ADD, R4, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3605  			BPF_ALU32_REG(BPF_ADD, R4, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3606  			BPF_ALU32_REG(BPF_ADD, R4, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3607  			BPF_ALU32_REG(BPF_ADD, R4, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3608  			BPF_ALU32_REG(BPF_ADD, R4, R9), /* R4 == 12177 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3609  			BPF_JMP_IMM(BPF_JEQ, R4, 12177, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3610  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3611  			BPF_ALU32_REG(BPF_ADD, R5, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3612  			BPF_ALU32_REG(BPF_ADD, R5, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3613  			BPF_ALU32_REG(BPF_ADD, R5, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3614  			BPF_ALU32_REG(BPF_ADD, R5, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3615  			BPF_ALU32_REG(BPF_ADD, R5, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3616  			BPF_ALU32_REG(BPF_ADD, R5, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3617  			BPF_ALU32_REG(BPF_ADD, R5, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3618  			BPF_ALU32_REG(BPF_ADD, R5, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3619  			BPF_ALU32_REG(BPF_ADD, R5, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3620  			BPF_ALU32_REG(BPF_ADD, R5, R9), /* R5 == 36518 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3621  			BPF_JMP_IMM(BPF_JEQ, R5, 36518, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3622  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3623  			BPF_ALU32_REG(BPF_ADD, R6, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3624  			BPF_ALU32_REG(BPF_ADD, R6, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3625  			BPF_ALU32_REG(BPF_ADD, R6, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3626  			BPF_ALU32_REG(BPF_ADD, R6, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3627  			BPF_ALU32_REG(BPF_ADD, R6, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3628  			BPF_ALU32_REG(BPF_ADD, R6, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3629  			BPF_ALU32_REG(BPF_ADD, R6, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3630  			BPF_ALU32_REG(BPF_ADD, R6, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3631  			BPF_ALU32_REG(BPF_ADD, R6, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3632  			BPF_ALU32_REG(BPF_ADD, R6, R9), /* R6 == 109540 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3633  			BPF_JMP_IMM(BPF_JEQ, R6, 109540, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3634  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3635  			BPF_ALU32_REG(BPF_ADD, R7, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3636  			BPF_ALU32_REG(BPF_ADD, R7, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3637  			BPF_ALU32_REG(BPF_ADD, R7, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3638  			BPF_ALU32_REG(BPF_ADD, R7, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3639  			BPF_ALU32_REG(BPF_ADD, R7, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3640  			BPF_ALU32_REG(BPF_ADD, R7, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3641  			BPF_ALU32_REG(BPF_ADD, R7, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3642  			BPF_ALU32_REG(BPF_ADD, R7, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3643  			BPF_ALU32_REG(BPF_ADD, R7, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3644  			BPF_ALU32_REG(BPF_ADD, R7, R9), /* R7 == 328605 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3645  			BPF_JMP_IMM(BPF_JEQ, R7, 328605, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3646  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3647  			BPF_ALU32_REG(BPF_ADD, R8, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3648  			BPF_ALU32_REG(BPF_ADD, R8, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3649  			BPF_ALU32_REG(BPF_ADD, R8, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3650  			BPF_ALU32_REG(BPF_ADD, R8, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3651  			BPF_ALU32_REG(BPF_ADD, R8, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3652  			BPF_ALU32_REG(BPF_ADD, R8, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3653  			BPF_ALU32_REG(BPF_ADD, R8, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3654  			BPF_ALU32_REG(BPF_ADD, R8, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3655  			BPF_ALU32_REG(BPF_ADD, R8, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3656  			BPF_ALU32_REG(BPF_ADD, R8, R9), /* R8 == 985799 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3657  			BPF_JMP_IMM(BPF_JEQ, R8, 985799, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3658  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3659  			BPF_ALU32_REG(BPF_ADD, R9, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3660  			BPF_ALU32_REG(BPF_ADD, R9, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3661  			BPF_ALU32_REG(BPF_ADD, R9, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3662  			BPF_ALU32_REG(BPF_ADD, R9, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3663  			BPF_ALU32_REG(BPF_ADD, R9, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3664  			BPF_ALU32_REG(BPF_ADD, R9, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3665  			BPF_ALU32_REG(BPF_ADD, R9, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3666  			BPF_ALU32_REG(BPF_ADD, R9, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3667  			BPF_ALU32_REG(BPF_ADD, R9, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3668  			BPF_ALU32_REG(BPF_ADD, R9, R9), /* R9 == 2957380 */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3669  			BPF_ALU32_REG(BPF_MOV, R0, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3670  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3671  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3672  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3673  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3674  		{ { 0, 2957380 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3675  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3676  	{	/* Mainly checking JIT here. */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3677  		"INT: SUB",
ece80490e2c1cef Andrew Morton      2014-05-22  3678  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3679  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3680  			BPF_ALU64_IMM(BPF_MOV, R1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3681  			BPF_ALU64_IMM(BPF_MOV, R2, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3682  			BPF_ALU64_IMM(BPF_MOV, R3, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3683  			BPF_ALU64_IMM(BPF_MOV, R4, 4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3684  			BPF_ALU64_IMM(BPF_MOV, R5, 5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3685  			BPF_ALU64_IMM(BPF_MOV, R6, 6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3686  			BPF_ALU64_IMM(BPF_MOV, R7, 7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3687  			BPF_ALU64_IMM(BPF_MOV, R8, 8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3688  			BPF_ALU64_IMM(BPF_MOV, R9, 9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3689  			BPF_ALU64_REG(BPF_SUB, R0, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3690  			BPF_ALU64_REG(BPF_SUB, R0, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3691  			BPF_ALU64_REG(BPF_SUB, R0, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3692  			BPF_ALU64_REG(BPF_SUB, R0, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3693  			BPF_ALU64_REG(BPF_SUB, R0, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3694  			BPF_ALU64_REG(BPF_SUB, R0, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3695  			BPF_ALU64_REG(BPF_SUB, R0, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3696  			BPF_ALU64_REG(BPF_SUB, R0, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3697  			BPF_ALU64_REG(BPF_SUB, R0, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3698  			BPF_ALU64_REG(BPF_SUB, R0, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3699  			BPF_ALU64_IMM(BPF_SUB, R0, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3700  			BPF_JMP_IMM(BPF_JEQ, R0, -55, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3701  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3702  			BPF_ALU64_REG(BPF_SUB, R1, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3703  			BPF_ALU64_REG(BPF_SUB, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3704  			BPF_ALU64_REG(BPF_SUB, R1, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3705  			BPF_ALU64_REG(BPF_SUB, R1, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3706  			BPF_ALU64_REG(BPF_SUB, R1, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3707  			BPF_ALU64_REG(BPF_SUB, R1, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3708  			BPF_ALU64_REG(BPF_SUB, R1, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3709  			BPF_ALU64_REG(BPF_SUB, R1, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3710  			BPF_ALU64_REG(BPF_SUB, R1, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3711  			BPF_ALU64_IMM(BPF_SUB, R1, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3712  			BPF_ALU64_REG(BPF_SUB, R2, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3713  			BPF_ALU64_REG(BPF_SUB, R2, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3714  			BPF_ALU64_REG(BPF_SUB, R2, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3715  			BPF_ALU64_REG(BPF_SUB, R2, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3716  			BPF_ALU64_REG(BPF_SUB, R2, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3717  			BPF_ALU64_REG(BPF_SUB, R2, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3718  			BPF_ALU64_REG(BPF_SUB, R2, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3719  			BPF_ALU64_REG(BPF_SUB, R2, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3720  			BPF_ALU64_REG(BPF_SUB, R2, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3721  			BPF_ALU64_IMM(BPF_SUB, R2, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3722  			BPF_ALU64_REG(BPF_SUB, R3, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3723  			BPF_ALU64_REG(BPF_SUB, R3, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3724  			BPF_ALU64_REG(BPF_SUB, R3, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3725  			BPF_ALU64_REG(BPF_SUB, R3, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3726  			BPF_ALU64_REG(BPF_SUB, R3, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3727  			BPF_ALU64_REG(BPF_SUB, R3, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3728  			BPF_ALU64_REG(BPF_SUB, R3, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3729  			BPF_ALU64_REG(BPF_SUB, R3, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3730  			BPF_ALU64_REG(BPF_SUB, R3, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3731  			BPF_ALU64_IMM(BPF_SUB, R3, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3732  			BPF_ALU64_REG(BPF_SUB, R4, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3733  			BPF_ALU64_REG(BPF_SUB, R4, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3734  			BPF_ALU64_REG(BPF_SUB, R4, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3735  			BPF_ALU64_REG(BPF_SUB, R4, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3736  			BPF_ALU64_REG(BPF_SUB, R4, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3737  			BPF_ALU64_REG(BPF_SUB, R4, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3738  			BPF_ALU64_REG(BPF_SUB, R4, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3739  			BPF_ALU64_REG(BPF_SUB, R4, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3740  			BPF_ALU64_REG(BPF_SUB, R4, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3741  			BPF_ALU64_IMM(BPF_SUB, R4, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3742  			BPF_ALU64_REG(BPF_SUB, R5, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3743  			BPF_ALU64_REG(BPF_SUB, R5, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3744  			BPF_ALU64_REG(BPF_SUB, R5, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3745  			BPF_ALU64_REG(BPF_SUB, R5, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3746  			BPF_ALU64_REG(BPF_SUB, R5, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3747  			BPF_ALU64_REG(BPF_SUB, R5, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3748  			BPF_ALU64_REG(BPF_SUB, R5, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3749  			BPF_ALU64_REG(BPF_SUB, R5, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3750  			BPF_ALU64_REG(BPF_SUB, R5, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3751  			BPF_ALU64_IMM(BPF_SUB, R5, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3752  			BPF_ALU64_REG(BPF_SUB, R6, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3753  			BPF_ALU64_REG(BPF_SUB, R6, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3754  			BPF_ALU64_REG(BPF_SUB, R6, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3755  			BPF_ALU64_REG(BPF_SUB, R6, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3756  			BPF_ALU64_REG(BPF_SUB, R6, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3757  			BPF_ALU64_REG(BPF_SUB, R6, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3758  			BPF_ALU64_REG(BPF_SUB, R6, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3759  			BPF_ALU64_REG(BPF_SUB, R6, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3760  			BPF_ALU64_REG(BPF_SUB, R6, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3761  			BPF_ALU64_IMM(BPF_SUB, R6, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3762  			BPF_ALU64_REG(BPF_SUB, R7, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3763  			BPF_ALU64_REG(BPF_SUB, R7, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3764  			BPF_ALU64_REG(BPF_SUB, R7, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3765  			BPF_ALU64_REG(BPF_SUB, R7, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3766  			BPF_ALU64_REG(BPF_SUB, R7, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3767  			BPF_ALU64_REG(BPF_SUB, R7, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3768  			BPF_ALU64_REG(BPF_SUB, R7, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3769  			BPF_ALU64_REG(BPF_SUB, R7, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3770  			BPF_ALU64_REG(BPF_SUB, R7, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3771  			BPF_ALU64_IMM(BPF_SUB, R7, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3772  			BPF_ALU64_REG(BPF_SUB, R8, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3773  			BPF_ALU64_REG(BPF_SUB, R8, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3774  			BPF_ALU64_REG(BPF_SUB, R8, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3775  			BPF_ALU64_REG(BPF_SUB, R8, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3776  			BPF_ALU64_REG(BPF_SUB, R8, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3777  			BPF_ALU64_REG(BPF_SUB, R8, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3778  			BPF_ALU64_REG(BPF_SUB, R8, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3779  			BPF_ALU64_REG(BPF_SUB, R8, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3780  			BPF_ALU64_REG(BPF_SUB, R8, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3781  			BPF_ALU64_IMM(BPF_SUB, R8, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3782  			BPF_ALU64_REG(BPF_SUB, R9, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3783  			BPF_ALU64_REG(BPF_SUB, R9, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3784  			BPF_ALU64_REG(BPF_SUB, R9, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3785  			BPF_ALU64_REG(BPF_SUB, R9, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3786  			BPF_ALU64_REG(BPF_SUB, R9, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3787  			BPF_ALU64_REG(BPF_SUB, R9, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3788  			BPF_ALU64_REG(BPF_SUB, R9, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3789  			BPF_ALU64_REG(BPF_SUB, R9, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3790  			BPF_ALU64_REG(BPF_SUB, R9, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3791  			BPF_ALU64_IMM(BPF_SUB, R9, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3792  			BPF_ALU64_IMM(BPF_SUB, R0, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3793  			BPF_ALU64_IMM(BPF_NEG, R0, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3794  			BPF_ALU64_REG(BPF_SUB, R0, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3795  			BPF_ALU64_REG(BPF_SUB, R0, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3796  			BPF_ALU64_REG(BPF_SUB, R0, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3797  			BPF_ALU64_REG(BPF_SUB, R0, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3798  			BPF_ALU64_REG(BPF_SUB, R0, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3799  			BPF_ALU64_REG(BPF_SUB, R0, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3800  			BPF_ALU64_REG(BPF_SUB, R0, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3801  			BPF_ALU64_REG(BPF_SUB, R0, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3802  			BPF_ALU64_REG(BPF_SUB, R0, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3803  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3804  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3805  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3806  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3807  		{ { 0, 11 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3808  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3809  	{	/* Mainly checking JIT here. */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3810  		"INT: XOR",
ece80490e2c1cef Andrew Morton      2014-05-22  3811  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3812  			BPF_ALU64_REG(BPF_SUB, R0, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3813  			BPF_ALU64_REG(BPF_XOR, R1, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3814  			BPF_JMP_REG(BPF_JEQ, R0, R1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3815  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3816  			BPF_ALU64_IMM(BPF_MOV, R0, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3817  			BPF_ALU64_IMM(BPF_MOV, R1, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3818  			BPF_ALU64_REG(BPF_SUB, R1, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3819  			BPF_ALU64_REG(BPF_XOR, R2, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3820  			BPF_JMP_REG(BPF_JEQ, R1, R2, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3821  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3822  			BPF_ALU64_REG(BPF_SUB, R2, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3823  			BPF_ALU64_REG(BPF_XOR, R3, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3824  			BPF_ALU64_IMM(BPF_MOV, R0, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3825  			BPF_ALU64_IMM(BPF_MOV, R1, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3826  			BPF_JMP_REG(BPF_JEQ, R2, R3, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3827  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3828  			BPF_ALU64_REG(BPF_SUB, R3, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3829  			BPF_ALU64_REG(BPF_XOR, R4, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3830  			BPF_ALU64_IMM(BPF_MOV, R2, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3831  			BPF_ALU64_IMM(BPF_MOV, R5, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3832  			BPF_JMP_REG(BPF_JEQ, R3, R4, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3833  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3834  			BPF_ALU64_REG(BPF_SUB, R4, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3835  			BPF_ALU64_REG(BPF_XOR, R5, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3836  			BPF_ALU64_IMM(BPF_MOV, R3, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3837  			BPF_ALU64_IMM(BPF_MOV, R7, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3838  			BPF_JMP_REG(BPF_JEQ, R5, R4, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3839  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3840  			BPF_ALU64_IMM(BPF_MOV, R5, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3841  			BPF_ALU64_REG(BPF_SUB, R5, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3842  			BPF_ALU64_REG(BPF_XOR, R6, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3843  			BPF_ALU64_IMM(BPF_MOV, R1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3844  			BPF_ALU64_IMM(BPF_MOV, R8, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3845  			BPF_JMP_REG(BPF_JEQ, R5, R6, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3846  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3847  			BPF_ALU64_REG(BPF_SUB, R6, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3848  			BPF_ALU64_REG(BPF_XOR, R7, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3849  			BPF_JMP_REG(BPF_JEQ, R7, R6, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3850  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3851  			BPF_ALU64_REG(BPF_SUB, R7, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3852  			BPF_ALU64_REG(BPF_XOR, R8, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3853  			BPF_JMP_REG(BPF_JEQ, R7, R8, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3854  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3855  			BPF_ALU64_REG(BPF_SUB, R8, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3856  			BPF_ALU64_REG(BPF_XOR, R9, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3857  			BPF_JMP_REG(BPF_JEQ, R9, R8, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3858  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3859  			BPF_ALU64_REG(BPF_SUB, R9, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3860  			BPF_ALU64_REG(BPF_XOR, R0, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3861  			BPF_JMP_REG(BPF_JEQ, R9, R0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3862  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3863  			BPF_ALU64_REG(BPF_SUB, R1, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3864  			BPF_ALU64_REG(BPF_XOR, R0, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3865  			BPF_JMP_REG(BPF_JEQ, R9, R0, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3866  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3867  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3868  			BPF_ALU64_IMM(BPF_MOV, R0, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3869  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3870  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3871  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3872  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3873  		{ { 0, 1 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3874  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3875  	{	/* Mainly checking JIT here. */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3876  		"INT: MUL",
ece80490e2c1cef Andrew Morton      2014-05-22  3877  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3878  			BPF_ALU64_IMM(BPF_MOV, R0, 11),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3879  			BPF_ALU64_IMM(BPF_MOV, R1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3880  			BPF_ALU64_IMM(BPF_MOV, R2, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3881  			BPF_ALU64_IMM(BPF_MOV, R3, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3882  			BPF_ALU64_IMM(BPF_MOV, R4, 4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3883  			BPF_ALU64_IMM(BPF_MOV, R5, 5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3884  			BPF_ALU64_IMM(BPF_MOV, R6, 6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3885  			BPF_ALU64_IMM(BPF_MOV, R7, 7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3886  			BPF_ALU64_IMM(BPF_MOV, R8, 8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3887  			BPF_ALU64_IMM(BPF_MOV, R9, 9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3888  			BPF_ALU64_REG(BPF_MUL, R0, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3889  			BPF_ALU64_REG(BPF_MUL, R0, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3890  			BPF_ALU64_REG(BPF_MUL, R0, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3891  			BPF_ALU64_REG(BPF_MUL, R0, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3892  			BPF_ALU64_REG(BPF_MUL, R0, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3893  			BPF_ALU64_REG(BPF_MUL, R0, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3894  			BPF_ALU64_REG(BPF_MUL, R0, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3895  			BPF_ALU64_REG(BPF_MUL, R0, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3896  			BPF_ALU64_REG(BPF_MUL, R0, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3897  			BPF_ALU64_REG(BPF_MUL, R0, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3898  			BPF_ALU64_IMM(BPF_MUL, R0, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3899  			BPF_JMP_IMM(BPF_JEQ, R0, 439084800, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3900  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3901  			BPF_ALU64_REG(BPF_MUL, R1, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3902  			BPF_ALU64_REG(BPF_MUL, R1, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3903  			BPF_ALU64_REG(BPF_MUL, R1, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3904  			BPF_ALU64_REG(BPF_MUL, R1, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3905  			BPF_ALU64_REG(BPF_MUL, R1, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3906  			BPF_ALU64_REG(BPF_MUL, R1, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3907  			BPF_ALU64_REG(BPF_MUL, R1, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3908  			BPF_ALU64_REG(BPF_MUL, R1, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3909  			BPF_ALU64_REG(BPF_MUL, R1, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3910  			BPF_ALU64_IMM(BPF_MUL, R1, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3911  			BPF_ALU64_REG(BPF_MOV, R2, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3912  			BPF_ALU64_IMM(BPF_RSH, R2, 32),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3913  			BPF_JMP_IMM(BPF_JEQ, R2, 0x5a924, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3914  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3915  			BPF_ALU64_IMM(BPF_LSH, R1, 32),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3916  			BPF_ALU64_IMM(BPF_ARSH, R1, 32),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3917  			BPF_JMP_IMM(BPF_JEQ, R1, 0xebb90000, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3918  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3919  			BPF_ALU64_REG(BPF_MUL, R2, R0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3920  			BPF_ALU64_REG(BPF_MUL, R2, R1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3921  			BPF_ALU64_REG(BPF_MUL, R2, R3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3922  			BPF_ALU64_REG(BPF_MUL, R2, R4),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3923  			BPF_ALU64_REG(BPF_MUL, R2, R5),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3924  			BPF_ALU64_REG(BPF_MUL, R2, R6),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3925  			BPF_ALU64_REG(BPF_MUL, R2, R7),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3926  			BPF_ALU64_REG(BPF_MUL, R2, R8),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3927  			BPF_ALU64_REG(BPF_MUL, R2, R9),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3928  			BPF_ALU64_IMM(BPF_MUL, R2, 10),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3929  			BPF_ALU64_IMM(BPF_RSH, R2, 32),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3930  			BPF_ALU64_REG(BPF_MOV, R0, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3931  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3932  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  3933  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3934  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3935  		{ { 0, 0x35d97ef2 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  3936  	},
9dd2af834dea132 Daniel Borkmann    2015-12-17  3937  	{	/* Mainly checking JIT here. */
9dd2af834dea132 Daniel Borkmann    2015-12-17  3938  		"MOV REG64",
9dd2af834dea132 Daniel Borkmann    2015-12-17  3939  		.u.insns_int = {
9dd2af834dea132 Daniel Borkmann    2015-12-17  3940  			BPF_LD_IMM64(R0, 0xffffffffffffffffLL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3941  			BPF_MOV64_REG(R1, R0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3942  			BPF_MOV64_REG(R2, R1),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3943  			BPF_MOV64_REG(R3, R2),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3944  			BPF_MOV64_REG(R4, R3),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3945  			BPF_MOV64_REG(R5, R4),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3946  			BPF_MOV64_REG(R6, R5),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3947  			BPF_MOV64_REG(R7, R6),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3948  			BPF_MOV64_REG(R8, R7),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3949  			BPF_MOV64_REG(R9, R8),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3950  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3951  			BPF_ALU64_IMM(BPF_MOV, R1, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3952  			BPF_ALU64_IMM(BPF_MOV, R2, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3953  			BPF_ALU64_IMM(BPF_MOV, R3, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3954  			BPF_ALU64_IMM(BPF_MOV, R4, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3955  			BPF_ALU64_IMM(BPF_MOV, R5, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3956  			BPF_ALU64_IMM(BPF_MOV, R6, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3957  			BPF_ALU64_IMM(BPF_MOV, R7, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3958  			BPF_ALU64_IMM(BPF_MOV, R8, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3959  			BPF_ALU64_IMM(BPF_MOV, R9, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3960  			BPF_ALU64_REG(BPF_ADD, R0, R0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3961  			BPF_ALU64_REG(BPF_ADD, R0, R1),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3962  			BPF_ALU64_REG(BPF_ADD, R0, R2),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3963  			BPF_ALU64_REG(BPF_ADD, R0, R3),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3964  			BPF_ALU64_REG(BPF_ADD, R0, R4),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3965  			BPF_ALU64_REG(BPF_ADD, R0, R5),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3966  			BPF_ALU64_REG(BPF_ADD, R0, R6),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3967  			BPF_ALU64_REG(BPF_ADD, R0, R7),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3968  			BPF_ALU64_REG(BPF_ADD, R0, R8),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3969  			BPF_ALU64_REG(BPF_ADD, R0, R9),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3970  			BPF_ALU64_IMM(BPF_ADD, R0, 0xfefe),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3971  			BPF_EXIT_INSN(),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3972  		},
9dd2af834dea132 Daniel Borkmann    2015-12-17  3973  		INTERNAL,
9dd2af834dea132 Daniel Borkmann    2015-12-17  3974  		{ },
9dd2af834dea132 Daniel Borkmann    2015-12-17  3975  		{ { 0, 0xfefe } }
9dd2af834dea132 Daniel Borkmann    2015-12-17  3976  	},
9dd2af834dea132 Daniel Borkmann    2015-12-17  3977  	{	/* Mainly checking JIT here. */
9dd2af834dea132 Daniel Borkmann    2015-12-17  3978  		"MOV REG32",
9dd2af834dea132 Daniel Borkmann    2015-12-17  3979  		.u.insns_int = {
9dd2af834dea132 Daniel Borkmann    2015-12-17  3980  			BPF_LD_IMM64(R0, 0xffffffffffffffffLL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3981  			BPF_MOV64_REG(R1, R0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3982  			BPF_MOV64_REG(R2, R1),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3983  			BPF_MOV64_REG(R3, R2),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3984  			BPF_MOV64_REG(R4, R3),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3985  			BPF_MOV64_REG(R5, R4),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3986  			BPF_MOV64_REG(R6, R5),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3987  			BPF_MOV64_REG(R7, R6),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3988  			BPF_MOV64_REG(R8, R7),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3989  			BPF_MOV64_REG(R9, R8),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3990  			BPF_ALU32_IMM(BPF_MOV, R0, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3991  			BPF_ALU32_IMM(BPF_MOV, R1, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3992  			BPF_ALU32_IMM(BPF_MOV, R2, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3993  			BPF_ALU32_IMM(BPF_MOV, R3, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3994  			BPF_ALU32_IMM(BPF_MOV, R4, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3995  			BPF_ALU32_IMM(BPF_MOV, R5, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3996  			BPF_ALU32_IMM(BPF_MOV, R6, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3997  			BPF_ALU32_IMM(BPF_MOV, R7, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3998  			BPF_ALU32_IMM(BPF_MOV, R8, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  3999  			BPF_ALU32_IMM(BPF_MOV, R9, 0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4000  			BPF_ALU64_REG(BPF_ADD, R0, R0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4001  			BPF_ALU64_REG(BPF_ADD, R0, R1),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4002  			BPF_ALU64_REG(BPF_ADD, R0, R2),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4003  			BPF_ALU64_REG(BPF_ADD, R0, R3),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4004  			BPF_ALU64_REG(BPF_ADD, R0, R4),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4005  			BPF_ALU64_REG(BPF_ADD, R0, R5),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4006  			BPF_ALU64_REG(BPF_ADD, R0, R6),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4007  			BPF_ALU64_REG(BPF_ADD, R0, R7),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4008  			BPF_ALU64_REG(BPF_ADD, R0, R8),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4009  			BPF_ALU64_REG(BPF_ADD, R0, R9),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4010  			BPF_ALU64_IMM(BPF_ADD, R0, 0xfefe),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4011  			BPF_EXIT_INSN(),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4012  		},
9dd2af834dea132 Daniel Borkmann    2015-12-17  4013  		INTERNAL,
9dd2af834dea132 Daniel Borkmann    2015-12-17  4014  		{ },
9dd2af834dea132 Daniel Borkmann    2015-12-17  4015  		{ { 0, 0xfefe } }
9dd2af834dea132 Daniel Borkmann    2015-12-17  4016  	},
9dd2af834dea132 Daniel Borkmann    2015-12-17  4017  	{	/* Mainly checking JIT here. */
9dd2af834dea132 Daniel Borkmann    2015-12-17  4018  		"LD IMM64",
9dd2af834dea132 Daniel Borkmann    2015-12-17  4019  		.u.insns_int = {
9dd2af834dea132 Daniel Borkmann    2015-12-17  4020  			BPF_LD_IMM64(R0, 0xffffffffffffffffLL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4021  			BPF_MOV64_REG(R1, R0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4022  			BPF_MOV64_REG(R2, R1),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4023  			BPF_MOV64_REG(R3, R2),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4024  			BPF_MOV64_REG(R4, R3),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4025  			BPF_MOV64_REG(R5, R4),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4026  			BPF_MOV64_REG(R6, R5),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4027  			BPF_MOV64_REG(R7, R6),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4028  			BPF_MOV64_REG(R8, R7),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4029  			BPF_MOV64_REG(R9, R8),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4030  			BPF_LD_IMM64(R0, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4031  			BPF_LD_IMM64(R1, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4032  			BPF_LD_IMM64(R2, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4033  			BPF_LD_IMM64(R3, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4034  			BPF_LD_IMM64(R4, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4035  			BPF_LD_IMM64(R5, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4036  			BPF_LD_IMM64(R6, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4037  			BPF_LD_IMM64(R7, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4038  			BPF_LD_IMM64(R8, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4039  			BPF_LD_IMM64(R9, 0x0LL),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4040  			BPF_ALU64_REG(BPF_ADD, R0, R0),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4041  			BPF_ALU64_REG(BPF_ADD, R0, R1),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4042  			BPF_ALU64_REG(BPF_ADD, R0, R2),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4043  			BPF_ALU64_REG(BPF_ADD, R0, R3),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4044  			BPF_ALU64_REG(BPF_ADD, R0, R4),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4045  			BPF_ALU64_REG(BPF_ADD, R0, R5),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4046  			BPF_ALU64_REG(BPF_ADD, R0, R6),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4047  			BPF_ALU64_REG(BPF_ADD, R0, R7),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4048  			BPF_ALU64_REG(BPF_ADD, R0, R8),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4049  			BPF_ALU64_REG(BPF_ADD, R0, R9),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4050  			BPF_ALU64_IMM(BPF_ADD, R0, 0xfefe),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4051  			BPF_EXIT_INSN(),
9dd2af834dea132 Daniel Borkmann    2015-12-17  4052  		},
9dd2af834dea132 Daniel Borkmann    2015-12-17  4053  		INTERNAL,
9dd2af834dea132 Daniel Borkmann    2015-12-17  4054  		{ },
9dd2af834dea132 Daniel Borkmann    2015-12-17  4055  		{ { 0, 0xfefe } }
9dd2af834dea132 Daniel Borkmann    2015-12-17  4056  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4057  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4058  		"INT: ALU MIX",
ece80490e2c1cef Andrew Morton      2014-05-22  4059  		.u.insns_int = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4060  			BPF_ALU64_IMM(BPF_MOV, R0, 11),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4061  			BPF_ALU64_IMM(BPF_ADD, R0, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4062  			BPF_ALU64_IMM(BPF_MOV, R2, 2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4063  			BPF_ALU64_IMM(BPF_XOR, R2, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4064  			BPF_ALU64_REG(BPF_DIV, R0, R2),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4065  			BPF_JMP_IMM(BPF_JEQ, R0, 10, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4066  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4067  			BPF_ALU64_IMM(BPF_MOD, R0, 3),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4068  			BPF_JMP_IMM(BPF_JEQ, R0, 1, 1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4069  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4070  			BPF_ALU64_IMM(BPF_MOV, R0, -1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4071  			BPF_EXIT_INSN(),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4072  		},
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4073  		INTERNAL,
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4074  		{ },
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4075  		{ { 0, -1 } }
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4076  	},
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4077  	{
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4078  		"INT: shifts by register",
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4079  		.u.insns_int = {
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4080  			BPF_MOV64_IMM(R0, -1234),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4081  			BPF_MOV64_IMM(R1, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4082  			BPF_ALU32_REG(BPF_RSH, R0, R1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4083  			BPF_JMP_IMM(BPF_JEQ, R0, 0x7ffffd97, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4084  			BPF_EXIT_INSN(),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4085  			BPF_MOV64_IMM(R2, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4086  			BPF_ALU64_REG(BPF_LSH, R0, R2),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4087  			BPF_MOV32_IMM(R4, -1234),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4088  			BPF_JMP_REG(BPF_JEQ, R0, R4, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4089  			BPF_EXIT_INSN(),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4090  			BPF_ALU64_IMM(BPF_AND, R4, 63),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4091  			BPF_ALU64_REG(BPF_LSH, R0, R4), /* R0 <= 46 */
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4092  			BPF_MOV64_IMM(R3, 47),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4093  			BPF_ALU64_REG(BPF_ARSH, R0, R3),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4094  			BPF_JMP_IMM(BPF_JEQ, R0, -617, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4095  			BPF_EXIT_INSN(),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4096  			BPF_MOV64_IMM(R2, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4097  			BPF_ALU64_REG(BPF_LSH, R4, R2), /* R4 = 46 << 1 */
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4098  			BPF_JMP_IMM(BPF_JEQ, R4, 92, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4099  			BPF_EXIT_INSN(),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4100  			BPF_MOV64_IMM(R4, 4),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4101  			BPF_ALU64_REG(BPF_LSH, R4, R4), /* R4 = 4 << 4 */
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4102  			BPF_JMP_IMM(BPF_JEQ, R4, 64, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4103  			BPF_EXIT_INSN(),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4104  			BPF_MOV64_IMM(R4, 5),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4105  			BPF_ALU32_REG(BPF_LSH, R4, R4), /* R4 = 5 << 5 */
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4106  			BPF_JMP_IMM(BPF_JEQ, R4, 160, 1),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4107  			BPF_EXIT_INSN(),
72b603ee8cfc6be Alexei Starovoitov 2014-08-25  4108  			BPF_MOV64_IMM(R0, -1),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4109  			BPF_EXIT_INSN(),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4110  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  4111  		INTERNAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4112  		{ },
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4113  		{ { 0, -1 } }
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4114  	},
53e33f9928cd612 Johan Almbladh     2021-08-09  4115  #ifdef CONFIG_32BIT
53e33f9928cd612 Johan Almbladh     2021-08-09  4116  	{
53e33f9928cd612 Johan Almbladh     2021-08-09  4117  		"INT: 32-bit context pointer word order and zero-extension",
53e33f9928cd612 Johan Almbladh     2021-08-09  4118  		.u.insns_int = {
53e33f9928cd612 Johan Almbladh     2021-08-09  4119  			BPF_ALU32_IMM(BPF_MOV, R0, 0),
53e33f9928cd612 Johan Almbladh     2021-08-09  4120  			BPF_JMP32_IMM(BPF_JEQ, R1, 0, 3),
53e33f9928cd612 Johan Almbladh     2021-08-09  4121  			BPF_ALU64_IMM(BPF_RSH, R1, 32),
53e33f9928cd612 Johan Almbladh     2021-08-09  4122  			BPF_JMP32_IMM(BPF_JNE, R1, 0, 1),
53e33f9928cd612 Johan Almbladh     2021-08-09  4123  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
53e33f9928cd612 Johan Almbladh     2021-08-09  4124  			BPF_EXIT_INSN(),
53e33f9928cd612 Johan Almbladh     2021-08-09  4125  		},
53e33f9928cd612 Johan Almbladh     2021-08-09  4126  		INTERNAL,
53e33f9928cd612 Johan Almbladh     2021-08-09  4127  		{ },
53e33f9928cd612 Johan Almbladh     2021-08-09  4128  		{ { 0, 1 } }
53e33f9928cd612 Johan Almbladh     2021-08-09  4129  	},
53e33f9928cd612 Johan Almbladh     2021-08-09  4130  #endif
64a8946b447e418 Alexei Starovoitov 2014-05-08  4131  	{
64a8946b447e418 Alexei Starovoitov 2014-05-08  4132  		"check: missing ret",
ece80490e2c1cef Andrew Morton      2014-05-22  4133  		.u.insns = {
64a8946b447e418 Alexei Starovoitov 2014-05-08  4134  			BPF_STMT(BPF_LD | BPF_IMM, 1),
64a8946b447e418 Alexei Starovoitov 2014-05-08  4135  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  4136  		CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL,
64a8946b447e418 Alexei Starovoitov 2014-05-08  4137  		{ },
09584b406742413 Yonghong Song      2018-02-02  4138  		{ },
09584b406742413 Yonghong Song      2018-02-02  4139  		.fill_helper = NULL,
09584b406742413 Yonghong Song      2018-02-02  4140  		.expected_errcode = -EINVAL,
64a8946b447e418 Alexei Starovoitov 2014-05-08  4141  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4142  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4143  		"check: div_k_0",
ece80490e2c1cef Andrew Morton      2014-05-22  4144  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4145  			BPF_STMT(BPF_ALU | BPF_DIV | BPF_K, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4146  			BPF_STMT(BPF_RET | BPF_K, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4147  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  4148  		CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4149  		{ },
09584b406742413 Yonghong Song      2018-02-02  4150  		{ },
09584b406742413 Yonghong Song      2018-02-02  4151  		.fill_helper = NULL,
09584b406742413 Yonghong Song      2018-02-02  4152  		.expected_errcode = -EINVAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4153  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4154  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4155  		"check: unknown insn",
ece80490e2c1cef Andrew Morton      2014-05-22  4156  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4157  			/* seccomp insn, rejected in socket filter */
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4158  			BPF_STMT(BPF_LDX | BPF_W | BPF_ABS, 0),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4159  			BPF_STMT(BPF_RET | BPF_K, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4160  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  4161  		CLASSIC | FLAG_EXPECTED_FAIL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4162  		{ },
09584b406742413 Yonghong Song      2018-02-02  4163  		{ },
09584b406742413 Yonghong Song      2018-02-02  4164  		.fill_helper = NULL,
09584b406742413 Yonghong Song      2018-02-02  4165  		.expected_errcode = -EINVAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4166  	},
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4167  	{
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4168  		"check: out of range spill/fill",
ece80490e2c1cef Andrew Morton      2014-05-22  4169  		.u.insns = {
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4170  			BPF_STMT(BPF_STX, 16),
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4171  			BPF_STMT(BPF_RET | BPF_K, 0)
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4172  		},
10f18e0ba1ea7eb Daniel Borkmann    2014-05-23  4173  		CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4174  		{ },
09584b406742413 Yonghong Song      2018-02-02  4175  		{ },
09584b406742413 Yonghong Song      2018-02-02  4176  		.fill_helper = NULL,
09584b406742413 Yonghong Song      2018-02-02  4177  		.expected_errcode = -EINVAL,
9def624afdf2a81 Alexei Starovoitov 2014-05-08  4178  	},
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4179  	{
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4180  		"JUMPS + HOLES",
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4181  		.u.insns = {
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4182  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4183  			BPF_JUMP(BPF_JMP | BPF_JGE, 0, 13, 15),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4184  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4185  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4186  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4187  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4188  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4189  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4190  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4191  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4192  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4193  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4194  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4195  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4196  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4197  			BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90c2894d, 3, 4),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4198  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4199  			BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90c2894d, 1, 2),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4200  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4201  			BPF_JUMP(BPF_JMP | BPF_JGE, 0, 14, 15),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4202  			BPF_JUMP(BPF_JMP | BPF_JGE, 0, 13, 14),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4203  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4204  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4205  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4206  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4207  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4208  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4209  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4210  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4211  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4212  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4213  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4214  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4215  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4216  			BPF_JUMP(BPF_JMP | BPF_JEQ, 0x2ac28349, 2, 3),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4217  			BPF_JUMP(BPF_JMP | BPF_JEQ, 0x2ac28349, 1, 2),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4218  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4219  			BPF_JUMP(BPF_JMP | BPF_JGE, 0, 14, 15),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4220  			BPF_JUMP(BPF_JMP | BPF_JGE, 0, 13, 14),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4221  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4222  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4223  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4224  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4225  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4226  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4227  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4228  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4229  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4230  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4231  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4232  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4233  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4234  			BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90d2ff41, 2, 3),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4235  			BPF_JUMP(BPF_JMP | BPF_JEQ, 0x90d2ff41, 1, 2),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4236  			BPF_STMT(BPF_LD | BPF_H | BPF_ABS, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4237  			BPF_STMT(BPF_RET | BPF_A, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4238  			BPF_STMT(BPF_RET | BPF_A, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4239  		},
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4240  		CLASSIC,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4241  		{ 0x00, 0x1b, 0x21, 0x3c, 0x9d, 0xf8,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4242  		  0x90, 0xe2, 0xba, 0x0a, 0x56, 0xb4,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4243  		  0x08, 0x00,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4244  		  0x45, 0x00, 0x00, 0x28, 0x00, 0x00,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4245  		  0x20, 0x00, 0x40, 0x11, 0x00, 0x00, /* IP header */
ce25b68b74593bb Daniel Borkmann    2014-05-26  4246  		  0xc0, 0xa8, 0x33, 0x01,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4247  		  0xc0, 0xa8, 0x33, 0x02,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4248  		  0xbb, 0xb6,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4249  		  0xa9, 0xfa,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4250  		  0x00, 0x14, 0x00, 0x00,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4251  		  0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4252  		  0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4253  		  0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4254  		  0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4255  		  0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4256  		  0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4257  		  0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
ce25b68b74593bb Daniel Borkmann    2014-05-26  4258  		  0xcc, 0xcc, 0xcc, 0xcc },
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4259  		{ { 88, 0x001b } }
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4260  	},
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4261  	{
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4262  		"check: RET X",
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4263  		.u.insns = {
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4264  			BPF_STMT(BPF_RET | BPF_X, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4265  		},
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4266  		CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL,
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4267  		{ },
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4268  		{ },
09584b406742413 Yonghong Song      2018-02-02  4269  		.fill_helper = NULL,
09584b406742413 Yonghong Song      2018-02-02  4270  		.expected_errcode = -EINVAL,
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4271  	},
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4272  	{
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4273  		"check: LDX + RET X",
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4274  		.u.insns = {
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4275  			BPF_STMT(BPF_LDX | BPF_IMM, 42),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4276  			BPF_STMT(BPF_RET | BPF_X, 0),
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4277  		},
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4278  		CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL,
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4279  		{ },
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4280  		{ },
09584b406742413 Yonghong Song      2018-02-02  4281  		.fill_helper = NULL,
09584b406742413 Yonghong Song      2018-02-02  4282  		.expected_errcode = -EINVAL,
2e8a83c52ffa418 Daniel Borkmann    2014-05-23  4283  	},
108cc22a93e1843 Daniel Borkmann    2014-05-26  4284  	{	/* Mainly checking JIT here. */
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4285  		"M[]: alt STX + LDX",
108cc22a93e1843 Daniel Borkmann    2014-05-26  4286  		.u.insns = {
108cc22a93e1843 Daniel Borkmann    2014-05-26  4287  			BPF_STMT(BPF_LDX | BPF_IMM, 100),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4288  			BPF_STMT(BPF_STX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4289  			BPF_STMT(BPF_LDX | BPF_MEM, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4290  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4291  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4292  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4293  			BPF_STMT(BPF_STX, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4294  			BPF_STMT(BPF_LDX | BPF_MEM, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4295  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4296  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4297  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4298  			BPF_STMT(BPF_STX, 2),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4299  			BPF_STMT(BPF_LDX | BPF_MEM, 2),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4300  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4301  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4302  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4303  			BPF_STMT(BPF_STX, 3),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4304  			BPF_STMT(BPF_LDX | BPF_MEM, 3),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4305  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4306  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4307  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4308  			BPF_STMT(BPF_STX, 4),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4309  			BPF_STMT(BPF_LDX | BPF_MEM, 4),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4310  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4311  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4312  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4313  			BPF_STMT(BPF_STX, 5),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4314  			BPF_STMT(BPF_LDX | BPF_MEM, 5),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4315  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4316  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4317  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4318  			BPF_STMT(BPF_STX, 6),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4319  			BPF_STMT(BPF_LDX | BPF_MEM, 6),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4320  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4321  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4322  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4323  			BPF_STMT(BPF_STX, 7),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4324  			BPF_STMT(BPF_LDX | BPF_MEM, 7),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4325  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4326  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4327  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4328  			BPF_STMT(BPF_STX, 8),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4329  			BPF_STMT(BPF_LDX | BPF_MEM, 8),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4330  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4331  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4332  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4333  			BPF_STMT(BPF_STX, 9),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4334  			BPF_STMT(BPF_LDX | BPF_MEM, 9),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4335  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4336  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4337  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4338  			BPF_STMT(BPF_STX, 10),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4339  			BPF_STMT(BPF_LDX | BPF_MEM, 10),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4340  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4341  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4342  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4343  			BPF_STMT(BPF_STX, 11),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4344  			BPF_STMT(BPF_LDX | BPF_MEM, 11),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4345  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4346  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4347  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4348  			BPF_STMT(BPF_STX, 12),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4349  			BPF_STMT(BPF_LDX | BPF_MEM, 12),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4350  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4351  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4352  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4353  			BPF_STMT(BPF_STX, 13),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4354  			BPF_STMT(BPF_LDX | BPF_MEM, 13),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4355  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4356  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4357  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4358  			BPF_STMT(BPF_STX, 14),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4359  			BPF_STMT(BPF_LDX | BPF_MEM, 14),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4360  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4361  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4362  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4363  			BPF_STMT(BPF_STX, 15),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4364  			BPF_STMT(BPF_LDX | BPF_MEM, 15),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4365  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4366  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_K, 1),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4367  			BPF_STMT(BPF_MISC | BPF_TAX, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4368  			BPF_STMT(BPF_RET | BPF_A, 0),
108cc22a93e1843 Daniel Borkmann    2014-05-26  4369  		},
108cc22a93e1843 Daniel Borkmann    2014-05-26  4370  		CLASSIC | FLAG_NO_DATA,
108cc22a93e1843 Daniel Borkmann    2014-05-26  4371  		{ },
108cc22a93e1843 Daniel Borkmann    2014-05-26  4372  		{ { 0, 116 } },
108cc22a93e1843 Daniel Borkmann    2014-05-26  4373  	},
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4374  	{	/* Mainly checking JIT here. */
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4375  		"M[]: full STX + full LDX",
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4376  		.u.insns = {
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4377  			BPF_STMT(BPF_LDX | BPF_IMM, 0xbadfeedb),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4378  			BPF_STMT(BPF_STX, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4379  			BPF_STMT(BPF_LDX | BPF_IMM, 0xecabedae),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4380  			BPF_STMT(BPF_STX, 1),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4381  			BPF_STMT(BPF_LDX | BPF_IMM, 0xafccfeaf),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4382  			BPF_STMT(BPF_STX, 2),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4383  			BPF_STMT(BPF_LDX | BPF_IMM, 0xbffdcedc),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4384  			BPF_STMT(BPF_STX, 3),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4385  			BPF_STMT(BPF_LDX | BPF_IMM, 0xfbbbdccb),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4386  			BPF_STMT(BPF_STX, 4),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4387  			BPF_STMT(BPF_LDX | BPF_IMM, 0xfbabcbda),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4388  			BPF_STMT(BPF_STX, 5),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4389  			BPF_STMT(BPF_LDX | BPF_IMM, 0xaedecbdb),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4390  			BPF_STMT(BPF_STX, 6),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4391  			BPF_STMT(BPF_LDX | BPF_IMM, 0xadebbade),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4392  			BPF_STMT(BPF_STX, 7),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4393  			BPF_STMT(BPF_LDX | BPF_IMM, 0xfcfcfaec),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4394  			BPF_STMT(BPF_STX, 8),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4395  			BPF_STMT(BPF_LDX | BPF_IMM, 0xbcdddbdc),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4396  			BPF_STMT(BPF_STX, 9),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4397  			BPF_STMT(BPF_LDX | BPF_IMM, 0xfeefdfac),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4398  			BPF_STMT(BPF_STX, 10),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4399  			BPF_STMT(BPF_LDX | BPF_IMM, 0xcddcdeea),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4400  			BPF_STMT(BPF_STX, 11),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4401  			BPF_STMT(BPF_LDX | BPF_IMM, 0xaccfaebb),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4402  			BPF_STMT(BPF_STX, 12),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4403  			BPF_STMT(BPF_LDX | BPF_IMM, 0xbdcccdcf),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4404  			BPF_STMT(BPF_STX, 13),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4405  			BPF_STMT(BPF_LDX | BPF_IMM, 0xaaedecde),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4406  			BPF_STMT(BPF_STX, 14),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4407  			BPF_STMT(BPF_LDX | BPF_IMM, 0xfaeacdad),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4408  			BPF_STMT(BPF_STX, 15),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4409  			BPF_STMT(BPF_LDX | BPF_MEM, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4410  			BPF_STMT(BPF_MISC | BPF_TXA, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4411  			BPF_STMT(BPF_LDX | BPF_MEM, 1),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4412  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4413  			BPF_STMT(BPF_LDX | BPF_MEM, 2),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4414  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4415  			BPF_STMT(BPF_LDX | BPF_MEM, 3),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4416  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4417  			BPF_STMT(BPF_LDX | BPF_MEM, 4),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4418  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4419  			BPF_STMT(BPF_LDX | BPF_MEM, 5),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4420  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4421  			BPF_STMT(BPF_LDX | BPF_MEM, 6),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4422  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4423  			BPF_STMT(BPF_LDX | BPF_MEM, 7),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4424  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4425  			BPF_STMT(BPF_LDX | BPF_MEM, 8),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4426  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4427  			BPF_STMT(BPF_LDX | BPF_MEM, 9),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4428  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4429  			BPF_STMT(BPF_LDX | BPF_MEM, 10),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4430  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4431  			BPF_STMT(BPF_LDX | BPF_MEM, 11),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4432  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4433  			BPF_STMT(BPF_LDX | BPF_MEM, 12),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4434  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4435  			BPF_STMT(BPF_LDX | BPF_MEM, 13),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4436  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4437  			BPF_STMT(BPF_LDX | BPF_MEM, 14),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4438  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4439  			BPF_STMT(BPF_LDX | BPF_MEM, 15),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4440  			BPF_STMT(BPF_ALU | BPF_ADD | BPF_X, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4441  			BPF_STMT(BPF_RET | BPF_A, 0),
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4442  		},
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4443  		CLASSIC | FLAG_NO_DATA,
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4444  		{ },
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4445  		{ { 0, 0x2a5a5e5 } },
9fe13baad6b1e8d Daniel Borkmann    2014-05-29  4446  	},
d50bc1575096250 Daniel Borkmann    2014-05-29  4447  	{
d50bc1575096250 Daniel Borkmann    2014-05-29  4448  		"check: SKF_AD_MAX",
d50bc1575096250 Daniel Borkmann    2014-05-29  4449  		.u.insns = {
d50bc1575096250 Daniel Borkmann    2014-05-29  4450  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
d50bc1575096250 Daniel Borkmann    2014-05-29  4451  				 SKF_AD_OFF + SKF_AD_MAX),
d50bc1575096250 Daniel Borkmann    2014-05-29  4452  			BPF_STMT(BPF_RET | BPF_A, 0),
d50bc1575096250 Daniel Borkmann    2014-05-29  4453  		},
d50bc1575096250 Daniel Borkmann    2014-05-29  4454  		CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL,
d50bc1575096250 Daniel Borkmann    2014-05-29  4455  		{ },
d50bc1575096250 Daniel Borkmann    2014-05-29  4456  		{ },
09584b406742413 Yonghong Song      2018-02-02  4457  		.fill_helper = NULL,
09584b406742413 Yonghong Song      2018-02-02  4458  		.expected_errcode = -EINVAL,
d50bc1575096250 Daniel Borkmann    2014-05-29  4459  	},
d50bc1575096250 Daniel Borkmann    2014-05-29  4460  	{	/* Passes checker but fails during runtime. */
d50bc1575096250 Daniel Borkmann    2014-05-29  4461  		"LD [SKF_AD_OFF-1]",
d50bc1575096250 Daniel Borkmann    2014-05-29  4462  		.u.insns = {
d50bc1575096250 Daniel Borkmann    2014-05-29  4463  			BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
d50bc1575096250 Daniel Borkmann    2014-05-29  4464  				 SKF_AD_OFF - 1),
d50bc1575096250 Daniel Borkmann    2014-05-29  4465  			BPF_STMT(BPF_RET | BPF_K, 1),
d50bc1575096250 Daniel Borkmann    2014-05-29  4466  		},
d50bc1575096250 Daniel Borkmann    2014-05-29  4467  		CLASSIC,
d50bc1575096250 Daniel Borkmann    2014-05-29  4468  		{ },
d50bc1575096250 Daniel Borkmann    2014-05-29  4469  		{ { 1, 0 } },
d50bc1575096250 Daniel Borkmann    2014-05-29  4470  	},
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4471  	{
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4472  		"load 64-bit immediate",
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4473  		.u.insns_int = {
25ee7327d04bc3f Alexei Starovoitov 2014-09-19  4474  			BPF_LD_IMM64(R1, 0x567800001234LL),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4475  			BPF_MOV64_REG(R2, R1),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4476  			BPF_MOV64_REG(R3, R2),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4477  			BPF_ALU64_IMM(BPF_RSH, R2, 32),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4478  			BPF_ALU64_IMM(BPF_LSH, R3, 32),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4479  			BPF_ALU64_IMM(BPF_RSH, R3, 32),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4480  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4481  			BPF_JMP_IMM(BPF_JEQ, R2, 0x5678, 1),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4482  			BPF_EXIT_INSN(),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4483  			BPF_JMP_IMM(BPF_JEQ, R3, 0x1234, 1),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4484  			BPF_EXIT_INSN(),
986ccfdbd90a292 Xi Wang            2015-05-09  4485  			BPF_LD_IMM64(R0, 0x1ffffffffLL),
986ccfdbd90a292 Xi Wang            2015-05-09  4486  			BPF_ALU64_IMM(BPF_RSH, R0, 32), /* R0 = 1 */
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4487  			BPF_EXIT_INSN(),
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4488  		},
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4489  		INTERNAL,
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4490  		{ },
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4491  		{ { 0, 1 } }
02ab695bb37ee9a Alexei Starovoitov 2014-09-04  4492  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4493  	/* BPF_ALU | BPF_MOV | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  4494  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4495  		"ALU_MOV_X: dst = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  4496  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4497  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4498  			BPF_ALU32_REG(BPF_MOV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4499  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4500  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4501  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4502  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4503  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4504  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4505  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4506  		"ALU_MOV_X: dst = 4294967295",
cffc642d93f9324 Michael Holzheu    2015-05-11  4507  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  4508  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967295U),
cffc642d93f9324 Michael Holzheu    2015-05-11  4509  			BPF_ALU32_REG(BPF_MOV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4510  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4511  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4512  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4513  		{ },
56cbaa45dde2356 Michael Holzheu    2015-05-13  4514  		{ { 0, 4294967295U } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4515  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4516  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4517  		"ALU64_MOV_X: dst = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  4518  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4519  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4520  			BPF_ALU64_REG(BPF_MOV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4521  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4522  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4523  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4524  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4525  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4526  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4527  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4528  		"ALU64_MOV_X: dst = 4294967295",
cffc642d93f9324 Michael Holzheu    2015-05-11  4529  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  4530  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967295U),
cffc642d93f9324 Michael Holzheu    2015-05-11  4531  			BPF_ALU64_REG(BPF_MOV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4532  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4533  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4534  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4535  		{ },
56cbaa45dde2356 Michael Holzheu    2015-05-13  4536  		{ { 0, 4294967295U } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4537  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4538  	/* BPF_ALU | BPF_MOV | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  4539  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4540  		"ALU_MOV_K: dst = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  4541  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4542  			BPF_ALU32_IMM(BPF_MOV, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4543  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4544  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4545  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4546  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4547  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4548  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4549  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4550  		"ALU_MOV_K: dst = 4294967295",
cffc642d93f9324 Michael Holzheu    2015-05-11  4551  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  4552  			BPF_ALU32_IMM(BPF_MOV, R0, 4294967295U),
cffc642d93f9324 Michael Holzheu    2015-05-11  4553  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4554  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4555  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4556  		{ },
56cbaa45dde2356 Michael Holzheu    2015-05-13  4557  		{ { 0, 4294967295U } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4558  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4559  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4560  		"ALU_MOV_K: 0x0000ffffffff0000 = 0x00000000ffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  4561  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  4562  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  4563  			BPF_LD_IMM64(R3, 0x00000000ffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  4564  			BPF_ALU32_IMM(BPF_MOV, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  4565  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4566  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4567  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4568  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4569  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4570  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4571  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4572  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4573  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4574  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4575  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4576  		"ALU_MOV_K: small negative",
565731acfcf28ff Johan Almbladh     2021-08-09  4577  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4578  			BPF_ALU32_IMM(BPF_MOV, R0, -123),
565731acfcf28ff Johan Almbladh     2021-08-09  4579  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4580  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4581  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4582  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4583  		{ { 0, -123 } }
565731acfcf28ff Johan Almbladh     2021-08-09  4584  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4585  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4586  		"ALU_MOV_K: small negative zero extension",
565731acfcf28ff Johan Almbladh     2021-08-09  4587  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4588  			BPF_ALU32_IMM(BPF_MOV, R0, -123),
565731acfcf28ff Johan Almbladh     2021-08-09  4589  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
565731acfcf28ff Johan Almbladh     2021-08-09  4590  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4591  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4592  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4593  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4594  		{ { 0, 0 } }
565731acfcf28ff Johan Almbladh     2021-08-09  4595  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4596  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4597  		"ALU_MOV_K: large negative",
565731acfcf28ff Johan Almbladh     2021-08-09  4598  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4599  			BPF_ALU32_IMM(BPF_MOV, R0, -123456789),
565731acfcf28ff Johan Almbladh     2021-08-09  4600  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4601  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4602  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4603  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4604  		{ { 0, -123456789 } }
565731acfcf28ff Johan Almbladh     2021-08-09  4605  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4606  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4607  		"ALU_MOV_K: large negative zero extension",
565731acfcf28ff Johan Almbladh     2021-08-09  4608  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4609  			BPF_ALU32_IMM(BPF_MOV, R0, -123456789),
565731acfcf28ff Johan Almbladh     2021-08-09  4610  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
565731acfcf28ff Johan Almbladh     2021-08-09  4611  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4612  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4613  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4614  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4615  		{ { 0, 0 } }
565731acfcf28ff Johan Almbladh     2021-08-09  4616  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4617  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4618  		"ALU64_MOV_K: dst = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  4619  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4620  			BPF_ALU64_IMM(BPF_MOV, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4621  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4622  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4623  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4624  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4625  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4626  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4627  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4628  		"ALU64_MOV_K: dst = 2147483647",
cffc642d93f9324 Michael Holzheu    2015-05-11  4629  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4630  			BPF_ALU64_IMM(BPF_MOV, R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  4631  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4632  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4633  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4634  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4635  		{ { 0, 2147483647 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4636  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4637  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4638  		"ALU64_OR_K: dst = 0x0",
cffc642d93f9324 Michael Holzheu    2015-05-11  4639  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  4640  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  4641  			BPF_LD_IMM64(R3, 0x0),
cffc642d93f9324 Michael Holzheu    2015-05-11  4642  			BPF_ALU64_IMM(BPF_MOV, R2, 0x0),
cffc642d93f9324 Michael Holzheu    2015-05-11  4643  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4644  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4645  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4646  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4647  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4648  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4649  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4650  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4651  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4652  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4653  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4654  		"ALU64_MOV_K: dst = -1",
cffc642d93f9324 Michael Holzheu    2015-05-11  4655  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  4656  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  4657  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  4658  			BPF_ALU64_IMM(BPF_MOV, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  4659  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4660  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4661  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4662  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4663  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4664  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4665  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4666  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4667  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4668  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4669  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4670  		"ALU64_MOV_K: small negative",
565731acfcf28ff Johan Almbladh     2021-08-09  4671  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4672  			BPF_ALU64_IMM(BPF_MOV, R0, -123),
565731acfcf28ff Johan Almbladh     2021-08-09  4673  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4674  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4675  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4676  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4677  		{ { 0, -123 } }
565731acfcf28ff Johan Almbladh     2021-08-09  4678  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4679  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4680  		"ALU64_MOV_K: small negative sign extension",
565731acfcf28ff Johan Almbladh     2021-08-09  4681  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4682  			BPF_ALU64_IMM(BPF_MOV, R0, -123),
565731acfcf28ff Johan Almbladh     2021-08-09  4683  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
565731acfcf28ff Johan Almbladh     2021-08-09  4684  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4685  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4686  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4687  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4688  		{ { 0, 0xffffffff } }
565731acfcf28ff Johan Almbladh     2021-08-09  4689  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4690  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4691  		"ALU64_MOV_K: large negative",
565731acfcf28ff Johan Almbladh     2021-08-09  4692  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4693  			BPF_ALU64_IMM(BPF_MOV, R0, -123456789),
565731acfcf28ff Johan Almbladh     2021-08-09  4694  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4695  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4696  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4697  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4698  		{ { 0, -123456789 } }
565731acfcf28ff Johan Almbladh     2021-08-09  4699  	},
565731acfcf28ff Johan Almbladh     2021-08-09  4700  	{
565731acfcf28ff Johan Almbladh     2021-08-09  4701  		"ALU64_MOV_K: large negative sign extension",
565731acfcf28ff Johan Almbladh     2021-08-09  4702  		.u.insns_int = {
565731acfcf28ff Johan Almbladh     2021-08-09  4703  			BPF_ALU64_IMM(BPF_MOV, R0, -123456789),
565731acfcf28ff Johan Almbladh     2021-08-09  4704  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
565731acfcf28ff Johan Almbladh     2021-08-09  4705  			BPF_EXIT_INSN(),
565731acfcf28ff Johan Almbladh     2021-08-09  4706  		},
565731acfcf28ff Johan Almbladh     2021-08-09  4707  		INTERNAL,
565731acfcf28ff Johan Almbladh     2021-08-09  4708  		{ },
565731acfcf28ff Johan Almbladh     2021-08-09  4709  		{ { 0, 0xffffffff } }
565731acfcf28ff Johan Almbladh     2021-08-09  4710  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4711  	/* BPF_ALU | BPF_ADD | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  4712  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4713  		"ALU_ADD_X: 1 + 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  4714  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4715  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4716  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4717  			BPF_ALU32_REG(BPF_ADD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4718  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4719  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4720  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4721  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4722  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4723  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4724  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4725  		"ALU_ADD_X: 1 + 4294967294 = 4294967295",
cffc642d93f9324 Michael Holzheu    2015-05-11  4726  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4727  			BPF_LD_IMM64(R0, 1),
56cbaa45dde2356 Michael Holzheu    2015-05-13  4728  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
cffc642d93f9324 Michael Holzheu    2015-05-11  4729  			BPF_ALU32_REG(BPF_ADD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4730  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4731  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4732  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4733  		{ },
56cbaa45dde2356 Michael Holzheu    2015-05-13  4734  		{ { 0, 4294967295U } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4735  	},
b64b50eac47046f Naveen N. Rao      2016-04-05  4736  	{
b64b50eac47046f Naveen N. Rao      2016-04-05  4737  		"ALU_ADD_X: 2 + 4294967294 = 0",
b64b50eac47046f Naveen N. Rao      2016-04-05  4738  		.u.insns_int = {
b64b50eac47046f Naveen N. Rao      2016-04-05  4739  			BPF_LD_IMM64(R0, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4740  			BPF_LD_IMM64(R1, 4294967294U),
b64b50eac47046f Naveen N. Rao      2016-04-05  4741  			BPF_ALU32_REG(BPF_ADD, R0, R1),
b64b50eac47046f Naveen N. Rao      2016-04-05  4742  			BPF_JMP_IMM(BPF_JEQ, R0, 0, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4743  			BPF_ALU32_IMM(BPF_MOV, R0, 0),
b64b50eac47046f Naveen N. Rao      2016-04-05  4744  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4745  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
b64b50eac47046f Naveen N. Rao      2016-04-05  4746  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4747  		},
b64b50eac47046f Naveen N. Rao      2016-04-05  4748  		INTERNAL,
b64b50eac47046f Naveen N. Rao      2016-04-05  4749  		{ },
b64b50eac47046f Naveen N. Rao      2016-04-05  4750  		{ { 0, 1 } },
b64b50eac47046f Naveen N. Rao      2016-04-05  4751  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4752  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4753  		"ALU64_ADD_X: 1 + 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  4754  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4755  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4756  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4757  			BPF_ALU64_REG(BPF_ADD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4758  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4759  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4760  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4761  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4762  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4763  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4764  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4765  		"ALU64_ADD_X: 1 + 4294967294 = 4294967295",
cffc642d93f9324 Michael Holzheu    2015-05-11  4766  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4767  			BPF_LD_IMM64(R0, 1),
56cbaa45dde2356 Michael Holzheu    2015-05-13  4768  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
cffc642d93f9324 Michael Holzheu    2015-05-11  4769  			BPF_ALU64_REG(BPF_ADD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4770  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4771  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4772  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4773  		{ },
56cbaa45dde2356 Michael Holzheu    2015-05-13  4774  		{ { 0, 4294967295U } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4775  	},
b64b50eac47046f Naveen N. Rao      2016-04-05  4776  	{
b64b50eac47046f Naveen N. Rao      2016-04-05  4777  		"ALU64_ADD_X: 2 + 4294967294 = 4294967296",
b64b50eac47046f Naveen N. Rao      2016-04-05  4778  		.u.insns_int = {
b64b50eac47046f Naveen N. Rao      2016-04-05  4779  			BPF_LD_IMM64(R0, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4780  			BPF_LD_IMM64(R1, 4294967294U),
b64b50eac47046f Naveen N. Rao      2016-04-05  4781  			BPF_LD_IMM64(R2, 4294967296ULL),
b64b50eac47046f Naveen N. Rao      2016-04-05  4782  			BPF_ALU64_REG(BPF_ADD, R0, R1),
b64b50eac47046f Naveen N. Rao      2016-04-05  4783  			BPF_JMP_REG(BPF_JEQ, R0, R2, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4784  			BPF_MOV32_IMM(R0, 0),
b64b50eac47046f Naveen N. Rao      2016-04-05  4785  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4786  			BPF_MOV32_IMM(R0, 1),
b64b50eac47046f Naveen N. Rao      2016-04-05  4787  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4788  		},
b64b50eac47046f Naveen N. Rao      2016-04-05  4789  		INTERNAL,
b64b50eac47046f Naveen N. Rao      2016-04-05  4790  		{ },
b64b50eac47046f Naveen N. Rao      2016-04-05  4791  		{ { 0, 1 } },
b64b50eac47046f Naveen N. Rao      2016-04-05  4792  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4793  	/* BPF_ALU | BPF_ADD | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  4794  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4795  		"ALU_ADD_K: 1 + 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  4796  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4797  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4798  			BPF_ALU32_IMM(BPF_ADD, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4799  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4800  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4801  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4802  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4803  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4804  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4805  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4806  		"ALU_ADD_K: 3 + 0 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  4807  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4808  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  4809  			BPF_ALU32_IMM(BPF_ADD, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  4810  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4811  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4812  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4813  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4814  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4815  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4816  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4817  		"ALU_ADD_K: 1 + 4294967294 = 4294967295",
cffc642d93f9324 Michael Holzheu    2015-05-11  4818  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4819  			BPF_LD_IMM64(R0, 1),
56cbaa45dde2356 Michael Holzheu    2015-05-13  4820  			BPF_ALU32_IMM(BPF_ADD, R0, 4294967294U),
cffc642d93f9324 Michael Holzheu    2015-05-11  4821  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4822  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4823  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4824  		{ },
56cbaa45dde2356 Michael Holzheu    2015-05-13  4825  		{ { 0, 4294967295U } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4826  	},
b64b50eac47046f Naveen N. Rao      2016-04-05  4827  	{
b64b50eac47046f Naveen N. Rao      2016-04-05  4828  		"ALU_ADD_K: 4294967294 + 2 = 0",
b64b50eac47046f Naveen N. Rao      2016-04-05  4829  		.u.insns_int = {
b64b50eac47046f Naveen N. Rao      2016-04-05  4830  			BPF_LD_IMM64(R0, 4294967294U),
b64b50eac47046f Naveen N. Rao      2016-04-05  4831  			BPF_ALU32_IMM(BPF_ADD, R0, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4832  			BPF_JMP_IMM(BPF_JEQ, R0, 0, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4833  			BPF_ALU32_IMM(BPF_MOV, R0, 0),
b64b50eac47046f Naveen N. Rao      2016-04-05  4834  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4835  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
b64b50eac47046f Naveen N. Rao      2016-04-05  4836  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4837  		},
b64b50eac47046f Naveen N. Rao      2016-04-05  4838  		INTERNAL,
b64b50eac47046f Naveen N. Rao      2016-04-05  4839  		{ },
b64b50eac47046f Naveen N. Rao      2016-04-05  4840  		{ { 0, 1 } },
b64b50eac47046f Naveen N. Rao      2016-04-05  4841  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4842  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4843  		"ALU_ADD_K: 0 + (-1) = 0x00000000ffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  4844  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4845  			BPF_LD_IMM64(R2, 0x0),
cffc642d93f9324 Michael Holzheu    2015-05-11  4846  			BPF_LD_IMM64(R3, 0x00000000ffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  4847  			BPF_ALU32_IMM(BPF_ADD, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  4848  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4849  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4850  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4851  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4852  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4853  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4854  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4855  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4856  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4857  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4858  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4859  		"ALU_ADD_K: 0 + 0xffff = 0xffff",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4860  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4861  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4862  			BPF_LD_IMM64(R3, 0xffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4863  			BPF_ALU32_IMM(BPF_ADD, R2, 0xffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4864  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4865  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4866  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4867  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4868  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4869  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4870  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4871  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4872  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4873  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4874  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4875  		"ALU_ADD_K: 0 + 0x7fffffff = 0x7fffffff",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4876  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4877  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4878  			BPF_LD_IMM64(R3, 0x7fffffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4879  			BPF_ALU32_IMM(BPF_ADD, R2, 0x7fffffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4880  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4881  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4882  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4883  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4884  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4885  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4886  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4887  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4888  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4889  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4890  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4891  		"ALU_ADD_K: 0 + 0x80000000 = 0x80000000",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4892  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4893  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4894  			BPF_LD_IMM64(R3, 0x80000000),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4895  			BPF_ALU32_IMM(BPF_ADD, R2, 0x80000000),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4896  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4897  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4898  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4899  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4900  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4901  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4902  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4903  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4904  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4905  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4906  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4907  		"ALU_ADD_K: 0 + 0x80008000 = 0x80008000",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4908  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4909  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4910  			BPF_LD_IMM64(R3, 0x80008000),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4911  			BPF_ALU32_IMM(BPF_ADD, R2, 0x80008000),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4912  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4913  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4914  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4915  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4916  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4917  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4918  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4919  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4920  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  4921  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4922  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4923  		"ALU64_ADD_K: 1 + 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  4924  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4925  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4926  			BPF_ALU64_IMM(BPF_ADD, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4927  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4928  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4929  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4930  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4931  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4932  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4933  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4934  		"ALU64_ADD_K: 3 + 0 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  4935  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4936  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  4937  			BPF_ALU64_IMM(BPF_ADD, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  4938  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4939  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4940  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4941  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4942  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4943  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4944  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4945  		"ALU64_ADD_K: 1 + 2147483646 = 2147483647",
cffc642d93f9324 Michael Holzheu    2015-05-11  4946  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4947  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4948  			BPF_ALU64_IMM(BPF_ADD, R0, 2147483646),
cffc642d93f9324 Michael Holzheu    2015-05-11  4949  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4950  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4951  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4952  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4953  		{ { 0, 2147483647 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4954  	},
b64b50eac47046f Naveen N. Rao      2016-04-05  4955  	{
b64b50eac47046f Naveen N. Rao      2016-04-05  4956  		"ALU64_ADD_K: 4294967294 + 2 = 4294967296",
b64b50eac47046f Naveen N. Rao      2016-04-05  4957  		.u.insns_int = {
b64b50eac47046f Naveen N. Rao      2016-04-05  4958  			BPF_LD_IMM64(R0, 4294967294U),
b64b50eac47046f Naveen N. Rao      2016-04-05  4959  			BPF_LD_IMM64(R1, 4294967296ULL),
b64b50eac47046f Naveen N. Rao      2016-04-05  4960  			BPF_ALU64_IMM(BPF_ADD, R0, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4961  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
b64b50eac47046f Naveen N. Rao      2016-04-05  4962  			BPF_ALU32_IMM(BPF_MOV, R0, 0),
b64b50eac47046f Naveen N. Rao      2016-04-05  4963  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4964  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
b64b50eac47046f Naveen N. Rao      2016-04-05  4965  			BPF_EXIT_INSN(),
b64b50eac47046f Naveen N. Rao      2016-04-05  4966  		},
b64b50eac47046f Naveen N. Rao      2016-04-05  4967  		INTERNAL,
b64b50eac47046f Naveen N. Rao      2016-04-05  4968  		{ },
b64b50eac47046f Naveen N. Rao      2016-04-05  4969  		{ { 0, 1 } },
b64b50eac47046f Naveen N. Rao      2016-04-05  4970  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4971  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4972  		"ALU64_ADD_K: 2147483646 + -2147483647 = -1",
cffc642d93f9324 Michael Holzheu    2015-05-11  4973  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4974  			BPF_LD_IMM64(R0, 2147483646),
cffc642d93f9324 Michael Holzheu    2015-05-11  4975  			BPF_ALU64_IMM(BPF_ADD, R0, -2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  4976  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4977  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4978  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4979  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4980  		{ { 0, -1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4981  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4982  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4983  		"ALU64_ADD_K: 1 + 0 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  4984  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  4985  			BPF_LD_IMM64(R2, 0x1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4986  			BPF_LD_IMM64(R3, 0x1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4987  			BPF_ALU64_IMM(BPF_ADD, R2, 0x0),
cffc642d93f9324 Michael Holzheu    2015-05-11  4988  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4989  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  4990  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4991  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  4992  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  4993  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  4994  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  4995  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  4996  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  4997  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  4998  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  4999  		"ALU64_ADD_K: 0 + (-1) = 0xffffffffffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5000  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5001  			BPF_LD_IMM64(R2, 0x0),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5002  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5003  			BPF_ALU64_IMM(BPF_ADD, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5004  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5005  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5006  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5007  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5008  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5009  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5010  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5011  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5012  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5013  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5014  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5015  		"ALU64_ADD_K: 0 + 0xffff = 0xffff",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5016  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5017  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5018  			BPF_LD_IMM64(R3, 0xffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5019  			BPF_ALU64_IMM(BPF_ADD, R2, 0xffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5020  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5021  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5022  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5023  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5024  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5025  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5026  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5027  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5028  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5029  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5030  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5031  		"ALU64_ADD_K: 0 + 0x7fffffff = 0x7fffffff",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5032  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5033  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5034  			BPF_LD_IMM64(R3, 0x7fffffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5035  			BPF_ALU64_IMM(BPF_ADD, R2, 0x7fffffff),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5036  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5037  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5038  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5039  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5040  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5041  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5042  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5043  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5044  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5045  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5046  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5047  		"ALU64_ADD_K: 0 + 0x80000000 = 0xffffffff80000000",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5048  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5049  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5050  			BPF_LD_IMM64(R3, 0xffffffff80000000LL),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5051  			BPF_ALU64_IMM(BPF_ADD, R2, 0x80000000),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5052  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5053  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5054  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5055  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5056  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5057  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5058  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5059  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5060  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5061  	},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5062  	{
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5063  		"ALU_ADD_K: 0 + 0x80008000 = 0xffffffff80008000",
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5064  		.u.insns_int = {
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5065  			BPF_LD_IMM64(R2, 0x0),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5066  			BPF_LD_IMM64(R3, 0xffffffff80008000LL),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5067  			BPF_ALU64_IMM(BPF_ADD, R2, 0x80008000),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5068  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5069  			BPF_MOV32_IMM(R0, 2),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5070  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5071  			BPF_MOV32_IMM(R0, 1),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5072  			BPF_EXIT_INSN(),
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5073  		},
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5074  		INTERNAL,
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5075  		{ },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5076  		{ { 0, 0x1 } },
9c94f6c8e0d3d4b Naveen N. Rao      2016-04-05  5077  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5078  	/* BPF_ALU | BPF_SUB | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  5079  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5080  		"ALU_SUB_X: 3 - 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5081  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5082  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5083  			BPF_ALU32_IMM(BPF_MOV, R1, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5084  			BPF_ALU32_REG(BPF_SUB, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5085  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5086  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5087  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5088  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5089  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5090  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5091  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5092  		"ALU_SUB_X: 4294967295 - 4294967294 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5093  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5094  			BPF_LD_IMM64(R0, 4294967295U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5095  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5096  			BPF_ALU32_REG(BPF_SUB, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5097  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5098  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5099  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5100  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5101  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5102  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5103  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5104  		"ALU64_SUB_X: 3 - 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5105  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5106  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5107  			BPF_ALU32_IMM(BPF_MOV, R1, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5108  			BPF_ALU64_REG(BPF_SUB, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5109  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5110  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5111  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5112  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5113  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5114  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5115  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5116  		"ALU64_SUB_X: 4294967295 - 4294967294 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5117  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5118  			BPF_LD_IMM64(R0, 4294967295U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5119  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967294U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5120  			BPF_ALU64_REG(BPF_SUB, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5121  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5122  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5123  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5124  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5125  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5126  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5127  	/* BPF_ALU | BPF_SUB | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  5128  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5129  		"ALU_SUB_K: 3 - 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5130  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5131  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5132  			BPF_ALU32_IMM(BPF_SUB, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5133  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5134  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5135  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5136  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5137  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5138  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5139  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5140  		"ALU_SUB_K: 3 - 0 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5141  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5142  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5143  			BPF_ALU32_IMM(BPF_SUB, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  5144  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5145  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5146  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5147  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5148  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5149  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5150  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5151  		"ALU_SUB_K: 4294967295 - 4294967294 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5152  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5153  			BPF_LD_IMM64(R0, 4294967295U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5154  			BPF_ALU32_IMM(BPF_SUB, R0, 4294967294U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5155  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5156  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5157  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5158  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5159  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5160  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5161  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5162  		"ALU64_SUB_K: 3 - 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5163  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5164  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5165  			BPF_ALU64_IMM(BPF_SUB, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5166  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5167  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5168  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5169  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5170  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5171  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5172  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5173  		"ALU64_SUB_K: 3 - 0 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5174  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5175  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5176  			BPF_ALU64_IMM(BPF_SUB, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  5177  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5178  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5179  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5180  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5181  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5182  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5183  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5184  		"ALU64_SUB_K: 4294967294 - 4294967295 = -1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5185  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5186  			BPF_LD_IMM64(R0, 4294967294U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5187  			BPF_ALU64_IMM(BPF_SUB, R0, 4294967295U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5188  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5189  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5190  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5191  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5192  		{ { 0, -1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5193  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5194  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5195  		"ALU64_ADD_K: 2147483646 - 2147483647 = -1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5196  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5197  			BPF_LD_IMM64(R0, 2147483646),
cffc642d93f9324 Michael Holzheu    2015-05-11  5198  			BPF_ALU64_IMM(BPF_SUB, R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5199  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5200  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5201  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5202  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5203  		{ { 0, -1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5204  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5205  	/* BPF_ALU | BPF_MUL | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  5206  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5207  		"ALU_MUL_X: 2 * 3 = 6",
cffc642d93f9324 Michael Holzheu    2015-05-11  5208  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5209  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5210  			BPF_ALU32_IMM(BPF_MOV, R1, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5211  			BPF_ALU32_REG(BPF_MUL, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5212  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5213  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5214  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5215  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5216  		{ { 0, 6 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5217  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5218  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5219  		"ALU_MUL_X: 2 * 0x7FFFFFF8 = 0xFFFFFFF0",
cffc642d93f9324 Michael Holzheu    2015-05-11  5220  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5221  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5222  			BPF_ALU32_IMM(BPF_MOV, R1, 0x7FFFFFF8),
cffc642d93f9324 Michael Holzheu    2015-05-11  5223  			BPF_ALU32_REG(BPF_MUL, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5224  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5225  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5226  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5227  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5228  		{ { 0, 0xFFFFFFF0 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5229  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5230  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5231  		"ALU_MUL_X: -1 * -1 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5232  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5233  			BPF_LD_IMM64(R0, -1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5234  			BPF_ALU32_IMM(BPF_MOV, R1, -1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5235  			BPF_ALU32_REG(BPF_MUL, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5236  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5237  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5238  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5239  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5240  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5241  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5242  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5243  		"ALU64_MUL_X: 2 * 3 = 6",
cffc642d93f9324 Michael Holzheu    2015-05-11  5244  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5245  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5246  			BPF_ALU32_IMM(BPF_MOV, R1, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5247  			BPF_ALU64_REG(BPF_MUL, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5248  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5249  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5250  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5251  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5252  		{ { 0, 6 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5253  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5254  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5255  		"ALU64_MUL_X: 1 * 2147483647 = 2147483647",
cffc642d93f9324 Michael Holzheu    2015-05-11  5256  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5257  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5258  			BPF_ALU32_IMM(BPF_MOV, R1, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5259  			BPF_ALU64_REG(BPF_MUL, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5260  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5261  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5262  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5263  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5264  		{ { 0, 2147483647 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5265  	},
faa576253d5fe75 Johan Almbladh     2021-08-09  5266  	{
faa576253d5fe75 Johan Almbladh     2021-08-09  5267  		"ALU64_MUL_X: 64x64 multiply, low word",
faa576253d5fe75 Johan Almbladh     2021-08-09  5268  		.u.insns_int = {
faa576253d5fe75 Johan Almbladh     2021-08-09  5269  			BPF_LD_IMM64(R0, 0x0fedcba987654321LL),
faa576253d5fe75 Johan Almbladh     2021-08-09  5270  			BPF_LD_IMM64(R1, 0x123456789abcdef0LL),
faa576253d5fe75 Johan Almbladh     2021-08-09  5271  			BPF_ALU64_REG(BPF_MUL, R0, R1),
faa576253d5fe75 Johan Almbladh     2021-08-09  5272  			BPF_EXIT_INSN(),
faa576253d5fe75 Johan Almbladh     2021-08-09  5273  		},
faa576253d5fe75 Johan Almbladh     2021-08-09  5274  		INTERNAL,
faa576253d5fe75 Johan Almbladh     2021-08-09  5275  		{ },
faa576253d5fe75 Johan Almbladh     2021-08-09  5276  		{ { 0, 0xe5618cf0 } }
faa576253d5fe75 Johan Almbladh     2021-08-09  5277  	},
faa576253d5fe75 Johan Almbladh     2021-08-09  5278  	{
faa576253d5fe75 Johan Almbladh     2021-08-09  5279  		"ALU64_MUL_X: 64x64 multiply, high word",
faa576253d5fe75 Johan Almbladh     2021-08-09  5280  		.u.insns_int = {
faa576253d5fe75 Johan Almbladh     2021-08-09  5281  			BPF_LD_IMM64(R0, 0x0fedcba987654321LL),
faa576253d5fe75 Johan Almbladh     2021-08-09  5282  			BPF_LD_IMM64(R1, 0x123456789abcdef0LL),
faa576253d5fe75 Johan Almbladh     2021-08-09  5283  			BPF_ALU64_REG(BPF_MUL, R0, R1),
faa576253d5fe75 Johan Almbladh     2021-08-09  5284  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
faa576253d5fe75 Johan Almbladh     2021-08-09  5285  			BPF_EXIT_INSN(),
faa576253d5fe75 Johan Almbladh     2021-08-09  5286  		},
faa576253d5fe75 Johan Almbladh     2021-08-09  5287  		INTERNAL,
faa576253d5fe75 Johan Almbladh     2021-08-09  5288  		{ },
faa576253d5fe75 Johan Almbladh     2021-08-09  5289  		{ { 0, 0x2236d88f } }
faa576253d5fe75 Johan Almbladh     2021-08-09  5290  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5291  	/* BPF_ALU | BPF_MUL | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  5292  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5293  		"ALU_MUL_K: 2 * 3 = 6",
cffc642d93f9324 Michael Holzheu    2015-05-11  5294  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5295  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5296  			BPF_ALU32_IMM(BPF_MUL, R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5297  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5298  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5299  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5300  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5301  		{ { 0, 6 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5302  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5303  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5304  		"ALU_MUL_K: 3 * 1 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5305  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5306  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5307  			BPF_ALU32_IMM(BPF_MUL, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5308  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5309  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5310  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5311  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5312  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5313  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5314  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5315  		"ALU_MUL_K: 2 * 0x7FFFFFF8 = 0xFFFFFFF0",
cffc642d93f9324 Michael Holzheu    2015-05-11  5316  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5317  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5318  			BPF_ALU32_IMM(BPF_MUL, R0, 0x7FFFFFF8),
cffc642d93f9324 Michael Holzheu    2015-05-11  5319  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5320  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5321  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5322  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5323  		{ { 0, 0xFFFFFFF0 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5324  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5325  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5326  		"ALU_MUL_K: 1 * (-1) = 0x00000000ffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5327  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5328  			BPF_LD_IMM64(R2, 0x1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5329  			BPF_LD_IMM64(R3, 0x00000000ffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5330  			BPF_ALU32_IMM(BPF_MUL, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5331  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5332  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5333  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5334  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5335  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5336  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5337  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5338  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5339  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5340  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5341  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5342  		"ALU64_MUL_K: 2 * 3 = 6",
cffc642d93f9324 Michael Holzheu    2015-05-11  5343  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5344  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5345  			BPF_ALU64_IMM(BPF_MUL, R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5346  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5347  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5348  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5349  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5350  		{ { 0, 6 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5351  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5352  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5353  		"ALU64_MUL_K: 3 * 1 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5354  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5355  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5356  			BPF_ALU64_IMM(BPF_MUL, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5357  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5358  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5359  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5360  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5361  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5362  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5363  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5364  		"ALU64_MUL_K: 1 * 2147483647 = 2147483647",
cffc642d93f9324 Michael Holzheu    2015-05-11  5365  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5366  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5367  			BPF_ALU64_IMM(BPF_MUL, R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5368  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5369  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5370  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5371  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5372  		{ { 0, 2147483647 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5373  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5374  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5375  		"ALU64_MUL_K: 1 * -2147483647 = -2147483647",
cffc642d93f9324 Michael Holzheu    2015-05-11  5376  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5377  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5378  			BPF_ALU64_IMM(BPF_MUL, R0, -2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5379  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5380  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5381  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5382  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5383  		{ { 0, -2147483647 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5384  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5385  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5386  		"ALU64_MUL_K: 1 * (-1) = 0xffffffffffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5387  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5388  			BPF_LD_IMM64(R2, 0x1),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5389  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5390  			BPF_ALU64_IMM(BPF_MUL, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5391  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5392  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5393  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5394  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5395  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5396  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5397  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5398  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5399  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5400  	},
faa576253d5fe75 Johan Almbladh     2021-08-09  5401  	{
faa576253d5fe75 Johan Almbladh     2021-08-09  5402  		"ALU64_MUL_K: 64x32 multiply, low word",
faa576253d5fe75 Johan Almbladh     2021-08-09  5403  		.u.insns_int = {
faa576253d5fe75 Johan Almbladh     2021-08-09  5404  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
faa576253d5fe75 Johan Almbladh     2021-08-09  5405  			BPF_ALU64_IMM(BPF_MUL, R0, 0x12345678),
faa576253d5fe75 Johan Almbladh     2021-08-09  5406  			BPF_EXIT_INSN(),
faa576253d5fe75 Johan Almbladh     2021-08-09  5407  		},
faa576253d5fe75 Johan Almbladh     2021-08-09  5408  		INTERNAL,
faa576253d5fe75 Johan Almbladh     2021-08-09  5409  		{ },
faa576253d5fe75 Johan Almbladh     2021-08-09  5410  		{ { 0, 0xe242d208 } }
faa576253d5fe75 Johan Almbladh     2021-08-09  5411  	},
faa576253d5fe75 Johan Almbladh     2021-08-09  5412  	{
faa576253d5fe75 Johan Almbladh     2021-08-09  5413  		"ALU64_MUL_K: 64x32 multiply, high word",
faa576253d5fe75 Johan Almbladh     2021-08-09  5414  		.u.insns_int = {
faa576253d5fe75 Johan Almbladh     2021-08-09  5415  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
faa576253d5fe75 Johan Almbladh     2021-08-09  5416  			BPF_ALU64_IMM(BPF_MUL, R0, 0x12345678),
faa576253d5fe75 Johan Almbladh     2021-08-09  5417  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
faa576253d5fe75 Johan Almbladh     2021-08-09  5418  			BPF_EXIT_INSN(),
faa576253d5fe75 Johan Almbladh     2021-08-09  5419  		},
faa576253d5fe75 Johan Almbladh     2021-08-09  5420  		INTERNAL,
faa576253d5fe75 Johan Almbladh     2021-08-09  5421  		{ },
faa576253d5fe75 Johan Almbladh     2021-08-09  5422  		{ { 0, 0xc28f5c28 } }
faa576253d5fe75 Johan Almbladh     2021-08-09  5423  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5424  	/* BPF_ALU | BPF_DIV | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  5425  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5426  		"ALU_DIV_X: 6 / 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5427  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5428  			BPF_LD_IMM64(R0, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  5429  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5430  			BPF_ALU32_REG(BPF_DIV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5431  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5432  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5433  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5434  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5435  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5436  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5437  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5438  		"ALU_DIV_X: 4294967295 / 4294967295 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5439  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5440  			BPF_LD_IMM64(R0, 4294967295U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5441  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967295U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5442  			BPF_ALU32_REG(BPF_DIV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5443  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5444  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5445  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5446  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5447  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5448  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5449  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5450  		"ALU64_DIV_X: 6 / 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5451  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5452  			BPF_LD_IMM64(R0, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  5453  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5454  			BPF_ALU64_REG(BPF_DIV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5455  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5456  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5457  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5458  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5459  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5460  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5461  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5462  		"ALU64_DIV_X: 2147483647 / 2147483647 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5463  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5464  			BPF_LD_IMM64(R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5465  			BPF_ALU32_IMM(BPF_MOV, R1, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5466  			BPF_ALU64_REG(BPF_DIV, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5467  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5468  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5469  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5470  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5471  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5472  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5473  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5474  		"ALU64_DIV_X: 0xffffffffffffffff / (-1) = 0x0000000000000001",
cffc642d93f9324 Michael Holzheu    2015-05-11  5475  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5476  			BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5477  			BPF_LD_IMM64(R4, 0xffffffffffffffffLL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5478  			BPF_LD_IMM64(R3, 0x0000000000000001LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5479  			BPF_ALU64_REG(BPF_DIV, R2, R4),
cffc642d93f9324 Michael Holzheu    2015-05-11  5480  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5481  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5482  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5483  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5484  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5485  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5486  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5487  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5488  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5489  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5490  	/* BPF_ALU | BPF_DIV | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  5491  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5492  		"ALU_DIV_K: 6 / 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5493  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5494  			BPF_LD_IMM64(R0, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  5495  			BPF_ALU32_IMM(BPF_DIV, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5496  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5497  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5498  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5499  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5500  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5501  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5502  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5503  		"ALU_DIV_K: 3 / 1 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5504  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5505  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5506  			BPF_ALU32_IMM(BPF_DIV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5507  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5508  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5509  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5510  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5511  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5512  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5513  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5514  		"ALU_DIV_K: 4294967295 / 4294967295 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5515  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5516  			BPF_LD_IMM64(R0, 4294967295U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5517  			BPF_ALU32_IMM(BPF_DIV, R0, 4294967295U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5518  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5519  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5520  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5521  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5522  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5523  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5524  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5525  		"ALU_DIV_K: 0xffffffffffffffff / (-1) = 0x1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5526  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5527  			BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5528  			BPF_LD_IMM64(R3, 0x1UL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5529  			BPF_ALU32_IMM(BPF_DIV, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5530  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5531  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5532  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5533  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5534  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5535  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5536  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5537  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5538  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5539  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5540  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5541  		"ALU64_DIV_K: 6 / 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5542  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5543  			BPF_LD_IMM64(R0, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  5544  			BPF_ALU64_IMM(BPF_DIV, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5545  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5546  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5547  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5548  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5549  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5550  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5551  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5552  		"ALU64_DIV_K: 3 / 1 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5553  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5554  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5555  			BPF_ALU64_IMM(BPF_DIV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5556  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5557  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5558  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5559  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5560  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5561  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5562  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5563  		"ALU64_DIV_K: 2147483647 / 2147483647 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5564  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5565  			BPF_LD_IMM64(R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5566  			BPF_ALU64_IMM(BPF_DIV, R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5567  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5568  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5569  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5570  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5571  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5572  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5573  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5574  		"ALU64_DIV_K: 0xffffffffffffffff / (-1) = 0x0000000000000001",
cffc642d93f9324 Michael Holzheu    2015-05-11  5575  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5576  			BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5577  			BPF_LD_IMM64(R3, 0x0000000000000001LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5578  			BPF_ALU64_IMM(BPF_DIV, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5579  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5580  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5581  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5582  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5583  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5584  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5585  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5586  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5587  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5588  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5589  	/* BPF_ALU | BPF_MOD | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  5590  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5591  		"ALU_MOD_X: 3 % 2 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5592  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5593  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5594  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5595  			BPF_ALU32_REG(BPF_MOD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5596  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5597  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5598  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5599  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5600  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5601  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5602  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5603  		"ALU_MOD_X: 4294967295 % 4294967293 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5604  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5605  			BPF_LD_IMM64(R0, 4294967295U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5606  			BPF_ALU32_IMM(BPF_MOV, R1, 4294967293U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5607  			BPF_ALU32_REG(BPF_MOD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5608  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5609  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5610  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5611  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5612  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5613  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5614  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5615  		"ALU64_MOD_X: 3 % 2 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5616  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5617  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5618  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5619  			BPF_ALU64_REG(BPF_MOD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5620  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5621  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5622  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5623  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5624  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5625  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5626  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5627  		"ALU64_MOD_X: 2147483647 % 2147483645 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5628  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5629  			BPF_LD_IMM64(R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5630  			BPF_ALU32_IMM(BPF_MOV, R1, 2147483645),
cffc642d93f9324 Michael Holzheu    2015-05-11  5631  			BPF_ALU64_REG(BPF_MOD, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5632  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5633  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5634  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5635  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5636  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5637  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5638  	/* BPF_ALU | BPF_MOD | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  5639  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5640  		"ALU_MOD_K: 3 % 2 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5641  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5642  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5643  			BPF_ALU32_IMM(BPF_MOD, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5644  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5645  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5646  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5647  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5648  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5649  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5650  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5651  		"ALU_MOD_K: 3 % 1 = 0",
cffc642d93f9324 Michael Holzheu    2015-05-11  5652  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5653  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5654  			BPF_ALU32_IMM(BPF_MOD, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5655  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5656  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5657  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5658  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5659  		{ { 0, 0 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5660  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5661  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5662  		"ALU_MOD_K: 4294967295 % 4294967293 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5663  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5664  			BPF_LD_IMM64(R0, 4294967295U),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5665  			BPF_ALU32_IMM(BPF_MOD, R0, 4294967293U),
cffc642d93f9324 Michael Holzheu    2015-05-11  5666  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5667  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5668  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5669  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5670  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5671  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5672  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5673  		"ALU64_MOD_K: 3 % 2 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  5674  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5675  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5676  			BPF_ALU64_IMM(BPF_MOD, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5677  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5678  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5679  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5680  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5681  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5682  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5683  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5684  		"ALU64_MOD_K: 3 % 1 = 0",
cffc642d93f9324 Michael Holzheu    2015-05-11  5685  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5686  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5687  			BPF_ALU64_IMM(BPF_MOD, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5688  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5689  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5690  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5691  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5692  		{ { 0, 0 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5693  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5694  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5695  		"ALU64_MOD_K: 2147483647 % 2147483645 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5696  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5697  			BPF_LD_IMM64(R0, 2147483647),
cffc642d93f9324 Michael Holzheu    2015-05-11  5698  			BPF_ALU64_IMM(BPF_MOD, R0, 2147483645),
cffc642d93f9324 Michael Holzheu    2015-05-11  5699  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5700  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5701  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5702  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5703  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5704  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5705  	/* BPF_ALU | BPF_AND | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  5706  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5707  		"ALU_AND_X: 3 & 2 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5708  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5709  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5710  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5711  			BPF_ALU32_REG(BPF_AND, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5712  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5713  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5714  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5715  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5716  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5717  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5718  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5719  		"ALU_AND_X: 0xffffffff & 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5720  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5721  			BPF_LD_IMM64(R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5722  			BPF_ALU32_IMM(BPF_MOV, R1, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5723  			BPF_ALU32_REG(BPF_AND, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5724  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5725  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5726  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5727  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5728  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5729  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5730  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5731  		"ALU64_AND_X: 3 & 2 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5732  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5733  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5734  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5735  			BPF_ALU64_REG(BPF_AND, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5736  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5737  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5738  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5739  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5740  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5741  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5742  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5743  		"ALU64_AND_X: 0xffffffff & 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5744  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5745  			BPF_LD_IMM64(R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5746  			BPF_ALU32_IMM(BPF_MOV, R1, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5747  			BPF_ALU64_REG(BPF_AND, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5748  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5749  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5750  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5751  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5752  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5753  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5754  	/* BPF_ALU | BPF_AND | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  5755  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5756  		"ALU_AND_K: 3 & 2 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5757  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5758  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5759  			BPF_ALU32_IMM(BPF_AND, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5760  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5761  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5762  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5763  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5764  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5765  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5766  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5767  		"ALU_AND_K: 0xffffffff & 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5768  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5769  			BPF_LD_IMM64(R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5770  			BPF_ALU32_IMM(BPF_AND, R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5771  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5772  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5773  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5774  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5775  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5776  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5777  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5778  		"ALU_AND_K: Small immediate",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5779  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5780  			BPF_ALU32_IMM(BPF_MOV, R0, 0x01020304),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5781  			BPF_ALU32_IMM(BPF_AND, R0, 15),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5782  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5783  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5784  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5785  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5786  		{ { 0, 4 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5787  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5788  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5789  		"ALU_AND_K: Large immediate",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5790  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5791  			BPF_ALU32_IMM(BPF_MOV, R0, 0xf1f2f3f4),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5792  			BPF_ALU32_IMM(BPF_AND, R0, 0xafbfcfdf),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5793  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5794  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5795  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5796  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5797  		{ { 0, 0xa1b2c3d4 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5798  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5799  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5800  		"ALU_AND_K: Zero extension",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5801  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5802  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5803  			BPF_LD_IMM64(R1, 0x0000000080a0c0e0LL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5804  			BPF_ALU32_IMM(BPF_AND, R0, 0xf0f0f0f0),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5805  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5806  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5807  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5808  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5809  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5810  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5811  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5812  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5813  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5814  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5815  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5816  		"ALU64_AND_K: 3 & 2 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  5817  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5818  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  5819  			BPF_ALU64_IMM(BPF_AND, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5820  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5821  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5822  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5823  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5824  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5825  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5826  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5827  		"ALU64_AND_K: 0xffffffff & 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5828  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5829  			BPF_LD_IMM64(R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5830  			BPF_ALU64_IMM(BPF_AND, R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5831  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5832  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5833  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5834  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5835  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5836  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5837  	{
e92c813bf119324 Johan Almbladh     2021-08-09  5838  		"ALU64_AND_K: 0x0000ffffffff0000 & 0x0 = 0x0000000000000000",
cffc642d93f9324 Michael Holzheu    2015-05-11  5839  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5840  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5841  			BPF_LD_IMM64(R3, 0x0000000000000000LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5842  			BPF_ALU64_IMM(BPF_AND, R2, 0x0),
cffc642d93f9324 Michael Holzheu    2015-05-11  5843  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5844  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5845  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5846  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5847  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5848  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5849  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5850  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5851  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5852  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5853  	{
e92c813bf119324 Johan Almbladh     2021-08-09  5854  		"ALU64_AND_K: 0x0000ffffffff0000 & -1 = 0x0000ffffffff0000",
cffc642d93f9324 Michael Holzheu    2015-05-11  5855  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5856  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5857  			BPF_LD_IMM64(R3, 0x0000ffffffff0000LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5858  			BPF_ALU64_IMM(BPF_AND, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5859  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5860  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5861  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5862  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5863  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5864  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5865  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5866  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5867  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5868  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5869  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5870  		"ALU64_AND_K: 0xffffffffffffffff & -1 = 0xffffffffffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5871  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  5872  			BPF_LD_IMM64(R2, 0xffffffffffffffffLL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  5873  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  5874  			BPF_ALU64_IMM(BPF_AND, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5875  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5876  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5877  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5878  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5879  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5880  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5881  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5882  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5883  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5884  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5885  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5886  		"ALU64_AND_K: Sign extension 1",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5887  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5888  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5889  			BPF_LD_IMM64(R1, 0x00000000090b0d0fLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5890  			BPF_ALU64_IMM(BPF_AND, R0, 0x0f0f0f0f),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5891  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5892  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5893  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5894  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5895  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5896  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5897  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5898  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5899  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5900  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5901  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5902  		"ALU64_AND_K: Sign extension 2",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5903  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5904  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5905  			BPF_LD_IMM64(R1, 0x0123456780a0c0e0LL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5906  			BPF_ALU64_IMM(BPF_AND, R0, 0xf0f0f0f0),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5907  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5908  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5909  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5910  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5911  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5912  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5913  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5914  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5915  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5916  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5917  	/* BPF_ALU | BPF_OR | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  5918  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5919  		"ALU_OR_X: 1 | 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5920  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5921  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5922  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5923  			BPF_ALU32_REG(BPF_OR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5924  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5925  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5926  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5927  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5928  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5929  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5930  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5931  		"ALU_OR_X: 0x0 | 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5932  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5933  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  5934  			BPF_ALU32_IMM(BPF_MOV, R1, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5935  			BPF_ALU32_REG(BPF_OR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5936  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5937  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5938  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5939  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5940  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5941  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5942  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5943  		"ALU64_OR_X: 1 | 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5944  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5945  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5946  			BPF_ALU32_IMM(BPF_MOV, R1, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5947  			BPF_ALU64_REG(BPF_OR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5948  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5949  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5950  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5951  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5952  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5953  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5954  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5955  		"ALU64_OR_X: 0 | 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5956  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5957  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  5958  			BPF_ALU32_IMM(BPF_MOV, R1, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5959  			BPF_ALU64_REG(BPF_OR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5960  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5961  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5962  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5963  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5964  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5965  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5966  	/* BPF_ALU | BPF_OR | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  5967  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5968  		"ALU_OR_K: 1 | 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  5969  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5970  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  5971  			BPF_ALU32_IMM(BPF_OR, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  5972  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5973  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5974  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5975  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5976  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5977  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  5978  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  5979  		"ALU_OR_K: 0 & 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  5980  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  5981  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  5982  			BPF_ALU32_IMM(BPF_OR, R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  5983  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  5984  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  5985  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  5986  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  5987  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  5988  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5989  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5990  		"ALU_OR_K: Small immediate",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5991  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5992  			BPF_ALU32_IMM(BPF_MOV, R0, 0x01020304),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5993  			BPF_ALU32_IMM(BPF_OR, R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5994  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5995  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5996  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5997  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5998  		{ { 0, 0x01020305 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  5999  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6000  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6001  		"ALU_OR_K: Large immediate",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6002  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6003  			BPF_ALU32_IMM(BPF_MOV, R0, 0x01020304),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6004  			BPF_ALU32_IMM(BPF_OR, R0, 0xa0b0c0d0),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6005  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6006  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6007  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6008  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6009  		{ { 0, 0xa1b2c3d4 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6010  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6011  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6012  		"ALU_OR_K: Zero extension",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6013  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6014  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6015  			BPF_LD_IMM64(R1, 0x00000000f9fbfdffLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6016  			BPF_ALU32_IMM(BPF_OR, R0, 0xf0f0f0f0),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6017  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6018  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6019  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6020  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6021  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6022  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6023  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6024  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6025  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6026  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6027  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6028  		"ALU64_OR_K: 1 | 2 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  6029  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6030  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6031  			BPF_ALU64_IMM(BPF_OR, R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6032  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6033  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6034  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6035  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6036  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6037  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6038  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6039  		"ALU64_OR_K: 0 & 0xffffffff = 0xffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  6040  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6041  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  6042  			BPF_ALU64_IMM(BPF_OR, R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6043  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6044  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6045  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6046  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6047  		{ { 0, 0xffffffff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6048  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6049  	{
e92c813bf119324 Johan Almbladh     2021-08-09  6050  		"ALU64_OR_K: 0x0000ffffffff0000 | 0x0 = 0x0000ffffffff0000",
cffc642d93f9324 Michael Holzheu    2015-05-11  6051  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  6052  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  6053  			BPF_LD_IMM64(R3, 0x0000ffffffff0000LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  6054  			BPF_ALU64_IMM(BPF_OR, R2, 0x0),
cffc642d93f9324 Michael Holzheu    2015-05-11  6055  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6056  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6057  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6058  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6059  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6060  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6061  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6062  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6063  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6064  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6065  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6066  		"ALU64_OR_K: 0x0000ffffffff0000 | -1 = 0xffffffffffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  6067  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  6068  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  6069  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  6070  			BPF_ALU64_IMM(BPF_OR, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6071  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6072  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6073  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6074  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6075  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6076  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6077  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6078  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6079  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6080  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6081  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6082  		"ALU64_OR_K: 0x000000000000000 | -1 = 0xffffffffffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  6083  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  6084  			BPF_LD_IMM64(R2, 0x0000000000000000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  6085  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  6086  			BPF_ALU64_IMM(BPF_OR, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6087  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6088  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6089  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6090  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6091  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6092  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6093  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6094  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6095  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6096  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6097  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6098  		"ALU64_OR_K: Sign extension 1",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6099  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6100  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6101  			BPF_LD_IMM64(R1, 0x012345678fafcfefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6102  			BPF_ALU64_IMM(BPF_OR, R0, 0x0f0f0f0f),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6103  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6104  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6105  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6106  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6107  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6108  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6109  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6110  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6111  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6112  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6113  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6114  		"ALU64_OR_K: Sign extension 2",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6115  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6116  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6117  			BPF_LD_IMM64(R1, 0xfffffffff9fbfdffLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6118  			BPF_ALU64_IMM(BPF_OR, R0, 0xf0f0f0f0),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6119  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6120  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6121  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6122  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6123  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6124  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6125  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6126  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6127  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6128  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6129  	/* BPF_ALU | BPF_XOR | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  6130  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6131  		"ALU_XOR_X: 5 ^ 6 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  6132  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6133  			BPF_LD_IMM64(R0, 5),
cffc642d93f9324 Michael Holzheu    2015-05-11  6134  			BPF_ALU32_IMM(BPF_MOV, R1, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  6135  			BPF_ALU32_REG(BPF_XOR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6136  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6137  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6138  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6139  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6140  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6141  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6142  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6143  		"ALU_XOR_X: 0x1 ^ 0xffffffff = 0xfffffffe",
cffc642d93f9324 Michael Holzheu    2015-05-11  6144  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6145  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6146  			BPF_ALU32_IMM(BPF_MOV, R1, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6147  			BPF_ALU32_REG(BPF_XOR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6148  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6149  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6150  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6151  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6152  		{ { 0, 0xfffffffe } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6153  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6154  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6155  		"ALU64_XOR_X: 5 ^ 6 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  6156  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6157  			BPF_LD_IMM64(R0, 5),
cffc642d93f9324 Michael Holzheu    2015-05-11  6158  			BPF_ALU32_IMM(BPF_MOV, R1, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  6159  			BPF_ALU64_REG(BPF_XOR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6160  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6161  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6162  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6163  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6164  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6165  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6166  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6167  		"ALU64_XOR_X: 1 ^ 0xffffffff = 0xfffffffe",
cffc642d93f9324 Michael Holzheu    2015-05-11  6168  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6169  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6170  			BPF_ALU32_IMM(BPF_MOV, R1, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6171  			BPF_ALU64_REG(BPF_XOR, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6172  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6173  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6174  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6175  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6176  		{ { 0, 0xfffffffe } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6177  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6178  	/* BPF_ALU | BPF_XOR | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  6179  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6180  		"ALU_XOR_K: 5 ^ 6 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  6181  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6182  			BPF_LD_IMM64(R0, 5),
cffc642d93f9324 Michael Holzheu    2015-05-11  6183  			BPF_ALU32_IMM(BPF_XOR, R0, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  6184  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6185  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6186  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6187  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6188  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6189  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6190  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6191  		"ALU_XOR_K: 1 ^ 0xffffffff = 0xfffffffe",
cffc642d93f9324 Michael Holzheu    2015-05-11  6192  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6193  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6194  			BPF_ALU32_IMM(BPF_XOR, R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6195  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6196  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6197  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6198  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6199  		{ { 0, 0xfffffffe } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6200  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6201  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6202  		"ALU_XOR_K: Small immediate",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6203  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6204  			BPF_ALU32_IMM(BPF_MOV, R0, 0x01020304),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6205  			BPF_ALU32_IMM(BPF_XOR, R0, 15),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6206  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6207  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6208  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6209  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6210  		{ { 0, 0x0102030b } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6211  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6212  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6213  		"ALU_XOR_K: Large immediate",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6214  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6215  			BPF_ALU32_IMM(BPF_MOV, R0, 0xf1f2f3f4),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6216  			BPF_ALU32_IMM(BPF_XOR, R0, 0xafbfcfdf),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6217  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6218  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6219  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6220  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6221  		{ { 0, 0x5e4d3c2b } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6222  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6223  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6224  		"ALU_XOR_K: Zero extension",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6225  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6226  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6227  			BPF_LD_IMM64(R1, 0x00000000795b3d1fLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6228  			BPF_ALU32_IMM(BPF_XOR, R0, 0xf0f0f0f0),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6229  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6230  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6231  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6232  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6233  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6234  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6235  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6236  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6237  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6238  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6239  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6240  		"ALU64_XOR_K: 5 ^ 6 = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  6241  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6242  			BPF_LD_IMM64(R0, 5),
cffc642d93f9324 Michael Holzheu    2015-05-11  6243  			BPF_ALU64_IMM(BPF_XOR, R0, 6),
cffc642d93f9324 Michael Holzheu    2015-05-11  6244  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6245  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6246  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6247  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6248  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6249  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6250  	{
e92c813bf119324 Johan Almbladh     2021-08-09  6251  		"ALU64_XOR_K: 1 ^ 0xffffffff = 0xfffffffe",
cffc642d93f9324 Michael Holzheu    2015-05-11  6252  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6253  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6254  			BPF_ALU64_IMM(BPF_XOR, R0, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6255  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6256  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6257  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6258  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6259  		{ { 0, 0xfffffffe } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6260  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6261  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6262  		"ALU64_XOR_K: 0x0000ffffffff0000 ^ 0x0 = 0x0000ffffffff0000",
cffc642d93f9324 Michael Holzheu    2015-05-11  6263  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  6264  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  6265  			BPF_LD_IMM64(R3, 0x0000ffffffff0000LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  6266  			BPF_ALU64_IMM(BPF_XOR, R2, 0x0),
cffc642d93f9324 Michael Holzheu    2015-05-11  6267  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6268  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6269  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6270  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6271  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6272  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6273  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6274  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6275  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6276  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6277  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6278  		"ALU64_XOR_K: 0x0000ffffffff0000 ^ -1 = 0xffff00000000ffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  6279  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  6280  			BPF_LD_IMM64(R2, 0x0000ffffffff0000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  6281  			BPF_LD_IMM64(R3, 0xffff00000000ffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  6282  			BPF_ALU64_IMM(BPF_XOR, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6283  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6284  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6285  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6286  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6287  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6288  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6289  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6290  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6291  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6292  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6293  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6294  		"ALU64_XOR_K: 0x000000000000000 ^ -1 = 0xffffffffffffffff",
cffc642d93f9324 Michael Holzheu    2015-05-11  6295  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  6296  			BPF_LD_IMM64(R2, 0x0000000000000000LL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  6297  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  6298  			BPF_ALU64_IMM(BPF_XOR, R2, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  6299  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6300  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6301  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6302  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6303  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6304  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6305  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6306  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6307  		{ { 0, 0x1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6308  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6309  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6310  		"ALU64_XOR_K: Sign extension 1",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6311  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6312  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6313  			BPF_LD_IMM64(R1, 0x0123456786a4c2e0LL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6314  			BPF_ALU64_IMM(BPF_XOR, R0, 0x0f0f0f0f),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6315  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6316  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6317  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6318  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6319  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6320  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6321  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6322  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6323  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6324  	},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6325  	{
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6326  		"ALU64_XOR_K: Sign extension 2",
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6327  		.u.insns_int = {
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6328  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6329  			BPF_LD_IMM64(R1, 0xfedcba98795b3d1fLL),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6330  			BPF_ALU64_IMM(BPF_XOR, R0, 0xf0f0f0f0),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6331  			BPF_JMP_REG(BPF_JEQ, R0, R1, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6332  			BPF_MOV32_IMM(R0, 2),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6333  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6334  			BPF_MOV32_IMM(R0, 1),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6335  			BPF_EXIT_INSN(),
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6336  		},
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6337  		INTERNAL,
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6338  		{ },
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6339  		{ { 0, 1 } }
ba89bcf78fba8ff Johan Almbladh     2021-08-09  6340  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6341  	/* BPF_ALU | BPF_LSH | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  6342  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6343  		"ALU_LSH_X: 1 << 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  6344  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6345  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6346  			BPF_ALU32_IMM(BPF_MOV, R1, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6347  			BPF_ALU32_REG(BPF_LSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6348  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6349  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6350  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6351  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6352  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6353  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6354  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6355  		"ALU_LSH_X: 1 << 31 = 0x80000000",
cffc642d93f9324 Michael Holzheu    2015-05-11  6356  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6357  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6358  			BPF_ALU32_IMM(BPF_MOV, R1, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6359  			BPF_ALU32_REG(BPF_LSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6360  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6361  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6362  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6363  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6364  		{ { 0, 0x80000000 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6365  	},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6366  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  6367  		"ALU_LSH_X: 0x12345678 << 12 = 0x45678000",
0f2fca1ab18319d Johan Almbladh     2021-08-09  6368  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  6369  			BPF_ALU32_IMM(BPF_MOV, R0, 0x12345678),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6370  			BPF_ALU32_IMM(BPF_MOV, R1, 12),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6371  			BPF_ALU32_REG(BPF_LSH, R0, R1),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6372  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6373  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6374  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  6375  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  6376  		{ { 0, 0x45678000 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  6377  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6378  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6379  		"ALU64_LSH_X: 1 << 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  6380  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6381  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6382  			BPF_ALU32_IMM(BPF_MOV, R1, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6383  			BPF_ALU64_REG(BPF_LSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6384  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6385  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6386  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6387  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6388  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6389  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6390  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6391  		"ALU64_LSH_X: 1 << 31 = 0x80000000",
cffc642d93f9324 Michael Holzheu    2015-05-11  6392  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6393  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6394  			BPF_ALU32_IMM(BPF_MOV, R1, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6395  			BPF_ALU64_REG(BPF_LSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6396  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6397  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6398  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6399  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6400  		{ { 0, 0x80000000 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6401  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6402  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6403  		"ALU64_LSH_X: Shift < 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6404  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6405  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6406  			BPF_ALU32_IMM(BPF_MOV, R1, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6407  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6408  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6409  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6410  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6411  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6412  		{ { 0, 0xbcdef000 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6413  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6414  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6415  		"ALU64_LSH_X: Shift < 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6416  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6417  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6418  			BPF_ALU32_IMM(BPF_MOV, R1, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6419  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6420  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6421  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6422  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6423  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6424  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6425  		{ { 0, 0x3456789a } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6426  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6427  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6428  		"ALU64_LSH_X: Shift > 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6429  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6430  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6431  			BPF_ALU32_IMM(BPF_MOV, R1, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6432  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6433  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6434  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6435  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6436  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6437  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6438  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6439  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6440  		"ALU64_LSH_X: Shift > 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6441  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6442  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6443  			BPF_ALU32_IMM(BPF_MOV, R1, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6444  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6445  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6446  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6447  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6448  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6449  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6450  		{ { 0, 0x9abcdef0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6451  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6452  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6453  		"ALU64_LSH_X: Shift == 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6454  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6455  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6456  			BPF_ALU32_IMM(BPF_MOV, R1, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6457  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6458  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6459  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6460  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6461  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6462  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6463  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6464  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6465  		"ALU64_LSH_X: Shift == 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6466  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6467  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6468  			BPF_ALU32_IMM(BPF_MOV, R1, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6469  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6470  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6471  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6472  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6473  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6474  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6475  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6476  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6477  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6478  		"ALU64_LSH_X: Zero shift, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6479  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6480  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6481  			BPF_ALU32_IMM(BPF_MOV, R1, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6482  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6483  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6484  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6485  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6486  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6487  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6488  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6489  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6490  		"ALU64_LSH_X: Zero shift, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6491  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6492  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6493  			BPF_ALU32_IMM(BPF_MOV, R1, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6494  			BPF_ALU64_REG(BPF_LSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6495  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6496  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6497  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6498  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6499  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6500  		{ { 0, 0x01234567 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6501  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6502  	/* BPF_ALU | BPF_LSH | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  6503  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6504  		"ALU_LSH_K: 1 << 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  6505  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6506  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6507  			BPF_ALU32_IMM(BPF_LSH, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6508  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6509  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6510  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6511  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6512  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6513  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6514  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6515  		"ALU_LSH_K: 1 << 31 = 0x80000000",
cffc642d93f9324 Michael Holzheu    2015-05-11  6516  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6517  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6518  			BPF_ALU32_IMM(BPF_LSH, R0, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6519  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6520  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6521  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6522  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6523  		{ { 0, 0x80000000 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6524  	},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6525  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  6526  		"ALU_LSH_K: 0x12345678 << 12 = 0x45678000",
0f2fca1ab18319d Johan Almbladh     2021-08-09  6527  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  6528  			BPF_ALU32_IMM(BPF_MOV, R0, 0x12345678),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6529  			BPF_ALU32_IMM(BPF_LSH, R0, 12),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6530  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6531  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6532  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  6533  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  6534  		{ { 0, 0x45678000 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  6535  	},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6536  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  6537  		"ALU_LSH_K: 0x12345678 << 0 = 0x12345678",
0f2fca1ab18319d Johan Almbladh     2021-08-09  6538  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  6539  			BPF_ALU32_IMM(BPF_MOV, R0, 0x12345678),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6540  			BPF_ALU32_IMM(BPF_LSH, R0, 0),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6541  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6542  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6543  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  6544  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  6545  		{ { 0, 0x12345678 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  6546  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6547  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6548  		"ALU64_LSH_K: 1 << 1 = 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  6549  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6550  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6551  			BPF_ALU64_IMM(BPF_LSH, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6552  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6553  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6554  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6555  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6556  		{ { 0, 2 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6557  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6558  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6559  		"ALU64_LSH_K: 1 << 31 = 0x80000000",
cffc642d93f9324 Michael Holzheu    2015-05-11  6560  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6561  			BPF_LD_IMM64(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6562  			BPF_ALU64_IMM(BPF_LSH, R0, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6563  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6564  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6565  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6566  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6567  		{ { 0, 0x80000000 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6568  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6569  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6570  		"ALU64_LSH_K: Shift < 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6571  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6572  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6573  			BPF_ALU64_IMM(BPF_LSH, R0, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6574  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6575  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6576  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6577  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6578  		{ { 0, 0xbcdef000 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6579  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6580  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6581  		"ALU64_LSH_K: Shift < 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6582  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6583  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6584  			BPF_ALU64_IMM(BPF_LSH, R0, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6585  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6586  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6587  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6588  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6589  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6590  		{ { 0, 0x3456789a } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6591  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6592  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6593  		"ALU64_LSH_K: Shift > 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6594  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6595  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6596  			BPF_ALU64_IMM(BPF_LSH, R0, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6597  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6598  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6599  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6600  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6601  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6602  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6603  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6604  		"ALU64_LSH_K: Shift > 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6605  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6606  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6607  			BPF_ALU64_IMM(BPF_LSH, R0, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6608  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6609  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6610  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6611  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6612  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6613  		{ { 0, 0x9abcdef0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6614  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6615  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6616  		"ALU64_LSH_K: Shift == 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6617  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6618  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6619  			BPF_ALU64_IMM(BPF_LSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6620  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6621  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6622  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6623  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6624  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6625  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6626  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6627  		"ALU64_LSH_K: Shift == 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6628  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6629  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6630  			BPF_ALU64_IMM(BPF_LSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6631  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6632  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6633  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6634  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6635  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6636  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6637  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6638  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6639  		"ALU64_LSH_K: Zero shift",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6640  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6641  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6642  			BPF_ALU64_IMM(BPF_LSH, R0, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6643  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6644  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6645  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6646  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6647  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6648  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6649  	/* BPF_ALU | BPF_RSH | BPF_X */
cffc642d93f9324 Michael Holzheu    2015-05-11  6650  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6651  		"ALU_RSH_X: 2 >> 1 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6652  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6653  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6654  			BPF_ALU32_IMM(BPF_MOV, R1, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6655  			BPF_ALU32_REG(BPF_RSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6656  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6657  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6658  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6659  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6660  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6661  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6662  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6663  		"ALU_RSH_X: 0x80000000 >> 31 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6664  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6665  			BPF_LD_IMM64(R0, 0x80000000),
cffc642d93f9324 Michael Holzheu    2015-05-11  6666  			BPF_ALU32_IMM(BPF_MOV, R1, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6667  			BPF_ALU32_REG(BPF_RSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6668  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6669  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6670  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6671  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6672  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6673  	},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6674  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  6675  		"ALU_RSH_X: 0x12345678 >> 20 = 0x123",
0f2fca1ab18319d Johan Almbladh     2021-08-09  6676  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  6677  			BPF_ALU32_IMM(BPF_MOV, R0, 0x12345678),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6678  			BPF_ALU32_IMM(BPF_MOV, R1, 20),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6679  			BPF_ALU32_REG(BPF_RSH, R0, R1),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6680  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6681  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6682  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  6683  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  6684  		{ { 0, 0x123 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  6685  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6686  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6687  		"ALU64_RSH_X: 2 >> 1 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6688  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6689  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6690  			BPF_ALU32_IMM(BPF_MOV, R1, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6691  			BPF_ALU64_REG(BPF_RSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6692  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6693  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6694  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6695  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6696  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6697  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6698  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6699  		"ALU64_RSH_X: 0x80000000 >> 31 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6700  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6701  			BPF_LD_IMM64(R0, 0x80000000),
cffc642d93f9324 Michael Holzheu    2015-05-11  6702  			BPF_ALU32_IMM(BPF_MOV, R1, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6703  			BPF_ALU64_REG(BPF_RSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6704  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6705  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6706  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6707  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6708  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6709  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6710  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6711  		"ALU64_RSH_X: Shift < 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6712  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6713  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6714  			BPF_ALU32_IMM(BPF_MOV, R1, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6715  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6716  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6717  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6718  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6719  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6720  		{ { 0, 0x56789abc } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6721  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6722  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6723  		"ALU64_RSH_X: Shift < 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6724  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6725  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6726  			BPF_ALU32_IMM(BPF_MOV, R1, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6727  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6728  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6729  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6730  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6731  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6732  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6733  		{ { 0, 0x00081234 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6734  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6735  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6736  		"ALU64_RSH_X: Shift > 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6737  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6738  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6739  			BPF_ALU32_IMM(BPF_MOV, R1, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6740  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6741  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6742  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6743  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6744  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6745  		{ { 0, 0x08123456 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6746  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6747  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6748  		"ALU64_RSH_X: Shift > 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6749  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6750  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6751  			BPF_ALU32_IMM(BPF_MOV, R1, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6752  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6753  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6754  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6755  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6756  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6757  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6758  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6759  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6760  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6761  		"ALU64_RSH_X: Shift == 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6762  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6763  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6764  			BPF_ALU32_IMM(BPF_MOV, R1, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6765  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6766  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6767  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6768  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6769  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6770  		{ { 0, 0x81234567 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6771  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6772  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6773  		"ALU64_RSH_X: Shift == 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6774  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6775  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6776  			BPF_ALU32_IMM(BPF_MOV, R1, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6777  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6778  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6779  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6780  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6781  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6782  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6783  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6784  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6785  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6786  		"ALU64_RSH_X: Zero shift, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6787  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6788  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6789  			BPF_ALU32_IMM(BPF_MOV, R1, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6790  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6791  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6792  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6793  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6794  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6795  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6796  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6797  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6798  		"ALU64_RSH_X: Zero shift, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6799  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6800  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6801  			BPF_ALU32_IMM(BPF_MOV, R1, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6802  			BPF_ALU64_REG(BPF_RSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6803  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6804  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6805  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6806  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6807  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6808  		{ { 0, 0x81234567 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6809  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6810  	/* BPF_ALU | BPF_RSH | BPF_K */
cffc642d93f9324 Michael Holzheu    2015-05-11  6811  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6812  		"ALU_RSH_K: 2 >> 1 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6813  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6814  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6815  			BPF_ALU32_IMM(BPF_RSH, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6816  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6817  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6818  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6819  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6820  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6821  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6822  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6823  		"ALU_RSH_K: 0x80000000 >> 31 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6824  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6825  			BPF_LD_IMM64(R0, 0x80000000),
cffc642d93f9324 Michael Holzheu    2015-05-11  6826  			BPF_ALU32_IMM(BPF_RSH, R0, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6827  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6828  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6829  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6830  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6831  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6832  	},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6833  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  6834  		"ALU_RSH_K: 0x12345678 >> 20 = 0x123",
0f2fca1ab18319d Johan Almbladh     2021-08-09  6835  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  6836  			BPF_ALU32_IMM(BPF_MOV, R0, 0x12345678),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6837  			BPF_ALU32_IMM(BPF_RSH, R0, 20),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6838  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6839  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6840  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  6841  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  6842  		{ { 0, 0x123 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  6843  	},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6844  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  6845  		"ALU_RSH_K: 0x12345678 >> 0 = 0x12345678",
0f2fca1ab18319d Johan Almbladh     2021-08-09  6846  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  6847  			BPF_ALU32_IMM(BPF_MOV, R0, 0x12345678),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6848  			BPF_ALU32_IMM(BPF_RSH, R0, 0),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6849  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6850  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6851  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  6852  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  6853  		{ { 0, 0x12345678 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  6854  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6855  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6856  		"ALU64_RSH_K: 2 >> 1 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6857  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6858  			BPF_LD_IMM64(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  6859  			BPF_ALU64_IMM(BPF_RSH, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6860  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6861  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6862  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6863  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6864  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6865  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6866  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  6867  		"ALU64_RSH_K: 0x80000000 >> 31 = 1",
cffc642d93f9324 Michael Holzheu    2015-05-11  6868  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6869  			BPF_LD_IMM64(R0, 0x80000000),
cffc642d93f9324 Michael Holzheu    2015-05-11  6870  			BPF_ALU64_IMM(BPF_RSH, R0, 31),
cffc642d93f9324 Michael Holzheu    2015-05-11  6871  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6872  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6873  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6874  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6875  		{ { 0, 1 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6876  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6877  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6878  		"ALU64_RSH_K: Shift < 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6879  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6880  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6881  			BPF_ALU64_IMM(BPF_RSH, R0, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6882  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6883  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6884  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6885  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6886  		{ { 0, 0x56789abc } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6887  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6888  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6889  		"ALU64_RSH_K: Shift < 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6890  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6891  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6892  			BPF_ALU64_IMM(BPF_RSH, R0, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6893  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6894  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6895  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6896  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6897  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6898  		{ { 0, 0x00081234 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6899  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6900  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6901  		"ALU64_RSH_K: Shift > 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6902  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6903  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6904  			BPF_ALU64_IMM(BPF_RSH, R0, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6905  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6906  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6907  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6908  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6909  		{ { 0, 0x08123456 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6910  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6911  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6912  		"ALU64_RSH_K: Shift > 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6913  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6914  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6915  			BPF_ALU64_IMM(BPF_RSH, R0, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6916  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6917  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6918  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6919  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6920  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6921  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6922  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6923  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6924  		"ALU64_RSH_K: Shift == 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6925  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6926  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6927  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6928  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6929  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6930  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6931  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6932  		{ { 0, 0x81234567 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6933  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6934  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6935  		"ALU64_RSH_K: Shift == 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6936  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6937  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6938  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6939  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6940  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6941  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6942  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6943  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6944  		{ { 0, 0 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6945  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6946  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6947  		"ALU64_RSH_K: Zero shift",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6948  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6949  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6950  			BPF_ALU64_IMM(BPF_RSH, R0, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6951  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6952  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6953  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6954  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6955  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6956  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6957  	/* BPF_ALU | BPF_ARSH | BPF_X */
0f2fca1ab18319d Johan Almbladh     2021-08-09  6958  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  6959  		"ALU32_ARSH_X: -1234 >> 7 = -10",
0f2fca1ab18319d Johan Almbladh     2021-08-09  6960  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  6961  			BPF_ALU32_IMM(BPF_MOV, R0, -1234),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6962  			BPF_ALU32_IMM(BPF_MOV, R1, 7),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6963  			BPF_ALU32_REG(BPF_ARSH, R0, R1),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6964  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  6965  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  6966  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  6967  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  6968  		{ { 0, -10 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  6969  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  6970  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6971  		"ALU64_ARSH_X: 0xff00ff0000000000 >> 40 = 0xffffffffffff00ff",
cffc642d93f9324 Michael Holzheu    2015-05-11  6972  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  6973  			BPF_LD_IMM64(R0, 0xff00ff0000000000LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  6974  			BPF_ALU32_IMM(BPF_MOV, R1, 40),
cffc642d93f9324 Michael Holzheu    2015-05-11  6975  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
cffc642d93f9324 Michael Holzheu    2015-05-11  6976  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  6977  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  6978  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  6979  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  6980  		{ { 0, 0xffff00ff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  6981  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6982  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6983  		"ALU64_ARSH_X: Shift < 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6984  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6985  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6986  			BPF_ALU32_IMM(BPF_MOV, R1, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6987  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6988  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6989  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6990  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  6991  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  6992  		{ { 0, 0x56789abc } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  6993  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  6994  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  6995  		"ALU64_ARSH_X: Shift < 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  6996  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  6997  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6998  			BPF_ALU32_IMM(BPF_MOV, R1, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  6999  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7000  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7001  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7002  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7003  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7004  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7005  		{ { 0, 0xfff81234 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7006  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7007  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7008  		"ALU64_ARSH_X: Shift > 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7009  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7010  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7011  			BPF_ALU32_IMM(BPF_MOV, R1, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7012  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7013  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7014  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7015  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7016  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7017  		{ { 0, 0xf8123456 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7018  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7019  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7020  		"ALU64_ARSH_X: Shift > 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7021  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7022  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7023  			BPF_ALU32_IMM(BPF_MOV, R1, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7024  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7025  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7026  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7027  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7028  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7029  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7030  		{ { 0, -1 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7031  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7032  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7033  		"ALU64_ARSH_X: Shift == 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7034  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7035  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7036  			BPF_ALU32_IMM(BPF_MOV, R1, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7037  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7038  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7039  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7040  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7041  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7042  		{ { 0, 0x81234567 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7043  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7044  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7045  		"ALU64_ARSH_X: Shift == 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7046  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7047  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7048  			BPF_ALU32_IMM(BPF_MOV, R1, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7049  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7050  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7051  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7052  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7053  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7054  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7055  		{ { 0, -1 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7056  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7057  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7058  		"ALU64_ARSH_X: Zero shift, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7059  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7060  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7061  			BPF_ALU32_IMM(BPF_MOV, R1, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7062  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7063  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7064  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7065  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7066  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7067  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7068  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7069  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7070  		"ALU64_ARSH_X: Zero shift, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7071  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7072  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7073  			BPF_ALU32_IMM(BPF_MOV, R1, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7074  			BPF_ALU64_REG(BPF_ARSH, R0, R1),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7075  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7076  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7077  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7078  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7079  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7080  		{ { 0, 0x81234567 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7081  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7082  	/* BPF_ALU | BPF_ARSH | BPF_K */
0f2fca1ab18319d Johan Almbladh     2021-08-09  7083  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  7084  		"ALU32_ARSH_K: -1234 >> 7 = -10",
0f2fca1ab18319d Johan Almbladh     2021-08-09  7085  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  7086  			BPF_ALU32_IMM(BPF_MOV, R0, -1234),
0f2fca1ab18319d Johan Almbladh     2021-08-09  7087  			BPF_ALU32_IMM(BPF_ARSH, R0, 7),
0f2fca1ab18319d Johan Almbladh     2021-08-09  7088  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  7089  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  7090  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  7091  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  7092  		{ { 0, -10 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  7093  	},
0f2fca1ab18319d Johan Almbladh     2021-08-09  7094  	{
0f2fca1ab18319d Johan Almbladh     2021-08-09  7095  		"ALU32_ARSH_K: -1234 >> 0 = -1234",
0f2fca1ab18319d Johan Almbladh     2021-08-09  7096  		.u.insns_int = {
0f2fca1ab18319d Johan Almbladh     2021-08-09  7097  			BPF_ALU32_IMM(BPF_MOV, R0, -1234),
0f2fca1ab18319d Johan Almbladh     2021-08-09  7098  			BPF_ALU32_IMM(BPF_ARSH, R0, 0),
0f2fca1ab18319d Johan Almbladh     2021-08-09  7099  			BPF_EXIT_INSN(),
0f2fca1ab18319d Johan Almbladh     2021-08-09  7100  		},
0f2fca1ab18319d Johan Almbladh     2021-08-09  7101  		INTERNAL,
0f2fca1ab18319d Johan Almbladh     2021-08-09  7102  		{ },
0f2fca1ab18319d Johan Almbladh     2021-08-09  7103  		{ { 0, -1234 } }
0f2fca1ab18319d Johan Almbladh     2021-08-09  7104  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7105  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7106  		"ALU64_ARSH_K: 0xff00ff0000000000 >> 40 = 0xffffffffffff00ff",
cffc642d93f9324 Michael Holzheu    2015-05-11  7107  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7108  			BPF_LD_IMM64(R0, 0xff00ff0000000000LL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7109  			BPF_ALU64_IMM(BPF_ARSH, R0, 40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7110  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7111  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7112  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7113  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7114  		{ { 0, 0xffff00ff } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7115  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7116  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7117  		"ALU64_ARSH_K: Shift < 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7118  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7119  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7120  			BPF_ALU64_IMM(BPF_RSH, R0, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7121  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7122  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7123  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7124  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7125  		{ { 0, 0x56789abc } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7126  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7127  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7128  		"ALU64_ARSH_K: Shift < 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7129  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7130  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7131  			BPF_ALU64_IMM(BPF_ARSH, R0, 12),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7132  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7133  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7134  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7135  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7136  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7137  		{ { 0, 0xfff81234 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7138  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7139  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7140  		"ALU64_ARSH_K: Shift > 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7141  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7142  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7143  			BPF_ALU64_IMM(BPF_ARSH, R0, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7144  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7145  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7146  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7147  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7148  		{ { 0, 0xf8123456 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7149  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7150  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7151  		"ALU64_ARSH_K: Shift > 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7152  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09 @7153  			BPF_LD_IMM64(R0, 0xf123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7154  			BPF_ALU64_IMM(BPF_ARSH, R0, 36),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7155  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7156  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7157  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7158  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7159  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7160  		{ { 0, -1 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7161  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7162  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7163  		"ALU64_ARSH_K: Shift == 32, low word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7164  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7165  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7166  			BPF_ALU64_IMM(BPF_ARSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7167  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7168  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7169  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7170  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7171  		{ { 0, 0x81234567 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7172  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7173  	{
3b9890ef80f4285 Johan Almbladh     2021-08-09  7174  		"ALU64_ARSH_K: Shift == 32, high word",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7175  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7176  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7177  			BPF_ALU64_IMM(BPF_ARSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7178  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7179  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7180  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7181  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7182  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7183  		{ { 0, -1 } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7184  	},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7185  	{
1bda52f80471260 Colin Ian King     2021-08-15  7186  		"ALU64_ARSH_K: Zero shift",
3b9890ef80f4285 Johan Almbladh     2021-08-09  7187  		.u.insns_int = {
3b9890ef80f4285 Johan Almbladh     2021-08-09  7188  			BPF_LD_IMM64(R0, 0x8123456789abcdefLL),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7189  			BPF_ALU64_IMM(BPF_ARSH, R0, 0),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7190  			BPF_EXIT_INSN(),
3b9890ef80f4285 Johan Almbladh     2021-08-09  7191  		},
3b9890ef80f4285 Johan Almbladh     2021-08-09  7192  		INTERNAL,
3b9890ef80f4285 Johan Almbladh     2021-08-09  7193  		{ },
3b9890ef80f4285 Johan Almbladh     2021-08-09  7194  		{ { 0, 0x89abcdef } }
3b9890ef80f4285 Johan Almbladh     2021-08-09  7195  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7196  	/* BPF_ALU | BPF_NEG */
cffc642d93f9324 Michael Holzheu    2015-05-11  7197  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7198  		"ALU_NEG: -(3) = -3",
cffc642d93f9324 Michael Holzheu    2015-05-11  7199  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7200  			BPF_ALU32_IMM(BPF_MOV, R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  7201  			BPF_ALU32_IMM(BPF_NEG, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7202  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7203  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7204  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7205  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7206  		{ { 0, -3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7207  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7208  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7209  		"ALU_NEG: -(-3) = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  7210  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7211  			BPF_ALU32_IMM(BPF_MOV, R0, -3),
cffc642d93f9324 Michael Holzheu    2015-05-11  7212  			BPF_ALU32_IMM(BPF_NEG, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7213  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7214  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7215  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7216  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7217  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7218  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7219  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7220  		"ALU64_NEG: -(3) = -3",
cffc642d93f9324 Michael Holzheu    2015-05-11  7221  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7222  			BPF_LD_IMM64(R0, 3),
cffc642d93f9324 Michael Holzheu    2015-05-11  7223  			BPF_ALU64_IMM(BPF_NEG, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7224  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7225  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7226  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7227  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7228  		{ { 0, -3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7229  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7230  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7231  		"ALU64_NEG: -(-3) = 3",
cffc642d93f9324 Michael Holzheu    2015-05-11  7232  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7233  			BPF_LD_IMM64(R0, -3),
cffc642d93f9324 Michael Holzheu    2015-05-11  7234  			BPF_ALU64_IMM(BPF_NEG, R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7235  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7236  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7237  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7238  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7239  		{ { 0, 3 } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7240  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7241  	/* BPF_ALU | BPF_END | BPF_FROM_BE */
cffc642d93f9324 Michael Holzheu    2015-05-11  7242  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7243  		"ALU_END_FROM_BE 16: 0x0123456789abcdef -> 0xcdef",
cffc642d93f9324 Michael Holzheu    2015-05-11  7244  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7245  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7246  			BPF_ENDIAN(BPF_FROM_BE, R0, 16),
cffc642d93f9324 Michael Holzheu    2015-05-11  7247  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7248  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7249  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7250  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7251  		{ { 0,  cpu_to_be16(0xcdef) } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7252  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7253  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7254  		"ALU_END_FROM_BE 32: 0x0123456789abcdef -> 0x89abcdef",
cffc642d93f9324 Michael Holzheu    2015-05-11  7255  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7256  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7257  			BPF_ENDIAN(BPF_FROM_BE, R0, 32),
ba29becd770ffec Xi Wang            2015-07-08  7258  			BPF_ALU64_REG(BPF_MOV, R1, R0),
ba29becd770ffec Xi Wang            2015-07-08  7259  			BPF_ALU64_IMM(BPF_RSH, R1, 32),
ba29becd770ffec Xi Wang            2015-07-08  7260  			BPF_ALU32_REG(BPF_ADD, R0, R1), /* R1 = 0 */
cffc642d93f9324 Michael Holzheu    2015-05-11  7261  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7262  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7263  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7264  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7265  		{ { 0, cpu_to_be32(0x89abcdef) } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7266  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7267  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7268  		"ALU_END_FROM_BE 64: 0x0123456789abcdef -> 0x89abcdef",
cffc642d93f9324 Michael Holzheu    2015-05-11  7269  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7270  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7271  			BPF_ENDIAN(BPF_FROM_BE, R0, 64),
cffc642d93f9324 Michael Holzheu    2015-05-11  7272  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7273  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7274  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7275  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7276  		{ { 0, (u32) cpu_to_be64(0x0123456789abcdefLL) } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7277  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7278  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7279  		"ALU_END_FROM_BE 64: 0x0123456789abcdef >> 32 -> 0x01234567",
f536a7c80675e48 Johan Almbladh     2021-09-14  7280  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7281  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7282  			BPF_ENDIAN(BPF_FROM_BE, R0, 64),
f536a7c80675e48 Johan Almbladh     2021-09-14  7283  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7284  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7285  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7286  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7287  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7288  		{ { 0, (u32) (cpu_to_be64(0x0123456789abcdefLL) >> 32) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7289  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7290  	/* BPF_ALU | BPF_END | BPF_FROM_BE, reversed */
f536a7c80675e48 Johan Almbladh     2021-09-14  7291  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7292  		"ALU_END_FROM_BE 16: 0xfedcba9876543210 -> 0x3210",
f536a7c80675e48 Johan Almbladh     2021-09-14  7293  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7294  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7295  			BPF_ENDIAN(BPF_FROM_BE, R0, 16),
f536a7c80675e48 Johan Almbladh     2021-09-14  7296  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7297  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7298  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7299  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7300  		{ { 0,  cpu_to_be16(0x3210) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7301  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7302  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7303  		"ALU_END_FROM_BE 32: 0xfedcba9876543210 -> 0x76543210",
f536a7c80675e48 Johan Almbladh     2021-09-14  7304  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7305  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7306  			BPF_ENDIAN(BPF_FROM_BE, R0, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7307  			BPF_ALU64_REG(BPF_MOV, R1, R0),
f536a7c80675e48 Johan Almbladh     2021-09-14  7308  			BPF_ALU64_IMM(BPF_RSH, R1, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7309  			BPF_ALU32_REG(BPF_ADD, R0, R1), /* R1 = 0 */
f536a7c80675e48 Johan Almbladh     2021-09-14  7310  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7311  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7312  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7313  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7314  		{ { 0, cpu_to_be32(0x76543210) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7315  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7316  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7317  		"ALU_END_FROM_BE 64: 0xfedcba9876543210 -> 0x76543210",
f536a7c80675e48 Johan Almbladh     2021-09-14  7318  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7319  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7320  			BPF_ENDIAN(BPF_FROM_BE, R0, 64),
f536a7c80675e48 Johan Almbladh     2021-09-14  7321  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7322  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7323  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7324  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7325  		{ { 0, (u32) cpu_to_be64(0xfedcba9876543210ULL) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7326  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7327  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7328  		"ALU_END_FROM_BE 64: 0xfedcba9876543210 >> 32 -> 0xfedcba98",
f536a7c80675e48 Johan Almbladh     2021-09-14  7329  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7330  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7331  			BPF_ENDIAN(BPF_FROM_BE, R0, 64),
f536a7c80675e48 Johan Almbladh     2021-09-14  7332  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7333  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7334  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7335  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7336  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7337  		{ { 0, (u32) (cpu_to_be64(0xfedcba9876543210ULL) >> 32) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7338  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7339  	/* BPF_ALU | BPF_END | BPF_FROM_LE */
cffc642d93f9324 Michael Holzheu    2015-05-11  7340  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7341  		"ALU_END_FROM_LE 16: 0x0123456789abcdef -> 0xefcd",
cffc642d93f9324 Michael Holzheu    2015-05-11  7342  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7343  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7344  			BPF_ENDIAN(BPF_FROM_LE, R0, 16),
cffc642d93f9324 Michael Holzheu    2015-05-11  7345  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7346  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7347  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7348  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7349  		{ { 0, cpu_to_le16(0xcdef) } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7350  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7351  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7352  		"ALU_END_FROM_LE 32: 0x0123456789abcdef -> 0xefcdab89",
cffc642d93f9324 Michael Holzheu    2015-05-11  7353  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7354  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7355  			BPF_ENDIAN(BPF_FROM_LE, R0, 32),
ba29becd770ffec Xi Wang            2015-07-08  7356  			BPF_ALU64_REG(BPF_MOV, R1, R0),
ba29becd770ffec Xi Wang            2015-07-08  7357  			BPF_ALU64_IMM(BPF_RSH, R1, 32),
ba29becd770ffec Xi Wang            2015-07-08  7358  			BPF_ALU32_REG(BPF_ADD, R0, R1), /* R1 = 0 */
cffc642d93f9324 Michael Holzheu    2015-05-11  7359  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7360  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7361  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7362  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7363  		{ { 0, cpu_to_le32(0x89abcdef) } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7364  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7365  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7366  		"ALU_END_FROM_LE 64: 0x0123456789abcdef -> 0x67452301",
cffc642d93f9324 Michael Holzheu    2015-05-11  7367  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7368  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7369  			BPF_ENDIAN(BPF_FROM_LE, R0, 64),
cffc642d93f9324 Michael Holzheu    2015-05-11  7370  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7371  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7372  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7373  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7374  		{ { 0, (u32) cpu_to_le64(0x0123456789abcdefLL) } },
cffc642d93f9324 Michael Holzheu    2015-05-11  7375  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7376  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7377  		"ALU_END_FROM_LE 64: 0x0123456789abcdef >> 32 -> 0xefcdab89",
f536a7c80675e48 Johan Almbladh     2021-09-14  7378  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7379  			BPF_LD_IMM64(R0, 0x0123456789abcdefLL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7380  			BPF_ENDIAN(BPF_FROM_LE, R0, 64),
f536a7c80675e48 Johan Almbladh     2021-09-14  7381  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7382  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7383  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7384  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7385  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7386  		{ { 0, (u32) (cpu_to_le64(0x0123456789abcdefLL) >> 32) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7387  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7388  	/* BPF_ALU | BPF_END | BPF_FROM_LE, reversed */
f536a7c80675e48 Johan Almbladh     2021-09-14  7389  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7390  		"ALU_END_FROM_LE 16: 0xfedcba9876543210 -> 0x1032",
f536a7c80675e48 Johan Almbladh     2021-09-14  7391  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7392  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7393  			BPF_ENDIAN(BPF_FROM_LE, R0, 16),
f536a7c80675e48 Johan Almbladh     2021-09-14  7394  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7395  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7396  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7397  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7398  		{ { 0,  cpu_to_le16(0x3210) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7399  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7400  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7401  		"ALU_END_FROM_LE 32: 0xfedcba9876543210 -> 0x10325476",
f536a7c80675e48 Johan Almbladh     2021-09-14  7402  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7403  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7404  			BPF_ENDIAN(BPF_FROM_LE, R0, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7405  			BPF_ALU64_REG(BPF_MOV, R1, R0),
f536a7c80675e48 Johan Almbladh     2021-09-14  7406  			BPF_ALU64_IMM(BPF_RSH, R1, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7407  			BPF_ALU32_REG(BPF_ADD, R0, R1), /* R1 = 0 */
f536a7c80675e48 Johan Almbladh     2021-09-14  7408  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7409  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7410  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7411  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7412  		{ { 0, cpu_to_le32(0x76543210) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7413  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7414  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7415  		"ALU_END_FROM_LE 64: 0xfedcba9876543210 -> 0x10325476",
f536a7c80675e48 Johan Almbladh     2021-09-14  7416  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7417  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7418  			BPF_ENDIAN(BPF_FROM_LE, R0, 64),
f536a7c80675e48 Johan Almbladh     2021-09-14  7419  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7420  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7421  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7422  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7423  		{ { 0, (u32) cpu_to_le64(0xfedcba9876543210ULL) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7424  	},
f536a7c80675e48 Johan Almbladh     2021-09-14  7425  	{
f536a7c80675e48 Johan Almbladh     2021-09-14  7426  		"ALU_END_FROM_LE 64: 0xfedcba9876543210 >> 32 -> 0x98badcfe",
f536a7c80675e48 Johan Almbladh     2021-09-14  7427  		.u.insns_int = {
f536a7c80675e48 Johan Almbladh     2021-09-14  7428  			BPF_LD_IMM64(R0, 0xfedcba9876543210ULL),
f536a7c80675e48 Johan Almbladh     2021-09-14  7429  			BPF_ENDIAN(BPF_FROM_LE, R0, 64),
f536a7c80675e48 Johan Almbladh     2021-09-14  7430  			BPF_ALU64_IMM(BPF_RSH, R0, 32),
f536a7c80675e48 Johan Almbladh     2021-09-14  7431  			BPF_EXIT_INSN(),
f536a7c80675e48 Johan Almbladh     2021-09-14  7432  		},
f536a7c80675e48 Johan Almbladh     2021-09-14  7433  		INTERNAL,
f536a7c80675e48 Johan Almbladh     2021-09-14  7434  		{ },
f536a7c80675e48 Johan Almbladh     2021-09-14  7435  		{ { 0, (u32) (cpu_to_le64(0xfedcba9876543210ULL) >> 32) } },
f536a7c80675e48 Johan Almbladh     2021-09-14  7436  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7437  	/* BPF_LDX_MEM B/H/W/DW */
b7436e53c202df5 Johan Almbladh     2021-10-01  7438  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7439  		"BPF_LDX_MEM | BPF_B",
b7436e53c202df5 Johan Almbladh     2021-10-01  7440  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7441  			BPF_LD_IMM64(R1, 0x0102030405060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7442  			BPF_LD_IMM64(R2, 0x0000000000000008ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7443  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7444  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7445  			BPF_LDX_MEM(BPF_B, R0, R10, -1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7446  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7447  			BPF_LDX_MEM(BPF_B, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7448  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7449  			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7450  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7451  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7452  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7453  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7454  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7455  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7456  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7457  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7458  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7459  		"BPF_LDX_MEM | BPF_B, MSB set",
b7436e53c202df5 Johan Almbladh     2021-10-01  7460  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7461  			BPF_LD_IMM64(R1, 0x8182838485868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7462  			BPF_LD_IMM64(R2, 0x0000000000000088ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7463  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7464  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7465  			BPF_LDX_MEM(BPF_B, R0, R10, -1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7466  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7467  			BPF_LDX_MEM(BPF_B, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7468  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7469  			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7470  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7471  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7472  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7473  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7474  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7475  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7476  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7477  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7478  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7479  		"BPF_LDX_MEM | BPF_H",
b7436e53c202df5 Johan Almbladh     2021-10-01  7480  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7481  			BPF_LD_IMM64(R1, 0x0102030405060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7482  			BPF_LD_IMM64(R2, 0x0000000000000708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7483  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7484  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7485  			BPF_LDX_MEM(BPF_H, R0, R10, -2),
b7436e53c202df5 Johan Almbladh     2021-10-01  7486  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7487  			BPF_LDX_MEM(BPF_H, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7488  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7489  			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7490  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7491  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7492  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7493  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7494  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7495  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7496  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7497  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7498  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7499  		"BPF_LDX_MEM | BPF_H, MSB set",
b7436e53c202df5 Johan Almbladh     2021-10-01  7500  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7501  			BPF_LD_IMM64(R1, 0x8182838485868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7502  			BPF_LD_IMM64(R2, 0x0000000000008788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7503  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7504  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7505  			BPF_LDX_MEM(BPF_H, R0, R10, -2),
b7436e53c202df5 Johan Almbladh     2021-10-01  7506  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7507  			BPF_LDX_MEM(BPF_H, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7508  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7509  			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7510  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7511  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7512  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7513  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7514  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7515  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7516  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7517  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7518  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7519  		"BPF_LDX_MEM | BPF_W",
b7436e53c202df5 Johan Almbladh     2021-10-01  7520  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7521  			BPF_LD_IMM64(R1, 0x0102030405060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7522  			BPF_LD_IMM64(R2, 0x0000000005060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7523  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7524  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7525  			BPF_LDX_MEM(BPF_W, R0, R10, -4),
b7436e53c202df5 Johan Almbladh     2021-10-01  7526  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7527  			BPF_LDX_MEM(BPF_W, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7528  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7529  			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7530  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7531  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7532  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7533  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7534  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7535  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7536  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7537  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7538  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7539  		"BPF_LDX_MEM | BPF_W, MSB set",
b7436e53c202df5 Johan Almbladh     2021-10-01  7540  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7541  			BPF_LD_IMM64(R1, 0x8182838485868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7542  			BPF_LD_IMM64(R2, 0x0000000085868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7543  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7544  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7545  			BPF_LDX_MEM(BPF_W, R0, R10, -4),
b7436e53c202df5 Johan Almbladh     2021-10-01  7546  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7547  			BPF_LDX_MEM(BPF_W, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7548  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7549  			BPF_JMP_REG(BPF_JNE, R0, R2, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7550  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7551  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7552  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7553  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7554  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7555  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7556  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7557  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7558  	/* BPF_STX_MEM B/H/W/DW */
b7436e53c202df5 Johan Almbladh     2021-10-01  7559  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7560  		"BPF_STX_MEM | BPF_B",
b7436e53c202df5 Johan Almbladh     2021-10-01  7561  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7562  			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7563  			BPF_LD_IMM64(R2, 0x0102030405060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7564  			BPF_LD_IMM64(R3, 0x8090a0b0c0d0e008ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7565  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7566  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7567  			BPF_STX_MEM(BPF_B, R10, R2, -1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7568  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7569  			BPF_STX_MEM(BPF_B, R10, R2, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7570  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7571  			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7572  			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7573  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7574  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7575  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7576  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7577  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7578  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7579  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7580  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7581  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7582  		"BPF_STX_MEM | BPF_B, MSB set",
b7436e53c202df5 Johan Almbladh     2021-10-01  7583  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7584  			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7585  			BPF_LD_IMM64(R2, 0x8182838485868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7586  			BPF_LD_IMM64(R3, 0x8090a0b0c0d0e088ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7587  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7588  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7589  			BPF_STX_MEM(BPF_B, R10, R2, -1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7590  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7591  			BPF_STX_MEM(BPF_B, R10, R2, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7592  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7593  			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7594  			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7595  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7596  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7597  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7598  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7599  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7600  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7601  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7602  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7603  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7604  		"BPF_STX_MEM | BPF_H",
b7436e53c202df5 Johan Almbladh     2021-10-01  7605  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7606  			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7607  			BPF_LD_IMM64(R2, 0x0102030405060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7608  			BPF_LD_IMM64(R3, 0x8090a0b0c0d00708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7609  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7610  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7611  			BPF_STX_MEM(BPF_H, R10, R2, -2),
b7436e53c202df5 Johan Almbladh     2021-10-01  7612  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7613  			BPF_STX_MEM(BPF_H, R10, R2, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7614  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7615  			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7616  			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7617  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7618  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7619  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7620  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7621  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7622  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7623  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7624  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7625  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7626  		"BPF_STX_MEM | BPF_H, MSB set",
b7436e53c202df5 Johan Almbladh     2021-10-01  7627  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7628  			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7629  			BPF_LD_IMM64(R2, 0x8182838485868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7630  			BPF_LD_IMM64(R3, 0x8090a0b0c0d08788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7631  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7632  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7633  			BPF_STX_MEM(BPF_H, R10, R2, -2),
b7436e53c202df5 Johan Almbladh     2021-10-01  7634  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7635  			BPF_STX_MEM(BPF_H, R10, R2, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7636  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7637  			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7638  			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7639  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7640  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7641  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7642  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7643  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7644  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7645  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7646  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7647  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7648  		"BPF_STX_MEM | BPF_W",
b7436e53c202df5 Johan Almbladh     2021-10-01  7649  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7650  			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7651  			BPF_LD_IMM64(R2, 0x0102030405060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7652  			BPF_LD_IMM64(R3, 0x8090a0b005060708ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7653  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7654  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7655  			BPF_STX_MEM(BPF_W, R10, R2, -4),
b7436e53c202df5 Johan Almbladh     2021-10-01  7656  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7657  			BPF_STX_MEM(BPF_W, R10, R2, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7658  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7659  			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7660  			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7661  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7662  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7663  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7664  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7665  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7666  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7667  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7668  	},
b7436e53c202df5 Johan Almbladh     2021-10-01  7669  	{
b7436e53c202df5 Johan Almbladh     2021-10-01  7670  		"BPF_STX_MEM | BPF_W, MSB set",
b7436e53c202df5 Johan Almbladh     2021-10-01  7671  		.u.insns_int = {
b7436e53c202df5 Johan Almbladh     2021-10-01  7672  			BPF_LD_IMM64(R1, 0x8090a0b0c0d0e0f0ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7673  			BPF_LD_IMM64(R2, 0x8182838485868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7674  			BPF_LD_IMM64(R3, 0x8090a0b085868788ULL),
b7436e53c202df5 Johan Almbladh     2021-10-01  7675  			BPF_STX_MEM(BPF_DW, R10, R1, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7676  #ifdef __BIG_ENDIAN
b7436e53c202df5 Johan Almbladh     2021-10-01  7677  			BPF_STX_MEM(BPF_W, R10, R2, -4),
b7436e53c202df5 Johan Almbladh     2021-10-01  7678  #else
b7436e53c202df5 Johan Almbladh     2021-10-01  7679  			BPF_STX_MEM(BPF_W, R10, R2, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7680  #endif
b7436e53c202df5 Johan Almbladh     2021-10-01  7681  			BPF_LDX_MEM(BPF_DW, R0, R10, -8),
b7436e53c202df5 Johan Almbladh     2021-10-01  7682  			BPF_JMP_REG(BPF_JNE, R0, R3, 1),
b7436e53c202df5 Johan Almbladh     2021-10-01  7683  			BPF_ALU64_IMM(BPF_MOV, R0, 0),
b7436e53c202df5 Johan Almbladh     2021-10-01  7684  			BPF_EXIT_INSN(),
b7436e53c202df5 Johan Almbladh     2021-10-01  7685  		},
b7436e53c202df5 Johan Almbladh     2021-10-01  7686  		INTERNAL,
b7436e53c202df5 Johan Almbladh     2021-10-01  7687  		{ },
b7436e53c202df5 Johan Almbladh     2021-10-01  7688  		{ { 0, 0 } },
b7436e53c202df5 Johan Almbladh     2021-10-01  7689  		.stack_depth = 8,
b7436e53c202df5 Johan Almbladh     2021-10-01  7690  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7691  	/* BPF_ST(X) | BPF_MEM | BPF_B/H/W/DW */
cffc642d93f9324 Michael Holzheu    2015-05-11  7692  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7693  		"ST_MEM_B: Store/Load byte: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7694  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7695  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7696  			BPF_ST_MEM(BPF_B, R10, -40, 0xff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7697  			BPF_LDX_MEM(BPF_B, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7698  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7699  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7700  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7701  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7702  		{ { 0, 0xff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7703  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7704  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7705  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7706  		"ST_MEM_B: Store/Load byte: max positive",
cffc642d93f9324 Michael Holzheu    2015-05-11  7707  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7708  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7709  			BPF_ST_MEM(BPF_H, R10, -40, 0x7f),
cffc642d93f9324 Michael Holzheu    2015-05-11  7710  			BPF_LDX_MEM(BPF_H, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7711  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7712  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7713  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7714  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7715  		{ { 0, 0x7f } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7716  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7717  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7718  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7719  		"STX_MEM_B: Store/Load byte: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7720  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7721  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7722  			BPF_LD_IMM64(R1, 0xffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7723  			BPF_STX_MEM(BPF_B, R10, R1, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7724  			BPF_LDX_MEM(BPF_B, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7725  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7726  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7727  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7728  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7729  		{ { 0, 0xff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7730  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7731  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7732  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7733  		"ST_MEM_H: Store/Load half word: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7734  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7735  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7736  			BPF_ST_MEM(BPF_H, R10, -40, 0xffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7737  			BPF_LDX_MEM(BPF_H, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7738  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7739  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7740  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7741  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7742  		{ { 0, 0xffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7743  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7744  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7745  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7746  		"ST_MEM_H: Store/Load half word: max positive",
cffc642d93f9324 Michael Holzheu    2015-05-11  7747  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7748  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7749  			BPF_ST_MEM(BPF_H, R10, -40, 0x7fff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7750  			BPF_LDX_MEM(BPF_H, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7751  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7752  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7753  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7754  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7755  		{ { 0, 0x7fff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7756  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7757  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7758  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7759  		"STX_MEM_H: Store/Load half word: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7760  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7761  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7762  			BPF_LD_IMM64(R1, 0xffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7763  			BPF_STX_MEM(BPF_H, R10, R1, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7764  			BPF_LDX_MEM(BPF_H, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7765  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7766  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7767  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7768  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7769  		{ { 0, 0xffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7770  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7771  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7772  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7773  		"ST_MEM_W: Store/Load word: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7774  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7775  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7776  			BPF_ST_MEM(BPF_W, R10, -40, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7777  			BPF_LDX_MEM(BPF_W, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7778  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7779  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7780  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7781  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7782  		{ { 0, 0xffffffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7783  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7784  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7785  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7786  		"ST_MEM_W: Store/Load word: max positive",
cffc642d93f9324 Michael Holzheu    2015-05-11  7787  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7788  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7789  			BPF_ST_MEM(BPF_W, R10, -40, 0x7fffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7790  			BPF_LDX_MEM(BPF_W, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7791  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7792  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7793  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7794  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7795  		{ { 0, 0x7fffffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7796  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7797  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7798  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7799  		"STX_MEM_W: Store/Load word: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7800  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7801  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7802  			BPF_LD_IMM64(R1, 0xffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7803  			BPF_STX_MEM(BPF_W, R10, R1, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7804  			BPF_LDX_MEM(BPF_W, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7805  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7806  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7807  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7808  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7809  		{ { 0, 0xffffffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7810  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7811  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7812  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7813  		"ST_MEM_DW: Store/Load double word: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7814  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7815  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7816  			BPF_ST_MEM(BPF_DW, R10, -40, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7817  			BPF_LDX_MEM(BPF_DW, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7818  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7819  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7820  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7821  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7822  		{ { 0, 0xffffffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7823  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7824  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7825  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7826  		"ST_MEM_DW: Store/Load double word: max negative 2",
cffc642d93f9324 Michael Holzheu    2015-05-11  7827  		.u.insns_int = {
56cbaa45dde2356 Michael Holzheu    2015-05-13  7828  			BPF_LD_IMM64(R2, 0xffff00000000ffffLL),
56cbaa45dde2356 Michael Holzheu    2015-05-13  7829  			BPF_LD_IMM64(R3, 0xffffffffffffffffLL),
cffc642d93f9324 Michael Holzheu    2015-05-11  7830  			BPF_ST_MEM(BPF_DW, R10, -40, 0xffffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7831  			BPF_LDX_MEM(BPF_DW, R2, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7832  			BPF_JMP_REG(BPF_JEQ, R2, R3, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  7833  			BPF_MOV32_IMM(R0, 2),
cffc642d93f9324 Michael Holzheu    2015-05-11  7834  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7835  			BPF_MOV32_IMM(R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7836  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7837  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7838  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7839  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7840  		{ { 0, 0x1 } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7841  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7842  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7843  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7844  		"ST_MEM_DW: Store/Load double word: max positive",
cffc642d93f9324 Michael Holzheu    2015-05-11  7845  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7846  			BPF_ALU32_IMM(BPF_MOV, R0, 1),
cffc642d93f9324 Michael Holzheu    2015-05-11  7847  			BPF_ST_MEM(BPF_DW, R10, -40, 0x7fffffff),
cffc642d93f9324 Michael Holzheu    2015-05-11  7848  			BPF_LDX_MEM(BPF_DW, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7849  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7850  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7851  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7852  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7853  		{ { 0, 0x7fffffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7854  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7855  	},
cffc642d93f9324 Michael Holzheu    2015-05-11  7856  	{
cffc642d93f9324 Michael Holzheu    2015-05-11  7857  		"STX_MEM_DW: Store/Load double word: max negative",
cffc642d93f9324 Michael Holzheu    2015-05-11  7858  		.u.insns_int = {
cffc642d93f9324 Michael Holzheu    2015-05-11  7859  			BPF_LD_IMM64(R0, 0),
cffc642d93f9324 Michael Holzheu    2015-05-11  7860  			BPF_LD_IMM64(R1, 0xffffffffffffffffLL),
ae7f47041d928b1 Johan Almbladh     2021-07-21  7861  			BPF_STX_MEM(BPF_DW, R10, R1, -40),
ae7f47041d928b1 Johan Almbladh     2021-07-21  7862  			BPF_LDX_MEM(BPF_DW, R0, R10, -40),
cffc642d93f9324 Michael Holzheu    2015-05-11  7863  			BPF_EXIT_INSN(),
cffc642d93f9324 Michael Holzheu    2015-05-11  7864  		},
cffc642d93f9324 Michael Holzheu    2015-05-11  7865  		INTERNAL,
cffc642d93f9324 Michael Holzheu    2015-05-11  7866  		{ },
cffc642d93f9324 Michael Holzheu    2015-05-11  7867  		{ { 0, 0xffffffff } },
105c03614bff2de Alexei Starovoitov 2017-05-30  7868  		.stack_depth = 40,
cffc642d93f9324 Michael Holzheu    2015-05-11  7869  	},
e5009b4636cb593 Johan Almbladh     2021-08-09  7870  	{
e5009b4636cb593 Johan Almbladh     2021-08-09  7871  		"STX_MEM_DW: Store double word: first word in memory",
e5009b4636cb593 Johan Almbladh     2021-08-09  7872  		.u.insns_int = {
e5009b4636cb593 Johan Almbladh     2021-08-09  7873  			BPF_LD_IMM64(R0, 0),
e5009b4636cb593 Johan Almbladh     2021-08-09  7874  			BPF_LD_IMM64(R1, 0x0123456789abcdefLL),
e5009b4636cb593 Johan Almbladh     2021-08-09  7875  			BPF_STX_MEM(BPF_DW, R10, R1, -40),
e5009b4636cb593 Johan Almbladh     2021-08-09  7876  			BPF_LDX_MEM(BPF_W, R0, R10, -40),
e5009b4636cb593 Johan Almbladh     2021-08-09  7877  			BPF_EXIT_INSN(),
e5009b4636cb593 Johan Almbladh     2021-08-09  7878  		},
e5009b4636cb593 Johan Almbladh     2021-08-09  7879  		INTERNAL,
e5009b4636cb593 Johan Almbladh     2021-08-09  7880  		{ },
e5009b4636cb593 Johan Almbladh     2021-08-09  7881  #ifdef __BIG_ENDIAN
e5009b4636cb593 Johan Almbladh     2021-08-09  7882  		{ { 0, 0x01234567 } },
e5009b4636cb593 Johan Almbladh     2021-08-09  7883  #else
e5009b4636cb593 Johan Almbladh     2021-08-09  7884  		{ { 0, 0x89abcdef } },
e5009b4636cb593 Johan Almbladh     2021-08-09  7885  #endif
e5009b4636cb593 Johan Almbladh     2021-08-09  7886  		.stack_depth = 40,
e5009b4636cb593 Johan Almbladh     2021-08-09  7887  	},
e5009b4636cb593 Johan Almbladh     2021-08-09  7888  	{
e5009b4636cb593 Johan Almbladh     2021-08-09  7889  		"STX_MEM_DW: Store double word: second word in memory",
e5009b4636cb593 Johan Almbladh     2021-08-09  7890  		.u.insns_int = {
e5009b4636cb593 Johan Almbladh     2021-08-09  7891  			BPF_LD_IMM64(R0, 0),
e5009b4636cb593 Johan Almbladh     2021-08-09  7892  			BPF_LD_IMM64(R1, 0x0123456789abcdefLL),
e5009b4636cb593 Johan Almbladh     2021-08-09  7893  			BPF_STX_MEM(BPF_DW, R10, R1, -40),
e5009b4636cb593 Johan Almbladh     2021-08-09  7894  			BPF_LDX_MEM(BPF_W, R0, R10, -36),
e5009b4636cb593 Johan Almbladh     2021-08-09  7895  			BPF_EXIT_INSN(),
e5009b4636cb593 Johan Almbladh     2021-08-09  7896  		},
e5009b4636cb593 Johan Almbladh     2021-08-09  7897  		INTERNAL,
e5009b4636cb593 Johan Almbladh     2021-08-09  7898  		{ },
e5009b4636cb593 Johan Almbladh     2021-08-09  7899  #ifdef __BIG_ENDIAN
e5009b4636cb593 Johan Almbladh     2021-08-09  7900  		{ { 0, 0x89abcdef } },
e5009b4636cb593 Johan Almbladh     2021-08-09  7901  #else
e5009b4636cb593 Johan Almbladh     2021-08-09  7902  		{ { 0, 0x01234567 } },
e5009b4636cb593 Johan Almbladh     2021-08-09  7903  #endif
e5009b4636cb593 Johan Almbladh     2021-08-09  7904  		.stack_depth = 40,
e5009b4636cb593 Johan Almbladh     2021-08-09  7905  	},
91c960b0056672e Brendan Jackman    2021-01-14  7906  	/* BPF_STX | BPF_ATOMIC | BPF_W/DW */
85f68fe89832057 Daniel Borkmann    2017-05-01  7907  	{
85f68fe89832057 Daniel Borkmann    2017-05-01  7908  		"STX_XADD_W: X + 1 + 1 + 1 + ...",
85f68fe89832057 Daniel Borkmann    2017-05-01  7909  		{ },
85f68fe89832057 Daniel Borkmann    2017-05-01  7910  		INTERNAL,
85f68fe89832057 Daniel Borkmann    2017-05-01  7911  		{ },
85f68fe89832057 Daniel Borkmann    2017-05-01  7912  		{ { 0, 4134 } },
85f68fe89832057 Daniel Borkmann    2017-05-01  7913  		.fill_helper = bpf_fill_stxw,
85f68fe89832057 Daniel Borkmann    2017-05-01  7914  	},
85f68fe89832057 Daniel Borkmann    2017-05-01  7915  	{
85f68fe89832057 Daniel Borkmann    2017-05-01  7916  		"STX_XADD_DW: X + 1 + 1 + 1 + ...",
85f68fe89832057 Daniel Borkmann    2017-05-01  7917  		{ },
85f68fe89832057 Daniel Borkmann    2017-05-01  7918  		INTERNAL,
85f68fe89832057 Daniel Borkmann    2017-05-01  7919  		{ },
85f68fe89832057 Daniel Borkmann    2017-05-01  7920  		{ { 0, 4134 } },
85f68fe89832057 Daniel Borkmann    2017-05-01  7921  		.fill_helper = bpf_fill_stxdw,
85f68fe89832057 Daniel Borkmann    2017-05-01  7922  	},
e4517b3637c648b Johan Almbladh     2021-08-09  7923  	/*
e4517b3637c648b Johan Almbladh     2021-08-09  7924  	 * Exhaustive tests of atomic operation variants.
e4517b3637c648b Johan Almbladh     2021-08-09  7925  	 * Individual tests are expanded from template macros for all
e4517b3637c648b Johan Almbladh     2021-08-09  7926  	 * combinations of ALU operation, word size and fetching.
e4517b3637c648b Johan Almbladh     2021-08-09  7927  	 */
eb2947361f01693 Johan Almbladh     2021-10-01  7928  #define BPF_ATOMIC_POISON(width) ((width) == BPF_W ? (0xbaadf00dULL << 32) : 0)
eb2947361f01693 Johan Almbladh     2021-10-01  7929  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42196 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-11-11 23:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 13:03 [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 01/10] bpf/tests: Add tests of BPF_LDX and BPF_STX with small sizes Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 02/10] bpf/tests: Add zero-extension checks in BPF_ATOMIC tests Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 03/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC magnitudes Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 04/10] bpf/tests: Add tests to check source register zero-extension Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 05/10] bpf/tests: Add more tests for ALU and ATOMIC register clobbering Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 06/10] bpf/tests: Minor restructuring of ALU tests Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 07/10] bpf/tests: Add exhaustive tests of ALU register combinations Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 08/10] bpf/tests: Add exhaustive tests of BPF_ATOMIC " Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 09/10] bpf/tests: Add test of ALU shifts with operand register aliasing Johan Almbladh
2021-10-01 13:03 ` [PATCH bpf-next 10/10] bpf/tests: Add test of LDX_MEM with operand aliasing Johan Almbladh
2021-10-01 15:10 ` [PATCH bpf-next 00/10] bpf/tests: Extend eBPF JIT test suite patchwork-bot+netdevbpf
2021-11-11 23:21 [PATCH bpf-next 07/10] bpf/tests: Add exhaustive tests of ALU register combinations kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.