diff --git a/Directory.Build.props b/Directory.Build.props index 7828cf3a5c..b5630da24f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ 0 - 20 + 21 0 $(EbpfVersion_Major).$(EbpfVersion_Minor).$(EbpfVersion_Revision) diff --git a/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_dll.c b/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_dll.c index 57a9484f51..6066c073c9 100644 --- a/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_dll.c +++ b/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_dll.c @@ -181,7 +181,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_raw.c b/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_raw.c index 1626e6eeb9..a28a8d9abc 100644 --- a/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_raw.c +++ b/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_raw.c @@ -155,7 +155,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_sys.c b/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_sys.c index a5460733b8..210f37ea75 100644 --- a/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_sys.c +++ b/tests/bpf2c_tests/expected/atomic_instruction_fetch_add_sys.c @@ -316,7 +316,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bad_map_name_dll.c b/tests/bpf2c_tests/expected/bad_map_name_dll.c index 76b3219a48..62a72fcb53 100644 --- a/tests/bpf2c_tests/expected/bad_map_name_dll.c +++ b/tests/bpf2c_tests/expected/bad_map_name_dll.c @@ -181,7 +181,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bad_map_name_raw.c b/tests/bpf2c_tests/expected/bad_map_name_raw.c index cd7772a03a..3cc0399c17 100644 --- a/tests/bpf2c_tests/expected/bad_map_name_raw.c +++ b/tests/bpf2c_tests/expected/bad_map_name_raw.c @@ -155,7 +155,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bad_map_name_sys.c b/tests/bpf2c_tests/expected/bad_map_name_sys.c index fc031e17f5..9b89c3c9b6 100644 --- a/tests/bpf2c_tests/expected/bad_map_name_sys.c +++ b/tests/bpf2c_tests/expected/bad_map_name_sys.c @@ -316,7 +316,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_dll.c b/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_dll.c index fb7f9c54ba..db48098b0a 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_dll.c +++ b/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_dll.c @@ -320,7 +320,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_raw.c b/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_raw.c index e502455694..0ae8379ade 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_raw.c +++ b/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_raw.c @@ -294,7 +294,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_sys.c b/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_sys.c index 2f7f837e1e..e94f6e90c5 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_sys.c +++ b/tests/bpf2c_tests/expected/bindmonitor_bpf2bpf_sys.c @@ -455,7 +455,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_dll.c b/tests/bpf2c_tests/expected/bindmonitor_dll.c index 0212d283b0..358778b758 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_dll.c +++ b/tests/bpf2c_tests/expected/bindmonitor_dll.c @@ -134,6 +134,8 @@ BindMonitor(void* context) register uint64_t r7 = 0; #line 112 "sample/bindmonitor.c" register uint64_t r8 = 0; +#line 112 "sample/bindmonitor.c" + register uint64_t r9 = 0; #line 112 "sample/bindmonitor.c" register uint64_t r10 = 0; @@ -145,12 +147,12 @@ BindMonitor(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 112 "sample/bindmonitor.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r8 src=r0 offset=0 imm=0 #line 112 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-84 imm=0 + r8 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r8 offset=-84 imm=0 #line 114 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r8; // EBPF_OP_CALL pc=3 dst=r0 src=r0 offset=0 imm=19 #line 61 "sample/bindmonitor.c" r0 = BindMonitor_helpers[0].address(r1, r2, r3, r4, r5, context); @@ -163,9 +165,9 @@ BindMonitor(void* context) // EBPF_OP_STXDW pc=4 dst=r10 src=r0 offset=-8 imm=0 #line 61 "sample/bindmonitor.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r0; - // EBPF_OP_STXDW pc=5 dst=r10 src=r7 offset=-72 imm=0 + // EBPF_OP_STXDW pc=5 dst=r10 src=r8 offset=-72 imm=0 #line 62 "sample/bindmonitor.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r7; + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r8; // EBPF_OP_MOV64_REG pc=6 dst=r1 src=r6 offset=0 imm=0 #line 64 "sample/bindmonitor.c" r1 = r6; @@ -241,26 +243,26 @@ BindMonitor(void* context) return 0; #line 119 "sample/bindmonitor.c" } - // EBPF_OP_JEQ_IMM pc=25 dst=r0 src=r0 offset=75 imm=0 + // EBPF_OP_MOV64_REG pc=25 dst=r7 src=r0 offset=0 imm=0 +#line 119 "sample/bindmonitor.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=26 dst=r7 src=r0 offset=77 imm=0 #line 120 "sample/bindmonitor.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 120 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 120 "sample/bindmonitor.c" } - // EBPF_OP_LDXW pc=26 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r1 src=r7 offset=0 imm=0 #line 120 "sample/bindmonitor.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=27 dst=r1 src=r0 offset=73 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=28 dst=r1 src=r0 offset=75 imm=0 #line 120 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 120 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 120 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=28 dst=r8 src=r0 offset=0 imm=0 -#line 120 "sample/bindmonitor.c" - r8 = r0; // EBPF_OP_LDXDW pc=29 dst=r1 src=r6 offset=16 imm=0 #line 73 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); @@ -315,65 +317,68 @@ BindMonitor(void* context) return 0; #line 78 "sample/bindmonitor.c" } - // EBPF_OP_JNE_IMM pc=46 dst=r0 src=r0 offset=29 imm=0 + // EBPF_OP_MOV64_REG pc=46 dst=r9 src=r0 offset=0 imm=0 +#line 78 "sample/bindmonitor.c" + r9 = r0; + // EBPF_OP_JNE_IMM pc=47 dst=r9 src=r0 offset=28 imm=0 #line 79 "sample/bindmonitor.c" - if (r0 != IMMEDIATE(0)) { + if (r9 != IMMEDIATE(0)) { #line 79 "sample/bindmonitor.c" goto label_1; #line 79 "sample/bindmonitor.c" } - // EBPF_OP_LDXW pc=47 dst=r1 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=48 dst=r1 src=r6 offset=44 imm=0 #line 83 "sample/bindmonitor.c" r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=48 dst=r1 src=r0 offset=51 imm=0 + // EBPF_OP_JNE_IMM pc=49 dst=r1 src=r0 offset=53 imm=0 #line 83 "sample/bindmonitor.c" if (r1 != IMMEDIATE(0)) { #line 83 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 83 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=49 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=50 dst=r1 src=r6 offset=0 imm=0 #line 87 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=50 dst=r1 src=r0 offset=49 imm=0 + // EBPF_OP_JEQ_IMM pc=51 dst=r1 src=r0 offset=51 imm=0 #line 87 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 87 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 87 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=51 dst=r1 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=52 dst=r1 src=r6 offset=8 imm=0 #line 87 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_JEQ_IMM pc=52 dst=r1 src=r0 offset=47 imm=0 + // EBPF_OP_JEQ_IMM pc=53 dst=r1 src=r0 offset=49 imm=0 #line 87 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 87 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 87 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=53 dst=r7 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=54 dst=r8 src=r10 offset=0 imm=0 #line 87 "sample/bindmonitor.c" - r7 = r10; - // EBPF_OP_ADD64_IMM pc=54 dst=r7 src=r0 offset=0 imm=-8 + r8 = r10; + // EBPF_OP_ADD64_IMM pc=55 dst=r8 src=r0 offset=0 imm=-8 #line 91 "sample/bindmonitor.c" - r7 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=55 dst=r3 src=r10 offset=0 imm=0 + r8 += IMMEDIATE(-8); + // EBPF_OP_MOV64_REG pc=56 dst=r3 src=r10 offset=0 imm=0 #line 91 "sample/bindmonitor.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=56 dst=r3 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=57 dst=r3 src=r0 offset=0 imm=-80 #line 91 "sample/bindmonitor.c" r3 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=57 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=58 dst=r1 src=r1 offset=0 imm=2 #line 91 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_REG pc=59 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=60 dst=r2 src=r8 offset=0 imm=0 #line 91 "sample/bindmonitor.c" - r2 = r7; - // EBPF_OP_MOV64_IMM pc=60 dst=r4 src=r0 offset=0 imm=0 + r2 = r8; + // EBPF_OP_MOV64_IMM pc=61 dst=r4 src=r0 offset=0 imm=0 #line 91 "sample/bindmonitor.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=61 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=62 dst=r0 src=r0 offset=0 imm=2 #line 91 "sample/bindmonitor.c" r0 = BindMonitor_helpers[3].address(r1, r2, r3, r4, r5, context); #line 91 "sample/bindmonitor.c" @@ -382,13 +387,13 @@ BindMonitor(void* context) return 0; #line 91 "sample/bindmonitor.c" } - // EBPF_OP_LDDW pc=62 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=63 dst=r1 src=r1 offset=0 imm=2 #line 92 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_REG pc=64 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=65 dst=r2 src=r8 offset=0 imm=0 #line 92 "sample/bindmonitor.c" - r2 = r7; - // EBPF_OP_CALL pc=65 dst=r0 src=r0 offset=0 imm=1 + r2 = r8; + // EBPF_OP_CALL pc=66 dst=r0 src=r0 offset=0 imm=1 #line 92 "sample/bindmonitor.c" r0 = BindMonitor_helpers[4].address(r1, r2, r3, r4, r5, context); #line 92 "sample/bindmonitor.c" @@ -397,35 +402,35 @@ BindMonitor(void* context) return 0; #line 92 "sample/bindmonitor.c" } - // EBPF_OP_JEQ_IMM pc=66 dst=r0 src=r0 offset=33 imm=0 + // EBPF_OP_MOV64_REG pc=67 dst=r9 src=r0 offset=0 imm=0 +#line 92 "sample/bindmonitor.c" + r9 = r0; + // EBPF_OP_JEQ_IMM pc=68 dst=r9 src=r0 offset=34 imm=0 #line 93 "sample/bindmonitor.c" - if (r0 == IMMEDIATE(0)) { + if (r9 == IMMEDIATE(0)) { #line 93 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 93 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=67 dst=r3 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=69 dst=r3 src=r6 offset=0 imm=0 #line 97 "sample/bindmonitor.c" r3 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=68 dst=r4 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=70 dst=r4 src=r6 offset=8 imm=0 #line 97 "sample/bindmonitor.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_SUB64_REG pc=69 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_SUB64_REG pc=71 dst=r4 src=r3 offset=0 imm=0 #line 97 "sample/bindmonitor.c" r4 -= r3; - // EBPF_OP_MOV64_REG pc=70 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=72 dst=r1 src=r9 offset=0 imm=0 #line 97 "sample/bindmonitor.c" - r1 = r0; - // EBPF_OP_ADD64_IMM pc=71 dst=r1 src=r0 offset=0 imm=4 + r1 = r9; + // EBPF_OP_ADD64_IMM pc=73 dst=r1 src=r0 offset=0 imm=4 #line 97 "sample/bindmonitor.c" r1 += IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=72 dst=r2 src=r0 offset=0 imm=64 + // EBPF_OP_MOV64_IMM pc=74 dst=r2 src=r0 offset=0 imm=64 #line 97 "sample/bindmonitor.c" r2 = IMMEDIATE(64); - // EBPF_OP_MOV64_REG pc=73 dst=r7 src=r0 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r7 = r0; - // EBPF_OP_CALL pc=74 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=75 dst=r0 src=r0 offset=0 imm=22 #line 97 "sample/bindmonitor.c" r0 = BindMonitor_helpers[5].address(r1, r2, r3, r4, r5, context); #line 97 "sample/bindmonitor.c" @@ -434,100 +439,107 @@ BindMonitor(void* context) return 0; #line 97 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=75 dst=r0 src=r7 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r0 = r7; label_1: - // EBPF_OP_LDXW pc=76 dst=r1 src=r0 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_LDXW pc=77 dst=r2 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=76 dst=r1 src=r6 offset=44 imm=0 #line 130 "sample/bindmonitor.c" - r2 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JEQ_IMM pc=78 dst=r2 src=r0 offset=7 imm=2 + r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); + // EBPF_OP_JEQ_IMM pc=77 dst=r1 src=r0 offset=8 imm=2 #line 130 "sample/bindmonitor.c" - if (r2 == IMMEDIATE(2)) { + if (r1 == IMMEDIATE(2)) { #line 130 "sample/bindmonitor.c" goto label_2; #line 130 "sample/bindmonitor.c" } - // EBPF_OP_JNE_IMM pc=79 dst=r2 src=r0 offset=9 imm=0 + // EBPF_OP_JNE_IMM pc=78 dst=r1 src=r0 offset=12 imm=0 #line 130 "sample/bindmonitor.c" - if (r2 != IMMEDIATE(0)) { + if (r1 != IMMEDIATE(0)) { #line 130 "sample/bindmonitor.c" goto label_3; #line 130 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_IMM pc=80 dst=r7 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=79 dst=r8 src=r0 offset=0 imm=1 #line 130 "sample/bindmonitor.c" - r7 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=81 dst=r2 src=r8 offset=0 imm=0 + r8 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=80 dst=r1 src=r9 offset=0 imm=0 #line 132 "sample/bindmonitor.c" - r2 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); - // EBPF_OP_JGE_REG pc=82 dst=r1 src=r2 offset=18 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); + // EBPF_OP_LDXW pc=81 dst=r2 src=r7 offset=0 imm=0 +#line 132 "sample/bindmonitor.c" + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JGE_REG pc=82 dst=r1 src=r2 offset=21 imm=0 #line 132 "sample/bindmonitor.c" if (r1 >= r2) { #line 132 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 132 "sample/bindmonitor.c" } // EBPF_OP_ADD64_IMM pc=83 dst=r1 src=r0 offset=0 imm=1 #line 136 "sample/bindmonitor.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXW pc=84 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=84 dst=r9 src=r1 offset=0 imm=0 #line 136 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_JA pc=85 dst=r0 src=r0 offset=14 imm=0 + *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=85 dst=r0 src=r0 offset=17 imm=0 #line 136 "sample/bindmonitor.c" - goto label_5; + goto label_6; label_2: - // EBPF_OP_JEQ_IMM pc=86 dst=r1 src=r0 offset=6 imm=0 + // EBPF_OP_LDXW pc=86 dst=r1 src=r9 offset=0 imm=0 +#line 139 "sample/bindmonitor.c" + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=87 dst=r1 src=r0 offset=8 imm=0 #line 139 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 139 "sample/bindmonitor.c" - goto label_4; + goto label_5; #line 139 "sample/bindmonitor.c" } - // EBPF_OP_ADD64_IMM pc=87 dst=r1 src=r0 offset=0 imm=-1 + // EBPF_OP_ADD64_IMM pc=88 dst=r1 src=r0 offset=0 imm=-1 #line 140 "sample/bindmonitor.c" r1 += IMMEDIATE(-1); - // EBPF_OP_STXW pc=88 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=89 dst=r9 src=r1 offset=0 imm=0 #line 140 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; -label_3: - // EBPF_OP_MOV64_IMM pc=89 dst=r7 src=r0 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=90 dst=r0 src=r0 offset=1 imm=0 #line 140 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); - // EBPF_OP_LSH64_IMM pc=90 dst=r1 src=r0 offset=0 imm=32 + goto label_4; +label_3: + // EBPF_OP_LDXW pc=91 dst=r1 src=r9 offset=0 imm=0 +#line 147 "sample/bindmonitor.c" + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); +label_4: + // EBPF_OP_MOV64_IMM pc=92 dst=r8 src=r0 offset=0 imm=0 +#line 147 "sample/bindmonitor.c" + r8 = IMMEDIATE(0); + // EBPF_OP_LSH64_IMM pc=93 dst=r1 src=r0 offset=0 imm=32 #line 147 "sample/bindmonitor.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=91 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=94 dst=r1 src=r0 offset=0 imm=32 #line 147 "sample/bindmonitor.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=92 dst=r1 src=r0 offset=8 imm=0 + // EBPF_OP_JNE_IMM pc=95 dst=r1 src=r0 offset=8 imm=0 #line 147 "sample/bindmonitor.c" if (r1 != IMMEDIATE(0)) { #line 147 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 147 "sample/bindmonitor.c" } -label_4: - // EBPF_OP_LDXDW pc=93 dst=r1 src=r6 offset=16 imm=0 +label_5: + // EBPF_OP_LDXDW pc=96 dst=r1 src=r6 offset=16 imm=0 #line 148 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); - // EBPF_OP_STXDW pc=94 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=97 dst=r10 src=r1 offset=-80 imm=0 #line 148 "sample/bindmonitor.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=95 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=98 dst=r2 src=r10 offset=0 imm=0 #line 148 "sample/bindmonitor.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=96 dst=r2 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=99 dst=r2 src=r0 offset=0 imm=-80 #line 148 "sample/bindmonitor.c" r2 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=97 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=100 dst=r1 src=r1 offset=0 imm=2 #line 149 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_CALL pc=99 dst=r0 src=r0 offset=0 imm=3 + // EBPF_OP_CALL pc=102 dst=r0 src=r0 offset=0 imm=3 #line 149 "sample/bindmonitor.c" r0 = BindMonitor_helpers[6].address(r1, r2, r3, r4, r5, context); #line 149 "sample/bindmonitor.c" @@ -536,15 +548,15 @@ BindMonitor(void* context) return 0; #line 149 "sample/bindmonitor.c" } -label_5: - // EBPF_OP_MOV64_IMM pc=100 dst=r7 src=r0 offset=0 imm=0 -#line 149 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); label_6: - // EBPF_OP_MOV64_REG pc=101 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=103 dst=r8 src=r0 offset=0 imm=0 +#line 149 "sample/bindmonitor.c" + r8 = IMMEDIATE(0); +label_7: + // EBPF_OP_MOV64_REG pc=104 dst=r0 src=r8 offset=0 imm=0 #line 153 "sample/bindmonitor.c" - r0 = r7; - // EBPF_OP_EXIT pc=102 dst=r0 src=r0 offset=0 imm=0 + r0 = r8; + // EBPF_OP_EXIT pc=105 dst=r0 src=r0 offset=0 imm=0 #line 153 "sample/bindmonitor.c" return r0; #line 112 "sample/bindmonitor.c" @@ -564,7 +576,7 @@ static program_entry_t _programs[] = { 3, BindMonitor_helpers, 7, - 103, + 106, &BindMonitor_program_type_guid, &BindMonitor_attach_type_guid, }, @@ -582,7 +594,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_dll.c b/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_dll.c index 250c49e617..15249c5fa2 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_dll.c +++ b/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_dll.c @@ -6256,7 +6256,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_raw.c b/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_raw.c index d07b56af34..2a31e442c3 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_raw.c +++ b/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_raw.c @@ -6230,7 +6230,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_sys.c b/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_sys.c index ad9b7cc058..9608adf8c5 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_sys.c +++ b/tests/bpf2c_tests/expected/bindmonitor_mt_tailcall_sys.c @@ -6391,7 +6391,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_raw.c b/tests/bpf2c_tests/expected/bindmonitor_raw.c index 2e98c4f997..226346fbe9 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_raw.c +++ b/tests/bpf2c_tests/expected/bindmonitor_raw.c @@ -108,6 +108,8 @@ BindMonitor(void* context) register uint64_t r7 = 0; #line 112 "sample/bindmonitor.c" register uint64_t r8 = 0; +#line 112 "sample/bindmonitor.c" + register uint64_t r9 = 0; #line 112 "sample/bindmonitor.c" register uint64_t r10 = 0; @@ -119,12 +121,12 @@ BindMonitor(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 112 "sample/bindmonitor.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r8 src=r0 offset=0 imm=0 #line 112 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-84 imm=0 + r8 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r8 offset=-84 imm=0 #line 114 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r8; // EBPF_OP_CALL pc=3 dst=r0 src=r0 offset=0 imm=19 #line 61 "sample/bindmonitor.c" r0 = BindMonitor_helpers[0].address(r1, r2, r3, r4, r5, context); @@ -137,9 +139,9 @@ BindMonitor(void* context) // EBPF_OP_STXDW pc=4 dst=r10 src=r0 offset=-8 imm=0 #line 61 "sample/bindmonitor.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r0; - // EBPF_OP_STXDW pc=5 dst=r10 src=r7 offset=-72 imm=0 + // EBPF_OP_STXDW pc=5 dst=r10 src=r8 offset=-72 imm=0 #line 62 "sample/bindmonitor.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r7; + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r8; // EBPF_OP_MOV64_REG pc=6 dst=r1 src=r6 offset=0 imm=0 #line 64 "sample/bindmonitor.c" r1 = r6; @@ -215,26 +217,26 @@ BindMonitor(void* context) return 0; #line 119 "sample/bindmonitor.c" } - // EBPF_OP_JEQ_IMM pc=25 dst=r0 src=r0 offset=75 imm=0 + // EBPF_OP_MOV64_REG pc=25 dst=r7 src=r0 offset=0 imm=0 +#line 119 "sample/bindmonitor.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=26 dst=r7 src=r0 offset=77 imm=0 #line 120 "sample/bindmonitor.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 120 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 120 "sample/bindmonitor.c" } - // EBPF_OP_LDXW pc=26 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r1 src=r7 offset=0 imm=0 #line 120 "sample/bindmonitor.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=27 dst=r1 src=r0 offset=73 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=28 dst=r1 src=r0 offset=75 imm=0 #line 120 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 120 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 120 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=28 dst=r8 src=r0 offset=0 imm=0 -#line 120 "sample/bindmonitor.c" - r8 = r0; // EBPF_OP_LDXDW pc=29 dst=r1 src=r6 offset=16 imm=0 #line 73 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); @@ -289,65 +291,68 @@ BindMonitor(void* context) return 0; #line 78 "sample/bindmonitor.c" } - // EBPF_OP_JNE_IMM pc=46 dst=r0 src=r0 offset=29 imm=0 + // EBPF_OP_MOV64_REG pc=46 dst=r9 src=r0 offset=0 imm=0 +#line 78 "sample/bindmonitor.c" + r9 = r0; + // EBPF_OP_JNE_IMM pc=47 dst=r9 src=r0 offset=28 imm=0 #line 79 "sample/bindmonitor.c" - if (r0 != IMMEDIATE(0)) { + if (r9 != IMMEDIATE(0)) { #line 79 "sample/bindmonitor.c" goto label_1; #line 79 "sample/bindmonitor.c" } - // EBPF_OP_LDXW pc=47 dst=r1 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=48 dst=r1 src=r6 offset=44 imm=0 #line 83 "sample/bindmonitor.c" r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=48 dst=r1 src=r0 offset=51 imm=0 + // EBPF_OP_JNE_IMM pc=49 dst=r1 src=r0 offset=53 imm=0 #line 83 "sample/bindmonitor.c" if (r1 != IMMEDIATE(0)) { #line 83 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 83 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=49 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=50 dst=r1 src=r6 offset=0 imm=0 #line 87 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=50 dst=r1 src=r0 offset=49 imm=0 + // EBPF_OP_JEQ_IMM pc=51 dst=r1 src=r0 offset=51 imm=0 #line 87 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 87 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 87 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=51 dst=r1 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=52 dst=r1 src=r6 offset=8 imm=0 #line 87 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_JEQ_IMM pc=52 dst=r1 src=r0 offset=47 imm=0 + // EBPF_OP_JEQ_IMM pc=53 dst=r1 src=r0 offset=49 imm=0 #line 87 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 87 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 87 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=53 dst=r7 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=54 dst=r8 src=r10 offset=0 imm=0 #line 87 "sample/bindmonitor.c" - r7 = r10; - // EBPF_OP_ADD64_IMM pc=54 dst=r7 src=r0 offset=0 imm=-8 + r8 = r10; + // EBPF_OP_ADD64_IMM pc=55 dst=r8 src=r0 offset=0 imm=-8 #line 91 "sample/bindmonitor.c" - r7 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=55 dst=r3 src=r10 offset=0 imm=0 + r8 += IMMEDIATE(-8); + // EBPF_OP_MOV64_REG pc=56 dst=r3 src=r10 offset=0 imm=0 #line 91 "sample/bindmonitor.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=56 dst=r3 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=57 dst=r3 src=r0 offset=0 imm=-80 #line 91 "sample/bindmonitor.c" r3 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=57 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=58 dst=r1 src=r1 offset=0 imm=2 #line 91 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_REG pc=59 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=60 dst=r2 src=r8 offset=0 imm=0 #line 91 "sample/bindmonitor.c" - r2 = r7; - // EBPF_OP_MOV64_IMM pc=60 dst=r4 src=r0 offset=0 imm=0 + r2 = r8; + // EBPF_OP_MOV64_IMM pc=61 dst=r4 src=r0 offset=0 imm=0 #line 91 "sample/bindmonitor.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=61 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=62 dst=r0 src=r0 offset=0 imm=2 #line 91 "sample/bindmonitor.c" r0 = BindMonitor_helpers[3].address(r1, r2, r3, r4, r5, context); #line 91 "sample/bindmonitor.c" @@ -356,13 +361,13 @@ BindMonitor(void* context) return 0; #line 91 "sample/bindmonitor.c" } - // EBPF_OP_LDDW pc=62 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=63 dst=r1 src=r1 offset=0 imm=2 #line 92 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_REG pc=64 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=65 dst=r2 src=r8 offset=0 imm=0 #line 92 "sample/bindmonitor.c" - r2 = r7; - // EBPF_OP_CALL pc=65 dst=r0 src=r0 offset=0 imm=1 + r2 = r8; + // EBPF_OP_CALL pc=66 dst=r0 src=r0 offset=0 imm=1 #line 92 "sample/bindmonitor.c" r0 = BindMonitor_helpers[4].address(r1, r2, r3, r4, r5, context); #line 92 "sample/bindmonitor.c" @@ -371,35 +376,35 @@ BindMonitor(void* context) return 0; #line 92 "sample/bindmonitor.c" } - // EBPF_OP_JEQ_IMM pc=66 dst=r0 src=r0 offset=33 imm=0 + // EBPF_OP_MOV64_REG pc=67 dst=r9 src=r0 offset=0 imm=0 +#line 92 "sample/bindmonitor.c" + r9 = r0; + // EBPF_OP_JEQ_IMM pc=68 dst=r9 src=r0 offset=34 imm=0 #line 93 "sample/bindmonitor.c" - if (r0 == IMMEDIATE(0)) { + if (r9 == IMMEDIATE(0)) { #line 93 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 93 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=67 dst=r3 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=69 dst=r3 src=r6 offset=0 imm=0 #line 97 "sample/bindmonitor.c" r3 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=68 dst=r4 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=70 dst=r4 src=r6 offset=8 imm=0 #line 97 "sample/bindmonitor.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_SUB64_REG pc=69 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_SUB64_REG pc=71 dst=r4 src=r3 offset=0 imm=0 #line 97 "sample/bindmonitor.c" r4 -= r3; - // EBPF_OP_MOV64_REG pc=70 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=72 dst=r1 src=r9 offset=0 imm=0 #line 97 "sample/bindmonitor.c" - r1 = r0; - // EBPF_OP_ADD64_IMM pc=71 dst=r1 src=r0 offset=0 imm=4 + r1 = r9; + // EBPF_OP_ADD64_IMM pc=73 dst=r1 src=r0 offset=0 imm=4 #line 97 "sample/bindmonitor.c" r1 += IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=72 dst=r2 src=r0 offset=0 imm=64 + // EBPF_OP_MOV64_IMM pc=74 dst=r2 src=r0 offset=0 imm=64 #line 97 "sample/bindmonitor.c" r2 = IMMEDIATE(64); - // EBPF_OP_MOV64_REG pc=73 dst=r7 src=r0 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r7 = r0; - // EBPF_OP_CALL pc=74 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=75 dst=r0 src=r0 offset=0 imm=22 #line 97 "sample/bindmonitor.c" r0 = BindMonitor_helpers[5].address(r1, r2, r3, r4, r5, context); #line 97 "sample/bindmonitor.c" @@ -408,100 +413,107 @@ BindMonitor(void* context) return 0; #line 97 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=75 dst=r0 src=r7 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r0 = r7; label_1: - // EBPF_OP_LDXW pc=76 dst=r1 src=r0 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_LDXW pc=77 dst=r2 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=76 dst=r1 src=r6 offset=44 imm=0 #line 130 "sample/bindmonitor.c" - r2 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JEQ_IMM pc=78 dst=r2 src=r0 offset=7 imm=2 + r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); + // EBPF_OP_JEQ_IMM pc=77 dst=r1 src=r0 offset=8 imm=2 #line 130 "sample/bindmonitor.c" - if (r2 == IMMEDIATE(2)) { + if (r1 == IMMEDIATE(2)) { #line 130 "sample/bindmonitor.c" goto label_2; #line 130 "sample/bindmonitor.c" } - // EBPF_OP_JNE_IMM pc=79 dst=r2 src=r0 offset=9 imm=0 + // EBPF_OP_JNE_IMM pc=78 dst=r1 src=r0 offset=12 imm=0 #line 130 "sample/bindmonitor.c" - if (r2 != IMMEDIATE(0)) { + if (r1 != IMMEDIATE(0)) { #line 130 "sample/bindmonitor.c" goto label_3; #line 130 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_IMM pc=80 dst=r7 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=79 dst=r8 src=r0 offset=0 imm=1 #line 130 "sample/bindmonitor.c" - r7 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=81 dst=r2 src=r8 offset=0 imm=0 + r8 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=80 dst=r1 src=r9 offset=0 imm=0 #line 132 "sample/bindmonitor.c" - r2 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); - // EBPF_OP_JGE_REG pc=82 dst=r1 src=r2 offset=18 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); + // EBPF_OP_LDXW pc=81 dst=r2 src=r7 offset=0 imm=0 +#line 132 "sample/bindmonitor.c" + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JGE_REG pc=82 dst=r1 src=r2 offset=21 imm=0 #line 132 "sample/bindmonitor.c" if (r1 >= r2) { #line 132 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 132 "sample/bindmonitor.c" } // EBPF_OP_ADD64_IMM pc=83 dst=r1 src=r0 offset=0 imm=1 #line 136 "sample/bindmonitor.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXW pc=84 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=84 dst=r9 src=r1 offset=0 imm=0 #line 136 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_JA pc=85 dst=r0 src=r0 offset=14 imm=0 + *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=85 dst=r0 src=r0 offset=17 imm=0 #line 136 "sample/bindmonitor.c" - goto label_5; + goto label_6; label_2: - // EBPF_OP_JEQ_IMM pc=86 dst=r1 src=r0 offset=6 imm=0 + // EBPF_OP_LDXW pc=86 dst=r1 src=r9 offset=0 imm=0 +#line 139 "sample/bindmonitor.c" + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=87 dst=r1 src=r0 offset=8 imm=0 #line 139 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 139 "sample/bindmonitor.c" - goto label_4; + goto label_5; #line 139 "sample/bindmonitor.c" } - // EBPF_OP_ADD64_IMM pc=87 dst=r1 src=r0 offset=0 imm=-1 + // EBPF_OP_ADD64_IMM pc=88 dst=r1 src=r0 offset=0 imm=-1 #line 140 "sample/bindmonitor.c" r1 += IMMEDIATE(-1); - // EBPF_OP_STXW pc=88 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=89 dst=r9 src=r1 offset=0 imm=0 #line 140 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; -label_3: - // EBPF_OP_MOV64_IMM pc=89 dst=r7 src=r0 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=90 dst=r0 src=r0 offset=1 imm=0 #line 140 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); - // EBPF_OP_LSH64_IMM pc=90 dst=r1 src=r0 offset=0 imm=32 + goto label_4; +label_3: + // EBPF_OP_LDXW pc=91 dst=r1 src=r9 offset=0 imm=0 +#line 147 "sample/bindmonitor.c" + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); +label_4: + // EBPF_OP_MOV64_IMM pc=92 dst=r8 src=r0 offset=0 imm=0 +#line 147 "sample/bindmonitor.c" + r8 = IMMEDIATE(0); + // EBPF_OP_LSH64_IMM pc=93 dst=r1 src=r0 offset=0 imm=32 #line 147 "sample/bindmonitor.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=91 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=94 dst=r1 src=r0 offset=0 imm=32 #line 147 "sample/bindmonitor.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=92 dst=r1 src=r0 offset=8 imm=0 + // EBPF_OP_JNE_IMM pc=95 dst=r1 src=r0 offset=8 imm=0 #line 147 "sample/bindmonitor.c" if (r1 != IMMEDIATE(0)) { #line 147 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 147 "sample/bindmonitor.c" } -label_4: - // EBPF_OP_LDXDW pc=93 dst=r1 src=r6 offset=16 imm=0 +label_5: + // EBPF_OP_LDXDW pc=96 dst=r1 src=r6 offset=16 imm=0 #line 148 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); - // EBPF_OP_STXDW pc=94 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=97 dst=r10 src=r1 offset=-80 imm=0 #line 148 "sample/bindmonitor.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=95 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=98 dst=r2 src=r10 offset=0 imm=0 #line 148 "sample/bindmonitor.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=96 dst=r2 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=99 dst=r2 src=r0 offset=0 imm=-80 #line 148 "sample/bindmonitor.c" r2 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=97 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=100 dst=r1 src=r1 offset=0 imm=2 #line 149 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_CALL pc=99 dst=r0 src=r0 offset=0 imm=3 + // EBPF_OP_CALL pc=102 dst=r0 src=r0 offset=0 imm=3 #line 149 "sample/bindmonitor.c" r0 = BindMonitor_helpers[6].address(r1, r2, r3, r4, r5, context); #line 149 "sample/bindmonitor.c" @@ -510,15 +522,15 @@ BindMonitor(void* context) return 0; #line 149 "sample/bindmonitor.c" } -label_5: - // EBPF_OP_MOV64_IMM pc=100 dst=r7 src=r0 offset=0 imm=0 -#line 149 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); label_6: - // EBPF_OP_MOV64_REG pc=101 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=103 dst=r8 src=r0 offset=0 imm=0 +#line 149 "sample/bindmonitor.c" + r8 = IMMEDIATE(0); +label_7: + // EBPF_OP_MOV64_REG pc=104 dst=r0 src=r8 offset=0 imm=0 #line 153 "sample/bindmonitor.c" - r0 = r7; - // EBPF_OP_EXIT pc=102 dst=r0 src=r0 offset=0 imm=0 + r0 = r8; + // EBPF_OP_EXIT pc=105 dst=r0 src=r0 offset=0 imm=0 #line 153 "sample/bindmonitor.c" return r0; #line 112 "sample/bindmonitor.c" @@ -538,7 +550,7 @@ static program_entry_t _programs[] = { 3, BindMonitor_helpers, 7, - 103, + 106, &BindMonitor_program_type_guid, &BindMonitor_attach_type_guid, }, @@ -556,7 +568,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_ringbuf_dll.c b/tests/bpf2c_tests/expected/bindmonitor_ringbuf_dll.c index 9e69b45c7f..760663c153 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_ringbuf_dll.c +++ b/tests/bpf2c_tests/expected/bindmonitor_ringbuf_dll.c @@ -187,7 +187,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_ringbuf_raw.c b/tests/bpf2c_tests/expected/bindmonitor_ringbuf_raw.c index 554143eda0..cefdbd059f 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_ringbuf_raw.c +++ b/tests/bpf2c_tests/expected/bindmonitor_ringbuf_raw.c @@ -161,7 +161,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_ringbuf_sys.c b/tests/bpf2c_tests/expected/bindmonitor_ringbuf_sys.c index 091b29572a..4c0c41a2a5 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_ringbuf_sys.c +++ b/tests/bpf2c_tests/expected/bindmonitor_ringbuf_sys.c @@ -322,7 +322,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_sys.c b/tests/bpf2c_tests/expected/bindmonitor_sys.c index 9fb37004e7..804e263ff1 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_sys.c +++ b/tests/bpf2c_tests/expected/bindmonitor_sys.c @@ -269,6 +269,8 @@ BindMonitor(void* context) register uint64_t r7 = 0; #line 112 "sample/bindmonitor.c" register uint64_t r8 = 0; +#line 112 "sample/bindmonitor.c" + register uint64_t r9 = 0; #line 112 "sample/bindmonitor.c" register uint64_t r10 = 0; @@ -280,12 +282,12 @@ BindMonitor(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 112 "sample/bindmonitor.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r8 src=r0 offset=0 imm=0 #line 112 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-84 imm=0 + r8 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r8 offset=-84 imm=0 #line 114 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r8; // EBPF_OP_CALL pc=3 dst=r0 src=r0 offset=0 imm=19 #line 61 "sample/bindmonitor.c" r0 = BindMonitor_helpers[0].address(r1, r2, r3, r4, r5, context); @@ -298,9 +300,9 @@ BindMonitor(void* context) // EBPF_OP_STXDW pc=4 dst=r10 src=r0 offset=-8 imm=0 #line 61 "sample/bindmonitor.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r0; - // EBPF_OP_STXDW pc=5 dst=r10 src=r7 offset=-72 imm=0 + // EBPF_OP_STXDW pc=5 dst=r10 src=r8 offset=-72 imm=0 #line 62 "sample/bindmonitor.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r7; + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r8; // EBPF_OP_MOV64_REG pc=6 dst=r1 src=r6 offset=0 imm=0 #line 64 "sample/bindmonitor.c" r1 = r6; @@ -376,26 +378,26 @@ BindMonitor(void* context) return 0; #line 119 "sample/bindmonitor.c" } - // EBPF_OP_JEQ_IMM pc=25 dst=r0 src=r0 offset=75 imm=0 + // EBPF_OP_MOV64_REG pc=25 dst=r7 src=r0 offset=0 imm=0 +#line 119 "sample/bindmonitor.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=26 dst=r7 src=r0 offset=77 imm=0 #line 120 "sample/bindmonitor.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 120 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 120 "sample/bindmonitor.c" } - // EBPF_OP_LDXW pc=26 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r1 src=r7 offset=0 imm=0 #line 120 "sample/bindmonitor.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=27 dst=r1 src=r0 offset=73 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=28 dst=r1 src=r0 offset=75 imm=0 #line 120 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 120 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 120 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=28 dst=r8 src=r0 offset=0 imm=0 -#line 120 "sample/bindmonitor.c" - r8 = r0; // EBPF_OP_LDXDW pc=29 dst=r1 src=r6 offset=16 imm=0 #line 73 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); @@ -450,65 +452,68 @@ BindMonitor(void* context) return 0; #line 78 "sample/bindmonitor.c" } - // EBPF_OP_JNE_IMM pc=46 dst=r0 src=r0 offset=29 imm=0 + // EBPF_OP_MOV64_REG pc=46 dst=r9 src=r0 offset=0 imm=0 +#line 78 "sample/bindmonitor.c" + r9 = r0; + // EBPF_OP_JNE_IMM pc=47 dst=r9 src=r0 offset=28 imm=0 #line 79 "sample/bindmonitor.c" - if (r0 != IMMEDIATE(0)) { + if (r9 != IMMEDIATE(0)) { #line 79 "sample/bindmonitor.c" goto label_1; #line 79 "sample/bindmonitor.c" } - // EBPF_OP_LDXW pc=47 dst=r1 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=48 dst=r1 src=r6 offset=44 imm=0 #line 83 "sample/bindmonitor.c" r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=48 dst=r1 src=r0 offset=51 imm=0 + // EBPF_OP_JNE_IMM pc=49 dst=r1 src=r0 offset=53 imm=0 #line 83 "sample/bindmonitor.c" if (r1 != IMMEDIATE(0)) { #line 83 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 83 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=49 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=50 dst=r1 src=r6 offset=0 imm=0 #line 87 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=50 dst=r1 src=r0 offset=49 imm=0 + // EBPF_OP_JEQ_IMM pc=51 dst=r1 src=r0 offset=51 imm=0 #line 87 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 87 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 87 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=51 dst=r1 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=52 dst=r1 src=r6 offset=8 imm=0 #line 87 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_JEQ_IMM pc=52 dst=r1 src=r0 offset=47 imm=0 + // EBPF_OP_JEQ_IMM pc=53 dst=r1 src=r0 offset=49 imm=0 #line 87 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 87 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 87 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=53 dst=r7 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=54 dst=r8 src=r10 offset=0 imm=0 #line 87 "sample/bindmonitor.c" - r7 = r10; - // EBPF_OP_ADD64_IMM pc=54 dst=r7 src=r0 offset=0 imm=-8 + r8 = r10; + // EBPF_OP_ADD64_IMM pc=55 dst=r8 src=r0 offset=0 imm=-8 #line 91 "sample/bindmonitor.c" - r7 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=55 dst=r3 src=r10 offset=0 imm=0 + r8 += IMMEDIATE(-8); + // EBPF_OP_MOV64_REG pc=56 dst=r3 src=r10 offset=0 imm=0 #line 91 "sample/bindmonitor.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=56 dst=r3 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=57 dst=r3 src=r0 offset=0 imm=-80 #line 91 "sample/bindmonitor.c" r3 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=57 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=58 dst=r1 src=r1 offset=0 imm=2 #line 91 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_REG pc=59 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=60 dst=r2 src=r8 offset=0 imm=0 #line 91 "sample/bindmonitor.c" - r2 = r7; - // EBPF_OP_MOV64_IMM pc=60 dst=r4 src=r0 offset=0 imm=0 + r2 = r8; + // EBPF_OP_MOV64_IMM pc=61 dst=r4 src=r0 offset=0 imm=0 #line 91 "sample/bindmonitor.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=61 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=62 dst=r0 src=r0 offset=0 imm=2 #line 91 "sample/bindmonitor.c" r0 = BindMonitor_helpers[3].address(r1, r2, r3, r4, r5, context); #line 91 "sample/bindmonitor.c" @@ -517,13 +522,13 @@ BindMonitor(void* context) return 0; #line 91 "sample/bindmonitor.c" } - // EBPF_OP_LDDW pc=62 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=63 dst=r1 src=r1 offset=0 imm=2 #line 92 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_REG pc=64 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=65 dst=r2 src=r8 offset=0 imm=0 #line 92 "sample/bindmonitor.c" - r2 = r7; - // EBPF_OP_CALL pc=65 dst=r0 src=r0 offset=0 imm=1 + r2 = r8; + // EBPF_OP_CALL pc=66 dst=r0 src=r0 offset=0 imm=1 #line 92 "sample/bindmonitor.c" r0 = BindMonitor_helpers[4].address(r1, r2, r3, r4, r5, context); #line 92 "sample/bindmonitor.c" @@ -532,35 +537,35 @@ BindMonitor(void* context) return 0; #line 92 "sample/bindmonitor.c" } - // EBPF_OP_JEQ_IMM pc=66 dst=r0 src=r0 offset=33 imm=0 + // EBPF_OP_MOV64_REG pc=67 dst=r9 src=r0 offset=0 imm=0 +#line 92 "sample/bindmonitor.c" + r9 = r0; + // EBPF_OP_JEQ_IMM pc=68 dst=r9 src=r0 offset=34 imm=0 #line 93 "sample/bindmonitor.c" - if (r0 == IMMEDIATE(0)) { + if (r9 == IMMEDIATE(0)) { #line 93 "sample/bindmonitor.c" - goto label_5; + goto label_6; #line 93 "sample/bindmonitor.c" } - // EBPF_OP_LDXDW pc=67 dst=r3 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=69 dst=r3 src=r6 offset=0 imm=0 #line 97 "sample/bindmonitor.c" r3 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=68 dst=r4 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=70 dst=r4 src=r6 offset=8 imm=0 #line 97 "sample/bindmonitor.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_SUB64_REG pc=69 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_SUB64_REG pc=71 dst=r4 src=r3 offset=0 imm=0 #line 97 "sample/bindmonitor.c" r4 -= r3; - // EBPF_OP_MOV64_REG pc=70 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=72 dst=r1 src=r9 offset=0 imm=0 #line 97 "sample/bindmonitor.c" - r1 = r0; - // EBPF_OP_ADD64_IMM pc=71 dst=r1 src=r0 offset=0 imm=4 + r1 = r9; + // EBPF_OP_ADD64_IMM pc=73 dst=r1 src=r0 offset=0 imm=4 #line 97 "sample/bindmonitor.c" r1 += IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=72 dst=r2 src=r0 offset=0 imm=64 + // EBPF_OP_MOV64_IMM pc=74 dst=r2 src=r0 offset=0 imm=64 #line 97 "sample/bindmonitor.c" r2 = IMMEDIATE(64); - // EBPF_OP_MOV64_REG pc=73 dst=r7 src=r0 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r7 = r0; - // EBPF_OP_CALL pc=74 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=75 dst=r0 src=r0 offset=0 imm=22 #line 97 "sample/bindmonitor.c" r0 = BindMonitor_helpers[5].address(r1, r2, r3, r4, r5, context); #line 97 "sample/bindmonitor.c" @@ -569,100 +574,107 @@ BindMonitor(void* context) return 0; #line 97 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_REG pc=75 dst=r0 src=r7 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r0 = r7; label_1: - // EBPF_OP_LDXW pc=76 dst=r1 src=r0 offset=0 imm=0 -#line 97 "sample/bindmonitor.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_LDXW pc=77 dst=r2 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=76 dst=r1 src=r6 offset=44 imm=0 #line 130 "sample/bindmonitor.c" - r2 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JEQ_IMM pc=78 dst=r2 src=r0 offset=7 imm=2 + r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); + // EBPF_OP_JEQ_IMM pc=77 dst=r1 src=r0 offset=8 imm=2 #line 130 "sample/bindmonitor.c" - if (r2 == IMMEDIATE(2)) { + if (r1 == IMMEDIATE(2)) { #line 130 "sample/bindmonitor.c" goto label_2; #line 130 "sample/bindmonitor.c" } - // EBPF_OP_JNE_IMM pc=79 dst=r2 src=r0 offset=9 imm=0 + // EBPF_OP_JNE_IMM pc=78 dst=r1 src=r0 offset=12 imm=0 #line 130 "sample/bindmonitor.c" - if (r2 != IMMEDIATE(0)) { + if (r1 != IMMEDIATE(0)) { #line 130 "sample/bindmonitor.c" goto label_3; #line 130 "sample/bindmonitor.c" } - // EBPF_OP_MOV64_IMM pc=80 dst=r7 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=79 dst=r8 src=r0 offset=0 imm=1 #line 130 "sample/bindmonitor.c" - r7 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=81 dst=r2 src=r8 offset=0 imm=0 + r8 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=80 dst=r1 src=r9 offset=0 imm=0 #line 132 "sample/bindmonitor.c" - r2 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); - // EBPF_OP_JGE_REG pc=82 dst=r1 src=r2 offset=18 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); + // EBPF_OP_LDXW pc=81 dst=r2 src=r7 offset=0 imm=0 +#line 132 "sample/bindmonitor.c" + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JGE_REG pc=82 dst=r1 src=r2 offset=21 imm=0 #line 132 "sample/bindmonitor.c" if (r1 >= r2) { #line 132 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 132 "sample/bindmonitor.c" } // EBPF_OP_ADD64_IMM pc=83 dst=r1 src=r0 offset=0 imm=1 #line 136 "sample/bindmonitor.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXW pc=84 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=84 dst=r9 src=r1 offset=0 imm=0 #line 136 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_JA pc=85 dst=r0 src=r0 offset=14 imm=0 + *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=85 dst=r0 src=r0 offset=17 imm=0 #line 136 "sample/bindmonitor.c" - goto label_5; + goto label_6; label_2: - // EBPF_OP_JEQ_IMM pc=86 dst=r1 src=r0 offset=6 imm=0 + // EBPF_OP_LDXW pc=86 dst=r1 src=r9 offset=0 imm=0 +#line 139 "sample/bindmonitor.c" + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=87 dst=r1 src=r0 offset=8 imm=0 #line 139 "sample/bindmonitor.c" if (r1 == IMMEDIATE(0)) { #line 139 "sample/bindmonitor.c" - goto label_4; + goto label_5; #line 139 "sample/bindmonitor.c" } - // EBPF_OP_ADD64_IMM pc=87 dst=r1 src=r0 offset=0 imm=-1 + // EBPF_OP_ADD64_IMM pc=88 dst=r1 src=r0 offset=0 imm=-1 #line 140 "sample/bindmonitor.c" r1 += IMMEDIATE(-1); - // EBPF_OP_STXW pc=88 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=89 dst=r9 src=r1 offset=0 imm=0 #line 140 "sample/bindmonitor.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; -label_3: - // EBPF_OP_MOV64_IMM pc=89 dst=r7 src=r0 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=90 dst=r0 src=r0 offset=1 imm=0 #line 140 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); - // EBPF_OP_LSH64_IMM pc=90 dst=r1 src=r0 offset=0 imm=32 + goto label_4; +label_3: + // EBPF_OP_LDXW pc=91 dst=r1 src=r9 offset=0 imm=0 +#line 147 "sample/bindmonitor.c" + r1 = *(uint32_t*)(uintptr_t)(r9 + OFFSET(0)); +label_4: + // EBPF_OP_MOV64_IMM pc=92 dst=r8 src=r0 offset=0 imm=0 +#line 147 "sample/bindmonitor.c" + r8 = IMMEDIATE(0); + // EBPF_OP_LSH64_IMM pc=93 dst=r1 src=r0 offset=0 imm=32 #line 147 "sample/bindmonitor.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=91 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=94 dst=r1 src=r0 offset=0 imm=32 #line 147 "sample/bindmonitor.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=92 dst=r1 src=r0 offset=8 imm=0 + // EBPF_OP_JNE_IMM pc=95 dst=r1 src=r0 offset=8 imm=0 #line 147 "sample/bindmonitor.c" if (r1 != IMMEDIATE(0)) { #line 147 "sample/bindmonitor.c" - goto label_6; + goto label_7; #line 147 "sample/bindmonitor.c" } -label_4: - // EBPF_OP_LDXDW pc=93 dst=r1 src=r6 offset=16 imm=0 +label_5: + // EBPF_OP_LDXDW pc=96 dst=r1 src=r6 offset=16 imm=0 #line 148 "sample/bindmonitor.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); - // EBPF_OP_STXDW pc=94 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=97 dst=r10 src=r1 offset=-80 imm=0 #line 148 "sample/bindmonitor.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=95 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=98 dst=r2 src=r10 offset=0 imm=0 #line 148 "sample/bindmonitor.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=96 dst=r2 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=99 dst=r2 src=r0 offset=0 imm=-80 #line 148 "sample/bindmonitor.c" r2 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=97 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=100 dst=r1 src=r1 offset=0 imm=2 #line 149 "sample/bindmonitor.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_CALL pc=99 dst=r0 src=r0 offset=0 imm=3 + // EBPF_OP_CALL pc=102 dst=r0 src=r0 offset=0 imm=3 #line 149 "sample/bindmonitor.c" r0 = BindMonitor_helpers[6].address(r1, r2, r3, r4, r5, context); #line 149 "sample/bindmonitor.c" @@ -671,15 +683,15 @@ BindMonitor(void* context) return 0; #line 149 "sample/bindmonitor.c" } -label_5: - // EBPF_OP_MOV64_IMM pc=100 dst=r7 src=r0 offset=0 imm=0 -#line 149 "sample/bindmonitor.c" - r7 = IMMEDIATE(0); label_6: - // EBPF_OP_MOV64_REG pc=101 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=103 dst=r8 src=r0 offset=0 imm=0 +#line 149 "sample/bindmonitor.c" + r8 = IMMEDIATE(0); +label_7: + // EBPF_OP_MOV64_REG pc=104 dst=r0 src=r8 offset=0 imm=0 #line 153 "sample/bindmonitor.c" - r0 = r7; - // EBPF_OP_EXIT pc=102 dst=r0 src=r0 offset=0 imm=0 + r0 = r8; + // EBPF_OP_EXIT pc=105 dst=r0 src=r0 offset=0 imm=0 #line 153 "sample/bindmonitor.c" return r0; #line 112 "sample/bindmonitor.c" @@ -699,7 +711,7 @@ static program_entry_t _programs[] = { 3, BindMonitor_helpers, 7, - 103, + 106, &BindMonitor_program_type_guid, &BindMonitor_attach_type_guid, }, @@ -717,7 +729,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_tailcall_dll.c b/tests/bpf2c_tests/expected/bindmonitor_tailcall_dll.c index 6aec80723f..c3f16c33ff 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_tailcall_dll.c +++ b/tests/bpf2c_tests/expected/bindmonitor_tailcall_dll.c @@ -396,6 +396,8 @@ BindMonitor_Callee1(void* context) register uint64_t r7 = 0; #line 152 "sample/bindmonitor_tailcall.c" register uint64_t r8 = 0; +#line 152 "sample/bindmonitor_tailcall.c" + register uint64_t r9 = 0; #line 152 "sample/bindmonitor_tailcall.c" register uint64_t r10 = 0; @@ -407,12 +409,12 @@ BindMonitor_Callee1(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 152 "sample/bindmonitor_tailcall.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r9 src=r0 offset=0 imm=0 #line 152 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-84 imm=0 + r9 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r9 offset=-84 imm=0 #line 154 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r9; // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r10 offset=0 imm=0 #line 154 "sample/bindmonitor_tailcall.c" r2 = r10; @@ -431,26 +433,26 @@ BindMonitor_Callee1(void* context) return 0; #line 156 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JEQ_IMM pc=8 dst=r0 src=r0 offset=75 imm=0 + // EBPF_OP_MOV64_REG pc=8 dst=r7 src=r0 offset=0 imm=0 +#line 156 "sample/bindmonitor_tailcall.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=9 dst=r7 src=r0 offset=76 imm=0 #line 157 "sample/bindmonitor_tailcall.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 157 "sample/bindmonitor_tailcall.c" goto label_6; #line 157 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXW pc=9 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=10 dst=r1 src=r7 offset=0 imm=0 #line 157 "sample/bindmonitor_tailcall.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=10 dst=r1 src=r0 offset=73 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=11 dst=r1 src=r0 offset=74 imm=0 #line 157 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 157 "sample/bindmonitor_tailcall.c" goto label_6; #line 157 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=11 dst=r8 src=r0 offset=0 imm=0 -#line 157 "sample/bindmonitor_tailcall.c" - r8 = r0; // EBPF_OP_LDXDW pc=12 dst=r1 src=r6 offset=16 imm=0 #line 81 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); @@ -505,65 +507,68 @@ BindMonitor_Callee1(void* context) return 0; #line 86 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JNE_IMM pc=29 dst=r0 src=r0 offset=29 imm=0 + // EBPF_OP_MOV64_REG pc=29 dst=r8 src=r0 offset=0 imm=0 +#line 86 "sample/bindmonitor_tailcall.c" + r8 = r0; + // EBPF_OP_JNE_IMM pc=30 dst=r8 src=r0 offset=28 imm=0 #line 87 "sample/bindmonitor_tailcall.c" - if (r0 != IMMEDIATE(0)) { + if (r8 != IMMEDIATE(0)) { #line 87 "sample/bindmonitor_tailcall.c" goto label_1; #line 87 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXW pc=30 dst=r1 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=31 dst=r1 src=r6 offset=44 imm=0 #line 91 "sample/bindmonitor_tailcall.c" r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=31 dst=r1 src=r0 offset=51 imm=0 + // EBPF_OP_JNE_IMM pc=32 dst=r1 src=r0 offset=53 imm=0 #line 91 "sample/bindmonitor_tailcall.c" if (r1 != IMMEDIATE(0)) { #line 91 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 91 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=32 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=33 dst=r1 src=r6 offset=0 imm=0 #line 95 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=33 dst=r1 src=r0 offset=49 imm=0 + // EBPF_OP_JEQ_IMM pc=34 dst=r1 src=r0 offset=51 imm=0 #line 95 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 95 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 95 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=34 dst=r1 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=35 dst=r1 src=r6 offset=8 imm=0 #line 95 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_JEQ_IMM pc=35 dst=r1 src=r0 offset=47 imm=0 + // EBPF_OP_JEQ_IMM pc=36 dst=r1 src=r0 offset=49 imm=0 #line 95 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 95 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 95 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=36 dst=r7 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=37 dst=r8 src=r10 offset=0 imm=0 #line 95 "sample/bindmonitor_tailcall.c" - r7 = r10; - // EBPF_OP_ADD64_IMM pc=37 dst=r7 src=r0 offset=0 imm=-8 + r8 = r10; + // EBPF_OP_ADD64_IMM pc=38 dst=r8 src=r0 offset=0 imm=-8 #line 99 "sample/bindmonitor_tailcall.c" - r7 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=38 dst=r3 src=r10 offset=0 imm=0 + r8 += IMMEDIATE(-8); + // EBPF_OP_MOV64_REG pc=39 dst=r3 src=r10 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=39 dst=r3 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=40 dst=r3 src=r0 offset=0 imm=-80 #line 99 "sample/bindmonitor_tailcall.c" r3 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=40 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=41 dst=r1 src=r1 offset=0 imm=1 #line 99 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_REG pc=42 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=43 dst=r2 src=r8 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" - r2 = r7; - // EBPF_OP_MOV64_IMM pc=43 dst=r4 src=r0 offset=0 imm=0 + r2 = r8; + // EBPF_OP_MOV64_IMM pc=44 dst=r4 src=r0 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=44 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=45 dst=r0 src=r0 offset=0 imm=2 #line 99 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[1].address(r1, r2, r3, r4, r5, context); #line 99 "sample/bindmonitor_tailcall.c" @@ -572,13 +577,13 @@ BindMonitor_Callee1(void* context) return 0; #line 99 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDDW pc=45 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=46 dst=r1 src=r1 offset=0 imm=1 #line 100 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_REG pc=47 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=48 dst=r2 src=r8 offset=0 imm=0 #line 100 "sample/bindmonitor_tailcall.c" - r2 = r7; - // EBPF_OP_CALL pc=48 dst=r0 src=r0 offset=0 imm=1 + r2 = r8; + // EBPF_OP_CALL pc=49 dst=r0 src=r0 offset=0 imm=1 #line 100 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[0].address(r1, r2, r3, r4, r5, context); #line 100 "sample/bindmonitor_tailcall.c" @@ -587,35 +592,35 @@ BindMonitor_Callee1(void* context) return 0; #line 100 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JEQ_IMM pc=49 dst=r0 src=r0 offset=33 imm=0 + // EBPF_OP_MOV64_REG pc=50 dst=r8 src=r0 offset=0 imm=0 +#line 100 "sample/bindmonitor_tailcall.c" + r8 = r0; + // EBPF_OP_JEQ_IMM pc=51 dst=r8 src=r0 offset=34 imm=0 #line 101 "sample/bindmonitor_tailcall.c" - if (r0 == IMMEDIATE(0)) { + if (r8 == IMMEDIATE(0)) { #line 101 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 101 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=50 dst=r3 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=52 dst=r3 src=r6 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r3 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=51 dst=r4 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=53 dst=r4 src=r6 offset=8 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_SUB64_REG pc=52 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_SUB64_REG pc=54 dst=r4 src=r3 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r4 -= r3; - // EBPF_OP_MOV64_REG pc=53 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=55 dst=r1 src=r8 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" - r1 = r0; - // EBPF_OP_ADD64_IMM pc=54 dst=r1 src=r0 offset=0 imm=4 + r1 = r8; + // EBPF_OP_ADD64_IMM pc=56 dst=r1 src=r0 offset=0 imm=4 #line 105 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=55 dst=r2 src=r0 offset=0 imm=64 + // EBPF_OP_MOV64_IMM pc=57 dst=r2 src=r0 offset=0 imm=64 #line 105 "sample/bindmonitor_tailcall.c" r2 = IMMEDIATE(64); - // EBPF_OP_MOV64_REG pc=56 dst=r7 src=r0 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r7 = r0; - // EBPF_OP_CALL pc=57 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=58 dst=r0 src=r0 offset=0 imm=22 #line 105 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[2].address(r1, r2, r3, r4, r5, context); #line 105 "sample/bindmonitor_tailcall.c" @@ -624,37 +629,34 @@ BindMonitor_Callee1(void* context) return 0; #line 105 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=58 dst=r0 src=r7 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r0 = r7; label_1: - // EBPF_OP_LDXW pc=59 dst=r1 src=r0 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_LDXW pc=60 dst=r2 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=59 dst=r1 src=r6 offset=44 imm=0 #line 167 "sample/bindmonitor_tailcall.c" - r2 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JEQ_IMM pc=61 dst=r2 src=r0 offset=7 imm=2 + r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); + // EBPF_OP_JEQ_IMM pc=60 dst=r1 src=r0 offset=9 imm=2 #line 167 "sample/bindmonitor_tailcall.c" - if (r2 == IMMEDIATE(2)) { + if (r1 == IMMEDIATE(2)) { #line 167 "sample/bindmonitor_tailcall.c" goto label_2; #line 167 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JNE_IMM pc=62 dst=r2 src=r0 offset=9 imm=0 + // EBPF_OP_JNE_IMM pc=61 dst=r1 src=r0 offset=13 imm=0 #line 167 "sample/bindmonitor_tailcall.c" - if (r2 != IMMEDIATE(0)) { + if (r1 != IMMEDIATE(0)) { #line 167 "sample/bindmonitor_tailcall.c" goto label_3; #line 167 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_IMM pc=63 dst=r7 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=62 dst=r9 src=r0 offset=0 imm=1 #line 167 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=64 dst=r2 src=r8 offset=0 imm=0 + r9 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=63 dst=r1 src=r8 offset=0 imm=0 +#line 169 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); + // EBPF_OP_LDXW pc=64 dst=r2 src=r7 offset=0 imm=0 #line 169 "sample/bindmonitor_tailcall.c" - r2 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); - // EBPF_OP_JGE_REG pc=65 dst=r1 src=r2 offset=18 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JGE_REG pc=65 dst=r1 src=r2 offset=20 imm=0 #line 169 "sample/bindmonitor_tailcall.c" if (r1 >= r2) { #line 169 "sample/bindmonitor_tailcall.c" @@ -664,60 +666,70 @@ BindMonitor_Callee1(void* context) // EBPF_OP_ADD64_IMM pc=66 dst=r1 src=r0 offset=0 imm=1 #line 173 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXW pc=67 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=67 dst=r8 src=r1 offset=0 imm=0 #line 173 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_JA pc=68 dst=r0 src=r0 offset=14 imm=0 + *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=68 dst=r9 src=r0 offset=0 imm=0 #line 173 "sample/bindmonitor_tailcall.c" - goto label_5; + r9 = IMMEDIATE(0); + // EBPF_OP_JA pc=69 dst=r0 src=r0 offset=16 imm=0 +#line 173 "sample/bindmonitor_tailcall.c" + goto label_6; label_2: - // EBPF_OP_JEQ_IMM pc=69 dst=r1 src=r0 offset=6 imm=0 + // EBPF_OP_LDXW pc=70 dst=r1 src=r8 offset=0 imm=0 +#line 176 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=71 dst=r1 src=r0 offset=7 imm=0 #line 176 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 176 "sample/bindmonitor_tailcall.c" - goto label_4; + goto label_5; #line 176 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_ADD64_IMM pc=70 dst=r1 src=r0 offset=0 imm=-1 + // EBPF_OP_ADD64_IMM pc=72 dst=r1 src=r0 offset=0 imm=-1 #line 177 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(-1); - // EBPF_OP_STXW pc=71 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=73 dst=r8 src=r1 offset=0 imm=0 #line 177 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; -label_3: - // EBPF_OP_MOV64_IMM pc=72 dst=r7 src=r0 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=74 dst=r0 src=r0 offset=1 imm=0 #line 177 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); - // EBPF_OP_LSH64_IMM pc=73 dst=r1 src=r0 offset=0 imm=32 + goto label_4; +label_3: + // EBPF_OP_LDXW pc=75 dst=r1 src=r8 offset=0 imm=0 +#line 184 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); +label_4: + // EBPF_OP_LSH64_IMM pc=76 dst=r1 src=r0 offset=0 imm=32 #line 184 "sample/bindmonitor_tailcall.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=74 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=77 dst=r1 src=r0 offset=0 imm=32 #line 184 "sample/bindmonitor_tailcall.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=75 dst=r1 src=r0 offset=8 imm=0 + // EBPF_OP_JNE_IMM pc=78 dst=r1 src=r0 offset=7 imm=0 #line 184 "sample/bindmonitor_tailcall.c" if (r1 != IMMEDIATE(0)) { #line 184 "sample/bindmonitor_tailcall.c" goto label_6; #line 184 "sample/bindmonitor_tailcall.c" } -label_4: - // EBPF_OP_LDXDW pc=76 dst=r1 src=r6 offset=16 imm=0 +label_5: + // EBPF_OP_LDXDW pc=79 dst=r1 src=r6 offset=16 imm=0 #line 185 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); - // EBPF_OP_STXDW pc=77 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=80 dst=r10 src=r1 offset=-80 imm=0 #line 185 "sample/bindmonitor_tailcall.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=81 dst=r2 src=r10 offset=0 imm=0 #line 185 "sample/bindmonitor_tailcall.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=79 dst=r2 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=82 dst=r2 src=r0 offset=0 imm=-80 #line 185 "sample/bindmonitor_tailcall.c" r2 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=80 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=83 dst=r1 src=r1 offset=0 imm=1 #line 186 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_CALL pc=82 dst=r0 src=r0 offset=0 imm=3 + // EBPF_OP_CALL pc=85 dst=r0 src=r0 offset=0 imm=3 #line 186 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[3].address(r1, r2, r3, r4, r5, context); #line 186 "sample/bindmonitor_tailcall.c" @@ -726,15 +738,11 @@ BindMonitor_Callee1(void* context) return 0; #line 186 "sample/bindmonitor_tailcall.c" } -label_5: - // EBPF_OP_MOV64_IMM pc=83 dst=r7 src=r0 offset=0 imm=0 -#line 186 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); label_6: - // EBPF_OP_MOV64_REG pc=84 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=86 dst=r0 src=r9 offset=0 imm=0 #line 190 "sample/bindmonitor_tailcall.c" - r0 = r7; - // EBPF_OP_EXIT pc=85 dst=r0 src=r0 offset=0 imm=0 + r0 = r9; + // EBPF_OP_EXIT pc=87 dst=r0 src=r0 offset=0 imm=0 #line 190 "sample/bindmonitor_tailcall.c" return r0; #line 152 "sample/bindmonitor_tailcall.c" @@ -782,7 +790,7 @@ static program_entry_t _programs[] = { 2, BindMonitor_Callee1_helpers, 4, - 86, + 88, &BindMonitor_Callee1_program_type_guid, &BindMonitor_Callee1_attach_type_guid, }, @@ -800,7 +808,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_tailcall_raw.c b/tests/bpf2c_tests/expected/bindmonitor_tailcall_raw.c index c7cfd6df8e..01de491a4a 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_tailcall_raw.c +++ b/tests/bpf2c_tests/expected/bindmonitor_tailcall_raw.c @@ -370,6 +370,8 @@ BindMonitor_Callee1(void* context) register uint64_t r7 = 0; #line 152 "sample/bindmonitor_tailcall.c" register uint64_t r8 = 0; +#line 152 "sample/bindmonitor_tailcall.c" + register uint64_t r9 = 0; #line 152 "sample/bindmonitor_tailcall.c" register uint64_t r10 = 0; @@ -381,12 +383,12 @@ BindMonitor_Callee1(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 152 "sample/bindmonitor_tailcall.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r9 src=r0 offset=0 imm=0 #line 152 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-84 imm=0 + r9 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r9 offset=-84 imm=0 #line 154 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r9; // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r10 offset=0 imm=0 #line 154 "sample/bindmonitor_tailcall.c" r2 = r10; @@ -405,26 +407,26 @@ BindMonitor_Callee1(void* context) return 0; #line 156 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JEQ_IMM pc=8 dst=r0 src=r0 offset=75 imm=0 + // EBPF_OP_MOV64_REG pc=8 dst=r7 src=r0 offset=0 imm=0 +#line 156 "sample/bindmonitor_tailcall.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=9 dst=r7 src=r0 offset=76 imm=0 #line 157 "sample/bindmonitor_tailcall.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 157 "sample/bindmonitor_tailcall.c" goto label_6; #line 157 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXW pc=9 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=10 dst=r1 src=r7 offset=0 imm=0 #line 157 "sample/bindmonitor_tailcall.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=10 dst=r1 src=r0 offset=73 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=11 dst=r1 src=r0 offset=74 imm=0 #line 157 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 157 "sample/bindmonitor_tailcall.c" goto label_6; #line 157 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=11 dst=r8 src=r0 offset=0 imm=0 -#line 157 "sample/bindmonitor_tailcall.c" - r8 = r0; // EBPF_OP_LDXDW pc=12 dst=r1 src=r6 offset=16 imm=0 #line 81 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); @@ -479,65 +481,68 @@ BindMonitor_Callee1(void* context) return 0; #line 86 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JNE_IMM pc=29 dst=r0 src=r0 offset=29 imm=0 + // EBPF_OP_MOV64_REG pc=29 dst=r8 src=r0 offset=0 imm=0 +#line 86 "sample/bindmonitor_tailcall.c" + r8 = r0; + // EBPF_OP_JNE_IMM pc=30 dst=r8 src=r0 offset=28 imm=0 #line 87 "sample/bindmonitor_tailcall.c" - if (r0 != IMMEDIATE(0)) { + if (r8 != IMMEDIATE(0)) { #line 87 "sample/bindmonitor_tailcall.c" goto label_1; #line 87 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXW pc=30 dst=r1 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=31 dst=r1 src=r6 offset=44 imm=0 #line 91 "sample/bindmonitor_tailcall.c" r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=31 dst=r1 src=r0 offset=51 imm=0 + // EBPF_OP_JNE_IMM pc=32 dst=r1 src=r0 offset=53 imm=0 #line 91 "sample/bindmonitor_tailcall.c" if (r1 != IMMEDIATE(0)) { #line 91 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 91 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=32 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=33 dst=r1 src=r6 offset=0 imm=0 #line 95 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=33 dst=r1 src=r0 offset=49 imm=0 + // EBPF_OP_JEQ_IMM pc=34 dst=r1 src=r0 offset=51 imm=0 #line 95 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 95 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 95 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=34 dst=r1 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=35 dst=r1 src=r6 offset=8 imm=0 #line 95 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_JEQ_IMM pc=35 dst=r1 src=r0 offset=47 imm=0 + // EBPF_OP_JEQ_IMM pc=36 dst=r1 src=r0 offset=49 imm=0 #line 95 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 95 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 95 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=36 dst=r7 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=37 dst=r8 src=r10 offset=0 imm=0 #line 95 "sample/bindmonitor_tailcall.c" - r7 = r10; - // EBPF_OP_ADD64_IMM pc=37 dst=r7 src=r0 offset=0 imm=-8 + r8 = r10; + // EBPF_OP_ADD64_IMM pc=38 dst=r8 src=r0 offset=0 imm=-8 #line 99 "sample/bindmonitor_tailcall.c" - r7 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=38 dst=r3 src=r10 offset=0 imm=0 + r8 += IMMEDIATE(-8); + // EBPF_OP_MOV64_REG pc=39 dst=r3 src=r10 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=39 dst=r3 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=40 dst=r3 src=r0 offset=0 imm=-80 #line 99 "sample/bindmonitor_tailcall.c" r3 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=40 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=41 dst=r1 src=r1 offset=0 imm=1 #line 99 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_REG pc=42 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=43 dst=r2 src=r8 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" - r2 = r7; - // EBPF_OP_MOV64_IMM pc=43 dst=r4 src=r0 offset=0 imm=0 + r2 = r8; + // EBPF_OP_MOV64_IMM pc=44 dst=r4 src=r0 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=44 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=45 dst=r0 src=r0 offset=0 imm=2 #line 99 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[1].address(r1, r2, r3, r4, r5, context); #line 99 "sample/bindmonitor_tailcall.c" @@ -546,13 +551,13 @@ BindMonitor_Callee1(void* context) return 0; #line 99 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDDW pc=45 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=46 dst=r1 src=r1 offset=0 imm=1 #line 100 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_REG pc=47 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=48 dst=r2 src=r8 offset=0 imm=0 #line 100 "sample/bindmonitor_tailcall.c" - r2 = r7; - // EBPF_OP_CALL pc=48 dst=r0 src=r0 offset=0 imm=1 + r2 = r8; + // EBPF_OP_CALL pc=49 dst=r0 src=r0 offset=0 imm=1 #line 100 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[0].address(r1, r2, r3, r4, r5, context); #line 100 "sample/bindmonitor_tailcall.c" @@ -561,35 +566,35 @@ BindMonitor_Callee1(void* context) return 0; #line 100 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JEQ_IMM pc=49 dst=r0 src=r0 offset=33 imm=0 + // EBPF_OP_MOV64_REG pc=50 dst=r8 src=r0 offset=0 imm=0 +#line 100 "sample/bindmonitor_tailcall.c" + r8 = r0; + // EBPF_OP_JEQ_IMM pc=51 dst=r8 src=r0 offset=34 imm=0 #line 101 "sample/bindmonitor_tailcall.c" - if (r0 == IMMEDIATE(0)) { + if (r8 == IMMEDIATE(0)) { #line 101 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 101 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=50 dst=r3 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=52 dst=r3 src=r6 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r3 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=51 dst=r4 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=53 dst=r4 src=r6 offset=8 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_SUB64_REG pc=52 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_SUB64_REG pc=54 dst=r4 src=r3 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r4 -= r3; - // EBPF_OP_MOV64_REG pc=53 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=55 dst=r1 src=r8 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" - r1 = r0; - // EBPF_OP_ADD64_IMM pc=54 dst=r1 src=r0 offset=0 imm=4 + r1 = r8; + // EBPF_OP_ADD64_IMM pc=56 dst=r1 src=r0 offset=0 imm=4 #line 105 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=55 dst=r2 src=r0 offset=0 imm=64 + // EBPF_OP_MOV64_IMM pc=57 dst=r2 src=r0 offset=0 imm=64 #line 105 "sample/bindmonitor_tailcall.c" r2 = IMMEDIATE(64); - // EBPF_OP_MOV64_REG pc=56 dst=r7 src=r0 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r7 = r0; - // EBPF_OP_CALL pc=57 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=58 dst=r0 src=r0 offset=0 imm=22 #line 105 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[2].address(r1, r2, r3, r4, r5, context); #line 105 "sample/bindmonitor_tailcall.c" @@ -598,37 +603,34 @@ BindMonitor_Callee1(void* context) return 0; #line 105 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=58 dst=r0 src=r7 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r0 = r7; label_1: - // EBPF_OP_LDXW pc=59 dst=r1 src=r0 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_LDXW pc=60 dst=r2 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=59 dst=r1 src=r6 offset=44 imm=0 #line 167 "sample/bindmonitor_tailcall.c" - r2 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JEQ_IMM pc=61 dst=r2 src=r0 offset=7 imm=2 + r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); + // EBPF_OP_JEQ_IMM pc=60 dst=r1 src=r0 offset=9 imm=2 #line 167 "sample/bindmonitor_tailcall.c" - if (r2 == IMMEDIATE(2)) { + if (r1 == IMMEDIATE(2)) { #line 167 "sample/bindmonitor_tailcall.c" goto label_2; #line 167 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JNE_IMM pc=62 dst=r2 src=r0 offset=9 imm=0 + // EBPF_OP_JNE_IMM pc=61 dst=r1 src=r0 offset=13 imm=0 #line 167 "sample/bindmonitor_tailcall.c" - if (r2 != IMMEDIATE(0)) { + if (r1 != IMMEDIATE(0)) { #line 167 "sample/bindmonitor_tailcall.c" goto label_3; #line 167 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_IMM pc=63 dst=r7 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=62 dst=r9 src=r0 offset=0 imm=1 #line 167 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=64 dst=r2 src=r8 offset=0 imm=0 + r9 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=63 dst=r1 src=r8 offset=0 imm=0 +#line 169 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); + // EBPF_OP_LDXW pc=64 dst=r2 src=r7 offset=0 imm=0 #line 169 "sample/bindmonitor_tailcall.c" - r2 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); - // EBPF_OP_JGE_REG pc=65 dst=r1 src=r2 offset=18 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JGE_REG pc=65 dst=r1 src=r2 offset=20 imm=0 #line 169 "sample/bindmonitor_tailcall.c" if (r1 >= r2) { #line 169 "sample/bindmonitor_tailcall.c" @@ -638,60 +640,70 @@ BindMonitor_Callee1(void* context) // EBPF_OP_ADD64_IMM pc=66 dst=r1 src=r0 offset=0 imm=1 #line 173 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXW pc=67 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=67 dst=r8 src=r1 offset=0 imm=0 #line 173 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_JA pc=68 dst=r0 src=r0 offset=14 imm=0 + *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=68 dst=r9 src=r0 offset=0 imm=0 #line 173 "sample/bindmonitor_tailcall.c" - goto label_5; + r9 = IMMEDIATE(0); + // EBPF_OP_JA pc=69 dst=r0 src=r0 offset=16 imm=0 +#line 173 "sample/bindmonitor_tailcall.c" + goto label_6; label_2: - // EBPF_OP_JEQ_IMM pc=69 dst=r1 src=r0 offset=6 imm=0 + // EBPF_OP_LDXW pc=70 dst=r1 src=r8 offset=0 imm=0 +#line 176 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=71 dst=r1 src=r0 offset=7 imm=0 #line 176 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 176 "sample/bindmonitor_tailcall.c" - goto label_4; + goto label_5; #line 176 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_ADD64_IMM pc=70 dst=r1 src=r0 offset=0 imm=-1 + // EBPF_OP_ADD64_IMM pc=72 dst=r1 src=r0 offset=0 imm=-1 #line 177 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(-1); - // EBPF_OP_STXW pc=71 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=73 dst=r8 src=r1 offset=0 imm=0 #line 177 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; -label_3: - // EBPF_OP_MOV64_IMM pc=72 dst=r7 src=r0 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=74 dst=r0 src=r0 offset=1 imm=0 #line 177 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); - // EBPF_OP_LSH64_IMM pc=73 dst=r1 src=r0 offset=0 imm=32 + goto label_4; +label_3: + // EBPF_OP_LDXW pc=75 dst=r1 src=r8 offset=0 imm=0 +#line 184 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); +label_4: + // EBPF_OP_LSH64_IMM pc=76 dst=r1 src=r0 offset=0 imm=32 #line 184 "sample/bindmonitor_tailcall.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=74 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=77 dst=r1 src=r0 offset=0 imm=32 #line 184 "sample/bindmonitor_tailcall.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=75 dst=r1 src=r0 offset=8 imm=0 + // EBPF_OP_JNE_IMM pc=78 dst=r1 src=r0 offset=7 imm=0 #line 184 "sample/bindmonitor_tailcall.c" if (r1 != IMMEDIATE(0)) { #line 184 "sample/bindmonitor_tailcall.c" goto label_6; #line 184 "sample/bindmonitor_tailcall.c" } -label_4: - // EBPF_OP_LDXDW pc=76 dst=r1 src=r6 offset=16 imm=0 +label_5: + // EBPF_OP_LDXDW pc=79 dst=r1 src=r6 offset=16 imm=0 #line 185 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); - // EBPF_OP_STXDW pc=77 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=80 dst=r10 src=r1 offset=-80 imm=0 #line 185 "sample/bindmonitor_tailcall.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=81 dst=r2 src=r10 offset=0 imm=0 #line 185 "sample/bindmonitor_tailcall.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=79 dst=r2 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=82 dst=r2 src=r0 offset=0 imm=-80 #line 185 "sample/bindmonitor_tailcall.c" r2 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=80 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=83 dst=r1 src=r1 offset=0 imm=1 #line 186 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_CALL pc=82 dst=r0 src=r0 offset=0 imm=3 + // EBPF_OP_CALL pc=85 dst=r0 src=r0 offset=0 imm=3 #line 186 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[3].address(r1, r2, r3, r4, r5, context); #line 186 "sample/bindmonitor_tailcall.c" @@ -700,15 +712,11 @@ BindMonitor_Callee1(void* context) return 0; #line 186 "sample/bindmonitor_tailcall.c" } -label_5: - // EBPF_OP_MOV64_IMM pc=83 dst=r7 src=r0 offset=0 imm=0 -#line 186 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); label_6: - // EBPF_OP_MOV64_REG pc=84 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=86 dst=r0 src=r9 offset=0 imm=0 #line 190 "sample/bindmonitor_tailcall.c" - r0 = r7; - // EBPF_OP_EXIT pc=85 dst=r0 src=r0 offset=0 imm=0 + r0 = r9; + // EBPF_OP_EXIT pc=87 dst=r0 src=r0 offset=0 imm=0 #line 190 "sample/bindmonitor_tailcall.c" return r0; #line 152 "sample/bindmonitor_tailcall.c" @@ -756,7 +764,7 @@ static program_entry_t _programs[] = { 2, BindMonitor_Callee1_helpers, 4, - 86, + 88, &BindMonitor_Callee1_program_type_guid, &BindMonitor_Callee1_attach_type_guid, }, @@ -774,7 +782,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bindmonitor_tailcall_sys.c b/tests/bpf2c_tests/expected/bindmonitor_tailcall_sys.c index 4069e23d04..1fcf6e870d 100644 --- a/tests/bpf2c_tests/expected/bindmonitor_tailcall_sys.c +++ b/tests/bpf2c_tests/expected/bindmonitor_tailcall_sys.c @@ -531,6 +531,8 @@ BindMonitor_Callee1(void* context) register uint64_t r7 = 0; #line 152 "sample/bindmonitor_tailcall.c" register uint64_t r8 = 0; +#line 152 "sample/bindmonitor_tailcall.c" + register uint64_t r9 = 0; #line 152 "sample/bindmonitor_tailcall.c" register uint64_t r10 = 0; @@ -542,12 +544,12 @@ BindMonitor_Callee1(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 152 "sample/bindmonitor_tailcall.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r9 src=r0 offset=0 imm=0 #line 152 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-84 imm=0 + r9 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r9 offset=-84 imm=0 #line 154 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-84)) = (uint32_t)r9; // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r10 offset=0 imm=0 #line 154 "sample/bindmonitor_tailcall.c" r2 = r10; @@ -566,26 +568,26 @@ BindMonitor_Callee1(void* context) return 0; #line 156 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JEQ_IMM pc=8 dst=r0 src=r0 offset=75 imm=0 + // EBPF_OP_MOV64_REG pc=8 dst=r7 src=r0 offset=0 imm=0 +#line 156 "sample/bindmonitor_tailcall.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=9 dst=r7 src=r0 offset=76 imm=0 #line 157 "sample/bindmonitor_tailcall.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 157 "sample/bindmonitor_tailcall.c" goto label_6; #line 157 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXW pc=9 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=10 dst=r1 src=r7 offset=0 imm=0 #line 157 "sample/bindmonitor_tailcall.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=10 dst=r1 src=r0 offset=73 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=11 dst=r1 src=r0 offset=74 imm=0 #line 157 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 157 "sample/bindmonitor_tailcall.c" goto label_6; #line 157 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=11 dst=r8 src=r0 offset=0 imm=0 -#line 157 "sample/bindmonitor_tailcall.c" - r8 = r0; // EBPF_OP_LDXDW pc=12 dst=r1 src=r6 offset=16 imm=0 #line 81 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); @@ -640,65 +642,68 @@ BindMonitor_Callee1(void* context) return 0; #line 86 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JNE_IMM pc=29 dst=r0 src=r0 offset=29 imm=0 + // EBPF_OP_MOV64_REG pc=29 dst=r8 src=r0 offset=0 imm=0 +#line 86 "sample/bindmonitor_tailcall.c" + r8 = r0; + // EBPF_OP_JNE_IMM pc=30 dst=r8 src=r0 offset=28 imm=0 #line 87 "sample/bindmonitor_tailcall.c" - if (r0 != IMMEDIATE(0)) { + if (r8 != IMMEDIATE(0)) { #line 87 "sample/bindmonitor_tailcall.c" goto label_1; #line 87 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXW pc=30 dst=r1 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=31 dst=r1 src=r6 offset=44 imm=0 #line 91 "sample/bindmonitor_tailcall.c" r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=31 dst=r1 src=r0 offset=51 imm=0 + // EBPF_OP_JNE_IMM pc=32 dst=r1 src=r0 offset=53 imm=0 #line 91 "sample/bindmonitor_tailcall.c" if (r1 != IMMEDIATE(0)) { #line 91 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 91 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=32 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=33 dst=r1 src=r6 offset=0 imm=0 #line 95 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=33 dst=r1 src=r0 offset=49 imm=0 + // EBPF_OP_JEQ_IMM pc=34 dst=r1 src=r0 offset=51 imm=0 #line 95 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 95 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 95 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=34 dst=r1 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=35 dst=r1 src=r6 offset=8 imm=0 #line 95 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_JEQ_IMM pc=35 dst=r1 src=r0 offset=47 imm=0 + // EBPF_OP_JEQ_IMM pc=36 dst=r1 src=r0 offset=49 imm=0 #line 95 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 95 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 95 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=36 dst=r7 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=37 dst=r8 src=r10 offset=0 imm=0 #line 95 "sample/bindmonitor_tailcall.c" - r7 = r10; - // EBPF_OP_ADD64_IMM pc=37 dst=r7 src=r0 offset=0 imm=-8 + r8 = r10; + // EBPF_OP_ADD64_IMM pc=38 dst=r8 src=r0 offset=0 imm=-8 #line 99 "sample/bindmonitor_tailcall.c" - r7 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=38 dst=r3 src=r10 offset=0 imm=0 + r8 += IMMEDIATE(-8); + // EBPF_OP_MOV64_REG pc=39 dst=r3 src=r10 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=39 dst=r3 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=40 dst=r3 src=r0 offset=0 imm=-80 #line 99 "sample/bindmonitor_tailcall.c" r3 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=40 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=41 dst=r1 src=r1 offset=0 imm=1 #line 99 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_REG pc=42 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=43 dst=r2 src=r8 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" - r2 = r7; - // EBPF_OP_MOV64_IMM pc=43 dst=r4 src=r0 offset=0 imm=0 + r2 = r8; + // EBPF_OP_MOV64_IMM pc=44 dst=r4 src=r0 offset=0 imm=0 #line 99 "sample/bindmonitor_tailcall.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=44 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=45 dst=r0 src=r0 offset=0 imm=2 #line 99 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[1].address(r1, r2, r3, r4, r5, context); #line 99 "sample/bindmonitor_tailcall.c" @@ -707,13 +712,13 @@ BindMonitor_Callee1(void* context) return 0; #line 99 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDDW pc=45 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=46 dst=r1 src=r1 offset=0 imm=1 #line 100 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_REG pc=47 dst=r2 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=48 dst=r2 src=r8 offset=0 imm=0 #line 100 "sample/bindmonitor_tailcall.c" - r2 = r7; - // EBPF_OP_CALL pc=48 dst=r0 src=r0 offset=0 imm=1 + r2 = r8; + // EBPF_OP_CALL pc=49 dst=r0 src=r0 offset=0 imm=1 #line 100 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[0].address(r1, r2, r3, r4, r5, context); #line 100 "sample/bindmonitor_tailcall.c" @@ -722,35 +727,35 @@ BindMonitor_Callee1(void* context) return 0; #line 100 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JEQ_IMM pc=49 dst=r0 src=r0 offset=33 imm=0 + // EBPF_OP_MOV64_REG pc=50 dst=r8 src=r0 offset=0 imm=0 +#line 100 "sample/bindmonitor_tailcall.c" + r8 = r0; + // EBPF_OP_JEQ_IMM pc=51 dst=r8 src=r0 offset=34 imm=0 #line 101 "sample/bindmonitor_tailcall.c" - if (r0 == IMMEDIATE(0)) { + if (r8 == IMMEDIATE(0)) { #line 101 "sample/bindmonitor_tailcall.c" - goto label_5; + goto label_6; #line 101 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_LDXDW pc=50 dst=r3 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=52 dst=r3 src=r6 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r3 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=51 dst=r4 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=53 dst=r4 src=r6 offset=8 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_SUB64_REG pc=52 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_SUB64_REG pc=54 dst=r4 src=r3 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" r4 -= r3; - // EBPF_OP_MOV64_REG pc=53 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=55 dst=r1 src=r8 offset=0 imm=0 #line 105 "sample/bindmonitor_tailcall.c" - r1 = r0; - // EBPF_OP_ADD64_IMM pc=54 dst=r1 src=r0 offset=0 imm=4 + r1 = r8; + // EBPF_OP_ADD64_IMM pc=56 dst=r1 src=r0 offset=0 imm=4 #line 105 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=55 dst=r2 src=r0 offset=0 imm=64 + // EBPF_OP_MOV64_IMM pc=57 dst=r2 src=r0 offset=0 imm=64 #line 105 "sample/bindmonitor_tailcall.c" r2 = IMMEDIATE(64); - // EBPF_OP_MOV64_REG pc=56 dst=r7 src=r0 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r7 = r0; - // EBPF_OP_CALL pc=57 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=58 dst=r0 src=r0 offset=0 imm=22 #line 105 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[2].address(r1, r2, r3, r4, r5, context); #line 105 "sample/bindmonitor_tailcall.c" @@ -759,37 +764,34 @@ BindMonitor_Callee1(void* context) return 0; #line 105 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_REG pc=58 dst=r0 src=r7 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r0 = r7; label_1: - // EBPF_OP_LDXW pc=59 dst=r1 src=r0 offset=0 imm=0 -#line 105 "sample/bindmonitor_tailcall.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_LDXW pc=60 dst=r2 src=r6 offset=44 imm=0 + // EBPF_OP_LDXW pc=59 dst=r1 src=r6 offset=44 imm=0 #line 167 "sample/bindmonitor_tailcall.c" - r2 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); - // EBPF_OP_JEQ_IMM pc=61 dst=r2 src=r0 offset=7 imm=2 + r1 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(44)); + // EBPF_OP_JEQ_IMM pc=60 dst=r1 src=r0 offset=9 imm=2 #line 167 "sample/bindmonitor_tailcall.c" - if (r2 == IMMEDIATE(2)) { + if (r1 == IMMEDIATE(2)) { #line 167 "sample/bindmonitor_tailcall.c" goto label_2; #line 167 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_JNE_IMM pc=62 dst=r2 src=r0 offset=9 imm=0 + // EBPF_OP_JNE_IMM pc=61 dst=r1 src=r0 offset=13 imm=0 #line 167 "sample/bindmonitor_tailcall.c" - if (r2 != IMMEDIATE(0)) { + if (r1 != IMMEDIATE(0)) { #line 167 "sample/bindmonitor_tailcall.c" goto label_3; #line 167 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_MOV64_IMM pc=63 dst=r7 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=62 dst=r9 src=r0 offset=0 imm=1 #line 167 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=64 dst=r2 src=r8 offset=0 imm=0 + r9 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=63 dst=r1 src=r8 offset=0 imm=0 +#line 169 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); + // EBPF_OP_LDXW pc=64 dst=r2 src=r7 offset=0 imm=0 #line 169 "sample/bindmonitor_tailcall.c" - r2 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); - // EBPF_OP_JGE_REG pc=65 dst=r1 src=r2 offset=18 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_JGE_REG pc=65 dst=r1 src=r2 offset=20 imm=0 #line 169 "sample/bindmonitor_tailcall.c" if (r1 >= r2) { #line 169 "sample/bindmonitor_tailcall.c" @@ -799,60 +801,70 @@ BindMonitor_Callee1(void* context) // EBPF_OP_ADD64_IMM pc=66 dst=r1 src=r0 offset=0 imm=1 #line 173 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXW pc=67 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=67 dst=r8 src=r1 offset=0 imm=0 #line 173 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_JA pc=68 dst=r0 src=r0 offset=14 imm=0 + *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=68 dst=r9 src=r0 offset=0 imm=0 #line 173 "sample/bindmonitor_tailcall.c" - goto label_5; + r9 = IMMEDIATE(0); + // EBPF_OP_JA pc=69 dst=r0 src=r0 offset=16 imm=0 +#line 173 "sample/bindmonitor_tailcall.c" + goto label_6; label_2: - // EBPF_OP_JEQ_IMM pc=69 dst=r1 src=r0 offset=6 imm=0 + // EBPF_OP_LDXW pc=70 dst=r1 src=r8 offset=0 imm=0 +#line 176 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=71 dst=r1 src=r0 offset=7 imm=0 #line 176 "sample/bindmonitor_tailcall.c" if (r1 == IMMEDIATE(0)) { #line 176 "sample/bindmonitor_tailcall.c" - goto label_4; + goto label_5; #line 176 "sample/bindmonitor_tailcall.c" } - // EBPF_OP_ADD64_IMM pc=70 dst=r1 src=r0 offset=0 imm=-1 + // EBPF_OP_ADD64_IMM pc=72 dst=r1 src=r0 offset=0 imm=-1 #line 177 "sample/bindmonitor_tailcall.c" r1 += IMMEDIATE(-1); - // EBPF_OP_STXW pc=71 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXW pc=73 dst=r8 src=r1 offset=0 imm=0 #line 177 "sample/bindmonitor_tailcall.c" - *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; -label_3: - // EBPF_OP_MOV64_IMM pc=72 dst=r7 src=r0 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_JA pc=74 dst=r0 src=r0 offset=1 imm=0 #line 177 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); - // EBPF_OP_LSH64_IMM pc=73 dst=r1 src=r0 offset=0 imm=32 + goto label_4; +label_3: + // EBPF_OP_LDXW pc=75 dst=r1 src=r8 offset=0 imm=0 +#line 184 "sample/bindmonitor_tailcall.c" + r1 = *(uint32_t*)(uintptr_t)(r8 + OFFSET(0)); +label_4: + // EBPF_OP_LSH64_IMM pc=76 dst=r1 src=r0 offset=0 imm=32 #line 184 "sample/bindmonitor_tailcall.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=74 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=77 dst=r1 src=r0 offset=0 imm=32 #line 184 "sample/bindmonitor_tailcall.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=75 dst=r1 src=r0 offset=8 imm=0 + // EBPF_OP_JNE_IMM pc=78 dst=r1 src=r0 offset=7 imm=0 #line 184 "sample/bindmonitor_tailcall.c" if (r1 != IMMEDIATE(0)) { #line 184 "sample/bindmonitor_tailcall.c" goto label_6; #line 184 "sample/bindmonitor_tailcall.c" } -label_4: - // EBPF_OP_LDXDW pc=76 dst=r1 src=r6 offset=16 imm=0 +label_5: + // EBPF_OP_LDXDW pc=79 dst=r1 src=r6 offset=16 imm=0 #line 185 "sample/bindmonitor_tailcall.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(16)); - // EBPF_OP_STXDW pc=77 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=80 dst=r10 src=r1 offset=-80 imm=0 #line 185 "sample/bindmonitor_tailcall.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=81 dst=r2 src=r10 offset=0 imm=0 #line 185 "sample/bindmonitor_tailcall.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=79 dst=r2 src=r0 offset=0 imm=-80 + // EBPF_OP_ADD64_IMM pc=82 dst=r2 src=r0 offset=0 imm=-80 #line 185 "sample/bindmonitor_tailcall.c" r2 += IMMEDIATE(-80); - // EBPF_OP_LDDW pc=80 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=83 dst=r1 src=r1 offset=0 imm=1 #line 186 "sample/bindmonitor_tailcall.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_CALL pc=82 dst=r0 src=r0 offset=0 imm=3 + // EBPF_OP_CALL pc=85 dst=r0 src=r0 offset=0 imm=3 #line 186 "sample/bindmonitor_tailcall.c" r0 = BindMonitor_Callee1_helpers[3].address(r1, r2, r3, r4, r5, context); #line 186 "sample/bindmonitor_tailcall.c" @@ -861,15 +873,11 @@ BindMonitor_Callee1(void* context) return 0; #line 186 "sample/bindmonitor_tailcall.c" } -label_5: - // EBPF_OP_MOV64_IMM pc=83 dst=r7 src=r0 offset=0 imm=0 -#line 186 "sample/bindmonitor_tailcall.c" - r7 = IMMEDIATE(0); label_6: - // EBPF_OP_MOV64_REG pc=84 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=86 dst=r0 src=r9 offset=0 imm=0 #line 190 "sample/bindmonitor_tailcall.c" - r0 = r7; - // EBPF_OP_EXIT pc=85 dst=r0 src=r0 offset=0 imm=0 + r0 = r9; + // EBPF_OP_EXIT pc=87 dst=r0 src=r0 offset=0 imm=0 #line 190 "sample/bindmonitor_tailcall.c" return r0; #line 152 "sample/bindmonitor_tailcall.c" @@ -917,7 +925,7 @@ static program_entry_t _programs[] = { 2, BindMonitor_Callee1_helpers, 4, - 86, + 88, &BindMonitor_Callee1_program_type_guid, &BindMonitor_Callee1_attach_type_guid, }, @@ -935,7 +943,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bpf_call_dll.c b/tests/bpf2c_tests/expected/bpf_call_dll.c index 87a7b626b5..7df0de7dc6 100644 --- a/tests/bpf2c_tests/expected/bpf_call_dll.c +++ b/tests/bpf2c_tests/expected/bpf_call_dll.c @@ -179,7 +179,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bpf_call_raw.c b/tests/bpf2c_tests/expected/bpf_call_raw.c index 0b639ac578..75152792b9 100644 --- a/tests/bpf2c_tests/expected/bpf_call_raw.c +++ b/tests/bpf2c_tests/expected/bpf_call_raw.c @@ -153,7 +153,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bpf_call_sys.c b/tests/bpf2c_tests/expected/bpf_call_sys.c index cd7a1f8455..599895decd 100644 --- a/tests/bpf2c_tests/expected/bpf_call_sys.c +++ b/tests/bpf2c_tests/expected/bpf_call_sys.c @@ -314,7 +314,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bpf_dll.c b/tests/bpf2c_tests/expected/bpf_dll.c index 8542f1bc0f..8043c53a45 100644 --- a/tests/bpf2c_tests/expected/bpf_dll.c +++ b/tests/bpf2c_tests/expected/bpf_dll.c @@ -110,7 +110,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bpf_raw.c b/tests/bpf2c_tests/expected/bpf_raw.c index fbd739d329..317df6109a 100644 --- a/tests/bpf2c_tests/expected/bpf_raw.c +++ b/tests/bpf2c_tests/expected/bpf_raw.c @@ -84,7 +84,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/bpf_sys.c b/tests/bpf2c_tests/expected/bpf_sys.c index f0b29253bf..25df7a4dd9 100644 --- a/tests/bpf2c_tests/expected/bpf_sys.c +++ b/tests/bpf2c_tests/expected/bpf_sys.c @@ -245,7 +245,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_count_connect4_dll.c b/tests/bpf2c_tests/expected/cgroup_count_connect4_dll.c index f6ffe6d1b1..491f1a780c 100644 --- a/tests/bpf2c_tests/expected/cgroup_count_connect4_dll.c +++ b/tests/bpf2c_tests/expected/cgroup_count_connect4_dll.c @@ -97,6 +97,8 @@ count_tcp_connect4(void* context) register uint64_t r4 = 0; #line 31 "sample/cgroup_count_connect4.c" register uint64_t r5 = 0; +#line 31 "sample/cgroup_count_connect4.c" + register uint64_t r6 = 0; #line 31 "sample/cgroup_count_connect4.c" register uint64_t r10 = 0; @@ -105,27 +107,27 @@ count_tcp_connect4(void* context) #line 31 "sample/cgroup_count_connect4.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/cgroup_count_connect4.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); // EBPF_OP_LDXW pc=1 dst=r2 src=r1 offset=44 imm=0 #line 34 "sample/cgroup_count_connect4.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=25 imm=6 + // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=26 imm=6 #line 34 "sample/cgroup_count_connect4.c" if (r2 != IMMEDIATE(6)) { #line 34 "sample/cgroup_count_connect4.c" - goto label_3; + goto label_2; #line 34 "sample/cgroup_count_connect4.c" } // EBPF_OP_LDXH pc=3 dst=r1 src=r1 offset=40 imm=0 #line 40 "sample/cgroup_count_connect4.c" r1 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=23 imm=7459 + // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=24 imm=7459 #line 40 "sample/cgroup_count_connect4.c" if (r1 != IMMEDIATE(7459)) { #line 40 "sample/cgroup_count_connect4.c" - goto label_3; + goto label_2; #line 40 "sample/cgroup_count_connect4.c" } // EBPF_OP_MOV64_IMM pc=5 dst=r1 src=r0 offset=0 imm=8989 @@ -152,7 +154,7 @@ count_tcp_connect4(void* context) return 0; #line 48 "sample/cgroup_count_connect4.c" } - // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=11 imm=0 + // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=12 imm=0 #line 49 "sample/cgroup_count_connect4.c" if (r0 != IMMEDIATE(0)) { #line 49 "sample/cgroup_count_connect4.c" @@ -177,13 +179,16 @@ count_tcp_connect4(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r3 src=r0 offset=0 imm=-16 #line 50 "sample/cgroup_count_connect4.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=19 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=0 +#line 50 "sample/cgroup_count_connect4.c" + r6 = IMMEDIATE(0); + // EBPF_OP_LDDW pc=20 dst=r1 src=r1 offset=0 imm=1 #line 51 "sample/cgroup_count_connect4.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_IMM pc=21 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=22 dst=r4 src=r0 offset=0 imm=0 #line 51 "sample/cgroup_count_connect4.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=2 #line 51 "sample/cgroup_count_connect4.c" r0 = count_tcp_connect4_helpers[1].address(r1, r2, r3, r4, r5, context); #line 51 "sample/cgroup_count_connect4.c" @@ -192,25 +197,27 @@ count_tcp_connect4(void* context) return 0; #line 51 "sample/cgroup_count_connect4.c" } - // EBPF_OP_JA pc=23 dst=r0 src=r0 offset=3 imm=0 + // EBPF_OP_JA pc=24 dst=r0 src=r0 offset=4 imm=0 #line 51 "sample/cgroup_count_connect4.c" goto label_2; label_1: - // EBPF_OP_LDXDW pc=24 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXDW pc=25 dst=r1 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" r1 = *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=1 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=1 #line 53 "sample/cgroup_count_connect4.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXDW pc=26 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXDW pc=27 dst=r0 src=r1 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint64_t)r1; -label_2: - // EBPF_OP_MOV64_IMM pc=27 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=28 dst=r6 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" - r0 = IMMEDIATE(0); -label_3: - // EBPF_OP_EXIT pc=28 dst=r0 src=r0 offset=0 imm=0 + r6 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=29 dst=r0 src=r6 offset=0 imm=0 +#line 62 "sample/cgroup_count_connect4.c" + r0 = r6; + // EBPF_OP_EXIT pc=30 dst=r0 src=r0 offset=0 imm=0 #line 62 "sample/cgroup_count_connect4.c" return r0; #line 31 "sample/cgroup_count_connect4.c" @@ -230,7 +237,7 @@ static program_entry_t _programs[] = { 1, count_tcp_connect4_helpers, 2, - 29, + 31, &count_tcp_connect4_program_type_guid, &count_tcp_connect4_attach_type_guid, }, @@ -248,7 +255,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_count_connect4_raw.c b/tests/bpf2c_tests/expected/cgroup_count_connect4_raw.c index c31b35d37b..397c64dde9 100644 --- a/tests/bpf2c_tests/expected/cgroup_count_connect4_raw.c +++ b/tests/bpf2c_tests/expected/cgroup_count_connect4_raw.c @@ -71,6 +71,8 @@ count_tcp_connect4(void* context) register uint64_t r4 = 0; #line 31 "sample/cgroup_count_connect4.c" register uint64_t r5 = 0; +#line 31 "sample/cgroup_count_connect4.c" + register uint64_t r6 = 0; #line 31 "sample/cgroup_count_connect4.c" register uint64_t r10 = 0; @@ -79,27 +81,27 @@ count_tcp_connect4(void* context) #line 31 "sample/cgroup_count_connect4.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/cgroup_count_connect4.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); // EBPF_OP_LDXW pc=1 dst=r2 src=r1 offset=44 imm=0 #line 34 "sample/cgroup_count_connect4.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=25 imm=6 + // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=26 imm=6 #line 34 "sample/cgroup_count_connect4.c" if (r2 != IMMEDIATE(6)) { #line 34 "sample/cgroup_count_connect4.c" - goto label_3; + goto label_2; #line 34 "sample/cgroup_count_connect4.c" } // EBPF_OP_LDXH pc=3 dst=r1 src=r1 offset=40 imm=0 #line 40 "sample/cgroup_count_connect4.c" r1 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=23 imm=7459 + // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=24 imm=7459 #line 40 "sample/cgroup_count_connect4.c" if (r1 != IMMEDIATE(7459)) { #line 40 "sample/cgroup_count_connect4.c" - goto label_3; + goto label_2; #line 40 "sample/cgroup_count_connect4.c" } // EBPF_OP_MOV64_IMM pc=5 dst=r1 src=r0 offset=0 imm=8989 @@ -126,7 +128,7 @@ count_tcp_connect4(void* context) return 0; #line 48 "sample/cgroup_count_connect4.c" } - // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=11 imm=0 + // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=12 imm=0 #line 49 "sample/cgroup_count_connect4.c" if (r0 != IMMEDIATE(0)) { #line 49 "sample/cgroup_count_connect4.c" @@ -151,13 +153,16 @@ count_tcp_connect4(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r3 src=r0 offset=0 imm=-16 #line 50 "sample/cgroup_count_connect4.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=19 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=0 +#line 50 "sample/cgroup_count_connect4.c" + r6 = IMMEDIATE(0); + // EBPF_OP_LDDW pc=20 dst=r1 src=r1 offset=0 imm=1 #line 51 "sample/cgroup_count_connect4.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_IMM pc=21 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=22 dst=r4 src=r0 offset=0 imm=0 #line 51 "sample/cgroup_count_connect4.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=2 #line 51 "sample/cgroup_count_connect4.c" r0 = count_tcp_connect4_helpers[1].address(r1, r2, r3, r4, r5, context); #line 51 "sample/cgroup_count_connect4.c" @@ -166,25 +171,27 @@ count_tcp_connect4(void* context) return 0; #line 51 "sample/cgroup_count_connect4.c" } - // EBPF_OP_JA pc=23 dst=r0 src=r0 offset=3 imm=0 + // EBPF_OP_JA pc=24 dst=r0 src=r0 offset=4 imm=0 #line 51 "sample/cgroup_count_connect4.c" goto label_2; label_1: - // EBPF_OP_LDXDW pc=24 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXDW pc=25 dst=r1 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" r1 = *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=1 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=1 #line 53 "sample/cgroup_count_connect4.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXDW pc=26 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXDW pc=27 dst=r0 src=r1 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint64_t)r1; -label_2: - // EBPF_OP_MOV64_IMM pc=27 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=28 dst=r6 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" - r0 = IMMEDIATE(0); -label_3: - // EBPF_OP_EXIT pc=28 dst=r0 src=r0 offset=0 imm=0 + r6 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=29 dst=r0 src=r6 offset=0 imm=0 +#line 62 "sample/cgroup_count_connect4.c" + r0 = r6; + // EBPF_OP_EXIT pc=30 dst=r0 src=r0 offset=0 imm=0 #line 62 "sample/cgroup_count_connect4.c" return r0; #line 31 "sample/cgroup_count_connect4.c" @@ -204,7 +211,7 @@ static program_entry_t _programs[] = { 1, count_tcp_connect4_helpers, 2, - 29, + 31, &count_tcp_connect4_program_type_guid, &count_tcp_connect4_attach_type_guid, }, @@ -222,7 +229,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_count_connect4_sys.c b/tests/bpf2c_tests/expected/cgroup_count_connect4_sys.c index 42522318cb..3416c7cca5 100644 --- a/tests/bpf2c_tests/expected/cgroup_count_connect4_sys.c +++ b/tests/bpf2c_tests/expected/cgroup_count_connect4_sys.c @@ -232,6 +232,8 @@ count_tcp_connect4(void* context) register uint64_t r4 = 0; #line 31 "sample/cgroup_count_connect4.c" register uint64_t r5 = 0; +#line 31 "sample/cgroup_count_connect4.c" + register uint64_t r6 = 0; #line 31 "sample/cgroup_count_connect4.c" register uint64_t r10 = 0; @@ -240,27 +242,27 @@ count_tcp_connect4(void* context) #line 31 "sample/cgroup_count_connect4.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/cgroup_count_connect4.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); // EBPF_OP_LDXW pc=1 dst=r2 src=r1 offset=44 imm=0 #line 34 "sample/cgroup_count_connect4.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=25 imm=6 + // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=26 imm=6 #line 34 "sample/cgroup_count_connect4.c" if (r2 != IMMEDIATE(6)) { #line 34 "sample/cgroup_count_connect4.c" - goto label_3; + goto label_2; #line 34 "sample/cgroup_count_connect4.c" } // EBPF_OP_LDXH pc=3 dst=r1 src=r1 offset=40 imm=0 #line 40 "sample/cgroup_count_connect4.c" r1 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=23 imm=7459 + // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=24 imm=7459 #line 40 "sample/cgroup_count_connect4.c" if (r1 != IMMEDIATE(7459)) { #line 40 "sample/cgroup_count_connect4.c" - goto label_3; + goto label_2; #line 40 "sample/cgroup_count_connect4.c" } // EBPF_OP_MOV64_IMM pc=5 dst=r1 src=r0 offset=0 imm=8989 @@ -287,7 +289,7 @@ count_tcp_connect4(void* context) return 0; #line 48 "sample/cgroup_count_connect4.c" } - // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=11 imm=0 + // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=12 imm=0 #line 49 "sample/cgroup_count_connect4.c" if (r0 != IMMEDIATE(0)) { #line 49 "sample/cgroup_count_connect4.c" @@ -312,13 +314,16 @@ count_tcp_connect4(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r3 src=r0 offset=0 imm=-16 #line 50 "sample/cgroup_count_connect4.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=19 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=0 +#line 50 "sample/cgroup_count_connect4.c" + r6 = IMMEDIATE(0); + // EBPF_OP_LDDW pc=20 dst=r1 src=r1 offset=0 imm=1 #line 51 "sample/cgroup_count_connect4.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_IMM pc=21 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=22 dst=r4 src=r0 offset=0 imm=0 #line 51 "sample/cgroup_count_connect4.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=2 #line 51 "sample/cgroup_count_connect4.c" r0 = count_tcp_connect4_helpers[1].address(r1, r2, r3, r4, r5, context); #line 51 "sample/cgroup_count_connect4.c" @@ -327,25 +332,27 @@ count_tcp_connect4(void* context) return 0; #line 51 "sample/cgroup_count_connect4.c" } - // EBPF_OP_JA pc=23 dst=r0 src=r0 offset=3 imm=0 + // EBPF_OP_JA pc=24 dst=r0 src=r0 offset=4 imm=0 #line 51 "sample/cgroup_count_connect4.c" goto label_2; label_1: - // EBPF_OP_LDXDW pc=24 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXDW pc=25 dst=r1 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" r1 = *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=1 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=1 #line 53 "sample/cgroup_count_connect4.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXDW pc=26 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXDW pc=27 dst=r0 src=r1 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint64_t)r1; -label_2: - // EBPF_OP_MOV64_IMM pc=27 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=28 dst=r6 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect4.c" - r0 = IMMEDIATE(0); -label_3: - // EBPF_OP_EXIT pc=28 dst=r0 src=r0 offset=0 imm=0 + r6 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=29 dst=r0 src=r6 offset=0 imm=0 +#line 62 "sample/cgroup_count_connect4.c" + r0 = r6; + // EBPF_OP_EXIT pc=30 dst=r0 src=r0 offset=0 imm=0 #line 62 "sample/cgroup_count_connect4.c" return r0; #line 31 "sample/cgroup_count_connect4.c" @@ -365,7 +372,7 @@ static program_entry_t _programs[] = { 1, count_tcp_connect4_helpers, 2, - 29, + 31, &count_tcp_connect4_program_type_guid, &count_tcp_connect4_attach_type_guid, }, @@ -383,7 +390,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_count_connect6_dll.c b/tests/bpf2c_tests/expected/cgroup_count_connect6_dll.c index 06898a4da0..47dd041237 100644 --- a/tests/bpf2c_tests/expected/cgroup_count_connect6_dll.c +++ b/tests/bpf2c_tests/expected/cgroup_count_connect6_dll.c @@ -97,6 +97,8 @@ count_tcp_connect6(void* context) register uint64_t r4 = 0; #line 31 "sample/cgroup_count_connect6.c" register uint64_t r5 = 0; +#line 31 "sample/cgroup_count_connect6.c" + register uint64_t r6 = 0; #line 31 "sample/cgroup_count_connect6.c" register uint64_t r10 = 0; @@ -105,27 +107,27 @@ count_tcp_connect6(void* context) #line 31 "sample/cgroup_count_connect6.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/cgroup_count_connect6.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); // EBPF_OP_LDXW pc=1 dst=r2 src=r1 offset=44 imm=0 #line 34 "sample/cgroup_count_connect6.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=25 imm=6 + // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=26 imm=6 #line 34 "sample/cgroup_count_connect6.c" if (r2 != IMMEDIATE(6)) { #line 34 "sample/cgroup_count_connect6.c" - goto label_3; + goto label_2; #line 34 "sample/cgroup_count_connect6.c" } // EBPF_OP_LDXH pc=3 dst=r1 src=r1 offset=40 imm=0 #line 40 "sample/cgroup_count_connect6.c" r1 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=23 imm=7459 + // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=24 imm=7459 #line 40 "sample/cgroup_count_connect6.c" if (r1 != IMMEDIATE(7459)) { #line 40 "sample/cgroup_count_connect6.c" - goto label_3; + goto label_2; #line 40 "sample/cgroup_count_connect6.c" } // EBPF_OP_MOV64_IMM pc=5 dst=r1 src=r0 offset=0 imm=8989 @@ -152,7 +154,7 @@ count_tcp_connect6(void* context) return 0; #line 48 "sample/cgroup_count_connect6.c" } - // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=11 imm=0 + // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=12 imm=0 #line 49 "sample/cgroup_count_connect6.c" if (r0 != IMMEDIATE(0)) { #line 49 "sample/cgroup_count_connect6.c" @@ -177,13 +179,16 @@ count_tcp_connect6(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r3 src=r0 offset=0 imm=-16 #line 50 "sample/cgroup_count_connect6.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=19 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=0 +#line 50 "sample/cgroup_count_connect6.c" + r6 = IMMEDIATE(0); + // EBPF_OP_LDDW pc=20 dst=r1 src=r1 offset=0 imm=1 #line 51 "sample/cgroup_count_connect6.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_IMM pc=21 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=22 dst=r4 src=r0 offset=0 imm=0 #line 51 "sample/cgroup_count_connect6.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=2 #line 51 "sample/cgroup_count_connect6.c" r0 = count_tcp_connect6_helpers[1].address(r1, r2, r3, r4, r5, context); #line 51 "sample/cgroup_count_connect6.c" @@ -192,25 +197,27 @@ count_tcp_connect6(void* context) return 0; #line 51 "sample/cgroup_count_connect6.c" } - // EBPF_OP_JA pc=23 dst=r0 src=r0 offset=3 imm=0 + // EBPF_OP_JA pc=24 dst=r0 src=r0 offset=4 imm=0 #line 51 "sample/cgroup_count_connect6.c" goto label_2; label_1: - // EBPF_OP_LDXDW pc=24 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXDW pc=25 dst=r1 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" r1 = *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=1 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=1 #line 53 "sample/cgroup_count_connect6.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXDW pc=26 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXDW pc=27 dst=r0 src=r1 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint64_t)r1; -label_2: - // EBPF_OP_MOV64_IMM pc=27 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=28 dst=r6 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" - r0 = IMMEDIATE(0); -label_3: - // EBPF_OP_EXIT pc=28 dst=r0 src=r0 offset=0 imm=0 + r6 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=29 dst=r0 src=r6 offset=0 imm=0 +#line 62 "sample/cgroup_count_connect6.c" + r0 = r6; + // EBPF_OP_EXIT pc=30 dst=r0 src=r0 offset=0 imm=0 #line 62 "sample/cgroup_count_connect6.c" return r0; #line 31 "sample/cgroup_count_connect6.c" @@ -230,7 +237,7 @@ static program_entry_t _programs[] = { 1, count_tcp_connect6_helpers, 2, - 29, + 31, &count_tcp_connect6_program_type_guid, &count_tcp_connect6_attach_type_guid, }, @@ -248,7 +255,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_count_connect6_raw.c b/tests/bpf2c_tests/expected/cgroup_count_connect6_raw.c index f3053e1ded..1bc50219a8 100644 --- a/tests/bpf2c_tests/expected/cgroup_count_connect6_raw.c +++ b/tests/bpf2c_tests/expected/cgroup_count_connect6_raw.c @@ -71,6 +71,8 @@ count_tcp_connect6(void* context) register uint64_t r4 = 0; #line 31 "sample/cgroup_count_connect6.c" register uint64_t r5 = 0; +#line 31 "sample/cgroup_count_connect6.c" + register uint64_t r6 = 0; #line 31 "sample/cgroup_count_connect6.c" register uint64_t r10 = 0; @@ -79,27 +81,27 @@ count_tcp_connect6(void* context) #line 31 "sample/cgroup_count_connect6.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/cgroup_count_connect6.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); // EBPF_OP_LDXW pc=1 dst=r2 src=r1 offset=44 imm=0 #line 34 "sample/cgroup_count_connect6.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=25 imm=6 + // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=26 imm=6 #line 34 "sample/cgroup_count_connect6.c" if (r2 != IMMEDIATE(6)) { #line 34 "sample/cgroup_count_connect6.c" - goto label_3; + goto label_2; #line 34 "sample/cgroup_count_connect6.c" } // EBPF_OP_LDXH pc=3 dst=r1 src=r1 offset=40 imm=0 #line 40 "sample/cgroup_count_connect6.c" r1 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=23 imm=7459 + // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=24 imm=7459 #line 40 "sample/cgroup_count_connect6.c" if (r1 != IMMEDIATE(7459)) { #line 40 "sample/cgroup_count_connect6.c" - goto label_3; + goto label_2; #line 40 "sample/cgroup_count_connect6.c" } // EBPF_OP_MOV64_IMM pc=5 dst=r1 src=r0 offset=0 imm=8989 @@ -126,7 +128,7 @@ count_tcp_connect6(void* context) return 0; #line 48 "sample/cgroup_count_connect6.c" } - // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=11 imm=0 + // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=12 imm=0 #line 49 "sample/cgroup_count_connect6.c" if (r0 != IMMEDIATE(0)) { #line 49 "sample/cgroup_count_connect6.c" @@ -151,13 +153,16 @@ count_tcp_connect6(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r3 src=r0 offset=0 imm=-16 #line 50 "sample/cgroup_count_connect6.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=19 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=0 +#line 50 "sample/cgroup_count_connect6.c" + r6 = IMMEDIATE(0); + // EBPF_OP_LDDW pc=20 dst=r1 src=r1 offset=0 imm=1 #line 51 "sample/cgroup_count_connect6.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_IMM pc=21 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=22 dst=r4 src=r0 offset=0 imm=0 #line 51 "sample/cgroup_count_connect6.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=2 #line 51 "sample/cgroup_count_connect6.c" r0 = count_tcp_connect6_helpers[1].address(r1, r2, r3, r4, r5, context); #line 51 "sample/cgroup_count_connect6.c" @@ -166,25 +171,27 @@ count_tcp_connect6(void* context) return 0; #line 51 "sample/cgroup_count_connect6.c" } - // EBPF_OP_JA pc=23 dst=r0 src=r0 offset=3 imm=0 + // EBPF_OP_JA pc=24 dst=r0 src=r0 offset=4 imm=0 #line 51 "sample/cgroup_count_connect6.c" goto label_2; label_1: - // EBPF_OP_LDXDW pc=24 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXDW pc=25 dst=r1 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" r1 = *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=1 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=1 #line 53 "sample/cgroup_count_connect6.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXDW pc=26 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXDW pc=27 dst=r0 src=r1 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint64_t)r1; -label_2: - // EBPF_OP_MOV64_IMM pc=27 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=28 dst=r6 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" - r0 = IMMEDIATE(0); -label_3: - // EBPF_OP_EXIT pc=28 dst=r0 src=r0 offset=0 imm=0 + r6 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=29 dst=r0 src=r6 offset=0 imm=0 +#line 62 "sample/cgroup_count_connect6.c" + r0 = r6; + // EBPF_OP_EXIT pc=30 dst=r0 src=r0 offset=0 imm=0 #line 62 "sample/cgroup_count_connect6.c" return r0; #line 31 "sample/cgroup_count_connect6.c" @@ -204,7 +211,7 @@ static program_entry_t _programs[] = { 1, count_tcp_connect6_helpers, 2, - 29, + 31, &count_tcp_connect6_program_type_guid, &count_tcp_connect6_attach_type_guid, }, @@ -222,7 +229,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_count_connect6_sys.c b/tests/bpf2c_tests/expected/cgroup_count_connect6_sys.c index 997dfa8747..19f4703111 100644 --- a/tests/bpf2c_tests/expected/cgroup_count_connect6_sys.c +++ b/tests/bpf2c_tests/expected/cgroup_count_connect6_sys.c @@ -232,6 +232,8 @@ count_tcp_connect6(void* context) register uint64_t r4 = 0; #line 31 "sample/cgroup_count_connect6.c" register uint64_t r5 = 0; +#line 31 "sample/cgroup_count_connect6.c" + register uint64_t r6 = 0; #line 31 "sample/cgroup_count_connect6.c" register uint64_t r10 = 0; @@ -240,27 +242,27 @@ count_tcp_connect6(void* context) #line 31 "sample/cgroup_count_connect6.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/cgroup_count_connect6.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); // EBPF_OP_LDXW pc=1 dst=r2 src=r1 offset=44 imm=0 #line 34 "sample/cgroup_count_connect6.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=25 imm=6 + // EBPF_OP_JNE_IMM pc=2 dst=r2 src=r0 offset=26 imm=6 #line 34 "sample/cgroup_count_connect6.c" if (r2 != IMMEDIATE(6)) { #line 34 "sample/cgroup_count_connect6.c" - goto label_3; + goto label_2; #line 34 "sample/cgroup_count_connect6.c" } // EBPF_OP_LDXH pc=3 dst=r1 src=r1 offset=40 imm=0 #line 40 "sample/cgroup_count_connect6.c" r1 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=23 imm=7459 + // EBPF_OP_JNE_IMM pc=4 dst=r1 src=r0 offset=24 imm=7459 #line 40 "sample/cgroup_count_connect6.c" if (r1 != IMMEDIATE(7459)) { #line 40 "sample/cgroup_count_connect6.c" - goto label_3; + goto label_2; #line 40 "sample/cgroup_count_connect6.c" } // EBPF_OP_MOV64_IMM pc=5 dst=r1 src=r0 offset=0 imm=8989 @@ -287,7 +289,7 @@ count_tcp_connect6(void* context) return 0; #line 48 "sample/cgroup_count_connect6.c" } - // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=11 imm=0 + // EBPF_OP_JNE_IMM pc=12 dst=r0 src=r0 offset=12 imm=0 #line 49 "sample/cgroup_count_connect6.c" if (r0 != IMMEDIATE(0)) { #line 49 "sample/cgroup_count_connect6.c" @@ -312,13 +314,16 @@ count_tcp_connect6(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r3 src=r0 offset=0 imm=-16 #line 50 "sample/cgroup_count_connect6.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=19 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=0 +#line 50 "sample/cgroup_count_connect6.c" + r6 = IMMEDIATE(0); + // EBPF_OP_LDDW pc=20 dst=r1 src=r1 offset=0 imm=1 #line 51 "sample/cgroup_count_connect6.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_MOV64_IMM pc=21 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=22 dst=r4 src=r0 offset=0 imm=0 #line 51 "sample/cgroup_count_connect6.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=2 #line 51 "sample/cgroup_count_connect6.c" r0 = count_tcp_connect6_helpers[1].address(r1, r2, r3, r4, r5, context); #line 51 "sample/cgroup_count_connect6.c" @@ -327,25 +332,27 @@ count_tcp_connect6(void* context) return 0; #line 51 "sample/cgroup_count_connect6.c" } - // EBPF_OP_JA pc=23 dst=r0 src=r0 offset=3 imm=0 + // EBPF_OP_JA pc=24 dst=r0 src=r0 offset=4 imm=0 #line 51 "sample/cgroup_count_connect6.c" goto label_2; label_1: - // EBPF_OP_LDXDW pc=24 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXDW pc=25 dst=r1 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" r1 = *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=1 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=1 #line 53 "sample/cgroup_count_connect6.c" r1 += IMMEDIATE(1); - // EBPF_OP_STXDW pc=26 dst=r0 src=r1 offset=0 imm=0 + // EBPF_OP_STXDW pc=27 dst=r0 src=r1 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" *(uint64_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint64_t)r1; -label_2: - // EBPF_OP_MOV64_IMM pc=27 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=28 dst=r6 src=r0 offset=0 imm=0 #line 53 "sample/cgroup_count_connect6.c" - r0 = IMMEDIATE(0); -label_3: - // EBPF_OP_EXIT pc=28 dst=r0 src=r0 offset=0 imm=0 + r6 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=29 dst=r0 src=r6 offset=0 imm=0 +#line 62 "sample/cgroup_count_connect6.c" + r0 = r6; + // EBPF_OP_EXIT pc=30 dst=r0 src=r0 offset=0 imm=0 #line 62 "sample/cgroup_count_connect6.c" return r0; #line 31 "sample/cgroup_count_connect6.c" @@ -365,7 +372,7 @@ static program_entry_t _programs[] = { 1, count_tcp_connect6_helpers, 2, - 29, + 31, &count_tcp_connect6_program_type_guid, &count_tcp_connect6_attach_type_guid, }, @@ -383,7 +390,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_mt_connect4_dll.c b/tests/bpf2c_tests/expected/cgroup_mt_connect4_dll.c index 95dcc8afb2..8d898884b6 100644 --- a/tests/bpf2c_tests/expected/cgroup_mt_connect4_dll.c +++ b/tests/bpf2c_tests/expected/cgroup_mt_connect4_dll.c @@ -185,7 +185,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_mt_connect4_raw.c b/tests/bpf2c_tests/expected/cgroup_mt_connect4_raw.c index cd98795ae6..22cb12ab84 100644 --- a/tests/bpf2c_tests/expected/cgroup_mt_connect4_raw.c +++ b/tests/bpf2c_tests/expected/cgroup_mt_connect4_raw.c @@ -159,7 +159,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_mt_connect4_sys.c b/tests/bpf2c_tests/expected/cgroup_mt_connect4_sys.c index 1b63f44f75..bee6a785bb 100644 --- a/tests/bpf2c_tests/expected/cgroup_mt_connect4_sys.c +++ b/tests/bpf2c_tests/expected/cgroup_mt_connect4_sys.c @@ -320,7 +320,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_mt_connect6_dll.c b/tests/bpf2c_tests/expected/cgroup_mt_connect6_dll.c index bc194ddcd4..f08b3280bb 100644 --- a/tests/bpf2c_tests/expected/cgroup_mt_connect6_dll.c +++ b/tests/bpf2c_tests/expected/cgroup_mt_connect6_dll.c @@ -185,7 +185,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_mt_connect6_raw.c b/tests/bpf2c_tests/expected/cgroup_mt_connect6_raw.c index f25e9ad814..f8c43e1757 100644 --- a/tests/bpf2c_tests/expected/cgroup_mt_connect6_raw.c +++ b/tests/bpf2c_tests/expected/cgroup_mt_connect6_raw.c @@ -159,7 +159,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_mt_connect6_sys.c b/tests/bpf2c_tests/expected/cgroup_mt_connect6_sys.c index a2c0f3e9f5..6d157a51a9 100644 --- a/tests/bpf2c_tests/expected/cgroup_mt_connect6_sys.c +++ b/tests/bpf2c_tests/expected/cgroup_mt_connect6_sys.c @@ -320,7 +320,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_sock_addr2_dll.c b/tests/bpf2c_tests/expected/cgroup_sock_addr2_dll.c index 4283b79872..8cd5180cf1 100644 --- a/tests/bpf2c_tests/expected/cgroup_sock_addr2_dll.c +++ b/tests/bpf2c_tests/expected/cgroup_sock_addr2_dll.c @@ -956,7 +956,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_sock_addr2_raw.c b/tests/bpf2c_tests/expected/cgroup_sock_addr2_raw.c index a95744c5f5..9f68894f11 100644 --- a/tests/bpf2c_tests/expected/cgroup_sock_addr2_raw.c +++ b/tests/bpf2c_tests/expected/cgroup_sock_addr2_raw.c @@ -930,7 +930,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_sock_addr2_sys.c b/tests/bpf2c_tests/expected/cgroup_sock_addr2_sys.c index 0363ff3f07..d9434defae 100644 --- a/tests/bpf2c_tests/expected/cgroup_sock_addr2_sys.c +++ b/tests/bpf2c_tests/expected/cgroup_sock_addr2_sys.c @@ -1091,7 +1091,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_sock_addr_dll.c b/tests/bpf2c_tests/expected/cgroup_sock_addr_dll.c index 165de82644..d8d5779df7 100644 --- a/tests/bpf2c_tests/expected/cgroup_sock_addr_dll.c +++ b/tests/bpf2c_tests/expected/cgroup_sock_addr_dll.c @@ -875,7 +875,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_sock_addr_raw.c b/tests/bpf2c_tests/expected/cgroup_sock_addr_raw.c index 3d959a6fa2..0827918774 100644 --- a/tests/bpf2c_tests/expected/cgroup_sock_addr_raw.c +++ b/tests/bpf2c_tests/expected/cgroup_sock_addr_raw.c @@ -849,7 +849,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/cgroup_sock_addr_sys.c b/tests/bpf2c_tests/expected/cgroup_sock_addr_sys.c index 5441ebc35e..436e7c3060 100644 --- a/tests/bpf2c_tests/expected/cgroup_sock_addr_sys.c +++ b/tests/bpf2c_tests/expected/cgroup_sock_addr_sys.c @@ -1010,7 +1010,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/decap_permit_packet_dll.c b/tests/bpf2c_tests/expected/decap_permit_packet_dll.c index 533830be9e..b2cf79dbdb 100644 --- a/tests/bpf2c_tests/expected/decap_permit_packet_dll.c +++ b/tests/bpf2c_tests/expected/decap_permit_packet_dll.c @@ -75,6 +75,8 @@ decapsulate_permit_packet(void* context) register uint64_t r4 = 0; #line 94 "sample/decap_permit_packet.c" register uint64_t r5 = 0; +#line 94 "sample/decap_permit_packet.c" + register uint64_t r6 = 0; #line 94 "sample/decap_permit_packet.c" register uint64_t r10 = 0; @@ -95,10 +97,10 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=3 dst=r4 src=r0 offset=0 imm=14 #line 94 "sample/decap_permit_packet.c" r4 += IMMEDIATE(14); - // EBPF_OP_MOV64_IMM pc=4 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=4 dst=r6 src=r0 offset=0 imm=1 #line 94 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JGT_REG pc=5 dst=r4 src=r3 offset=103 imm=0 + r6 = IMMEDIATE(1); + // EBPF_OP_JGT_REG pc=5 dst=r4 src=r3 offset=100 imm=0 #line 94 "sample/decap_permit_packet.c" if (r4 > r3) { #line 94 "sample/decap_permit_packet.c" @@ -108,14 +110,14 @@ decapsulate_permit_packet(void* context) // EBPF_OP_LDXH pc=6 dst=r5 src=r2 offset=12 imm=0 #line 99 "sample/decap_permit_packet.c" r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=56 imm=56710 + // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=54 imm=56710 #line 99 "sample/decap_permit_packet.c" if (r5 == IMMEDIATE(56710)) { #line 99 "sample/decap_permit_packet.c" goto label_1; #line 99 "sample/decap_permit_packet.c" } - // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=100 imm=8 + // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=97 imm=8 #line 99 "sample/decap_permit_packet.c" if (r5 != IMMEDIATE(8)) { #line 99 "sample/decap_permit_packet.c" @@ -128,7 +130,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=10 dst=r5 src=r0 offset=0 imm=34 #line 100 "sample/decap_permit_packet.c" r5 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r5 src=r3 offset=97 imm=0 + // EBPF_OP_JGT_REG pc=11 dst=r5 src=r3 offset=94 imm=0 #line 100 "sample/decap_permit_packet.c" if (r5 > r3) { #line 100 "sample/decap_permit_packet.c" @@ -138,7 +140,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_LDXB pc=12 dst=r5 src=r2 offset=23 imm=0 #line 106 "sample/decap_permit_packet.c" r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=95 imm=4 + // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=92 imm=4 #line 106 "sample/decap_permit_packet.c" if (r5 != IMMEDIATE(4)) { #line 106 "sample/decap_permit_packet.c" @@ -160,7 +162,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r4 src=r0 offset=0 imm=20 #line 107 "sample/decap_permit_packet.c" r4 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=19 dst=r4 src=r3 offset=89 imm=0 + // EBPF_OP_JGT_REG pc=19 dst=r4 src=r3 offset=86 imm=0 #line 107 "sample/decap_permit_packet.c" if (r4 > r3) { #line 107 "sample/decap_permit_packet.c" @@ -173,10 +175,10 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_REG pc=21 dst=r4 src=r5 offset=0 imm=0 #line 29 "sample/decap_permit_packet.c" r4 += r5; - // EBPF_OP_MOV64_IMM pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_MOV64_IMM pc=22 dst=r6 src=r0 offset=0 imm=2 #line 29 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_JGT_REG pc=23 dst=r4 src=r3 offset=85 imm=0 + r6 = IMMEDIATE(2); + // EBPF_OP_JGT_REG pc=23 dst=r4 src=r3 offset=82 imm=0 #line 29 "sample/decap_permit_packet.c" if (r4 > r3) { #line 29 "sample/decap_permit_packet.c" @@ -189,7 +191,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=25 dst=r5 src=r0 offset=0 imm=14 #line 29 "sample/decap_permit_packet.c" r5 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=26 dst=r5 src=r3 offset=82 imm=0 + // EBPF_OP_JGT_REG pc=26 dst=r5 src=r3 offset=79 imm=0 #line 29 "sample/decap_permit_packet.c" if (r5 > r3) { #line 29 "sample/decap_permit_packet.c" @@ -292,156 +294,150 @@ decapsulate_permit_packet(void* context) return 0; #line 41 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=57 dst=r1 src=r0 offset=0 imm=0 -#line 41 "sample/decap_permit_packet.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=58 dst=r0 src=r0 offset=0 imm=2 -#line 41 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=59 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=57 dst=r0 src=r0 offset=0 imm=32 #line 41 "sample/decap_permit_packet.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=60 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=58 dst=r0 src=r0 offset=0 imm=32 #line 41 "sample/decap_permit_packet.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=61 dst=r2 src=r0 offset=0 imm=0 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_MOV64_IMM pc=59 dst=r1 src=r0 offset=0 imm=0 #line 41 "sample/decap_permit_packet.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=62 dst=r2 src=r1 offset=46 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=60 dst=r1 src=r0 offset=45 imm=0 #line 41 "sample/decap_permit_packet.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 41 "sample/decap_permit_packet.c" goto label_3; #line 41 "sample/decap_permit_packet.c" } - // EBPF_OP_JA pc=63 dst=r0 src=r0 offset=44 imm=0 + // EBPF_OP_JA pc=61 dst=r0 src=r0 offset=43 imm=0 #line 41 "sample/decap_permit_packet.c" goto label_2; label_1: - // EBPF_OP_MOV64_REG pc=64 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=62 dst=r4 src=r2 offset=0 imm=0 #line 114 "sample/decap_permit_packet.c" r4 = r2; - // EBPF_OP_ADD64_IMM pc=65 dst=r4 src=r0 offset=0 imm=54 + // EBPF_OP_ADD64_IMM pc=63 dst=r4 src=r0 offset=0 imm=54 #line 114 "sample/decap_permit_packet.c" r4 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=66 dst=r4 src=r3 offset=42 imm=0 + // EBPF_OP_JGT_REG pc=64 dst=r4 src=r3 offset=41 imm=0 #line 114 "sample/decap_permit_packet.c" if (r4 > r3) { #line 114 "sample/decap_permit_packet.c" goto label_3; #line 114 "sample/decap_permit_packet.c" } - // EBPF_OP_LDXB pc=67 dst=r4 src=r2 offset=20 imm=0 + // EBPF_OP_LDXB pc=65 dst=r4 src=r2 offset=20 imm=0 #line 120 "sample/decap_permit_packet.c" r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=68 dst=r4 src=r0 offset=40 imm=41 + // EBPF_OP_JNE_IMM pc=66 dst=r4 src=r0 offset=39 imm=41 #line 120 "sample/decap_permit_packet.c" if (r4 != IMMEDIATE(41)) { #line 120 "sample/decap_permit_packet.c" goto label_3; #line 120 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=69 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=67 dst=r4 src=r2 offset=0 imm=0 #line 120 "sample/decap_permit_packet.c" r4 = r2; - // EBPF_OP_ADD64_IMM pc=70 dst=r4 src=r0 offset=0 imm=94 + // EBPF_OP_ADD64_IMM pc=68 dst=r4 src=r0 offset=0 imm=94 #line 120 "sample/decap_permit_packet.c" r4 += IMMEDIATE(94); - // EBPF_OP_JGT_REG pc=71 dst=r4 src=r3 offset=37 imm=0 + // EBPF_OP_JGT_REG pc=69 dst=r4 src=r3 offset=36 imm=0 #line 120 "sample/decap_permit_packet.c" if (r4 > r3) { #line 120 "sample/decap_permit_packet.c" goto label_3; #line 120 "sample/decap_permit_packet.c" } - // EBPF_OP_LDXB pc=72 dst=r3 src=r2 offset=13 imm=0 + // EBPF_OP_LDXB pc=70 dst=r3 src=r2 offset=13 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(13)); - // EBPF_OP_STXB pc=73 dst=r2 src=r3 offset=53 imm=0 + // EBPF_OP_STXB pc=71 dst=r2 src=r3 offset=53 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(53)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=74 dst=r3 src=r2 offset=12 imm=0 + // EBPF_OP_LDXB pc=72 dst=r3 src=r2 offset=12 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_STXB pc=75 dst=r2 src=r3 offset=52 imm=0 + // EBPF_OP_STXB pc=73 dst=r2 src=r3 offset=52 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(52)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=76 dst=r3 src=r2 offset=11 imm=0 + // EBPF_OP_LDXB pc=74 dst=r3 src=r2 offset=11 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(11)); - // EBPF_OP_STXB pc=77 dst=r2 src=r3 offset=51 imm=0 + // EBPF_OP_STXB pc=75 dst=r2 src=r3 offset=51 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(51)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=78 dst=r3 src=r2 offset=10 imm=0 + // EBPF_OP_LDXB pc=76 dst=r3 src=r2 offset=10 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(10)); - // EBPF_OP_STXB pc=79 dst=r2 src=r3 offset=50 imm=0 + // EBPF_OP_STXB pc=77 dst=r2 src=r3 offset=50 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(50)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=80 dst=r3 src=r2 offset=9 imm=0 + // EBPF_OP_LDXB pc=78 dst=r3 src=r2 offset=9 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(9)); - // EBPF_OP_STXB pc=81 dst=r2 src=r3 offset=49 imm=0 + // EBPF_OP_STXB pc=79 dst=r2 src=r3 offset=49 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(49)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=82 dst=r3 src=r2 offset=8 imm=0 + // EBPF_OP_LDXB pc=80 dst=r3 src=r2 offset=8 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_STXB pc=83 dst=r2 src=r3 offset=48 imm=0 + // EBPF_OP_STXB pc=81 dst=r2 src=r3 offset=48 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(48)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=84 dst=r3 src=r2 offset=7 imm=0 + // EBPF_OP_LDXB pc=82 dst=r3 src=r2 offset=7 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(7)); - // EBPF_OP_STXB pc=85 dst=r2 src=r3 offset=47 imm=0 + // EBPF_OP_STXB pc=83 dst=r2 src=r3 offset=47 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(47)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=86 dst=r3 src=r2 offset=6 imm=0 + // EBPF_OP_LDXB pc=84 dst=r3 src=r2 offset=6 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(6)); - // EBPF_OP_STXB pc=87 dst=r2 src=r3 offset=46 imm=0 + // EBPF_OP_STXB pc=85 dst=r2 src=r3 offset=46 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(46)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=88 dst=r3 src=r2 offset=5 imm=0 + // EBPF_OP_LDXB pc=86 dst=r3 src=r2 offset=5 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(5)); - // EBPF_OP_STXB pc=89 dst=r2 src=r3 offset=45 imm=0 + // EBPF_OP_STXB pc=87 dst=r2 src=r3 offset=45 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(45)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=90 dst=r3 src=r2 offset=4 imm=0 + // EBPF_OP_LDXB pc=88 dst=r3 src=r2 offset=4 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXB pc=91 dst=r2 src=r3 offset=44 imm=0 + // EBPF_OP_STXB pc=89 dst=r2 src=r3 offset=44 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(44)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=92 dst=r3 src=r2 offset=3 imm=0 + // EBPF_OP_LDXB pc=90 dst=r3 src=r2 offset=3 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(3)); - // EBPF_OP_STXB pc=93 dst=r2 src=r3 offset=43 imm=0 + // EBPF_OP_STXB pc=91 dst=r2 src=r3 offset=43 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(43)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=94 dst=r3 src=r2 offset=2 imm=0 + // EBPF_OP_LDXB pc=92 dst=r3 src=r2 offset=2 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_STXB pc=95 dst=r2 src=r3 offset=42 imm=0 + // EBPF_OP_STXB pc=93 dst=r2 src=r3 offset=42 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(42)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=96 dst=r3 src=r2 offset=1 imm=0 + // EBPF_OP_LDXB pc=94 dst=r3 src=r2 offset=1 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(1)); - // EBPF_OP_STXB pc=97 dst=r2 src=r3 offset=41 imm=0 + // EBPF_OP_STXB pc=95 dst=r2 src=r3 offset=41 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(41)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=98 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_LDXB pc=96 dst=r3 src=r2 offset=0 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_STXB pc=99 dst=r2 src=r3 offset=40 imm=0 + // EBPF_OP_STXB pc=97 dst=r2 src=r3 offset=40 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(40)) = (uint8_t)r3; - // EBPF_OP_MOV64_IMM pc=100 dst=r2 src=r0 offset=0 imm=40 + // EBPF_OP_MOV64_IMM pc=98 dst=r2 src=r0 offset=0 imm=40 #line 70 "sample/decap_permit_packet.c" r2 = IMMEDIATE(40); - // EBPF_OP_CALL pc=101 dst=r0 src=r0 offset=0 imm=65536 + // EBPF_OP_CALL pc=99 dst=r0 src=r0 offset=0 imm=65536 #line 70 "sample/decap_permit_packet.c" r0 = decapsulate_permit_packet_helpers[0].address(r1, r2, r3, r4, r5, context); #line 70 "sample/decap_permit_packet.c" @@ -450,34 +446,34 @@ decapsulate_permit_packet(void* context) return 0; #line 70 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=102 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=100 dst=r6 src=r0 offset=0 imm=2 #line 70 "sample/decap_permit_packet.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=103 dst=r0 src=r0 offset=0 imm=2 + r6 = IMMEDIATE(2); + // EBPF_OP_LSH64_IMM pc=101 dst=r0 src=r0 offset=0 imm=32 #line 70 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=104 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=102 dst=r0 src=r0 offset=0 imm=32 #line 70 "sample/decap_permit_packet.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=105 dst=r1 src=r0 offset=0 imm=32 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_MOV64_IMM pc=103 dst=r1 src=r0 offset=0 imm=0 #line 70 "sample/decap_permit_packet.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=106 dst=r2 src=r0 offset=0 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=104 dst=r1 src=r0 offset=1 imm=0 #line 70 "sample/decap_permit_packet.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=107 dst=r2 src=r1 offset=1 imm=0 -#line 70 "sample/decap_permit_packet.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 70 "sample/decap_permit_packet.c" goto label_3; #line 70 "sample/decap_permit_packet.c" } label_2: - // EBPF_OP_MOV64_IMM pc=108 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=105 dst=r6 src=r0 offset=0 imm=1 #line 70 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); label_3: - // EBPF_OP_EXIT pc=109 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=106 dst=r0 src=r6 offset=0 imm=0 +#line 131 "sample/decap_permit_packet.c" + r0 = r6; + // EBPF_OP_EXIT pc=107 dst=r0 src=r0 offset=0 imm=0 #line 131 "sample/decap_permit_packet.c" return r0; #line 94 "sample/decap_permit_packet.c" @@ -497,7 +493,7 @@ static program_entry_t _programs[] = { 0, decapsulate_permit_packet_helpers, 1, - 110, + 108, &decapsulate_permit_packet_program_type_guid, &decapsulate_permit_packet_attach_type_guid, }, @@ -515,7 +511,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/decap_permit_packet_raw.c b/tests/bpf2c_tests/expected/decap_permit_packet_raw.c index 65d1bc04ed..5e9af3e36c 100644 --- a/tests/bpf2c_tests/expected/decap_permit_packet_raw.c +++ b/tests/bpf2c_tests/expected/decap_permit_packet_raw.c @@ -49,6 +49,8 @@ decapsulate_permit_packet(void* context) register uint64_t r4 = 0; #line 94 "sample/decap_permit_packet.c" register uint64_t r5 = 0; +#line 94 "sample/decap_permit_packet.c" + register uint64_t r6 = 0; #line 94 "sample/decap_permit_packet.c" register uint64_t r10 = 0; @@ -69,10 +71,10 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=3 dst=r4 src=r0 offset=0 imm=14 #line 94 "sample/decap_permit_packet.c" r4 += IMMEDIATE(14); - // EBPF_OP_MOV64_IMM pc=4 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=4 dst=r6 src=r0 offset=0 imm=1 #line 94 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JGT_REG pc=5 dst=r4 src=r3 offset=103 imm=0 + r6 = IMMEDIATE(1); + // EBPF_OP_JGT_REG pc=5 dst=r4 src=r3 offset=100 imm=0 #line 94 "sample/decap_permit_packet.c" if (r4 > r3) { #line 94 "sample/decap_permit_packet.c" @@ -82,14 +84,14 @@ decapsulate_permit_packet(void* context) // EBPF_OP_LDXH pc=6 dst=r5 src=r2 offset=12 imm=0 #line 99 "sample/decap_permit_packet.c" r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=56 imm=56710 + // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=54 imm=56710 #line 99 "sample/decap_permit_packet.c" if (r5 == IMMEDIATE(56710)) { #line 99 "sample/decap_permit_packet.c" goto label_1; #line 99 "sample/decap_permit_packet.c" } - // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=100 imm=8 + // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=97 imm=8 #line 99 "sample/decap_permit_packet.c" if (r5 != IMMEDIATE(8)) { #line 99 "sample/decap_permit_packet.c" @@ -102,7 +104,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=10 dst=r5 src=r0 offset=0 imm=34 #line 100 "sample/decap_permit_packet.c" r5 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r5 src=r3 offset=97 imm=0 + // EBPF_OP_JGT_REG pc=11 dst=r5 src=r3 offset=94 imm=0 #line 100 "sample/decap_permit_packet.c" if (r5 > r3) { #line 100 "sample/decap_permit_packet.c" @@ -112,7 +114,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_LDXB pc=12 dst=r5 src=r2 offset=23 imm=0 #line 106 "sample/decap_permit_packet.c" r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=95 imm=4 + // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=92 imm=4 #line 106 "sample/decap_permit_packet.c" if (r5 != IMMEDIATE(4)) { #line 106 "sample/decap_permit_packet.c" @@ -134,7 +136,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r4 src=r0 offset=0 imm=20 #line 107 "sample/decap_permit_packet.c" r4 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=19 dst=r4 src=r3 offset=89 imm=0 + // EBPF_OP_JGT_REG pc=19 dst=r4 src=r3 offset=86 imm=0 #line 107 "sample/decap_permit_packet.c" if (r4 > r3) { #line 107 "sample/decap_permit_packet.c" @@ -147,10 +149,10 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_REG pc=21 dst=r4 src=r5 offset=0 imm=0 #line 29 "sample/decap_permit_packet.c" r4 += r5; - // EBPF_OP_MOV64_IMM pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_MOV64_IMM pc=22 dst=r6 src=r0 offset=0 imm=2 #line 29 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_JGT_REG pc=23 dst=r4 src=r3 offset=85 imm=0 + r6 = IMMEDIATE(2); + // EBPF_OP_JGT_REG pc=23 dst=r4 src=r3 offset=82 imm=0 #line 29 "sample/decap_permit_packet.c" if (r4 > r3) { #line 29 "sample/decap_permit_packet.c" @@ -163,7 +165,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=25 dst=r5 src=r0 offset=0 imm=14 #line 29 "sample/decap_permit_packet.c" r5 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=26 dst=r5 src=r3 offset=82 imm=0 + // EBPF_OP_JGT_REG pc=26 dst=r5 src=r3 offset=79 imm=0 #line 29 "sample/decap_permit_packet.c" if (r5 > r3) { #line 29 "sample/decap_permit_packet.c" @@ -266,156 +268,150 @@ decapsulate_permit_packet(void* context) return 0; #line 41 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=57 dst=r1 src=r0 offset=0 imm=0 -#line 41 "sample/decap_permit_packet.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=58 dst=r0 src=r0 offset=0 imm=2 -#line 41 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=59 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=57 dst=r0 src=r0 offset=0 imm=32 #line 41 "sample/decap_permit_packet.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=60 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=58 dst=r0 src=r0 offset=0 imm=32 #line 41 "sample/decap_permit_packet.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=61 dst=r2 src=r0 offset=0 imm=0 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_MOV64_IMM pc=59 dst=r1 src=r0 offset=0 imm=0 #line 41 "sample/decap_permit_packet.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=62 dst=r2 src=r1 offset=46 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=60 dst=r1 src=r0 offset=45 imm=0 #line 41 "sample/decap_permit_packet.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 41 "sample/decap_permit_packet.c" goto label_3; #line 41 "sample/decap_permit_packet.c" } - // EBPF_OP_JA pc=63 dst=r0 src=r0 offset=44 imm=0 + // EBPF_OP_JA pc=61 dst=r0 src=r0 offset=43 imm=0 #line 41 "sample/decap_permit_packet.c" goto label_2; label_1: - // EBPF_OP_MOV64_REG pc=64 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=62 dst=r4 src=r2 offset=0 imm=0 #line 114 "sample/decap_permit_packet.c" r4 = r2; - // EBPF_OP_ADD64_IMM pc=65 dst=r4 src=r0 offset=0 imm=54 + // EBPF_OP_ADD64_IMM pc=63 dst=r4 src=r0 offset=0 imm=54 #line 114 "sample/decap_permit_packet.c" r4 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=66 dst=r4 src=r3 offset=42 imm=0 + // EBPF_OP_JGT_REG pc=64 dst=r4 src=r3 offset=41 imm=0 #line 114 "sample/decap_permit_packet.c" if (r4 > r3) { #line 114 "sample/decap_permit_packet.c" goto label_3; #line 114 "sample/decap_permit_packet.c" } - // EBPF_OP_LDXB pc=67 dst=r4 src=r2 offset=20 imm=0 + // EBPF_OP_LDXB pc=65 dst=r4 src=r2 offset=20 imm=0 #line 120 "sample/decap_permit_packet.c" r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=68 dst=r4 src=r0 offset=40 imm=41 + // EBPF_OP_JNE_IMM pc=66 dst=r4 src=r0 offset=39 imm=41 #line 120 "sample/decap_permit_packet.c" if (r4 != IMMEDIATE(41)) { #line 120 "sample/decap_permit_packet.c" goto label_3; #line 120 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=69 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=67 dst=r4 src=r2 offset=0 imm=0 #line 120 "sample/decap_permit_packet.c" r4 = r2; - // EBPF_OP_ADD64_IMM pc=70 dst=r4 src=r0 offset=0 imm=94 + // EBPF_OP_ADD64_IMM pc=68 dst=r4 src=r0 offset=0 imm=94 #line 120 "sample/decap_permit_packet.c" r4 += IMMEDIATE(94); - // EBPF_OP_JGT_REG pc=71 dst=r4 src=r3 offset=37 imm=0 + // EBPF_OP_JGT_REG pc=69 dst=r4 src=r3 offset=36 imm=0 #line 120 "sample/decap_permit_packet.c" if (r4 > r3) { #line 120 "sample/decap_permit_packet.c" goto label_3; #line 120 "sample/decap_permit_packet.c" } - // EBPF_OP_LDXB pc=72 dst=r3 src=r2 offset=13 imm=0 + // EBPF_OP_LDXB pc=70 dst=r3 src=r2 offset=13 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(13)); - // EBPF_OP_STXB pc=73 dst=r2 src=r3 offset=53 imm=0 + // EBPF_OP_STXB pc=71 dst=r2 src=r3 offset=53 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(53)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=74 dst=r3 src=r2 offset=12 imm=0 + // EBPF_OP_LDXB pc=72 dst=r3 src=r2 offset=12 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_STXB pc=75 dst=r2 src=r3 offset=52 imm=0 + // EBPF_OP_STXB pc=73 dst=r2 src=r3 offset=52 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(52)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=76 dst=r3 src=r2 offset=11 imm=0 + // EBPF_OP_LDXB pc=74 dst=r3 src=r2 offset=11 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(11)); - // EBPF_OP_STXB pc=77 dst=r2 src=r3 offset=51 imm=0 + // EBPF_OP_STXB pc=75 dst=r2 src=r3 offset=51 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(51)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=78 dst=r3 src=r2 offset=10 imm=0 + // EBPF_OP_LDXB pc=76 dst=r3 src=r2 offset=10 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(10)); - // EBPF_OP_STXB pc=79 dst=r2 src=r3 offset=50 imm=0 + // EBPF_OP_STXB pc=77 dst=r2 src=r3 offset=50 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(50)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=80 dst=r3 src=r2 offset=9 imm=0 + // EBPF_OP_LDXB pc=78 dst=r3 src=r2 offset=9 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(9)); - // EBPF_OP_STXB pc=81 dst=r2 src=r3 offset=49 imm=0 + // EBPF_OP_STXB pc=79 dst=r2 src=r3 offset=49 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(49)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=82 dst=r3 src=r2 offset=8 imm=0 + // EBPF_OP_LDXB pc=80 dst=r3 src=r2 offset=8 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_STXB pc=83 dst=r2 src=r3 offset=48 imm=0 + // EBPF_OP_STXB pc=81 dst=r2 src=r3 offset=48 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(48)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=84 dst=r3 src=r2 offset=7 imm=0 + // EBPF_OP_LDXB pc=82 dst=r3 src=r2 offset=7 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(7)); - // EBPF_OP_STXB pc=85 dst=r2 src=r3 offset=47 imm=0 + // EBPF_OP_STXB pc=83 dst=r2 src=r3 offset=47 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(47)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=86 dst=r3 src=r2 offset=6 imm=0 + // EBPF_OP_LDXB pc=84 dst=r3 src=r2 offset=6 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(6)); - // EBPF_OP_STXB pc=87 dst=r2 src=r3 offset=46 imm=0 + // EBPF_OP_STXB pc=85 dst=r2 src=r3 offset=46 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(46)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=88 dst=r3 src=r2 offset=5 imm=0 + // EBPF_OP_LDXB pc=86 dst=r3 src=r2 offset=5 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(5)); - // EBPF_OP_STXB pc=89 dst=r2 src=r3 offset=45 imm=0 + // EBPF_OP_STXB pc=87 dst=r2 src=r3 offset=45 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(45)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=90 dst=r3 src=r2 offset=4 imm=0 + // EBPF_OP_LDXB pc=88 dst=r3 src=r2 offset=4 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXB pc=91 dst=r2 src=r3 offset=44 imm=0 + // EBPF_OP_STXB pc=89 dst=r2 src=r3 offset=44 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(44)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=92 dst=r3 src=r2 offset=3 imm=0 + // EBPF_OP_LDXB pc=90 dst=r3 src=r2 offset=3 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(3)); - // EBPF_OP_STXB pc=93 dst=r2 src=r3 offset=43 imm=0 + // EBPF_OP_STXB pc=91 dst=r2 src=r3 offset=43 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(43)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=94 dst=r3 src=r2 offset=2 imm=0 + // EBPF_OP_LDXB pc=92 dst=r3 src=r2 offset=2 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_STXB pc=95 dst=r2 src=r3 offset=42 imm=0 + // EBPF_OP_STXB pc=93 dst=r2 src=r3 offset=42 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(42)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=96 dst=r3 src=r2 offset=1 imm=0 + // EBPF_OP_LDXB pc=94 dst=r3 src=r2 offset=1 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(1)); - // EBPF_OP_STXB pc=97 dst=r2 src=r3 offset=41 imm=0 + // EBPF_OP_STXB pc=95 dst=r2 src=r3 offset=41 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(41)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=98 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_LDXB pc=96 dst=r3 src=r2 offset=0 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_STXB pc=99 dst=r2 src=r3 offset=40 imm=0 + // EBPF_OP_STXB pc=97 dst=r2 src=r3 offset=40 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(40)) = (uint8_t)r3; - // EBPF_OP_MOV64_IMM pc=100 dst=r2 src=r0 offset=0 imm=40 + // EBPF_OP_MOV64_IMM pc=98 dst=r2 src=r0 offset=0 imm=40 #line 70 "sample/decap_permit_packet.c" r2 = IMMEDIATE(40); - // EBPF_OP_CALL pc=101 dst=r0 src=r0 offset=0 imm=65536 + // EBPF_OP_CALL pc=99 dst=r0 src=r0 offset=0 imm=65536 #line 70 "sample/decap_permit_packet.c" r0 = decapsulate_permit_packet_helpers[0].address(r1, r2, r3, r4, r5, context); #line 70 "sample/decap_permit_packet.c" @@ -424,34 +420,34 @@ decapsulate_permit_packet(void* context) return 0; #line 70 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=102 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=100 dst=r6 src=r0 offset=0 imm=2 #line 70 "sample/decap_permit_packet.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=103 dst=r0 src=r0 offset=0 imm=2 + r6 = IMMEDIATE(2); + // EBPF_OP_LSH64_IMM pc=101 dst=r0 src=r0 offset=0 imm=32 #line 70 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=104 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=102 dst=r0 src=r0 offset=0 imm=32 #line 70 "sample/decap_permit_packet.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=105 dst=r1 src=r0 offset=0 imm=32 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_MOV64_IMM pc=103 dst=r1 src=r0 offset=0 imm=0 #line 70 "sample/decap_permit_packet.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=106 dst=r2 src=r0 offset=0 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=104 dst=r1 src=r0 offset=1 imm=0 #line 70 "sample/decap_permit_packet.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=107 dst=r2 src=r1 offset=1 imm=0 -#line 70 "sample/decap_permit_packet.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 70 "sample/decap_permit_packet.c" goto label_3; #line 70 "sample/decap_permit_packet.c" } label_2: - // EBPF_OP_MOV64_IMM pc=108 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=105 dst=r6 src=r0 offset=0 imm=1 #line 70 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); label_3: - // EBPF_OP_EXIT pc=109 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=106 dst=r0 src=r6 offset=0 imm=0 +#line 131 "sample/decap_permit_packet.c" + r0 = r6; + // EBPF_OP_EXIT pc=107 dst=r0 src=r0 offset=0 imm=0 #line 131 "sample/decap_permit_packet.c" return r0; #line 94 "sample/decap_permit_packet.c" @@ -471,7 +467,7 @@ static program_entry_t _programs[] = { 0, decapsulate_permit_packet_helpers, 1, - 110, + 108, &decapsulate_permit_packet_program_type_guid, &decapsulate_permit_packet_attach_type_guid, }, @@ -489,7 +485,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/decap_permit_packet_sys.c b/tests/bpf2c_tests/expected/decap_permit_packet_sys.c index 213e047169..6820c2386f 100644 --- a/tests/bpf2c_tests/expected/decap_permit_packet_sys.c +++ b/tests/bpf2c_tests/expected/decap_permit_packet_sys.c @@ -210,6 +210,8 @@ decapsulate_permit_packet(void* context) register uint64_t r4 = 0; #line 94 "sample/decap_permit_packet.c" register uint64_t r5 = 0; +#line 94 "sample/decap_permit_packet.c" + register uint64_t r6 = 0; #line 94 "sample/decap_permit_packet.c" register uint64_t r10 = 0; @@ -230,10 +232,10 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=3 dst=r4 src=r0 offset=0 imm=14 #line 94 "sample/decap_permit_packet.c" r4 += IMMEDIATE(14); - // EBPF_OP_MOV64_IMM pc=4 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=4 dst=r6 src=r0 offset=0 imm=1 #line 94 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JGT_REG pc=5 dst=r4 src=r3 offset=103 imm=0 + r6 = IMMEDIATE(1); + // EBPF_OP_JGT_REG pc=5 dst=r4 src=r3 offset=100 imm=0 #line 94 "sample/decap_permit_packet.c" if (r4 > r3) { #line 94 "sample/decap_permit_packet.c" @@ -243,14 +245,14 @@ decapsulate_permit_packet(void* context) // EBPF_OP_LDXH pc=6 dst=r5 src=r2 offset=12 imm=0 #line 99 "sample/decap_permit_packet.c" r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=56 imm=56710 + // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=54 imm=56710 #line 99 "sample/decap_permit_packet.c" if (r5 == IMMEDIATE(56710)) { #line 99 "sample/decap_permit_packet.c" goto label_1; #line 99 "sample/decap_permit_packet.c" } - // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=100 imm=8 + // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=97 imm=8 #line 99 "sample/decap_permit_packet.c" if (r5 != IMMEDIATE(8)) { #line 99 "sample/decap_permit_packet.c" @@ -263,7 +265,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=10 dst=r5 src=r0 offset=0 imm=34 #line 100 "sample/decap_permit_packet.c" r5 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r5 src=r3 offset=97 imm=0 + // EBPF_OP_JGT_REG pc=11 dst=r5 src=r3 offset=94 imm=0 #line 100 "sample/decap_permit_packet.c" if (r5 > r3) { #line 100 "sample/decap_permit_packet.c" @@ -273,7 +275,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_LDXB pc=12 dst=r5 src=r2 offset=23 imm=0 #line 106 "sample/decap_permit_packet.c" r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=95 imm=4 + // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=92 imm=4 #line 106 "sample/decap_permit_packet.c" if (r5 != IMMEDIATE(4)) { #line 106 "sample/decap_permit_packet.c" @@ -295,7 +297,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=18 dst=r4 src=r0 offset=0 imm=20 #line 107 "sample/decap_permit_packet.c" r4 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=19 dst=r4 src=r3 offset=89 imm=0 + // EBPF_OP_JGT_REG pc=19 dst=r4 src=r3 offset=86 imm=0 #line 107 "sample/decap_permit_packet.c" if (r4 > r3) { #line 107 "sample/decap_permit_packet.c" @@ -308,10 +310,10 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_REG pc=21 dst=r4 src=r5 offset=0 imm=0 #line 29 "sample/decap_permit_packet.c" r4 += r5; - // EBPF_OP_MOV64_IMM pc=22 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_MOV64_IMM pc=22 dst=r6 src=r0 offset=0 imm=2 #line 29 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_JGT_REG pc=23 dst=r4 src=r3 offset=85 imm=0 + r6 = IMMEDIATE(2); + // EBPF_OP_JGT_REG pc=23 dst=r4 src=r3 offset=82 imm=0 #line 29 "sample/decap_permit_packet.c" if (r4 > r3) { #line 29 "sample/decap_permit_packet.c" @@ -324,7 +326,7 @@ decapsulate_permit_packet(void* context) // EBPF_OP_ADD64_IMM pc=25 dst=r5 src=r0 offset=0 imm=14 #line 29 "sample/decap_permit_packet.c" r5 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=26 dst=r5 src=r3 offset=82 imm=0 + // EBPF_OP_JGT_REG pc=26 dst=r5 src=r3 offset=79 imm=0 #line 29 "sample/decap_permit_packet.c" if (r5 > r3) { #line 29 "sample/decap_permit_packet.c" @@ -427,156 +429,150 @@ decapsulate_permit_packet(void* context) return 0; #line 41 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=57 dst=r1 src=r0 offset=0 imm=0 -#line 41 "sample/decap_permit_packet.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=58 dst=r0 src=r0 offset=0 imm=2 -#line 41 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=59 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=57 dst=r0 src=r0 offset=0 imm=32 #line 41 "sample/decap_permit_packet.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=60 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=58 dst=r0 src=r0 offset=0 imm=32 #line 41 "sample/decap_permit_packet.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=61 dst=r2 src=r0 offset=0 imm=0 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_MOV64_IMM pc=59 dst=r1 src=r0 offset=0 imm=0 #line 41 "sample/decap_permit_packet.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=62 dst=r2 src=r1 offset=46 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=60 dst=r1 src=r0 offset=45 imm=0 #line 41 "sample/decap_permit_packet.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 41 "sample/decap_permit_packet.c" goto label_3; #line 41 "sample/decap_permit_packet.c" } - // EBPF_OP_JA pc=63 dst=r0 src=r0 offset=44 imm=0 + // EBPF_OP_JA pc=61 dst=r0 src=r0 offset=43 imm=0 #line 41 "sample/decap_permit_packet.c" goto label_2; label_1: - // EBPF_OP_MOV64_REG pc=64 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=62 dst=r4 src=r2 offset=0 imm=0 #line 114 "sample/decap_permit_packet.c" r4 = r2; - // EBPF_OP_ADD64_IMM pc=65 dst=r4 src=r0 offset=0 imm=54 + // EBPF_OP_ADD64_IMM pc=63 dst=r4 src=r0 offset=0 imm=54 #line 114 "sample/decap_permit_packet.c" r4 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=66 dst=r4 src=r3 offset=42 imm=0 + // EBPF_OP_JGT_REG pc=64 dst=r4 src=r3 offset=41 imm=0 #line 114 "sample/decap_permit_packet.c" if (r4 > r3) { #line 114 "sample/decap_permit_packet.c" goto label_3; #line 114 "sample/decap_permit_packet.c" } - // EBPF_OP_LDXB pc=67 dst=r4 src=r2 offset=20 imm=0 + // EBPF_OP_LDXB pc=65 dst=r4 src=r2 offset=20 imm=0 #line 120 "sample/decap_permit_packet.c" r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=68 dst=r4 src=r0 offset=40 imm=41 + // EBPF_OP_JNE_IMM pc=66 dst=r4 src=r0 offset=39 imm=41 #line 120 "sample/decap_permit_packet.c" if (r4 != IMMEDIATE(41)) { #line 120 "sample/decap_permit_packet.c" goto label_3; #line 120 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=69 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=67 dst=r4 src=r2 offset=0 imm=0 #line 120 "sample/decap_permit_packet.c" r4 = r2; - // EBPF_OP_ADD64_IMM pc=70 dst=r4 src=r0 offset=0 imm=94 + // EBPF_OP_ADD64_IMM pc=68 dst=r4 src=r0 offset=0 imm=94 #line 120 "sample/decap_permit_packet.c" r4 += IMMEDIATE(94); - // EBPF_OP_JGT_REG pc=71 dst=r4 src=r3 offset=37 imm=0 + // EBPF_OP_JGT_REG pc=69 dst=r4 src=r3 offset=36 imm=0 #line 120 "sample/decap_permit_packet.c" if (r4 > r3) { #line 120 "sample/decap_permit_packet.c" goto label_3; #line 120 "sample/decap_permit_packet.c" } - // EBPF_OP_LDXB pc=72 dst=r3 src=r2 offset=13 imm=0 + // EBPF_OP_LDXB pc=70 dst=r3 src=r2 offset=13 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(13)); - // EBPF_OP_STXB pc=73 dst=r2 src=r3 offset=53 imm=0 + // EBPF_OP_STXB pc=71 dst=r2 src=r3 offset=53 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(53)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=74 dst=r3 src=r2 offset=12 imm=0 + // EBPF_OP_LDXB pc=72 dst=r3 src=r2 offset=12 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_STXB pc=75 dst=r2 src=r3 offset=52 imm=0 + // EBPF_OP_STXB pc=73 dst=r2 src=r3 offset=52 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(52)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=76 dst=r3 src=r2 offset=11 imm=0 + // EBPF_OP_LDXB pc=74 dst=r3 src=r2 offset=11 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(11)); - // EBPF_OP_STXB pc=77 dst=r2 src=r3 offset=51 imm=0 + // EBPF_OP_STXB pc=75 dst=r2 src=r3 offset=51 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(51)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=78 dst=r3 src=r2 offset=10 imm=0 + // EBPF_OP_LDXB pc=76 dst=r3 src=r2 offset=10 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(10)); - // EBPF_OP_STXB pc=79 dst=r2 src=r3 offset=50 imm=0 + // EBPF_OP_STXB pc=77 dst=r2 src=r3 offset=50 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(50)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=80 dst=r3 src=r2 offset=9 imm=0 + // EBPF_OP_LDXB pc=78 dst=r3 src=r2 offset=9 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(9)); - // EBPF_OP_STXB pc=81 dst=r2 src=r3 offset=49 imm=0 + // EBPF_OP_STXB pc=79 dst=r2 src=r3 offset=49 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(49)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=82 dst=r3 src=r2 offset=8 imm=0 + // EBPF_OP_LDXB pc=80 dst=r3 src=r2 offset=8 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_STXB pc=83 dst=r2 src=r3 offset=48 imm=0 + // EBPF_OP_STXB pc=81 dst=r2 src=r3 offset=48 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(48)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=84 dst=r3 src=r2 offset=7 imm=0 + // EBPF_OP_LDXB pc=82 dst=r3 src=r2 offset=7 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(7)); - // EBPF_OP_STXB pc=85 dst=r2 src=r3 offset=47 imm=0 + // EBPF_OP_STXB pc=83 dst=r2 src=r3 offset=47 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(47)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=86 dst=r3 src=r2 offset=6 imm=0 + // EBPF_OP_LDXB pc=84 dst=r3 src=r2 offset=6 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(6)); - // EBPF_OP_STXB pc=87 dst=r2 src=r3 offset=46 imm=0 + // EBPF_OP_STXB pc=85 dst=r2 src=r3 offset=46 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(46)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=88 dst=r3 src=r2 offset=5 imm=0 + // EBPF_OP_LDXB pc=86 dst=r3 src=r2 offset=5 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(5)); - // EBPF_OP_STXB pc=89 dst=r2 src=r3 offset=45 imm=0 + // EBPF_OP_STXB pc=87 dst=r2 src=r3 offset=45 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(45)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=90 dst=r3 src=r2 offset=4 imm=0 + // EBPF_OP_LDXB pc=88 dst=r3 src=r2 offset=4 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXB pc=91 dst=r2 src=r3 offset=44 imm=0 + // EBPF_OP_STXB pc=89 dst=r2 src=r3 offset=44 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(44)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=92 dst=r3 src=r2 offset=3 imm=0 + // EBPF_OP_LDXB pc=90 dst=r3 src=r2 offset=3 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(3)); - // EBPF_OP_STXB pc=93 dst=r2 src=r3 offset=43 imm=0 + // EBPF_OP_STXB pc=91 dst=r2 src=r3 offset=43 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(43)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=94 dst=r3 src=r2 offset=2 imm=0 + // EBPF_OP_LDXB pc=92 dst=r3 src=r2 offset=2 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_STXB pc=95 dst=r2 src=r3 offset=42 imm=0 + // EBPF_OP_STXB pc=93 dst=r2 src=r3 offset=42 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(42)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=96 dst=r3 src=r2 offset=1 imm=0 + // EBPF_OP_LDXB pc=94 dst=r3 src=r2 offset=1 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(1)); - // EBPF_OP_STXB pc=97 dst=r2 src=r3 offset=41 imm=0 + // EBPF_OP_STXB pc=95 dst=r2 src=r3 offset=41 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(41)) = (uint8_t)r3; - // EBPF_OP_LDXB pc=98 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_LDXB pc=96 dst=r3 src=r2 offset=0 imm=0 #line 67 "sample/decap_permit_packet.c" r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_STXB pc=99 dst=r2 src=r3 offset=40 imm=0 + // EBPF_OP_STXB pc=97 dst=r2 src=r3 offset=40 imm=0 #line 67 "sample/decap_permit_packet.c" *(uint8_t*)(uintptr_t)(r2 + OFFSET(40)) = (uint8_t)r3; - // EBPF_OP_MOV64_IMM pc=100 dst=r2 src=r0 offset=0 imm=40 + // EBPF_OP_MOV64_IMM pc=98 dst=r2 src=r0 offset=0 imm=40 #line 70 "sample/decap_permit_packet.c" r2 = IMMEDIATE(40); - // EBPF_OP_CALL pc=101 dst=r0 src=r0 offset=0 imm=65536 + // EBPF_OP_CALL pc=99 dst=r0 src=r0 offset=0 imm=65536 #line 70 "sample/decap_permit_packet.c" r0 = decapsulate_permit_packet_helpers[0].address(r1, r2, r3, r4, r5, context); #line 70 "sample/decap_permit_packet.c" @@ -585,34 +581,34 @@ decapsulate_permit_packet(void* context) return 0; #line 70 "sample/decap_permit_packet.c" } - // EBPF_OP_MOV64_REG pc=102 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=100 dst=r6 src=r0 offset=0 imm=2 #line 70 "sample/decap_permit_packet.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=103 dst=r0 src=r0 offset=0 imm=2 + r6 = IMMEDIATE(2); + // EBPF_OP_LSH64_IMM pc=101 dst=r0 src=r0 offset=0 imm=32 #line 70 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=104 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=102 dst=r0 src=r0 offset=0 imm=32 #line 70 "sample/decap_permit_packet.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=105 dst=r1 src=r0 offset=0 imm=32 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_MOV64_IMM pc=103 dst=r1 src=r0 offset=0 imm=0 #line 70 "sample/decap_permit_packet.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=106 dst=r2 src=r0 offset=0 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=104 dst=r1 src=r0 offset=1 imm=0 #line 70 "sample/decap_permit_packet.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=107 dst=r2 src=r1 offset=1 imm=0 -#line 70 "sample/decap_permit_packet.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 70 "sample/decap_permit_packet.c" goto label_3; #line 70 "sample/decap_permit_packet.c" } label_2: - // EBPF_OP_MOV64_IMM pc=108 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=105 dst=r6 src=r0 offset=0 imm=1 #line 70 "sample/decap_permit_packet.c" - r0 = IMMEDIATE(1); + r6 = IMMEDIATE(1); label_3: - // EBPF_OP_EXIT pc=109 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=106 dst=r0 src=r6 offset=0 imm=0 +#line 131 "sample/decap_permit_packet.c" + r0 = r6; + // EBPF_OP_EXIT pc=107 dst=r0 src=r0 offset=0 imm=0 #line 131 "sample/decap_permit_packet.c" return r0; #line 94 "sample/decap_permit_packet.c" @@ -632,7 +628,7 @@ static program_entry_t _programs[] = { 0, decapsulate_permit_packet_helpers, 1, - 110, + 108, &decapsulate_permit_packet_program_type_guid, &decapsulate_permit_packet_attach_type_guid, }, @@ -650,7 +646,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/divide_by_zero_dll.c b/tests/bpf2c_tests/expected/divide_by_zero_dll.c index 0e5fc946ad..91054e3a27 100644 --- a/tests/bpf2c_tests/expected/divide_by_zero_dll.c +++ b/tests/bpf2c_tests/expected/divide_by_zero_dll.c @@ -188,7 +188,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/divide_by_zero_raw.c b/tests/bpf2c_tests/expected/divide_by_zero_raw.c index efe81657e9..5db79ade8e 100644 --- a/tests/bpf2c_tests/expected/divide_by_zero_raw.c +++ b/tests/bpf2c_tests/expected/divide_by_zero_raw.c @@ -162,7 +162,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/divide_by_zero_sys.c b/tests/bpf2c_tests/expected/divide_by_zero_sys.c index bcf6d329f9..edf9bef7af 100644 --- a/tests/bpf2c_tests/expected/divide_by_zero_sys.c +++ b/tests/bpf2c_tests/expected/divide_by_zero_sys.c @@ -323,7 +323,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/droppacket_dll.c b/tests/bpf2c_tests/expected/droppacket_dll.c index 31a80f81cb..5e6be58516 100644 --- a/tests/bpf2c_tests/expected/droppacket_dll.c +++ b/tests/bpf2c_tests/expected/droppacket_dll.c @@ -176,12 +176,12 @@ DropPacket(void* context) // EBPF_OP_MOV64_IMM pc=14 dst=r0 src=r0 offset=0 imm=1 #line 59 "sample/droppacket.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=15 dst=r1 src=r6 offset=0 imm=0 -#line 65 "sample/droppacket.c" - r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=16 dst=r2 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=15 dst=r2 src=r6 offset=8 imm=0 #line 65 "sample/droppacket.c" r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=16 dst=r1 src=r6 offset=0 imm=0 +#line 65 "sample/droppacket.c" + r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); // EBPF_OP_MOV64_REG pc=17 dst=r3 src=r1 offset=0 imm=0 #line 65 "sample/droppacket.c" r3 = r1; @@ -215,12 +215,12 @@ DropPacket(void* context) goto label_2; #line 73 "sample/droppacket.c" } - // EBPF_OP_ADD64_IMM pc=24 dst=r1 src=r0 offset=0 imm=14 -#line 73 "sample/droppacket.c" - r1 += IMMEDIATE(14); - // EBPF_OP_LDXB pc=25 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_LDXB pc=24 dst=r3 src=r1 offset=14 imm=0 #line 75 "sample/droppacket.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); + // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=14 +#line 72 "sample/droppacket.c" + r1 += IMMEDIATE(14); // EBPF_OP_LSH64_IMM pc=26 dst=r3 src=r0 offset=0 imm=2 #line 75 "sample/droppacket.c" r3 <<= (IMMEDIATE(2) & 63); @@ -337,7 +337,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/droppacket_raw.c b/tests/bpf2c_tests/expected/droppacket_raw.c index 0529d1619b..95f8ef8344 100644 --- a/tests/bpf2c_tests/expected/droppacket_raw.c +++ b/tests/bpf2c_tests/expected/droppacket_raw.c @@ -150,12 +150,12 @@ DropPacket(void* context) // EBPF_OP_MOV64_IMM pc=14 dst=r0 src=r0 offset=0 imm=1 #line 59 "sample/droppacket.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=15 dst=r1 src=r6 offset=0 imm=0 -#line 65 "sample/droppacket.c" - r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=16 dst=r2 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=15 dst=r2 src=r6 offset=8 imm=0 #line 65 "sample/droppacket.c" r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=16 dst=r1 src=r6 offset=0 imm=0 +#line 65 "sample/droppacket.c" + r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); // EBPF_OP_MOV64_REG pc=17 dst=r3 src=r1 offset=0 imm=0 #line 65 "sample/droppacket.c" r3 = r1; @@ -189,12 +189,12 @@ DropPacket(void* context) goto label_2; #line 73 "sample/droppacket.c" } - // EBPF_OP_ADD64_IMM pc=24 dst=r1 src=r0 offset=0 imm=14 -#line 73 "sample/droppacket.c" - r1 += IMMEDIATE(14); - // EBPF_OP_LDXB pc=25 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_LDXB pc=24 dst=r3 src=r1 offset=14 imm=0 #line 75 "sample/droppacket.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); + // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=14 +#line 72 "sample/droppacket.c" + r1 += IMMEDIATE(14); // EBPF_OP_LSH64_IMM pc=26 dst=r3 src=r0 offset=0 imm=2 #line 75 "sample/droppacket.c" r3 <<= (IMMEDIATE(2) & 63); @@ -311,7 +311,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/droppacket_sys.c b/tests/bpf2c_tests/expected/droppacket_sys.c index 899c48de38..270f9525a4 100644 --- a/tests/bpf2c_tests/expected/droppacket_sys.c +++ b/tests/bpf2c_tests/expected/droppacket_sys.c @@ -311,12 +311,12 @@ DropPacket(void* context) // EBPF_OP_MOV64_IMM pc=14 dst=r0 src=r0 offset=0 imm=1 #line 59 "sample/droppacket.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=15 dst=r1 src=r6 offset=0 imm=0 -#line 65 "sample/droppacket.c" - r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_LDXDW pc=16 dst=r2 src=r6 offset=8 imm=0 + // EBPF_OP_LDXDW pc=15 dst=r2 src=r6 offset=8 imm=0 #line 65 "sample/droppacket.c" r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=16 dst=r1 src=r6 offset=0 imm=0 +#line 65 "sample/droppacket.c" + r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); // EBPF_OP_MOV64_REG pc=17 dst=r3 src=r1 offset=0 imm=0 #line 65 "sample/droppacket.c" r3 = r1; @@ -350,12 +350,12 @@ DropPacket(void* context) goto label_2; #line 73 "sample/droppacket.c" } - // EBPF_OP_ADD64_IMM pc=24 dst=r1 src=r0 offset=0 imm=14 -#line 73 "sample/droppacket.c" - r1 += IMMEDIATE(14); - // EBPF_OP_LDXB pc=25 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_LDXB pc=24 dst=r3 src=r1 offset=14 imm=0 #line 75 "sample/droppacket.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); + // EBPF_OP_ADD64_IMM pc=25 dst=r1 src=r0 offset=0 imm=14 +#line 72 "sample/droppacket.c" + r1 += IMMEDIATE(14); // EBPF_OP_LSH64_IMM pc=26 dst=r3 src=r0 offset=0 imm=2 #line 75 "sample/droppacket.c" r3 <<= (IMMEDIATE(2) & 63); @@ -472,7 +472,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c b/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c index dc3c2b983c..a19ba9f06e 100644 --- a/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c +++ b/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c @@ -90,110 +90,113 @@ encap_reflect_packet(void* context) #line 167 "sample/encap_reflect_packet.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 +#line 167 "sample/encap_reflect_packet.c" + r6 = r1; + // EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1 #line 167 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=1 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXDW pc=2 dst=r1 src=r6 offset=8 imm=0 #line 173 "sample/encap_reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_LDXDW pc=2 dst=r3 src=r1 offset=0 imm=0 + r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=3 dst=r2 src=r6 offset=0 imm=0 #line 172 "sample/encap_reflect_packet.c" - r3 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=3 dst=r4 src=r3 offset=0 imm=0 + r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=4 dst=r3 src=r2 offset=0 imm=0 #line 173 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=4 dst=r4 src=r0 offset=0 imm=14 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=5 dst=r3 src=r0 offset=0 imm=14 #line 173 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=5 dst=r4 src=r2 offset=315 imm=0 + r3 += IMMEDIATE(14); + // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=314 imm=0 #line 173 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 173 "sample/encap_reflect_packet.c" goto label_5; #line 173 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=6 dst=r5 src=r3 offset=12 imm=0 + // EBPF_OP_LDXH pc=7 dst=r4 src=r2 offset=12 imm=0 #line 178 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=120 imm=56710 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=119 imm=56710 #line 178 "sample/encap_reflect_packet.c" - if (r5 == IMMEDIATE(56710)) { + if (r4 == IMMEDIATE(56710)) { #line 178 "sample/encap_reflect_packet.c" goto label_2; #line 178 "sample/encap_reflect_packet.c" } - // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=312 imm=8 + // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=311 imm=8 #line 178 "sample/encap_reflect_packet.c" - if (r5 != IMMEDIATE(8)) { + if (r4 != IMMEDIATE(8)) { #line 178 "sample/encap_reflect_packet.c" goto label_5; #line 178 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=9 dst=r5 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=10 dst=r4 src=r2 offset=0 imm=0 #line 179 "sample/encap_reflect_packet.c" - r5 = r3; - // EBPF_OP_ADD64_IMM pc=10 dst=r5 src=r0 offset=0 imm=34 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=11 dst=r4 src=r0 offset=0 imm=34 #line 179 "sample/encap_reflect_packet.c" - r5 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r5 src=r2 offset=309 imm=0 + r4 += IMMEDIATE(34); + // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=308 imm=0 #line 179 "sample/encap_reflect_packet.c" - if (r5 > r2) { + if (r4 > r1) { #line 179 "sample/encap_reflect_packet.c" goto label_5; #line 179 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=12 dst=r5 src=r3 offset=23 imm=0 + // EBPF_OP_LDXB pc=13 dst=r4 src=r2 offset=23 imm=0 #line 185 "sample/encap_reflect_packet.c" - r5 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=307 imm=17 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); + // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=306 imm=17 #line 185 "sample/encap_reflect_packet.c" - if (r5 != IMMEDIATE(17)) { + if (r4 != IMMEDIATE(17)) { #line 185 "sample/encap_reflect_packet.c" goto label_5; #line 185 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=14 dst=r3 src=r3 offset=14 imm=0 + // EBPF_OP_LDXB pc=15 dst=r2 src=r2 offset=14 imm=0 #line 185 "sample/encap_reflect_packet.c" - r3 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(14)); - // EBPF_OP_LSH64_IMM pc=15 dst=r3 src=r0 offset=0 imm=2 + r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=16 dst=r2 src=r0 offset=0 imm=2 #line 185 "sample/encap_reflect_packet.c" - r3 <<= (IMMEDIATE(2) & 63); - // EBPF_OP_AND64_IMM pc=16 dst=r3 src=r0 offset=0 imm=60 + r2 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=17 dst=r2 src=r0 offset=0 imm=60 #line 185 "sample/encap_reflect_packet.c" - r3 &= IMMEDIATE(60); - // EBPF_OP_ADD64_REG pc=17 dst=r4 src=r3 offset=0 imm=0 + r2 &= IMMEDIATE(60); + // EBPF_OP_ADD64_REG pc=18 dst=r3 src=r2 offset=0 imm=0 #line 185 "sample/encap_reflect_packet.c" - r4 += r3; - // EBPF_OP_MOV64_REG pc=18 dst=r3 src=r4 offset=0 imm=0 + r3 += r2; + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r3 offset=0 imm=0 #line 185 "sample/encap_reflect_packet.c" - r3 = r4; - // EBPF_OP_ADD64_IMM pc=19 dst=r3 src=r0 offset=0 imm=8 + r2 = r3; + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=8 #line 185 "sample/encap_reflect_packet.c" - r3 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=20 dst=r3 src=r2 offset=300 imm=0 + r2 += IMMEDIATE(8); + // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=299 imm=0 #line 185 "sample/encap_reflect_packet.c" - if (r3 > r2) { + if (r2 > r1) { #line 185 "sample/encap_reflect_packet.c" goto label_5; #line 185 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=21 dst=r2 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=22 dst=r1 src=r3 offset=2 imm=0 #line 191 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=22 dst=r2 src=r0 offset=298 imm=7459 + r1 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=297 imm=7459 #line 191 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r1 != IMMEDIATE(7459)) { #line 191 "sample/encap_reflect_packet.c" goto label_5; #line 191 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=23 dst=r6 src=r1 offset=0 imm=0 -#line 191 "sample/encap_reflect_packet.c" - r6 = r1; - // EBPF_OP_LDDW pc=24 dst=r2 src=r0 offset=0 imm=-20 + // EBPF_OP_MOV64_REG pc=24 dst=r1 src=r6 offset=0 imm=0 +#line 22 "sample/encap_reflect_packet.c" + r1 = r6; + // EBPF_OP_LDDW pc=25 dst=r2 src=r0 offset=0 imm=-20 #line 22 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967276; - // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=65536 + // EBPF_OP_CALL pc=27 dst=r0 src=r0 offset=0 imm=65536 #line 22 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[0].address(r1, r2, r3, r4, r5, context); #line 22 "sample/encap_reflect_packet.c" @@ -202,9 +205,6 @@ encap_reflect_packet(void* context) return 0; #line 22 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=27 dst=r2 src=r6 offset=0 imm=0 -#line 22 "sample/encap_reflect_packet.c" - r2 = r6; // EBPF_OP_MOV64_REG pc=28 dst=r1 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r1 = r0; @@ -217,208 +217,208 @@ encap_reflect_packet(void* context) // EBPF_OP_ARSH64_IMM pc=31 dst=r1 src=r0 offset=0 imm=32 #line 22 "sample/encap_reflect_packet.c" r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=32 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=32 dst=r2 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" - r3 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=33 dst=r3 src=r1 offset=287 imm=0 + r2 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=287 imm=0 #line 22 "sample/encap_reflect_packet.c" - if ((int64_t)r3 > (int64_t)r1) { + if ((int64_t)r2 > (int64_t)r1) { #line 22 "sample/encap_reflect_packet.c" goto label_5; #line 22 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXDW pc=34 dst=r5 src=r2 offset=8 imm=0 + // EBPF_OP_LDXDW pc=34 dst=r4 src=r6 offset=8 imm=0 #line 28 "sample/encap_reflect_packet.c" - r5 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_LDXDW pc=35 dst=r6 src=r2 offset=0 imm=0 + r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=35 dst=r7 src=r6 offset=0 imm=0 #line 27 "sample/encap_reflect_packet.c" - r6 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r6 offset=0 imm=0 + r7 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r7 offset=0 imm=0 #line 28 "sample/encap_reflect_packet.c" - r3 = r6; + r3 = r7; // EBPF_OP_ADD64_IMM pc=37 dst=r3 src=r0 offset=0 imm=14 #line 28 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=38 dst=r3 src=r5 offset=282 imm=0 + // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=282 imm=0 #line 28 "sample/encap_reflect_packet.c" - if (r3 > r5) { + if (r3 > r4) { #line 28 "sample/encap_reflect_packet.c" goto label_5; #line 28 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=39 dst=r4 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r7 offset=0 imm=0 #line 35 "sample/encap_reflect_packet.c" - r4 = r6; - // EBPF_OP_ADD64_IMM pc=40 dst=r4 src=r0 offset=0 imm=20 + r2 = r7; + // EBPF_OP_ADD64_IMM pc=40 dst=r2 src=r0 offset=0 imm=20 #line 35 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=41 dst=r4 src=r5 offset=279 imm=0 + r2 += IMMEDIATE(20); + // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=279 imm=0 #line 35 "sample/encap_reflect_packet.c" - if (r4 > r5) { + if (r2 > r4) { #line 35 "sample/encap_reflect_packet.c" goto label_5; #line 35 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r6 offset=0 imm=0 -#line 35 "sample/encap_reflect_packet.c" - r1 = r6; + // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r7 offset=0 imm=0 +#line 43 "sample/encap_reflect_packet.c" + r1 = r7; // EBPF_OP_ADD64_IMM pc=43 dst=r1 src=r0 offset=0 imm=34 -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=44 dst=r1 src=r5 offset=276 imm=0 -#line 35 "sample/encap_reflect_packet.c" - if (r1 > r5) { -#line 35 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=276 imm=0 +#line 43 "sample/encap_reflect_packet.c" + if (r1 > r4) { +#line 43 "sample/encap_reflect_packet.c" goto label_5; -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=45 dst=r7 src=r6 offset=0 imm=0 -#line 35 "sample/encap_reflect_packet.c" - r7 = r6; - // EBPF_OP_ADD64_IMM pc=46 dst=r7 src=r0 offset=0 imm=54 -#line 35 "sample/encap_reflect_packet.c" - r7 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=47 dst=r7 src=r5 offset=273 imm=0 -#line 35 "sample/encap_reflect_packet.c" - if (r7 > r5) { -#line 35 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r7 offset=0 imm=0 +#line 43 "sample/encap_reflect_packet.c" + r5 = r7; + // EBPF_OP_ADD64_IMM pc=46 dst=r5 src=r0 offset=0 imm=54 +#line 43 "sample/encap_reflect_packet.c" + r5 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=273 imm=0 +#line 43 "sample/encap_reflect_packet.c" + if (r5 > r4) { +#line 43 "sample/encap_reflect_packet.c" goto label_5; -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=48 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=48 dst=r4 src=r2 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=49 dst=r6 src=r5 offset=0 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=49 dst=r7 src=r4 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=50 dst=r5 src=r4 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=50 dst=r4 src=r2 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=51 dst=r6 src=r5 offset=2 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=51 dst=r7 src=r4 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=52 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=52 dst=r4 src=r2 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=53 dst=r6 src=r5 offset=4 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_STXH pc=53 dst=r7 src=r4 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=54 dst=r5 src=r4 offset=12 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=54 dst=r4 src=r2 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(12)); - // EBPF_OP_STXH pc=55 dst=r6 src=r5 offset=12 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_STXH pc=55 dst=r7 src=r4 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(12)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=56 dst=r5 src=r4 offset=6 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(12)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=56 dst=r4 src=r2 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); - // EBPF_OP_STXH pc=57 dst=r6 src=r5 offset=6 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_STXH pc=57 dst=r7 src=r4 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=58 dst=r7 src=r4 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=58 dst=r5 src=r2 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - r7 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(10)); - // EBPF_OP_LDXH pc=59 dst=r8 src=r4 offset=8 imm=0 + r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(10)); + // EBPF_OP_LDXH pc=59 dst=r8 src=r2 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - r8 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); - // EBPF_OP_STXH pc=60 dst=r6 src=r5 offset=0 imm=0 + r8 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(8)); + // EBPF_OP_STXH pc=60 dst=r7 src=r4 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_STXH pc=61 dst=r6 src=r8 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; + // EBPF_OP_STXH pc=61 dst=r7 src=r8 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r8; - // EBPF_OP_STXH pc=62 dst=r6 src=r8 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r8; + // EBPF_OP_STXH pc=62 dst=r7 src=r8 offset=2 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r8; - // EBPF_OP_STXH pc=63 dst=r6 src=r7 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r8; + // EBPF_OP_STXH pc=63 dst=r7 src=r5 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r7; - // EBPF_OP_STXH pc=64 dst=r6 src=r7 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r5; + // EBPF_OP_STXH pc=64 dst=r7 src=r5 offset=4 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r7; - // EBPF_OP_LDXH pc=65 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r5; + // EBPF_OP_LDXH pc=65 dst=r4 src=r2 offset=4 imm=0 #line 18 "sample/./xdp_common.h" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=66 dst=r6 src=r5 offset=10 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_STXH pc=66 dst=r7 src=r4 offset=10 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=67 dst=r5 src=r4 offset=0 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=0 imm=0 #line 18 "sample/./xdp_common.h" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=68 dst=r6 src=r5 offset=6 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=68 dst=r7 src=r4 offset=6 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=69 dst=r4 src=r4 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=69 dst=r2 src=r2 offset=2 imm=0 #line 18 "sample/./xdp_common.h" - r4 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=70 dst=r6 src=r4 offset=8 imm=0 + r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=70 dst=r7 src=r2 offset=8 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXW pc=71 dst=r4 src=r6 offset=50 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=71 dst=r2 src=r7 offset=50 imm=0 #line 24 "sample/./xdp_common.h" - r4 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)); - // EBPF_OP_LDXW pc=72 dst=r5 src=r6 offset=46 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)); + // EBPF_OP_LDXW pc=72 dst=r4 src=r7 offset=46 imm=0 #line 25 "sample/./xdp_common.h" - r5 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)); - // EBPF_OP_STXW pc=73 dst=r6 src=r5 offset=50 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)); + // EBPF_OP_STXW pc=73 dst=r7 src=r4 offset=50 imm=0 #line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)) = (uint32_t)r5; - // EBPF_OP_STXW pc=74 dst=r6 src=r4 offset=46 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)) = (uint32_t)r4; + // EBPF_OP_STXW pc=74 dst=r7 src=r2 offset=46 imm=0 #line 26 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)) = (uint32_t)r4; - // EBPF_OP_LDXB pc=75 dst=r5 src=r6 offset=34 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)) = (uint32_t)r2; + // EBPF_OP_LDXB pc=75 dst=r4 src=r7 offset=34 imm=0 #line 63 "sample/encap_reflect_packet.c" - r5 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(34)); - // EBPF_OP_LSH64_IMM pc=76 dst=r5 src=r0 offset=0 imm=2 + r4 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(34)); + // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=2 #line 63 "sample/encap_reflect_packet.c" - r5 <<= (IMMEDIATE(2) & 63); - // EBPF_OP_AND64_IMM pc=77 dst=r5 src=r0 offset=0 imm=60 + r4 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=77 dst=r4 src=r0 offset=0 imm=60 #line 63 "sample/encap_reflect_packet.c" - r5 &= IMMEDIATE(60); - // EBPF_OP_MOV64_REG pc=78 dst=r4 src=r1 offset=0 imm=0 + r4 &= IMMEDIATE(60); + // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r1 offset=0 imm=0 #line 63 "sample/encap_reflect_packet.c" - r4 = r1; - // EBPF_OP_ADD64_REG pc=79 dst=r4 src=r5 offset=0 imm=0 + r2 = r1; + // EBPF_OP_ADD64_REG pc=79 dst=r2 src=r4 offset=0 imm=0 #line 63 "sample/encap_reflect_packet.c" - r4 += r5; - // EBPF_OP_MOV64_REG pc=80 dst=r5 src=r4 offset=0 imm=0 + r2 += r4; + // EBPF_OP_MOV64_REG pc=80 dst=r4 src=r2 offset=0 imm=0 #line 64 "sample/encap_reflect_packet.c" - r5 = r4; - // EBPF_OP_ADD64_IMM pc=81 dst=r5 src=r0 offset=0 imm=8 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=81 dst=r4 src=r0 offset=0 imm=8 #line 64 "sample/encap_reflect_packet.c" - r5 += IMMEDIATE(8); - // EBPF_OP_LDXDW pc=82 dst=r2 src=r2 offset=8 imm=0 + r4 += IMMEDIATE(8); + // EBPF_OP_LDXDW pc=82 dst=r5 src=r6 offset=8 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_JGT_REG pc=83 dst=r5 src=r2 offset=237 imm=0 + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=83 dst=r4 src=r5 offset=237 imm=0 #line 64 "sample/encap_reflect_packet.c" - if (r5 > r2) { + if (r4 > r5) { #line 64 "sample/encap_reflect_packet.c" goto label_5; #line 64 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=84 dst=r2 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=84 dst=r4 src=r2 offset=2 imm=0 #line 68 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=85 dst=r2 src=r0 offset=4 imm=7459 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=85 dst=r4 src=r0 offset=4 imm=7459 #line 68 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r4 != IMMEDIATE(7459)) { #line 68 "sample/encap_reflect_packet.c" goto label_1; #line 68 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=86 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=86 dst=r4 src=r2 offset=0 imm=0 #line 41 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=87 dst=r4 src=r2 offset=2 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=87 dst=r2 src=r4 offset=2 imm=0 #line 43 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_MOV64_IMM pc=88 dst=r2 src=r0 offset=0 imm=7459 + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=88 dst=r4 src=r0 offset=0 imm=7459 #line 43 "sample/./xdp_common.h" - r2 = IMMEDIATE(7459); - // EBPF_OP_STXH pc=89 dst=r4 src=r2 offset=0 imm=0 + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=89 dst=r2 src=r4 offset=0 imm=0 #line 42 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)) = (uint16_t)r2; + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r4; label_1: // EBPF_OP_LDXW pc=90 dst=r2 src=r1 offset=16 imm=0 #line 73 "sample/encap_reflect_packet.c" @@ -453,24 +453,24 @@ encap_reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=100 dst=r1 src=r0 offset=0 imm=4 #line 73 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(4); - // EBPF_OP_STXB pc=101 dst=r6 src=r1 offset=23 imm=0 + // EBPF_OP_STXB pc=101 dst=r7 src=r1 offset=23 imm=0 #line 76 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(23)) = (uint8_t)r1; - // EBPF_OP_LDXB pc=102 dst=r1 src=r6 offset=14 imm=0 + *(uint8_t*)(uintptr_t)(r7 + OFFSET(23)) = (uint8_t)r1; + // EBPF_OP_LDXB pc=102 dst=r1 src=r7 offset=14 imm=0 #line 77 "sample/encap_reflect_packet.c" - r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)); + r1 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)); // EBPF_OP_AND64_IMM pc=103 dst=r1 src=r0 offset=0 imm=240 #line 77 "sample/encap_reflect_packet.c" r1 &= IMMEDIATE(240); // EBPF_OP_OR64_IMM pc=104 dst=r1 src=r0 offset=0 imm=5 #line 77 "sample/encap_reflect_packet.c" r1 |= IMMEDIATE(5); - // EBPF_OP_STXB pc=105 dst=r6 src=r1 offset=14 imm=0 + // EBPF_OP_STXB pc=105 dst=r7 src=r1 offset=14 imm=0 #line 77 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)) = (uint8_t)r1; - // EBPF_OP_LDXH pc=106 dst=r1 src=r6 offset=36 imm=0 + *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)) = (uint8_t)r1; + // EBPF_OP_LDXH pc=106 dst=r1 src=r7 offset=36 imm=0 #line 78 "sample/encap_reflect_packet.c" - r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(36)); + r1 = *(uint16_t*)(uintptr_t)(r7 + OFFSET(36)); // EBPF_OP_BE pc=107 dst=r1 src=r0 offset=0 imm=16 #line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); @@ -484,15 +484,15 @@ encap_reflect_packet(void* context) r1 = htobe16((uint16_t)r1); #line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_STXH pc=110 dst=r6 src=r1 offset=16 imm=0 + // EBPF_OP_STXH pc=110 dst=r7 src=r1 offset=16 imm=0 #line 78 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(16)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(16)) = (uint16_t)r1; // EBPF_OP_MOV64_IMM pc=111 dst=r1 src=r0 offset=0 imm=0 #line 78 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXH pc=112 dst=r6 src=r1 offset=24 imm=0 + // EBPF_OP_STXH pc=112 dst=r7 src=r1 offset=24 imm=0 #line 80 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; // EBPF_OP_MOV64_IMM pc=113 dst=r2 src=r0 offset=0 imm=0 #line 82 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); @@ -538,62 +538,62 @@ encap_reflect_packet(void* context) // EBPF_OP_XOR64_IMM pc=125 dst=r1 src=r0 offset=0 imm=-1 #line 82 "sample/encap_reflect_packet.c" r1 ^= IMMEDIATE(-1); - // EBPF_OP_STXH pc=126 dst=r6 src=r1 offset=24 imm=0 + // EBPF_OP_STXH pc=126 dst=r7 src=r1 offset=24 imm=0 #line 81 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; // EBPF_OP_JA pc=127 dst=r0 src=r0 offset=192 imm=0 #line 81 "sample/encap_reflect_packet.c" goto label_4; label_2: - // EBPF_OP_MOV64_REG pc=128 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=128 dst=r3 src=r2 offset=0 imm=0 #line 196 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=129 dst=r4 src=r0 offset=0 imm=54 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=129 dst=r3 src=r0 offset=0 imm=54 #line 196 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=130 dst=r4 src=r2 offset=190 imm=0 + r3 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=130 dst=r3 src=r1 offset=190 imm=0 #line 196 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 196 "sample/encap_reflect_packet.c" goto label_5; #line 196 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=131 dst=r4 src=r3 offset=20 imm=0 + // EBPF_OP_LDXB pc=131 dst=r3 src=r2 offset=20 imm=0 #line 202 "sample/encap_reflect_packet.c" - r4 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=132 dst=r4 src=r0 offset=188 imm=17 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); + // EBPF_OP_JNE_IMM pc=132 dst=r3 src=r0 offset=188 imm=17 #line 202 "sample/encap_reflect_packet.c" - if (r4 != IMMEDIATE(17)) { + if (r3 != IMMEDIATE(17)) { #line 202 "sample/encap_reflect_packet.c" goto label_5; #line 202 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=133 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=133 dst=r3 src=r2 offset=0 imm=0 #line 202 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=134 dst=r4 src=r0 offset=0 imm=62 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=134 dst=r3 src=r0 offset=0 imm=62 #line 202 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=135 dst=r4 src=r2 offset=185 imm=0 + r3 += IMMEDIATE(62); + // EBPF_OP_JGT_REG pc=135 dst=r3 src=r1 offset=185 imm=0 #line 202 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 202 "sample/encap_reflect_packet.c" goto label_5; #line 202 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=136 dst=r2 src=r3 offset=56 imm=0 + // EBPF_OP_LDXH pc=136 dst=r1 src=r2 offset=56 imm=0 #line 208 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=137 dst=r2 src=r0 offset=183 imm=7459 + r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(56)); + // EBPF_OP_JNE_IMM pc=137 dst=r1 src=r0 offset=183 imm=7459 #line 208 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r1 != IMMEDIATE(7459)) { #line 208 "sample/encap_reflect_packet.c" goto label_5; #line 208 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=138 dst=r6 src=r1 offset=0 imm=0 -#line 208 "sample/encap_reflect_packet.c" - r6 = r1; + // EBPF_OP_MOV64_REG pc=138 dst=r1 src=r6 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" + r1 = r6; // EBPF_OP_LDDW pc=139 dst=r2 src=r0 offset=0 imm=-40 #line 96 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967256; @@ -661,17 +661,17 @@ encap_reflect_packet(void* context) #line 109 "sample/encap_reflect_packet.c" } // EBPF_OP_MOV64_REG pc=156 dst=r3 src=r1 offset=0 imm=0 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" r3 = r1; // EBPF_OP_ADD64_IMM pc=157 dst=r3 src=r0 offset=0 imm=54 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); // EBPF_OP_JGT_REG pc=158 dst=r3 src=r5 offset=162 imm=0 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" if (r3 > r5) { -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" goto label_5; -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" } // EBPF_OP_MOV64_REG pc=159 dst=r7 src=r1 offset=0 imm=0 #line 124 "sample/encap_reflect_packet.c" @@ -1216,7 +1216,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c b/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c index e49e475797..4c1eca7b21 100644 --- a/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c +++ b/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c @@ -64,110 +64,113 @@ encap_reflect_packet(void* context) #line 167 "sample/encap_reflect_packet.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 +#line 167 "sample/encap_reflect_packet.c" + r6 = r1; + // EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1 #line 167 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=1 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXDW pc=2 dst=r1 src=r6 offset=8 imm=0 #line 173 "sample/encap_reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_LDXDW pc=2 dst=r3 src=r1 offset=0 imm=0 + r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=3 dst=r2 src=r6 offset=0 imm=0 #line 172 "sample/encap_reflect_packet.c" - r3 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=3 dst=r4 src=r3 offset=0 imm=0 + r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=4 dst=r3 src=r2 offset=0 imm=0 #line 173 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=4 dst=r4 src=r0 offset=0 imm=14 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=5 dst=r3 src=r0 offset=0 imm=14 #line 173 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=5 dst=r4 src=r2 offset=315 imm=0 + r3 += IMMEDIATE(14); + // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=314 imm=0 #line 173 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 173 "sample/encap_reflect_packet.c" goto label_5; #line 173 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=6 dst=r5 src=r3 offset=12 imm=0 + // EBPF_OP_LDXH pc=7 dst=r4 src=r2 offset=12 imm=0 #line 178 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=120 imm=56710 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=119 imm=56710 #line 178 "sample/encap_reflect_packet.c" - if (r5 == IMMEDIATE(56710)) { + if (r4 == IMMEDIATE(56710)) { #line 178 "sample/encap_reflect_packet.c" goto label_2; #line 178 "sample/encap_reflect_packet.c" } - // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=312 imm=8 + // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=311 imm=8 #line 178 "sample/encap_reflect_packet.c" - if (r5 != IMMEDIATE(8)) { + if (r4 != IMMEDIATE(8)) { #line 178 "sample/encap_reflect_packet.c" goto label_5; #line 178 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=9 dst=r5 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=10 dst=r4 src=r2 offset=0 imm=0 #line 179 "sample/encap_reflect_packet.c" - r5 = r3; - // EBPF_OP_ADD64_IMM pc=10 dst=r5 src=r0 offset=0 imm=34 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=11 dst=r4 src=r0 offset=0 imm=34 #line 179 "sample/encap_reflect_packet.c" - r5 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r5 src=r2 offset=309 imm=0 + r4 += IMMEDIATE(34); + // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=308 imm=0 #line 179 "sample/encap_reflect_packet.c" - if (r5 > r2) { + if (r4 > r1) { #line 179 "sample/encap_reflect_packet.c" goto label_5; #line 179 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=12 dst=r5 src=r3 offset=23 imm=0 + // EBPF_OP_LDXB pc=13 dst=r4 src=r2 offset=23 imm=0 #line 185 "sample/encap_reflect_packet.c" - r5 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=307 imm=17 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); + // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=306 imm=17 #line 185 "sample/encap_reflect_packet.c" - if (r5 != IMMEDIATE(17)) { + if (r4 != IMMEDIATE(17)) { #line 185 "sample/encap_reflect_packet.c" goto label_5; #line 185 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=14 dst=r3 src=r3 offset=14 imm=0 + // EBPF_OP_LDXB pc=15 dst=r2 src=r2 offset=14 imm=0 #line 185 "sample/encap_reflect_packet.c" - r3 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(14)); - // EBPF_OP_LSH64_IMM pc=15 dst=r3 src=r0 offset=0 imm=2 + r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=16 dst=r2 src=r0 offset=0 imm=2 #line 185 "sample/encap_reflect_packet.c" - r3 <<= (IMMEDIATE(2) & 63); - // EBPF_OP_AND64_IMM pc=16 dst=r3 src=r0 offset=0 imm=60 + r2 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=17 dst=r2 src=r0 offset=0 imm=60 #line 185 "sample/encap_reflect_packet.c" - r3 &= IMMEDIATE(60); - // EBPF_OP_ADD64_REG pc=17 dst=r4 src=r3 offset=0 imm=0 + r2 &= IMMEDIATE(60); + // EBPF_OP_ADD64_REG pc=18 dst=r3 src=r2 offset=0 imm=0 #line 185 "sample/encap_reflect_packet.c" - r4 += r3; - // EBPF_OP_MOV64_REG pc=18 dst=r3 src=r4 offset=0 imm=0 + r3 += r2; + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r3 offset=0 imm=0 #line 185 "sample/encap_reflect_packet.c" - r3 = r4; - // EBPF_OP_ADD64_IMM pc=19 dst=r3 src=r0 offset=0 imm=8 + r2 = r3; + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=8 #line 185 "sample/encap_reflect_packet.c" - r3 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=20 dst=r3 src=r2 offset=300 imm=0 + r2 += IMMEDIATE(8); + // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=299 imm=0 #line 185 "sample/encap_reflect_packet.c" - if (r3 > r2) { + if (r2 > r1) { #line 185 "sample/encap_reflect_packet.c" goto label_5; #line 185 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=21 dst=r2 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=22 dst=r1 src=r3 offset=2 imm=0 #line 191 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=22 dst=r2 src=r0 offset=298 imm=7459 + r1 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=297 imm=7459 #line 191 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r1 != IMMEDIATE(7459)) { #line 191 "sample/encap_reflect_packet.c" goto label_5; #line 191 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=23 dst=r6 src=r1 offset=0 imm=0 -#line 191 "sample/encap_reflect_packet.c" - r6 = r1; - // EBPF_OP_LDDW pc=24 dst=r2 src=r0 offset=0 imm=-20 + // EBPF_OP_MOV64_REG pc=24 dst=r1 src=r6 offset=0 imm=0 +#line 22 "sample/encap_reflect_packet.c" + r1 = r6; + // EBPF_OP_LDDW pc=25 dst=r2 src=r0 offset=0 imm=-20 #line 22 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967276; - // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=65536 + // EBPF_OP_CALL pc=27 dst=r0 src=r0 offset=0 imm=65536 #line 22 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[0].address(r1, r2, r3, r4, r5, context); #line 22 "sample/encap_reflect_packet.c" @@ -176,9 +179,6 @@ encap_reflect_packet(void* context) return 0; #line 22 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=27 dst=r2 src=r6 offset=0 imm=0 -#line 22 "sample/encap_reflect_packet.c" - r2 = r6; // EBPF_OP_MOV64_REG pc=28 dst=r1 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r1 = r0; @@ -191,208 +191,208 @@ encap_reflect_packet(void* context) // EBPF_OP_ARSH64_IMM pc=31 dst=r1 src=r0 offset=0 imm=32 #line 22 "sample/encap_reflect_packet.c" r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=32 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=32 dst=r2 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" - r3 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=33 dst=r3 src=r1 offset=287 imm=0 + r2 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=287 imm=0 #line 22 "sample/encap_reflect_packet.c" - if ((int64_t)r3 > (int64_t)r1) { + if ((int64_t)r2 > (int64_t)r1) { #line 22 "sample/encap_reflect_packet.c" goto label_5; #line 22 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXDW pc=34 dst=r5 src=r2 offset=8 imm=0 + // EBPF_OP_LDXDW pc=34 dst=r4 src=r6 offset=8 imm=0 #line 28 "sample/encap_reflect_packet.c" - r5 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_LDXDW pc=35 dst=r6 src=r2 offset=0 imm=0 + r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=35 dst=r7 src=r6 offset=0 imm=0 #line 27 "sample/encap_reflect_packet.c" - r6 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r6 offset=0 imm=0 + r7 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r7 offset=0 imm=0 #line 28 "sample/encap_reflect_packet.c" - r3 = r6; + r3 = r7; // EBPF_OP_ADD64_IMM pc=37 dst=r3 src=r0 offset=0 imm=14 #line 28 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=38 dst=r3 src=r5 offset=282 imm=0 + // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=282 imm=0 #line 28 "sample/encap_reflect_packet.c" - if (r3 > r5) { + if (r3 > r4) { #line 28 "sample/encap_reflect_packet.c" goto label_5; #line 28 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=39 dst=r4 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r7 offset=0 imm=0 #line 35 "sample/encap_reflect_packet.c" - r4 = r6; - // EBPF_OP_ADD64_IMM pc=40 dst=r4 src=r0 offset=0 imm=20 + r2 = r7; + // EBPF_OP_ADD64_IMM pc=40 dst=r2 src=r0 offset=0 imm=20 #line 35 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=41 dst=r4 src=r5 offset=279 imm=0 + r2 += IMMEDIATE(20); + // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=279 imm=0 #line 35 "sample/encap_reflect_packet.c" - if (r4 > r5) { + if (r2 > r4) { #line 35 "sample/encap_reflect_packet.c" goto label_5; #line 35 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r6 offset=0 imm=0 -#line 35 "sample/encap_reflect_packet.c" - r1 = r6; + // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r7 offset=0 imm=0 +#line 43 "sample/encap_reflect_packet.c" + r1 = r7; // EBPF_OP_ADD64_IMM pc=43 dst=r1 src=r0 offset=0 imm=34 -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=44 dst=r1 src=r5 offset=276 imm=0 -#line 35 "sample/encap_reflect_packet.c" - if (r1 > r5) { -#line 35 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=276 imm=0 +#line 43 "sample/encap_reflect_packet.c" + if (r1 > r4) { +#line 43 "sample/encap_reflect_packet.c" goto label_5; -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=45 dst=r7 src=r6 offset=0 imm=0 -#line 35 "sample/encap_reflect_packet.c" - r7 = r6; - // EBPF_OP_ADD64_IMM pc=46 dst=r7 src=r0 offset=0 imm=54 -#line 35 "sample/encap_reflect_packet.c" - r7 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=47 dst=r7 src=r5 offset=273 imm=0 -#line 35 "sample/encap_reflect_packet.c" - if (r7 > r5) { -#line 35 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r7 offset=0 imm=0 +#line 43 "sample/encap_reflect_packet.c" + r5 = r7; + // EBPF_OP_ADD64_IMM pc=46 dst=r5 src=r0 offset=0 imm=54 +#line 43 "sample/encap_reflect_packet.c" + r5 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=273 imm=0 +#line 43 "sample/encap_reflect_packet.c" + if (r5 > r4) { +#line 43 "sample/encap_reflect_packet.c" goto label_5; -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=48 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=48 dst=r4 src=r2 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=49 dst=r6 src=r5 offset=0 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=49 dst=r7 src=r4 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=50 dst=r5 src=r4 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=50 dst=r4 src=r2 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=51 dst=r6 src=r5 offset=2 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=51 dst=r7 src=r4 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=52 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=52 dst=r4 src=r2 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=53 dst=r6 src=r5 offset=4 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_STXH pc=53 dst=r7 src=r4 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=54 dst=r5 src=r4 offset=12 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=54 dst=r4 src=r2 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(12)); - // EBPF_OP_STXH pc=55 dst=r6 src=r5 offset=12 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_STXH pc=55 dst=r7 src=r4 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(12)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=56 dst=r5 src=r4 offset=6 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(12)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=56 dst=r4 src=r2 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); - // EBPF_OP_STXH pc=57 dst=r6 src=r5 offset=6 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_STXH pc=57 dst=r7 src=r4 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=58 dst=r7 src=r4 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=58 dst=r5 src=r2 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - r7 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(10)); - // EBPF_OP_LDXH pc=59 dst=r8 src=r4 offset=8 imm=0 + r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(10)); + // EBPF_OP_LDXH pc=59 dst=r8 src=r2 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - r8 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); - // EBPF_OP_STXH pc=60 dst=r6 src=r5 offset=0 imm=0 + r8 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(8)); + // EBPF_OP_STXH pc=60 dst=r7 src=r4 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_STXH pc=61 dst=r6 src=r8 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; + // EBPF_OP_STXH pc=61 dst=r7 src=r8 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r8; - // EBPF_OP_STXH pc=62 dst=r6 src=r8 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r8; + // EBPF_OP_STXH pc=62 dst=r7 src=r8 offset=2 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r8; - // EBPF_OP_STXH pc=63 dst=r6 src=r7 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r8; + // EBPF_OP_STXH pc=63 dst=r7 src=r5 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r7; - // EBPF_OP_STXH pc=64 dst=r6 src=r7 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r5; + // EBPF_OP_STXH pc=64 dst=r7 src=r5 offset=4 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r7; - // EBPF_OP_LDXH pc=65 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r5; + // EBPF_OP_LDXH pc=65 dst=r4 src=r2 offset=4 imm=0 #line 18 "sample/./xdp_common.h" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=66 dst=r6 src=r5 offset=10 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_STXH pc=66 dst=r7 src=r4 offset=10 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=67 dst=r5 src=r4 offset=0 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=0 imm=0 #line 18 "sample/./xdp_common.h" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=68 dst=r6 src=r5 offset=6 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=68 dst=r7 src=r4 offset=6 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=69 dst=r4 src=r4 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=69 dst=r2 src=r2 offset=2 imm=0 #line 18 "sample/./xdp_common.h" - r4 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=70 dst=r6 src=r4 offset=8 imm=0 + r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=70 dst=r7 src=r2 offset=8 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXW pc=71 dst=r4 src=r6 offset=50 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=71 dst=r2 src=r7 offset=50 imm=0 #line 24 "sample/./xdp_common.h" - r4 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)); - // EBPF_OP_LDXW pc=72 dst=r5 src=r6 offset=46 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)); + // EBPF_OP_LDXW pc=72 dst=r4 src=r7 offset=46 imm=0 #line 25 "sample/./xdp_common.h" - r5 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)); - // EBPF_OP_STXW pc=73 dst=r6 src=r5 offset=50 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)); + // EBPF_OP_STXW pc=73 dst=r7 src=r4 offset=50 imm=0 #line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)) = (uint32_t)r5; - // EBPF_OP_STXW pc=74 dst=r6 src=r4 offset=46 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)) = (uint32_t)r4; + // EBPF_OP_STXW pc=74 dst=r7 src=r2 offset=46 imm=0 #line 26 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)) = (uint32_t)r4; - // EBPF_OP_LDXB pc=75 dst=r5 src=r6 offset=34 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)) = (uint32_t)r2; + // EBPF_OP_LDXB pc=75 dst=r4 src=r7 offset=34 imm=0 #line 63 "sample/encap_reflect_packet.c" - r5 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(34)); - // EBPF_OP_LSH64_IMM pc=76 dst=r5 src=r0 offset=0 imm=2 + r4 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(34)); + // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=2 #line 63 "sample/encap_reflect_packet.c" - r5 <<= (IMMEDIATE(2) & 63); - // EBPF_OP_AND64_IMM pc=77 dst=r5 src=r0 offset=0 imm=60 + r4 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=77 dst=r4 src=r0 offset=0 imm=60 #line 63 "sample/encap_reflect_packet.c" - r5 &= IMMEDIATE(60); - // EBPF_OP_MOV64_REG pc=78 dst=r4 src=r1 offset=0 imm=0 + r4 &= IMMEDIATE(60); + // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r1 offset=0 imm=0 #line 63 "sample/encap_reflect_packet.c" - r4 = r1; - // EBPF_OP_ADD64_REG pc=79 dst=r4 src=r5 offset=0 imm=0 + r2 = r1; + // EBPF_OP_ADD64_REG pc=79 dst=r2 src=r4 offset=0 imm=0 #line 63 "sample/encap_reflect_packet.c" - r4 += r5; - // EBPF_OP_MOV64_REG pc=80 dst=r5 src=r4 offset=0 imm=0 + r2 += r4; + // EBPF_OP_MOV64_REG pc=80 dst=r4 src=r2 offset=0 imm=0 #line 64 "sample/encap_reflect_packet.c" - r5 = r4; - // EBPF_OP_ADD64_IMM pc=81 dst=r5 src=r0 offset=0 imm=8 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=81 dst=r4 src=r0 offset=0 imm=8 #line 64 "sample/encap_reflect_packet.c" - r5 += IMMEDIATE(8); - // EBPF_OP_LDXDW pc=82 dst=r2 src=r2 offset=8 imm=0 + r4 += IMMEDIATE(8); + // EBPF_OP_LDXDW pc=82 dst=r5 src=r6 offset=8 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_JGT_REG pc=83 dst=r5 src=r2 offset=237 imm=0 + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=83 dst=r4 src=r5 offset=237 imm=0 #line 64 "sample/encap_reflect_packet.c" - if (r5 > r2) { + if (r4 > r5) { #line 64 "sample/encap_reflect_packet.c" goto label_5; #line 64 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=84 dst=r2 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=84 dst=r4 src=r2 offset=2 imm=0 #line 68 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=85 dst=r2 src=r0 offset=4 imm=7459 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=85 dst=r4 src=r0 offset=4 imm=7459 #line 68 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r4 != IMMEDIATE(7459)) { #line 68 "sample/encap_reflect_packet.c" goto label_1; #line 68 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=86 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=86 dst=r4 src=r2 offset=0 imm=0 #line 41 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=87 dst=r4 src=r2 offset=2 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=87 dst=r2 src=r4 offset=2 imm=0 #line 43 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_MOV64_IMM pc=88 dst=r2 src=r0 offset=0 imm=7459 + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=88 dst=r4 src=r0 offset=0 imm=7459 #line 43 "sample/./xdp_common.h" - r2 = IMMEDIATE(7459); - // EBPF_OP_STXH pc=89 dst=r4 src=r2 offset=0 imm=0 + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=89 dst=r2 src=r4 offset=0 imm=0 #line 42 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)) = (uint16_t)r2; + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r4; label_1: // EBPF_OP_LDXW pc=90 dst=r2 src=r1 offset=16 imm=0 #line 73 "sample/encap_reflect_packet.c" @@ -427,24 +427,24 @@ encap_reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=100 dst=r1 src=r0 offset=0 imm=4 #line 73 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(4); - // EBPF_OP_STXB pc=101 dst=r6 src=r1 offset=23 imm=0 + // EBPF_OP_STXB pc=101 dst=r7 src=r1 offset=23 imm=0 #line 76 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(23)) = (uint8_t)r1; - // EBPF_OP_LDXB pc=102 dst=r1 src=r6 offset=14 imm=0 + *(uint8_t*)(uintptr_t)(r7 + OFFSET(23)) = (uint8_t)r1; + // EBPF_OP_LDXB pc=102 dst=r1 src=r7 offset=14 imm=0 #line 77 "sample/encap_reflect_packet.c" - r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)); + r1 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)); // EBPF_OP_AND64_IMM pc=103 dst=r1 src=r0 offset=0 imm=240 #line 77 "sample/encap_reflect_packet.c" r1 &= IMMEDIATE(240); // EBPF_OP_OR64_IMM pc=104 dst=r1 src=r0 offset=0 imm=5 #line 77 "sample/encap_reflect_packet.c" r1 |= IMMEDIATE(5); - // EBPF_OP_STXB pc=105 dst=r6 src=r1 offset=14 imm=0 + // EBPF_OP_STXB pc=105 dst=r7 src=r1 offset=14 imm=0 #line 77 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)) = (uint8_t)r1; - // EBPF_OP_LDXH pc=106 dst=r1 src=r6 offset=36 imm=0 + *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)) = (uint8_t)r1; + // EBPF_OP_LDXH pc=106 dst=r1 src=r7 offset=36 imm=0 #line 78 "sample/encap_reflect_packet.c" - r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(36)); + r1 = *(uint16_t*)(uintptr_t)(r7 + OFFSET(36)); // EBPF_OP_BE pc=107 dst=r1 src=r0 offset=0 imm=16 #line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); @@ -458,15 +458,15 @@ encap_reflect_packet(void* context) r1 = htobe16((uint16_t)r1); #line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_STXH pc=110 dst=r6 src=r1 offset=16 imm=0 + // EBPF_OP_STXH pc=110 dst=r7 src=r1 offset=16 imm=0 #line 78 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(16)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(16)) = (uint16_t)r1; // EBPF_OP_MOV64_IMM pc=111 dst=r1 src=r0 offset=0 imm=0 #line 78 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXH pc=112 dst=r6 src=r1 offset=24 imm=0 + // EBPF_OP_STXH pc=112 dst=r7 src=r1 offset=24 imm=0 #line 80 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; // EBPF_OP_MOV64_IMM pc=113 dst=r2 src=r0 offset=0 imm=0 #line 82 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); @@ -512,62 +512,62 @@ encap_reflect_packet(void* context) // EBPF_OP_XOR64_IMM pc=125 dst=r1 src=r0 offset=0 imm=-1 #line 82 "sample/encap_reflect_packet.c" r1 ^= IMMEDIATE(-1); - // EBPF_OP_STXH pc=126 dst=r6 src=r1 offset=24 imm=0 + // EBPF_OP_STXH pc=126 dst=r7 src=r1 offset=24 imm=0 #line 81 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; // EBPF_OP_JA pc=127 dst=r0 src=r0 offset=192 imm=0 #line 81 "sample/encap_reflect_packet.c" goto label_4; label_2: - // EBPF_OP_MOV64_REG pc=128 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=128 dst=r3 src=r2 offset=0 imm=0 #line 196 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=129 dst=r4 src=r0 offset=0 imm=54 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=129 dst=r3 src=r0 offset=0 imm=54 #line 196 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=130 dst=r4 src=r2 offset=190 imm=0 + r3 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=130 dst=r3 src=r1 offset=190 imm=0 #line 196 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 196 "sample/encap_reflect_packet.c" goto label_5; #line 196 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=131 dst=r4 src=r3 offset=20 imm=0 + // EBPF_OP_LDXB pc=131 dst=r3 src=r2 offset=20 imm=0 #line 202 "sample/encap_reflect_packet.c" - r4 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=132 dst=r4 src=r0 offset=188 imm=17 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); + // EBPF_OP_JNE_IMM pc=132 dst=r3 src=r0 offset=188 imm=17 #line 202 "sample/encap_reflect_packet.c" - if (r4 != IMMEDIATE(17)) { + if (r3 != IMMEDIATE(17)) { #line 202 "sample/encap_reflect_packet.c" goto label_5; #line 202 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=133 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=133 dst=r3 src=r2 offset=0 imm=0 #line 202 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=134 dst=r4 src=r0 offset=0 imm=62 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=134 dst=r3 src=r0 offset=0 imm=62 #line 202 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=135 dst=r4 src=r2 offset=185 imm=0 + r3 += IMMEDIATE(62); + // EBPF_OP_JGT_REG pc=135 dst=r3 src=r1 offset=185 imm=0 #line 202 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 202 "sample/encap_reflect_packet.c" goto label_5; #line 202 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=136 dst=r2 src=r3 offset=56 imm=0 + // EBPF_OP_LDXH pc=136 dst=r1 src=r2 offset=56 imm=0 #line 208 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=137 dst=r2 src=r0 offset=183 imm=7459 + r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(56)); + // EBPF_OP_JNE_IMM pc=137 dst=r1 src=r0 offset=183 imm=7459 #line 208 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r1 != IMMEDIATE(7459)) { #line 208 "sample/encap_reflect_packet.c" goto label_5; #line 208 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=138 dst=r6 src=r1 offset=0 imm=0 -#line 208 "sample/encap_reflect_packet.c" - r6 = r1; + // EBPF_OP_MOV64_REG pc=138 dst=r1 src=r6 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" + r1 = r6; // EBPF_OP_LDDW pc=139 dst=r2 src=r0 offset=0 imm=-40 #line 96 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967256; @@ -635,17 +635,17 @@ encap_reflect_packet(void* context) #line 109 "sample/encap_reflect_packet.c" } // EBPF_OP_MOV64_REG pc=156 dst=r3 src=r1 offset=0 imm=0 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" r3 = r1; // EBPF_OP_ADD64_IMM pc=157 dst=r3 src=r0 offset=0 imm=54 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); // EBPF_OP_JGT_REG pc=158 dst=r3 src=r5 offset=162 imm=0 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" if (r3 > r5) { -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" goto label_5; -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" } // EBPF_OP_MOV64_REG pc=159 dst=r7 src=r1 offset=0 imm=0 #line 124 "sample/encap_reflect_packet.c" @@ -1190,7 +1190,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c b/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c index 585e2e16e6..b6350a1bcb 100644 --- a/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c +++ b/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c @@ -225,110 +225,113 @@ encap_reflect_packet(void* context) #line 167 "sample/encap_reflect_packet.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 +#line 167 "sample/encap_reflect_packet.c" + r6 = r1; + // EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1 #line 167 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=1 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXDW pc=2 dst=r1 src=r6 offset=8 imm=0 #line 173 "sample/encap_reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_LDXDW pc=2 dst=r3 src=r1 offset=0 imm=0 + r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=3 dst=r2 src=r6 offset=0 imm=0 #line 172 "sample/encap_reflect_packet.c" - r3 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=3 dst=r4 src=r3 offset=0 imm=0 + r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=4 dst=r3 src=r2 offset=0 imm=0 #line 173 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=4 dst=r4 src=r0 offset=0 imm=14 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=5 dst=r3 src=r0 offset=0 imm=14 #line 173 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=5 dst=r4 src=r2 offset=315 imm=0 + r3 += IMMEDIATE(14); + // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=314 imm=0 #line 173 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 173 "sample/encap_reflect_packet.c" goto label_5; #line 173 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=6 dst=r5 src=r3 offset=12 imm=0 + // EBPF_OP_LDXH pc=7 dst=r4 src=r2 offset=12 imm=0 #line 178 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r5 src=r0 offset=120 imm=56710 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=119 imm=56710 #line 178 "sample/encap_reflect_packet.c" - if (r5 == IMMEDIATE(56710)) { + if (r4 == IMMEDIATE(56710)) { #line 178 "sample/encap_reflect_packet.c" goto label_2; #line 178 "sample/encap_reflect_packet.c" } - // EBPF_OP_JNE_IMM pc=8 dst=r5 src=r0 offset=312 imm=8 + // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=311 imm=8 #line 178 "sample/encap_reflect_packet.c" - if (r5 != IMMEDIATE(8)) { + if (r4 != IMMEDIATE(8)) { #line 178 "sample/encap_reflect_packet.c" goto label_5; #line 178 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=9 dst=r5 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=10 dst=r4 src=r2 offset=0 imm=0 #line 179 "sample/encap_reflect_packet.c" - r5 = r3; - // EBPF_OP_ADD64_IMM pc=10 dst=r5 src=r0 offset=0 imm=34 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=11 dst=r4 src=r0 offset=0 imm=34 #line 179 "sample/encap_reflect_packet.c" - r5 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r5 src=r2 offset=309 imm=0 + r4 += IMMEDIATE(34); + // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=308 imm=0 #line 179 "sample/encap_reflect_packet.c" - if (r5 > r2) { + if (r4 > r1) { #line 179 "sample/encap_reflect_packet.c" goto label_5; #line 179 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=12 dst=r5 src=r3 offset=23 imm=0 + // EBPF_OP_LDXB pc=13 dst=r4 src=r2 offset=23 imm=0 #line 185 "sample/encap_reflect_packet.c" - r5 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r5 src=r0 offset=307 imm=17 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); + // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=306 imm=17 #line 185 "sample/encap_reflect_packet.c" - if (r5 != IMMEDIATE(17)) { + if (r4 != IMMEDIATE(17)) { #line 185 "sample/encap_reflect_packet.c" goto label_5; #line 185 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=14 dst=r3 src=r3 offset=14 imm=0 + // EBPF_OP_LDXB pc=15 dst=r2 src=r2 offset=14 imm=0 #line 185 "sample/encap_reflect_packet.c" - r3 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(14)); - // EBPF_OP_LSH64_IMM pc=15 dst=r3 src=r0 offset=0 imm=2 + r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=16 dst=r2 src=r0 offset=0 imm=2 #line 185 "sample/encap_reflect_packet.c" - r3 <<= (IMMEDIATE(2) & 63); - // EBPF_OP_AND64_IMM pc=16 dst=r3 src=r0 offset=0 imm=60 + r2 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=17 dst=r2 src=r0 offset=0 imm=60 #line 185 "sample/encap_reflect_packet.c" - r3 &= IMMEDIATE(60); - // EBPF_OP_ADD64_REG pc=17 dst=r4 src=r3 offset=0 imm=0 + r2 &= IMMEDIATE(60); + // EBPF_OP_ADD64_REG pc=18 dst=r3 src=r2 offset=0 imm=0 #line 185 "sample/encap_reflect_packet.c" - r4 += r3; - // EBPF_OP_MOV64_REG pc=18 dst=r3 src=r4 offset=0 imm=0 + r3 += r2; + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r3 offset=0 imm=0 #line 185 "sample/encap_reflect_packet.c" - r3 = r4; - // EBPF_OP_ADD64_IMM pc=19 dst=r3 src=r0 offset=0 imm=8 + r2 = r3; + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=8 #line 185 "sample/encap_reflect_packet.c" - r3 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=20 dst=r3 src=r2 offset=300 imm=0 + r2 += IMMEDIATE(8); + // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=299 imm=0 #line 185 "sample/encap_reflect_packet.c" - if (r3 > r2) { + if (r2 > r1) { #line 185 "sample/encap_reflect_packet.c" goto label_5; #line 185 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=21 dst=r2 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=22 dst=r1 src=r3 offset=2 imm=0 #line 191 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=22 dst=r2 src=r0 offset=298 imm=7459 + r1 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=297 imm=7459 #line 191 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r1 != IMMEDIATE(7459)) { #line 191 "sample/encap_reflect_packet.c" goto label_5; #line 191 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=23 dst=r6 src=r1 offset=0 imm=0 -#line 191 "sample/encap_reflect_packet.c" - r6 = r1; - // EBPF_OP_LDDW pc=24 dst=r2 src=r0 offset=0 imm=-20 + // EBPF_OP_MOV64_REG pc=24 dst=r1 src=r6 offset=0 imm=0 +#line 22 "sample/encap_reflect_packet.c" + r1 = r6; + // EBPF_OP_LDDW pc=25 dst=r2 src=r0 offset=0 imm=-20 #line 22 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967276; - // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=65536 + // EBPF_OP_CALL pc=27 dst=r0 src=r0 offset=0 imm=65536 #line 22 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[0].address(r1, r2, r3, r4, r5, context); #line 22 "sample/encap_reflect_packet.c" @@ -337,9 +340,6 @@ encap_reflect_packet(void* context) return 0; #line 22 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=27 dst=r2 src=r6 offset=0 imm=0 -#line 22 "sample/encap_reflect_packet.c" - r2 = r6; // EBPF_OP_MOV64_REG pc=28 dst=r1 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r1 = r0; @@ -352,208 +352,208 @@ encap_reflect_packet(void* context) // EBPF_OP_ARSH64_IMM pc=31 dst=r1 src=r0 offset=0 imm=32 #line 22 "sample/encap_reflect_packet.c" r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=32 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=32 dst=r2 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" - r3 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=33 dst=r3 src=r1 offset=287 imm=0 + r2 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=287 imm=0 #line 22 "sample/encap_reflect_packet.c" - if ((int64_t)r3 > (int64_t)r1) { + if ((int64_t)r2 > (int64_t)r1) { #line 22 "sample/encap_reflect_packet.c" goto label_5; #line 22 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXDW pc=34 dst=r5 src=r2 offset=8 imm=0 + // EBPF_OP_LDXDW pc=34 dst=r4 src=r6 offset=8 imm=0 #line 28 "sample/encap_reflect_packet.c" - r5 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_LDXDW pc=35 dst=r6 src=r2 offset=0 imm=0 + r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_LDXDW pc=35 dst=r7 src=r6 offset=0 imm=0 #line 27 "sample/encap_reflect_packet.c" - r6 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r6 offset=0 imm=0 + r7 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r7 offset=0 imm=0 #line 28 "sample/encap_reflect_packet.c" - r3 = r6; + r3 = r7; // EBPF_OP_ADD64_IMM pc=37 dst=r3 src=r0 offset=0 imm=14 #line 28 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=38 dst=r3 src=r5 offset=282 imm=0 + // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=282 imm=0 #line 28 "sample/encap_reflect_packet.c" - if (r3 > r5) { + if (r3 > r4) { #line 28 "sample/encap_reflect_packet.c" goto label_5; #line 28 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=39 dst=r4 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r7 offset=0 imm=0 #line 35 "sample/encap_reflect_packet.c" - r4 = r6; - // EBPF_OP_ADD64_IMM pc=40 dst=r4 src=r0 offset=0 imm=20 + r2 = r7; + // EBPF_OP_ADD64_IMM pc=40 dst=r2 src=r0 offset=0 imm=20 #line 35 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=41 dst=r4 src=r5 offset=279 imm=0 + r2 += IMMEDIATE(20); + // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=279 imm=0 #line 35 "sample/encap_reflect_packet.c" - if (r4 > r5) { + if (r2 > r4) { #line 35 "sample/encap_reflect_packet.c" goto label_5; #line 35 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r6 offset=0 imm=0 -#line 35 "sample/encap_reflect_packet.c" - r1 = r6; + // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r7 offset=0 imm=0 +#line 43 "sample/encap_reflect_packet.c" + r1 = r7; // EBPF_OP_ADD64_IMM pc=43 dst=r1 src=r0 offset=0 imm=34 -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=44 dst=r1 src=r5 offset=276 imm=0 -#line 35 "sample/encap_reflect_packet.c" - if (r1 > r5) { -#line 35 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=276 imm=0 +#line 43 "sample/encap_reflect_packet.c" + if (r1 > r4) { +#line 43 "sample/encap_reflect_packet.c" goto label_5; -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=45 dst=r7 src=r6 offset=0 imm=0 -#line 35 "sample/encap_reflect_packet.c" - r7 = r6; - // EBPF_OP_ADD64_IMM pc=46 dst=r7 src=r0 offset=0 imm=54 -#line 35 "sample/encap_reflect_packet.c" - r7 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=47 dst=r7 src=r5 offset=273 imm=0 -#line 35 "sample/encap_reflect_packet.c" - if (r7 > r5) { -#line 35 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r7 offset=0 imm=0 +#line 43 "sample/encap_reflect_packet.c" + r5 = r7; + // EBPF_OP_ADD64_IMM pc=46 dst=r5 src=r0 offset=0 imm=54 +#line 43 "sample/encap_reflect_packet.c" + r5 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=273 imm=0 +#line 43 "sample/encap_reflect_packet.c" + if (r5 > r4) { +#line 43 "sample/encap_reflect_packet.c" goto label_5; -#line 35 "sample/encap_reflect_packet.c" +#line 43 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=48 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=48 dst=r4 src=r2 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=49 dst=r6 src=r5 offset=0 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=49 dst=r7 src=r4 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=50 dst=r5 src=r4 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=50 dst=r4 src=r2 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=51 dst=r6 src=r5 offset=2 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=51 dst=r7 src=r4 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=52 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=52 dst=r4 src=r2 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=53 dst=r6 src=r5 offset=4 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_STXH pc=53 dst=r7 src=r4 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=54 dst=r5 src=r4 offset=12 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=54 dst=r4 src=r2 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(12)); - // EBPF_OP_STXH pc=55 dst=r6 src=r5 offset=12 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_STXH pc=55 dst=r7 src=r4 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(12)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=56 dst=r5 src=r4 offset=6 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(12)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=56 dst=r4 src=r2 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); - // EBPF_OP_STXH pc=57 dst=r6 src=r5 offset=6 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_STXH pc=57 dst=r7 src=r4 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=58 dst=r7 src=r4 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=58 dst=r5 src=r2 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - r7 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(10)); - // EBPF_OP_LDXH pc=59 dst=r8 src=r4 offset=8 imm=0 + r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(10)); + // EBPF_OP_LDXH pc=59 dst=r8 src=r2 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - r8 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); - // EBPF_OP_STXH pc=60 dst=r6 src=r5 offset=0 imm=0 + r8 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(8)); + // EBPF_OP_STXH pc=60 dst=r7 src=r4 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_STXH pc=61 dst=r6 src=r8 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; + // EBPF_OP_STXH pc=61 dst=r7 src=r8 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r8; - // EBPF_OP_STXH pc=62 dst=r6 src=r8 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r8; + // EBPF_OP_STXH pc=62 dst=r7 src=r8 offset=2 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r8; - // EBPF_OP_STXH pc=63 dst=r6 src=r7 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r8; + // EBPF_OP_STXH pc=63 dst=r7 src=r5 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r7; - // EBPF_OP_STXH pc=64 dst=r6 src=r7 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r5; + // EBPF_OP_STXH pc=64 dst=r7 src=r5 offset=4 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r7; - // EBPF_OP_LDXH pc=65 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r5; + // EBPF_OP_LDXH pc=65 dst=r4 src=r2 offset=4 imm=0 #line 18 "sample/./xdp_common.h" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=66 dst=r6 src=r5 offset=10 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_STXH pc=66 dst=r7 src=r4 offset=10 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=67 dst=r5 src=r4 offset=0 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=0 imm=0 #line 18 "sample/./xdp_common.h" - r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=68 dst=r6 src=r5 offset=6 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=68 dst=r7 src=r4 offset=6 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=69 dst=r4 src=r4 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=69 dst=r2 src=r2 offset=2 imm=0 #line 18 "sample/./xdp_common.h" - r4 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=70 dst=r6 src=r4 offset=8 imm=0 + r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=70 dst=r7 src=r2 offset=8 imm=0 #line 18 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXW pc=71 dst=r4 src=r6 offset=50 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=71 dst=r2 src=r7 offset=50 imm=0 #line 24 "sample/./xdp_common.h" - r4 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)); - // EBPF_OP_LDXW pc=72 dst=r5 src=r6 offset=46 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)); + // EBPF_OP_LDXW pc=72 dst=r4 src=r7 offset=46 imm=0 #line 25 "sample/./xdp_common.h" - r5 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)); - // EBPF_OP_STXW pc=73 dst=r6 src=r5 offset=50 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)); + // EBPF_OP_STXW pc=73 dst=r7 src=r4 offset=50 imm=0 #line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)) = (uint32_t)r5; - // EBPF_OP_STXW pc=74 dst=r6 src=r4 offset=46 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)) = (uint32_t)r4; + // EBPF_OP_STXW pc=74 dst=r7 src=r2 offset=46 imm=0 #line 26 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)) = (uint32_t)r4; - // EBPF_OP_LDXB pc=75 dst=r5 src=r6 offset=34 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)) = (uint32_t)r2; + // EBPF_OP_LDXB pc=75 dst=r4 src=r7 offset=34 imm=0 #line 63 "sample/encap_reflect_packet.c" - r5 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(34)); - // EBPF_OP_LSH64_IMM pc=76 dst=r5 src=r0 offset=0 imm=2 + r4 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(34)); + // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=2 #line 63 "sample/encap_reflect_packet.c" - r5 <<= (IMMEDIATE(2) & 63); - // EBPF_OP_AND64_IMM pc=77 dst=r5 src=r0 offset=0 imm=60 + r4 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=77 dst=r4 src=r0 offset=0 imm=60 #line 63 "sample/encap_reflect_packet.c" - r5 &= IMMEDIATE(60); - // EBPF_OP_MOV64_REG pc=78 dst=r4 src=r1 offset=0 imm=0 + r4 &= IMMEDIATE(60); + // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r1 offset=0 imm=0 #line 63 "sample/encap_reflect_packet.c" - r4 = r1; - // EBPF_OP_ADD64_REG pc=79 dst=r4 src=r5 offset=0 imm=0 + r2 = r1; + // EBPF_OP_ADD64_REG pc=79 dst=r2 src=r4 offset=0 imm=0 #line 63 "sample/encap_reflect_packet.c" - r4 += r5; - // EBPF_OP_MOV64_REG pc=80 dst=r5 src=r4 offset=0 imm=0 + r2 += r4; + // EBPF_OP_MOV64_REG pc=80 dst=r4 src=r2 offset=0 imm=0 #line 64 "sample/encap_reflect_packet.c" - r5 = r4; - // EBPF_OP_ADD64_IMM pc=81 dst=r5 src=r0 offset=0 imm=8 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=81 dst=r4 src=r0 offset=0 imm=8 #line 64 "sample/encap_reflect_packet.c" - r5 += IMMEDIATE(8); - // EBPF_OP_LDXDW pc=82 dst=r2 src=r2 offset=8 imm=0 + r4 += IMMEDIATE(8); + // EBPF_OP_LDXDW pc=82 dst=r5 src=r6 offset=8 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_JGT_REG pc=83 dst=r5 src=r2 offset=237 imm=0 + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=83 dst=r4 src=r5 offset=237 imm=0 #line 64 "sample/encap_reflect_packet.c" - if (r5 > r2) { + if (r4 > r5) { #line 64 "sample/encap_reflect_packet.c" goto label_5; #line 64 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=84 dst=r2 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=84 dst=r4 src=r2 offset=2 imm=0 #line 68 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=85 dst=r2 src=r0 offset=4 imm=7459 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=85 dst=r4 src=r0 offset=4 imm=7459 #line 68 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r4 != IMMEDIATE(7459)) { #line 68 "sample/encap_reflect_packet.c" goto label_1; #line 68 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=86 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=86 dst=r4 src=r2 offset=0 imm=0 #line 41 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=87 dst=r4 src=r2 offset=2 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=87 dst=r2 src=r4 offset=2 imm=0 #line 43 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_MOV64_IMM pc=88 dst=r2 src=r0 offset=0 imm=7459 + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=88 dst=r4 src=r0 offset=0 imm=7459 #line 43 "sample/./xdp_common.h" - r2 = IMMEDIATE(7459); - // EBPF_OP_STXH pc=89 dst=r4 src=r2 offset=0 imm=0 + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=89 dst=r2 src=r4 offset=0 imm=0 #line 42 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)) = (uint16_t)r2; + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r4; label_1: // EBPF_OP_LDXW pc=90 dst=r2 src=r1 offset=16 imm=0 #line 73 "sample/encap_reflect_packet.c" @@ -588,24 +588,24 @@ encap_reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=100 dst=r1 src=r0 offset=0 imm=4 #line 73 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(4); - // EBPF_OP_STXB pc=101 dst=r6 src=r1 offset=23 imm=0 + // EBPF_OP_STXB pc=101 dst=r7 src=r1 offset=23 imm=0 #line 76 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(23)) = (uint8_t)r1; - // EBPF_OP_LDXB pc=102 dst=r1 src=r6 offset=14 imm=0 + *(uint8_t*)(uintptr_t)(r7 + OFFSET(23)) = (uint8_t)r1; + // EBPF_OP_LDXB pc=102 dst=r1 src=r7 offset=14 imm=0 #line 77 "sample/encap_reflect_packet.c" - r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)); + r1 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)); // EBPF_OP_AND64_IMM pc=103 dst=r1 src=r0 offset=0 imm=240 #line 77 "sample/encap_reflect_packet.c" r1 &= IMMEDIATE(240); // EBPF_OP_OR64_IMM pc=104 dst=r1 src=r0 offset=0 imm=5 #line 77 "sample/encap_reflect_packet.c" r1 |= IMMEDIATE(5); - // EBPF_OP_STXB pc=105 dst=r6 src=r1 offset=14 imm=0 + // EBPF_OP_STXB pc=105 dst=r7 src=r1 offset=14 imm=0 #line 77 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)) = (uint8_t)r1; - // EBPF_OP_LDXH pc=106 dst=r1 src=r6 offset=36 imm=0 + *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)) = (uint8_t)r1; + // EBPF_OP_LDXH pc=106 dst=r1 src=r7 offset=36 imm=0 #line 78 "sample/encap_reflect_packet.c" - r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(36)); + r1 = *(uint16_t*)(uintptr_t)(r7 + OFFSET(36)); // EBPF_OP_BE pc=107 dst=r1 src=r0 offset=0 imm=16 #line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); @@ -619,15 +619,15 @@ encap_reflect_packet(void* context) r1 = htobe16((uint16_t)r1); #line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_STXH pc=110 dst=r6 src=r1 offset=16 imm=0 + // EBPF_OP_STXH pc=110 dst=r7 src=r1 offset=16 imm=0 #line 78 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(16)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(16)) = (uint16_t)r1; // EBPF_OP_MOV64_IMM pc=111 dst=r1 src=r0 offset=0 imm=0 #line 78 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXH pc=112 dst=r6 src=r1 offset=24 imm=0 + // EBPF_OP_STXH pc=112 dst=r7 src=r1 offset=24 imm=0 #line 80 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; // EBPF_OP_MOV64_IMM pc=113 dst=r2 src=r0 offset=0 imm=0 #line 82 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); @@ -673,62 +673,62 @@ encap_reflect_packet(void* context) // EBPF_OP_XOR64_IMM pc=125 dst=r1 src=r0 offset=0 imm=-1 #line 82 "sample/encap_reflect_packet.c" r1 ^= IMMEDIATE(-1); - // EBPF_OP_STXH pc=126 dst=r6 src=r1 offset=24 imm=0 + // EBPF_OP_STXH pc=126 dst=r7 src=r1 offset=24 imm=0 #line 81 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; // EBPF_OP_JA pc=127 dst=r0 src=r0 offset=192 imm=0 #line 81 "sample/encap_reflect_packet.c" goto label_4; label_2: - // EBPF_OP_MOV64_REG pc=128 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=128 dst=r3 src=r2 offset=0 imm=0 #line 196 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=129 dst=r4 src=r0 offset=0 imm=54 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=129 dst=r3 src=r0 offset=0 imm=54 #line 196 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=130 dst=r4 src=r2 offset=190 imm=0 + r3 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=130 dst=r3 src=r1 offset=190 imm=0 #line 196 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 196 "sample/encap_reflect_packet.c" goto label_5; #line 196 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXB pc=131 dst=r4 src=r3 offset=20 imm=0 + // EBPF_OP_LDXB pc=131 dst=r3 src=r2 offset=20 imm=0 #line 202 "sample/encap_reflect_packet.c" - r4 = *(uint8_t*)(uintptr_t)(r3 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=132 dst=r4 src=r0 offset=188 imm=17 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); + // EBPF_OP_JNE_IMM pc=132 dst=r3 src=r0 offset=188 imm=17 #line 202 "sample/encap_reflect_packet.c" - if (r4 != IMMEDIATE(17)) { + if (r3 != IMMEDIATE(17)) { #line 202 "sample/encap_reflect_packet.c" goto label_5; #line 202 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=133 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=133 dst=r3 src=r2 offset=0 imm=0 #line 202 "sample/encap_reflect_packet.c" - r4 = r3; - // EBPF_OP_ADD64_IMM pc=134 dst=r4 src=r0 offset=0 imm=62 + r3 = r2; + // EBPF_OP_ADD64_IMM pc=134 dst=r3 src=r0 offset=0 imm=62 #line 202 "sample/encap_reflect_packet.c" - r4 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=135 dst=r4 src=r2 offset=185 imm=0 + r3 += IMMEDIATE(62); + // EBPF_OP_JGT_REG pc=135 dst=r3 src=r1 offset=185 imm=0 #line 202 "sample/encap_reflect_packet.c" - if (r4 > r2) { + if (r3 > r1) { #line 202 "sample/encap_reflect_packet.c" goto label_5; #line 202 "sample/encap_reflect_packet.c" } - // EBPF_OP_LDXH pc=136 dst=r2 src=r3 offset=56 imm=0 + // EBPF_OP_LDXH pc=136 dst=r1 src=r2 offset=56 imm=0 #line 208 "sample/encap_reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=137 dst=r2 src=r0 offset=183 imm=7459 + r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(56)); + // EBPF_OP_JNE_IMM pc=137 dst=r1 src=r0 offset=183 imm=7459 #line 208 "sample/encap_reflect_packet.c" - if (r2 != IMMEDIATE(7459)) { + if (r1 != IMMEDIATE(7459)) { #line 208 "sample/encap_reflect_packet.c" goto label_5; #line 208 "sample/encap_reflect_packet.c" } - // EBPF_OP_MOV64_REG pc=138 dst=r6 src=r1 offset=0 imm=0 -#line 208 "sample/encap_reflect_packet.c" - r6 = r1; + // EBPF_OP_MOV64_REG pc=138 dst=r1 src=r6 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" + r1 = r6; // EBPF_OP_LDDW pc=139 dst=r2 src=r0 offset=0 imm=-40 #line 96 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967256; @@ -796,17 +796,17 @@ encap_reflect_packet(void* context) #line 109 "sample/encap_reflect_packet.c" } // EBPF_OP_MOV64_REG pc=156 dst=r3 src=r1 offset=0 imm=0 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" r3 = r1; // EBPF_OP_ADD64_IMM pc=157 dst=r3 src=r0 offset=0 imm=54 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); // EBPF_OP_JGT_REG pc=158 dst=r3 src=r5 offset=162 imm=0 -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" if (r3 > r5) { -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" goto label_5; -#line 109 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" } // EBPF_OP_MOV64_REG pc=159 dst=r7 src=r1 offset=0 imm=0 #line 124 "sample/encap_reflect_packet.c" @@ -1351,7 +1351,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/hash_of_map_dll.c b/tests/bpf2c_tests/expected/hash_of_map_dll.c index fe1480650e..85e936980c 100644 --- a/tests/bpf2c_tests/expected/hash_of_map_dll.c +++ b/tests/bpf2c_tests/expected/hash_of_map_dll.c @@ -224,7 +224,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/hash_of_map_raw.c b/tests/bpf2c_tests/expected/hash_of_map_raw.c index 25b0ea1720..d0abaea318 100644 --- a/tests/bpf2c_tests/expected/hash_of_map_raw.c +++ b/tests/bpf2c_tests/expected/hash_of_map_raw.c @@ -198,7 +198,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/hash_of_map_sys.c b/tests/bpf2c_tests/expected/hash_of_map_sys.c index 7d003073c8..b18e8d52dc 100644 --- a/tests/bpf2c_tests/expected/hash_of_map_sys.c +++ b/tests/bpf2c_tests/expected/hash_of_map_sys.c @@ -359,7 +359,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/inner_map_dll.c b/tests/bpf2c_tests/expected/inner_map_dll.c index 3bb9f1f4c4..0165196747 100644 --- a/tests/bpf2c_tests/expected/inner_map_dll.c +++ b/tests/bpf2c_tests/expected/inner_map_dll.c @@ -175,11 +175,11 @@ lookup_update(void* context) // EBPF_OP_MOV64_REG pc=8 dst=r6 src=r0 offset=0 imm=0 #line 60 "sample/undocked/inner_map.c" r6 = r0; - // EBPF_OP_JEQ_IMM pc=9 dst=r6 src=r0 offset=10 imm=0 + // EBPF_OP_JEQ_IMM pc=9 dst=r6 src=r0 offset=9 imm=0 #line 61 "sample/undocked/inner_map.c" if (r6 == IMMEDIATE(0)) { #line 61 "sample/undocked/inner_map.c" - goto label_3; + goto label_1; #line 61 "sample/undocked/inner_map.c" } // EBPF_OP_STXW pc=10 dst=r10 src=r7 offset=-12 imm=0 @@ -203,38 +203,33 @@ lookup_update(void* context) return 0; #line 63 "sample/undocked/inner_map.c" } - // EBPF_OP_JEQ_IMM pc=15 dst=r0 src=r0 offset=4 imm=0 + // EBPF_OP_JEQ_IMM pc=15 dst=r0 src=r0 offset=3 imm=0 #line 64 "sample/undocked/inner_map.c" if (r0 == IMMEDIATE(0)) { #line 64 "sample/undocked/inner_map.c" - goto label_3; + goto label_1; #line 64 "sample/undocked/inner_map.c" } -label_1: // EBPF_OP_MOV64_IMM pc=16 dst=r1 src=r0 offset=0 imm=1 #line 64 "sample/undocked/inner_map.c" r1 = IMMEDIATE(1); // EBPF_OP_STXW pc=17 dst=r0 src=r1 offset=0 imm=0 -#line 64 "sample/undocked/inner_map.c" +#line 66 "sample/undocked/inner_map.c" *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_MOV64_IMM pc=18 dst=r0 src=r0 offset=0 imm=0 -#line 64 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(0); -label_2: - // EBPF_OP_EXIT pc=19 dst=r0 src=r0 offset=0 imm=0 -#line 84 "sample/undocked/inner_map.c" - return r0; -label_3: - // EBPF_OP_MOV64_REG pc=20 dst=r2 src=r10 offset=0 imm=0 -#line 84 "sample/undocked/inner_map.c" + // EBPF_OP_JA pc=18 dst=r0 src=r0 offset=17 imm=0 +#line 66 "sample/undocked/inner_map.c" + goto label_2; +label_1: + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 +#line 66 "sample/undocked/inner_map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r2 src=r0 offset=0 imm=-6 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-6 #line 72 "sample/undocked/inner_map.c" r2 += IMMEDIATE(-6); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=4 + // EBPF_OP_LDDW pc=21 dst=r1 src=r1 offset=0 imm=4 #line 72 "sample/undocked/inner_map.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_CALL pc=24 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=1 #line 72 "sample/undocked/inner_map.c" r0 = lookup_update_helpers[0].address(r1, r2, r3, r4, r5, context); #line 72 "sample/undocked/inner_map.c" @@ -243,35 +238,32 @@ lookup_update(void* context) return 0; #line 72 "sample/undocked/inner_map.c" } - // EBPF_OP_MOV64_REG pc=25 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=24 dst=r7 src=r0 offset=0 imm=1 #line 72 "sample/undocked/inner_map.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=26 dst=r0 src=r0 offset=0 imm=1 -#line 72 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JEQ_IMM pc=27 dst=r1 src=r0 offset=-9 imm=0 + r7 = IMMEDIATE(1); + // EBPF_OP_JEQ_IMM pc=25 dst=r0 src=r0 offset=10 imm=0 #line 73 "sample/undocked/inner_map.c" - if (r1 == IMMEDIATE(0)) { + if (r0 == IMMEDIATE(0)) { #line 73 "sample/undocked/inner_map.c" goto label_2; #line 73 "sample/undocked/inner_map.c" } - // EBPF_OP_MOV64_IMM pc=28 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=26 dst=r1 src=r0 offset=0 imm=0 #line 73 "sample/undocked/inner_map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXW pc=29 dst=r10 src=r1 offset=-16 imm=0 + // EBPF_OP_STXW pc=27 dst=r10 src=r1 offset=-16 imm=0 #line 74 "sample/undocked/inner_map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=30 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=28 dst=r2 src=r10 offset=0 imm=0 #line 74 "sample/undocked/inner_map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=31 dst=r2 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=29 dst=r2 src=r0 offset=0 imm=-16 #line 74 "sample/undocked/inner_map.c" r2 += IMMEDIATE(-16); - // EBPF_OP_MOV64_REG pc=32 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=30 dst=r1 src=r6 offset=0 imm=0 #line 75 "sample/undocked/inner_map.c" r1 = r6; - // EBPF_OP_CALL pc=33 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=31 dst=r0 src=r0 offset=0 imm=1 #line 75 "sample/undocked/inner_map.c" r0 = lookup_update_helpers[0].address(r1, r2, r3, r4, r5, context); #line 75 "sample/undocked/inner_map.c" @@ -280,23 +272,29 @@ lookup_update(void* context) return 0; #line 75 "sample/undocked/inner_map.c" } - // EBPF_OP_JEQ_IMM pc=34 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_JEQ_IMM pc=32 dst=r0 src=r0 offset=3 imm=0 #line 76 "sample/undocked/inner_map.c" if (r0 == IMMEDIATE(0)) { #line 76 "sample/undocked/inner_map.c" - goto label_4; + goto label_2; #line 76 "sample/undocked/inner_map.c" } - // EBPF_OP_JA pc=35 dst=r0 src=r0 offset=-20 imm=0 -#line 76 "sample/undocked/inner_map.c" - goto label_1; -label_4: - // EBPF_OP_MOV64_IMM pc=36 dst=r0 src=r0 offset=0 imm=1 -#line 76 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JA pc=37 dst=r0 src=r0 offset=-19 imm=0 + // EBPF_OP_MOV64_IMM pc=33 dst=r1 src=r0 offset=0 imm=1 #line 76 "sample/undocked/inner_map.c" - goto label_2; + r1 = IMMEDIATE(1); + // EBPF_OP_STXW pc=34 dst=r0 src=r1 offset=0 imm=0 +#line 78 "sample/undocked/inner_map.c" + *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=35 dst=r7 src=r0 offset=0 imm=0 +#line 78 "sample/undocked/inner_map.c" + r7 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=36 dst=r0 src=r7 offset=0 imm=0 +#line 84 "sample/undocked/inner_map.c" + r0 = r7; + // EBPF_OP_EXIT pc=37 dst=r0 src=r0 offset=0 imm=0 +#line 84 "sample/undocked/inner_map.c" + return r0; #line 52 "sample/undocked/inner_map.c" } #pragma code_seg(pop) @@ -332,7 +330,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/inner_map_raw.c b/tests/bpf2c_tests/expected/inner_map_raw.c index 390cd0b95f..7c28366af9 100644 --- a/tests/bpf2c_tests/expected/inner_map_raw.c +++ b/tests/bpf2c_tests/expected/inner_map_raw.c @@ -149,11 +149,11 @@ lookup_update(void* context) // EBPF_OP_MOV64_REG pc=8 dst=r6 src=r0 offset=0 imm=0 #line 60 "sample/undocked/inner_map.c" r6 = r0; - // EBPF_OP_JEQ_IMM pc=9 dst=r6 src=r0 offset=10 imm=0 + // EBPF_OP_JEQ_IMM pc=9 dst=r6 src=r0 offset=9 imm=0 #line 61 "sample/undocked/inner_map.c" if (r6 == IMMEDIATE(0)) { #line 61 "sample/undocked/inner_map.c" - goto label_3; + goto label_1; #line 61 "sample/undocked/inner_map.c" } // EBPF_OP_STXW pc=10 dst=r10 src=r7 offset=-12 imm=0 @@ -177,38 +177,33 @@ lookup_update(void* context) return 0; #line 63 "sample/undocked/inner_map.c" } - // EBPF_OP_JEQ_IMM pc=15 dst=r0 src=r0 offset=4 imm=0 + // EBPF_OP_JEQ_IMM pc=15 dst=r0 src=r0 offset=3 imm=0 #line 64 "sample/undocked/inner_map.c" if (r0 == IMMEDIATE(0)) { #line 64 "sample/undocked/inner_map.c" - goto label_3; + goto label_1; #line 64 "sample/undocked/inner_map.c" } -label_1: // EBPF_OP_MOV64_IMM pc=16 dst=r1 src=r0 offset=0 imm=1 #line 64 "sample/undocked/inner_map.c" r1 = IMMEDIATE(1); // EBPF_OP_STXW pc=17 dst=r0 src=r1 offset=0 imm=0 -#line 64 "sample/undocked/inner_map.c" +#line 66 "sample/undocked/inner_map.c" *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_MOV64_IMM pc=18 dst=r0 src=r0 offset=0 imm=0 -#line 64 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(0); -label_2: - // EBPF_OP_EXIT pc=19 dst=r0 src=r0 offset=0 imm=0 -#line 84 "sample/undocked/inner_map.c" - return r0; -label_3: - // EBPF_OP_MOV64_REG pc=20 dst=r2 src=r10 offset=0 imm=0 -#line 84 "sample/undocked/inner_map.c" + // EBPF_OP_JA pc=18 dst=r0 src=r0 offset=17 imm=0 +#line 66 "sample/undocked/inner_map.c" + goto label_2; +label_1: + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 +#line 66 "sample/undocked/inner_map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r2 src=r0 offset=0 imm=-6 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-6 #line 72 "sample/undocked/inner_map.c" r2 += IMMEDIATE(-6); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=4 + // EBPF_OP_LDDW pc=21 dst=r1 src=r1 offset=0 imm=4 #line 72 "sample/undocked/inner_map.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_CALL pc=24 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=1 #line 72 "sample/undocked/inner_map.c" r0 = lookup_update_helpers[0].address(r1, r2, r3, r4, r5, context); #line 72 "sample/undocked/inner_map.c" @@ -217,35 +212,32 @@ lookup_update(void* context) return 0; #line 72 "sample/undocked/inner_map.c" } - // EBPF_OP_MOV64_REG pc=25 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=24 dst=r7 src=r0 offset=0 imm=1 #line 72 "sample/undocked/inner_map.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=26 dst=r0 src=r0 offset=0 imm=1 -#line 72 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JEQ_IMM pc=27 dst=r1 src=r0 offset=-9 imm=0 + r7 = IMMEDIATE(1); + // EBPF_OP_JEQ_IMM pc=25 dst=r0 src=r0 offset=10 imm=0 #line 73 "sample/undocked/inner_map.c" - if (r1 == IMMEDIATE(0)) { + if (r0 == IMMEDIATE(0)) { #line 73 "sample/undocked/inner_map.c" goto label_2; #line 73 "sample/undocked/inner_map.c" } - // EBPF_OP_MOV64_IMM pc=28 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=26 dst=r1 src=r0 offset=0 imm=0 #line 73 "sample/undocked/inner_map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXW pc=29 dst=r10 src=r1 offset=-16 imm=0 + // EBPF_OP_STXW pc=27 dst=r10 src=r1 offset=-16 imm=0 #line 74 "sample/undocked/inner_map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=30 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=28 dst=r2 src=r10 offset=0 imm=0 #line 74 "sample/undocked/inner_map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=31 dst=r2 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=29 dst=r2 src=r0 offset=0 imm=-16 #line 74 "sample/undocked/inner_map.c" r2 += IMMEDIATE(-16); - // EBPF_OP_MOV64_REG pc=32 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=30 dst=r1 src=r6 offset=0 imm=0 #line 75 "sample/undocked/inner_map.c" r1 = r6; - // EBPF_OP_CALL pc=33 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=31 dst=r0 src=r0 offset=0 imm=1 #line 75 "sample/undocked/inner_map.c" r0 = lookup_update_helpers[0].address(r1, r2, r3, r4, r5, context); #line 75 "sample/undocked/inner_map.c" @@ -254,23 +246,29 @@ lookup_update(void* context) return 0; #line 75 "sample/undocked/inner_map.c" } - // EBPF_OP_JEQ_IMM pc=34 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_JEQ_IMM pc=32 dst=r0 src=r0 offset=3 imm=0 #line 76 "sample/undocked/inner_map.c" if (r0 == IMMEDIATE(0)) { #line 76 "sample/undocked/inner_map.c" - goto label_4; + goto label_2; #line 76 "sample/undocked/inner_map.c" } - // EBPF_OP_JA pc=35 dst=r0 src=r0 offset=-20 imm=0 -#line 76 "sample/undocked/inner_map.c" - goto label_1; -label_4: - // EBPF_OP_MOV64_IMM pc=36 dst=r0 src=r0 offset=0 imm=1 -#line 76 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JA pc=37 dst=r0 src=r0 offset=-19 imm=0 + // EBPF_OP_MOV64_IMM pc=33 dst=r1 src=r0 offset=0 imm=1 #line 76 "sample/undocked/inner_map.c" - goto label_2; + r1 = IMMEDIATE(1); + // EBPF_OP_STXW pc=34 dst=r0 src=r1 offset=0 imm=0 +#line 78 "sample/undocked/inner_map.c" + *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=35 dst=r7 src=r0 offset=0 imm=0 +#line 78 "sample/undocked/inner_map.c" + r7 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=36 dst=r0 src=r7 offset=0 imm=0 +#line 84 "sample/undocked/inner_map.c" + r0 = r7; + // EBPF_OP_EXIT pc=37 dst=r0 src=r0 offset=0 imm=0 +#line 84 "sample/undocked/inner_map.c" + return r0; #line 52 "sample/undocked/inner_map.c" } #pragma code_seg(pop) @@ -306,7 +304,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/inner_map_sys.c b/tests/bpf2c_tests/expected/inner_map_sys.c index fb9fdbf2b4..352388bd92 100644 --- a/tests/bpf2c_tests/expected/inner_map_sys.c +++ b/tests/bpf2c_tests/expected/inner_map_sys.c @@ -310,11 +310,11 @@ lookup_update(void* context) // EBPF_OP_MOV64_REG pc=8 dst=r6 src=r0 offset=0 imm=0 #line 60 "sample/undocked/inner_map.c" r6 = r0; - // EBPF_OP_JEQ_IMM pc=9 dst=r6 src=r0 offset=10 imm=0 + // EBPF_OP_JEQ_IMM pc=9 dst=r6 src=r0 offset=9 imm=0 #line 61 "sample/undocked/inner_map.c" if (r6 == IMMEDIATE(0)) { #line 61 "sample/undocked/inner_map.c" - goto label_3; + goto label_1; #line 61 "sample/undocked/inner_map.c" } // EBPF_OP_STXW pc=10 dst=r10 src=r7 offset=-12 imm=0 @@ -338,38 +338,33 @@ lookup_update(void* context) return 0; #line 63 "sample/undocked/inner_map.c" } - // EBPF_OP_JEQ_IMM pc=15 dst=r0 src=r0 offset=4 imm=0 + // EBPF_OP_JEQ_IMM pc=15 dst=r0 src=r0 offset=3 imm=0 #line 64 "sample/undocked/inner_map.c" if (r0 == IMMEDIATE(0)) { #line 64 "sample/undocked/inner_map.c" - goto label_3; + goto label_1; #line 64 "sample/undocked/inner_map.c" } -label_1: // EBPF_OP_MOV64_IMM pc=16 dst=r1 src=r0 offset=0 imm=1 #line 64 "sample/undocked/inner_map.c" r1 = IMMEDIATE(1); // EBPF_OP_STXW pc=17 dst=r0 src=r1 offset=0 imm=0 -#line 64 "sample/undocked/inner_map.c" +#line 66 "sample/undocked/inner_map.c" *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; - // EBPF_OP_MOV64_IMM pc=18 dst=r0 src=r0 offset=0 imm=0 -#line 64 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(0); -label_2: - // EBPF_OP_EXIT pc=19 dst=r0 src=r0 offset=0 imm=0 -#line 84 "sample/undocked/inner_map.c" - return r0; -label_3: - // EBPF_OP_MOV64_REG pc=20 dst=r2 src=r10 offset=0 imm=0 -#line 84 "sample/undocked/inner_map.c" + // EBPF_OP_JA pc=18 dst=r0 src=r0 offset=17 imm=0 +#line 66 "sample/undocked/inner_map.c" + goto label_2; +label_1: + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 +#line 66 "sample/undocked/inner_map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r2 src=r0 offset=0 imm=-6 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-6 #line 72 "sample/undocked/inner_map.c" r2 += IMMEDIATE(-6); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=4 + // EBPF_OP_LDDW pc=21 dst=r1 src=r1 offset=0 imm=4 #line 72 "sample/undocked/inner_map.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_CALL pc=24 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=23 dst=r0 src=r0 offset=0 imm=1 #line 72 "sample/undocked/inner_map.c" r0 = lookup_update_helpers[0].address(r1, r2, r3, r4, r5, context); #line 72 "sample/undocked/inner_map.c" @@ -378,35 +373,32 @@ lookup_update(void* context) return 0; #line 72 "sample/undocked/inner_map.c" } - // EBPF_OP_MOV64_REG pc=25 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=24 dst=r7 src=r0 offset=0 imm=1 #line 72 "sample/undocked/inner_map.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=26 dst=r0 src=r0 offset=0 imm=1 -#line 72 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JEQ_IMM pc=27 dst=r1 src=r0 offset=-9 imm=0 + r7 = IMMEDIATE(1); + // EBPF_OP_JEQ_IMM pc=25 dst=r0 src=r0 offset=10 imm=0 #line 73 "sample/undocked/inner_map.c" - if (r1 == IMMEDIATE(0)) { + if (r0 == IMMEDIATE(0)) { #line 73 "sample/undocked/inner_map.c" goto label_2; #line 73 "sample/undocked/inner_map.c" } - // EBPF_OP_MOV64_IMM pc=28 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=26 dst=r1 src=r0 offset=0 imm=0 #line 73 "sample/undocked/inner_map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXW pc=29 dst=r10 src=r1 offset=-16 imm=0 + // EBPF_OP_STXW pc=27 dst=r10 src=r1 offset=-16 imm=0 #line 74 "sample/undocked/inner_map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=30 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=28 dst=r2 src=r10 offset=0 imm=0 #line 74 "sample/undocked/inner_map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=31 dst=r2 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=29 dst=r2 src=r0 offset=0 imm=-16 #line 74 "sample/undocked/inner_map.c" r2 += IMMEDIATE(-16); - // EBPF_OP_MOV64_REG pc=32 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=30 dst=r1 src=r6 offset=0 imm=0 #line 75 "sample/undocked/inner_map.c" r1 = r6; - // EBPF_OP_CALL pc=33 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=31 dst=r0 src=r0 offset=0 imm=1 #line 75 "sample/undocked/inner_map.c" r0 = lookup_update_helpers[0].address(r1, r2, r3, r4, r5, context); #line 75 "sample/undocked/inner_map.c" @@ -415,23 +407,29 @@ lookup_update(void* context) return 0; #line 75 "sample/undocked/inner_map.c" } - // EBPF_OP_JEQ_IMM pc=34 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_JEQ_IMM pc=32 dst=r0 src=r0 offset=3 imm=0 #line 76 "sample/undocked/inner_map.c" if (r0 == IMMEDIATE(0)) { #line 76 "sample/undocked/inner_map.c" - goto label_4; + goto label_2; #line 76 "sample/undocked/inner_map.c" } - // EBPF_OP_JA pc=35 dst=r0 src=r0 offset=-20 imm=0 -#line 76 "sample/undocked/inner_map.c" - goto label_1; -label_4: - // EBPF_OP_MOV64_IMM pc=36 dst=r0 src=r0 offset=0 imm=1 -#line 76 "sample/undocked/inner_map.c" - r0 = IMMEDIATE(1); - // EBPF_OP_JA pc=37 dst=r0 src=r0 offset=-19 imm=0 + // EBPF_OP_MOV64_IMM pc=33 dst=r1 src=r0 offset=0 imm=1 #line 76 "sample/undocked/inner_map.c" - goto label_2; + r1 = IMMEDIATE(1); + // EBPF_OP_STXW pc=34 dst=r0 src=r1 offset=0 imm=0 +#line 78 "sample/undocked/inner_map.c" + *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=35 dst=r7 src=r0 offset=0 imm=0 +#line 78 "sample/undocked/inner_map.c" + r7 = IMMEDIATE(0); +label_2: + // EBPF_OP_MOV64_REG pc=36 dst=r0 src=r7 offset=0 imm=0 +#line 84 "sample/undocked/inner_map.c" + r0 = r7; + // EBPF_OP_EXIT pc=37 dst=r0 src=r0 offset=0 imm=0 +#line 84 "sample/undocked/inner_map.c" + return r0; #line 52 "sample/undocked/inner_map.c" } #pragma code_seg(pop) @@ -467,7 +465,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_dll.c b/tests/bpf2c_tests/expected/map_dll.c index ad30319da5..cd049de8d6 100644 --- a/tests/bpf2c_tests/expected/map_dll.c +++ b/tests/bpf2c_tests/expected/map_dll.c @@ -5459,11 +5459,11 @@ test_maps(void* context) // EBPF_OP_RSH64_IMM pc=1712 dst=r1 src=r0 offset=0 imm=32 #line 264 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=1713 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JEQ_IMM pc=1713 dst=r1 src=r0 offset=27 imm=0 #line 264 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 264 "sample/undocked/map.c" - goto label_109; + goto label_110; #line 264 "sample/undocked/map.c" } // EBPF_OP_MOV64_IMM pc=1714 dst=r1 src=r0 offset=0 imm=100 @@ -5520,88 +5520,101 @@ test_maps(void* context) // EBPF_OP_MOV64_IMM pc=1737 dst=r2 src=r0 offset=0 imm=50 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(50); - // EBPF_OP_JA pc=1738 dst=r0 src=r0 offset=60 imm=0 -#line 264 "sample/undocked/map.c" - goto label_112; label_109: - // EBPF_OP_LDXW pc=1739 dst=r3 src=r10 offset=-4 imm=0 + // EBPF_OP_MOV64_IMM pc=1738 dst=r3 src=r0 offset=0 imm=0 +#line 264 "sample/undocked/map.c" + r3 = IMMEDIATE(0); + // EBPF_OP_CALL pc=1739 dst=r0 src=r0 offset=0 imm=14 +#line 264 "sample/undocked/map.c" + r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); +#line 264 "sample/undocked/map.c" + if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { +#line 264 "sample/undocked/map.c" + return 0; +#line 264 "sample/undocked/map.c" + } + // EBPF_OP_JA pc=1740 dst=r0 src=r0 offset=-429 imm=0 +#line 264 "sample/undocked/map.c" + goto label_84; +label_110: + // EBPF_OP_LDXW pc=1741 dst=r3 src=r10 offset=-4 imm=0 #line 264 "sample/undocked/map.c" r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)); - // EBPF_OP_JEQ_IMM pc=1740 dst=r3 src=r0 offset=22 imm=1 + // EBPF_OP_JEQ_IMM pc=1742 dst=r3 src=r0 offset=22 imm=1 #line 264 "sample/undocked/map.c" if (r3 == IMMEDIATE(1)) { #line 264 "sample/undocked/map.c" - goto label_110; + goto label_111; #line 264 "sample/undocked/map.c" } - // EBPF_OP_MOV64_IMM pc=1741 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1743 dst=r1 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXB pc=1742 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXB pc=1744 dst=r10 src=r1 offset=-72 imm=0 #line 264 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint8_t)r1; - // EBPF_OP_LDDW pc=1743 dst=r1 src=r0 offset=0 imm=1852404835 + // EBPF_OP_LDDW pc=1745 dst=r1 src=r0 offset=0 imm=1852404835 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7216209606537213027; - // EBPF_OP_STXDW pc=1745 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=1747 dst=r10 src=r1 offset=-80 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1746 dst=r1 src=r0 offset=0 imm=543434016 + // EBPF_OP_LDDW pc=1748 dst=r1 src=r0 offset=0 imm=543434016 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7309474570952779040; - // EBPF_OP_STXDW pc=1748 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=1750 dst=r10 src=r1 offset=-88 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1749 dst=r1 src=r0 offset=0 imm=1701978221 + // EBPF_OP_LDDW pc=1751 dst=r1 src=r0 offset=0 imm=1701978221 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7958552634295722093; - // EBPF_OP_STXDW pc=1751 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=1753 dst=r10 src=r1 offset=-96 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1752 dst=r1 src=r0 offset=0 imm=1801807216 + // EBPF_OP_LDDW pc=1754 dst=r1 src=r0 offset=0 imm=1801807216 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7308327755813578096; - // EBPF_OP_STXDW pc=1754 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=1756 dst=r10 src=r1 offset=-104 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1755 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=1757 dst=r1 src=r0 offset=0 imm=1600548962 #line 264 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=1757 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=1759 dst=r10 src=r1 offset=-112 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=1758 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1760 dst=r1 src=r10 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=1759 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=1761 dst=r1 src=r0 offset=0 imm=-112 #line 264 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=1760 dst=r2 src=r0 offset=0 imm=41 + // EBPF_OP_MOV64_IMM pc=1762 dst=r2 src=r0 offset=0 imm=41 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(41); - // EBPF_OP_MOV64_IMM pc=1761 dst=r4 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=1763 dst=r4 src=r0 offset=0 imm=1 #line 264 "sample/undocked/map.c" r4 = IMMEDIATE(1); - // EBPF_OP_JA pc=1762 dst=r0 src=r0 offset=-454 imm=0 + // EBPF_OP_JA pc=1764 dst=r0 src=r0 offset=-456 imm=0 #line 264 "sample/undocked/map.c" goto label_83; -label_110: - // EBPF_OP_MOV64_IMM pc=1763 dst=r7 src=r0 offset=0 imm=0 +label_111: + // EBPF_OP_MOV64_IMM pc=1765 dst=r7 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=1764 dst=r10 src=r7 offset=-4 imm=0 + // EBPF_OP_STXW pc=1766 dst=r10 src=r7 offset=-4 imm=0 #line 272 "sample/undocked/map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r7; - // EBPF_OP_MOV64_REG pc=1765 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1767 dst=r2 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=1766 dst=r2 src=r0 offset=0 imm=-4 + // EBPF_OP_ADD64_IMM pc=1768 dst=r2 src=r0 offset=0 imm=-4 #line 272 "sample/undocked/map.c" r2 += IMMEDIATE(-4); - // EBPF_OP_LDDW pc=1767 dst=r1 src=r1 offset=0 imm=7 + // EBPF_OP_LDDW pc=1769 dst=r1 src=r1 offset=0 imm=7 #line 272 "sample/undocked/map.c" r1 = POINTER(_maps[6].address); - // EBPF_OP_CALL pc=1769 dst=r0 src=r0 offset=0 imm=17 + // EBPF_OP_CALL pc=1771 dst=r0 src=r0 offset=0 imm=17 #line 272 "sample/undocked/map.c" r0 = test_maps_helpers[8].address(r1, r2, r3, r4, r5, context); #line 272 "sample/undocked/map.c" @@ -5610,96 +5623,83 @@ test_maps(void* context) return 0; #line 272 "sample/undocked/map.c" } - // EBPF_OP_MOV64_REG pc=1770 dst=r6 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1772 dst=r6 src=r0 offset=0 imm=0 #line 272 "sample/undocked/map.c" r6 = r0; - // EBPF_OP_MOV64_REG pc=1771 dst=r4 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1773 dst=r4 src=r6 offset=0 imm=0 #line 272 "sample/undocked/map.c" r4 = r6; - // EBPF_OP_LSH64_IMM pc=1772 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=1774 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=1773 dst=r1 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1775 dst=r1 src=r4 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r4; - // EBPF_OP_RSH64_IMM pc=1774 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=1776 dst=r1 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=1775 dst=r1 src=r0 offset=26 imm=0 + // EBPF_OP_JEQ_IMM pc=1777 dst=r1 src=r0 offset=24 imm=0 #line 272 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 272 "sample/undocked/map.c" goto label_113; #line 272 "sample/undocked/map.c" } -label_111: - // EBPF_OP_LDDW pc=1776 dst=r1 src=r0 offset=0 imm=1701737077 +label_112: + // EBPF_OP_LDDW pc=1778 dst=r1 src=r0 offset=0 imm=1701737077 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7216209593501643381; - // EBPF_OP_STXDW pc=1778 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXDW pc=1780 dst=r10 src=r1 offset=-72 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1779 dst=r1 src=r0 offset=0 imm=1680154740 + // EBPF_OP_LDDW pc=1781 dst=r1 src=r0 offset=0 imm=1680154740 #line 272 "sample/undocked/map.c" r1 = (uint64_t)8387235364492091508; - // EBPF_OP_STXDW pc=1781 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=1783 dst=r10 src=r1 offset=-80 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1782 dst=r1 src=r0 offset=0 imm=1914726254 + // EBPF_OP_LDDW pc=1784 dst=r1 src=r0 offset=0 imm=1914726254 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7815279607914981230; - // EBPF_OP_STXDW pc=1784 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=1786 dst=r10 src=r1 offset=-88 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1785 dst=r1 src=r0 offset=0 imm=1886938400 + // EBPF_OP_LDDW pc=1787 dst=r1 src=r0 offset=0 imm=1886938400 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7598807758610654496; - // EBPF_OP_STXDW pc=1787 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=1789 dst=r10 src=r1 offset=-96 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1788 dst=r1 src=r0 offset=0 imm=1601204080 + // EBPF_OP_LDDW pc=1790 dst=r1 src=r0 offset=0 imm=1601204080 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7882825905430622064; - // EBPF_OP_STXDW pc=1790 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=1792 dst=r10 src=r1 offset=-104 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1791 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=1793 dst=r1 src=r0 offset=0 imm=1600548962 #line 272 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=1793 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=1795 dst=r10 src=r1 offset=-112 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_STXB pc=1794 dst=r10 src=r7 offset=-64 imm=0 + // EBPF_OP_STXB pc=1796 dst=r10 src=r7 offset=-64 imm=0 #line 272 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint8_t)r7; - // EBPF_OP_ARSH64_IMM pc=1795 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_ARSH64_IMM pc=1797 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 = (int64_t)r4 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=1796 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1798 dst=r1 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=1797 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=1799 dst=r1 src=r0 offset=0 imm=-112 #line 272 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=1798 dst=r2 src=r0 offset=0 imm=49 + // EBPF_OP_MOV64_IMM pc=1800 dst=r2 src=r0 offset=0 imm=49 #line 272 "sample/undocked/map.c" r2 = IMMEDIATE(49); -label_112: - // EBPF_OP_MOV64_IMM pc=1799 dst=r3 src=r0 offset=0 imm=0 -#line 272 "sample/undocked/map.c" - r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=1800 dst=r0 src=r0 offset=0 imm=14 -#line 272 "sample/undocked/map.c" - r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); -#line 272 "sample/undocked/map.c" - if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { -#line 272 "sample/undocked/map.c" - return 0; -#line 272 "sample/undocked/map.c" - } - // EBPF_OP_JA pc=1801 dst=r0 src=r0 offset=-490 imm=0 + // EBPF_OP_JA pc=1801 dst=r0 src=r0 offset=-64 imm=0 #line 272 "sample/undocked/map.c" - goto label_84; + goto label_109; label_113: // EBPF_OP_LDXW pc=1802 dst=r3 src=r10 offset=-4 imm=0 #line 272 "sample/undocked/map.c" @@ -5800,9 +5800,9 @@ test_maps(void* context) goto label_115; #line 273 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1836 dst=r0 src=r0 offset=-61 imm=0 + // EBPF_OP_JA pc=1836 dst=r0 src=r0 offset=-59 imm=0 #line 273 "sample/undocked/map.c" - goto label_111; + goto label_112; label_115: // EBPF_OP_LDXW pc=1837 dst=r3 src=r10 offset=-4 imm=0 #line 273 "sample/undocked/map.c" @@ -5903,9 +5903,9 @@ test_maps(void* context) goto label_117; #line 274 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1871 dst=r0 src=r0 offset=-96 imm=0 + // EBPF_OP_JA pc=1871 dst=r0 src=r0 offset=-94 imm=0 #line 274 "sample/undocked/map.c" - goto label_111; + goto label_112; label_117: // EBPF_OP_LDXW pc=1872 dst=r3 src=r10 offset=-4 imm=0 #line 274 "sample/undocked/map.c" @@ -6006,9 +6006,9 @@ test_maps(void* context) goto label_119; #line 275 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1906 dst=r0 src=r0 offset=-131 imm=0 + // EBPF_OP_JA pc=1906 dst=r0 src=r0 offset=-129 imm=0 #line 275 "sample/undocked/map.c" - goto label_111; + goto label_112; label_119: // EBPF_OP_LDXW pc=1907 dst=r3 src=r10 offset=-4 imm=0 #line 275 "sample/undocked/map.c" @@ -6109,9 +6109,9 @@ test_maps(void* context) goto label_121; #line 276 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1941 dst=r0 src=r0 offset=-166 imm=0 + // EBPF_OP_JA pc=1941 dst=r0 src=r0 offset=-164 imm=0 #line 276 "sample/undocked/map.c" - goto label_111; + goto label_112; label_121: // EBPF_OP_LDXW pc=1942 dst=r3 src=r10 offset=-4 imm=0 #line 276 "sample/undocked/map.c" @@ -6212,9 +6212,9 @@ test_maps(void* context) goto label_123; #line 277 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1976 dst=r0 src=r0 offset=-201 imm=0 + // EBPF_OP_JA pc=1976 dst=r0 src=r0 offset=-199 imm=0 #line 277 "sample/undocked/map.c" - goto label_111; + goto label_112; label_123: // EBPF_OP_LDXW pc=1977 dst=r3 src=r10 offset=-4 imm=0 #line 277 "sample/undocked/map.c" @@ -6315,9 +6315,9 @@ test_maps(void* context) goto label_125; #line 278 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2011 dst=r0 src=r0 offset=-236 imm=0 + // EBPF_OP_JA pc=2011 dst=r0 src=r0 offset=-234 imm=0 #line 278 "sample/undocked/map.c" - goto label_111; + goto label_112; label_125: // EBPF_OP_LDXW pc=2012 dst=r3 src=r10 offset=-4 imm=0 #line 278 "sample/undocked/map.c" @@ -6418,9 +6418,9 @@ test_maps(void* context) goto label_127; #line 279 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2046 dst=r0 src=r0 offset=-271 imm=0 + // EBPF_OP_JA pc=2046 dst=r0 src=r0 offset=-269 imm=0 #line 279 "sample/undocked/map.c" - goto label_111; + goto label_112; label_127: // EBPF_OP_LDXW pc=2047 dst=r3 src=r10 offset=-4 imm=0 #line 279 "sample/undocked/map.c" @@ -6521,9 +6521,9 @@ test_maps(void* context) goto label_129; #line 280 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2081 dst=r0 src=r0 offset=-306 imm=0 + // EBPF_OP_JA pc=2081 dst=r0 src=r0 offset=-304 imm=0 #line 280 "sample/undocked/map.c" - goto label_111; + goto label_112; label_129: // EBPF_OP_LDXW pc=2082 dst=r3 src=r10 offset=-4 imm=0 #line 280 "sample/undocked/map.c" @@ -6624,9 +6624,9 @@ test_maps(void* context) goto label_131; #line 281 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2116 dst=r0 src=r0 offset=-341 imm=0 + // EBPF_OP_JA pc=2116 dst=r0 src=r0 offset=-339 imm=0 #line 281 "sample/undocked/map.c" - goto label_111; + goto label_112; label_131: // EBPF_OP_LDXW pc=2117 dst=r3 src=r10 offset=-4 imm=0 #line 281 "sample/undocked/map.c" @@ -8001,11 +8001,11 @@ test_maps(void* context) // EBPF_OP_RSH64_IMM pc=2563 dst=r1 src=r0 offset=0 imm=32 #line 264 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=2564 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JEQ_IMM pc=2564 dst=r1 src=r0 offset=27 imm=0 #line 264 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 264 "sample/undocked/map.c" - goto label_161; + goto label_162; #line 264 "sample/undocked/map.c" } // EBPF_OP_MOV64_IMM pc=2565 dst=r1 src=r0 offset=0 imm=100 @@ -8062,88 +8062,101 @@ test_maps(void* context) // EBPF_OP_MOV64_IMM pc=2588 dst=r2 src=r0 offset=0 imm=50 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(50); - // EBPF_OP_JA pc=2589 dst=r0 src=r0 offset=60 imm=0 -#line 264 "sample/undocked/map.c" - goto label_164; label_161: - // EBPF_OP_LDXW pc=2590 dst=r3 src=r10 offset=-4 imm=0 + // EBPF_OP_MOV64_IMM pc=2589 dst=r3 src=r0 offset=0 imm=0 +#line 264 "sample/undocked/map.c" + r3 = IMMEDIATE(0); + // EBPF_OP_CALL pc=2590 dst=r0 src=r0 offset=0 imm=14 +#line 264 "sample/undocked/map.c" + r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); +#line 264 "sample/undocked/map.c" + if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { +#line 264 "sample/undocked/map.c" + return 0; +#line 264 "sample/undocked/map.c" + } + // EBPF_OP_JA pc=2591 dst=r0 src=r0 offset=-390 imm=0 +#line 264 "sample/undocked/map.c" + goto label_140; +label_162: + // EBPF_OP_LDXW pc=2592 dst=r3 src=r10 offset=-4 imm=0 #line 264 "sample/undocked/map.c" r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)); - // EBPF_OP_JEQ_IMM pc=2591 dst=r3 src=r0 offset=22 imm=10 + // EBPF_OP_JEQ_IMM pc=2593 dst=r3 src=r0 offset=22 imm=10 #line 264 "sample/undocked/map.c" if (r3 == IMMEDIATE(10)) { #line 264 "sample/undocked/map.c" - goto label_162; + goto label_163; #line 264 "sample/undocked/map.c" } - // EBPF_OP_MOV64_IMM pc=2592 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=2594 dst=r1 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXB pc=2593 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXB pc=2595 dst=r10 src=r1 offset=-72 imm=0 #line 264 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint8_t)r1; - // EBPF_OP_LDDW pc=2594 dst=r1 src=r0 offset=0 imm=1852404835 + // EBPF_OP_LDDW pc=2596 dst=r1 src=r0 offset=0 imm=1852404835 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7216209606537213027; - // EBPF_OP_STXDW pc=2596 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=2598 dst=r10 src=r1 offset=-80 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2597 dst=r1 src=r0 offset=0 imm=543434016 + // EBPF_OP_LDDW pc=2599 dst=r1 src=r0 offset=0 imm=543434016 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7309474570952779040; - // EBPF_OP_STXDW pc=2599 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=2601 dst=r10 src=r1 offset=-88 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2600 dst=r1 src=r0 offset=0 imm=1701978221 + // EBPF_OP_LDDW pc=2602 dst=r1 src=r0 offset=0 imm=1701978221 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7958552634295722093; - // EBPF_OP_STXDW pc=2602 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=2604 dst=r10 src=r1 offset=-96 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2603 dst=r1 src=r0 offset=0 imm=1801807216 + // EBPF_OP_LDDW pc=2605 dst=r1 src=r0 offset=0 imm=1801807216 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7308327755813578096; - // EBPF_OP_STXDW pc=2605 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=2607 dst=r10 src=r1 offset=-104 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2606 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=2608 dst=r1 src=r0 offset=0 imm=1600548962 #line 264 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=2608 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=2610 dst=r10 src=r1 offset=-112 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=2609 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2611 dst=r1 src=r10 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=2610 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=2612 dst=r1 src=r0 offset=0 imm=-112 #line 264 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=2611 dst=r2 src=r0 offset=0 imm=41 + // EBPF_OP_MOV64_IMM pc=2613 dst=r2 src=r0 offset=0 imm=41 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(41); - // EBPF_OP_MOV64_IMM pc=2612 dst=r4 src=r0 offset=0 imm=10 + // EBPF_OP_MOV64_IMM pc=2614 dst=r4 src=r0 offset=0 imm=10 #line 264 "sample/undocked/map.c" r4 = IMMEDIATE(10); - // EBPF_OP_JA pc=2613 dst=r0 src=r0 offset=-415 imm=0 + // EBPF_OP_JA pc=2615 dst=r0 src=r0 offset=-417 imm=0 #line 264 "sample/undocked/map.c" goto label_139; -label_162: - // EBPF_OP_MOV64_IMM pc=2614 dst=r6 src=r0 offset=0 imm=0 +label_163: + // EBPF_OP_MOV64_IMM pc=2616 dst=r6 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r6 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2615 dst=r10 src=r6 offset=-4 imm=0 + // EBPF_OP_STXW pc=2617 dst=r10 src=r6 offset=-4 imm=0 #line 272 "sample/undocked/map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r6; - // EBPF_OP_MOV64_REG pc=2616 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2618 dst=r2 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=2617 dst=r2 src=r0 offset=0 imm=-4 + // EBPF_OP_ADD64_IMM pc=2619 dst=r2 src=r0 offset=0 imm=-4 #line 272 "sample/undocked/map.c" r2 += IMMEDIATE(-4); - // EBPF_OP_LDDW pc=2618 dst=r1 src=r1 offset=0 imm=8 + // EBPF_OP_LDDW pc=2620 dst=r1 src=r1 offset=0 imm=8 #line 272 "sample/undocked/map.c" r1 = POINTER(_maps[7].address); - // EBPF_OP_CALL pc=2620 dst=r0 src=r0 offset=0 imm=17 + // EBPF_OP_CALL pc=2622 dst=r0 src=r0 offset=0 imm=17 #line 272 "sample/undocked/map.c" r0 = test_maps_helpers[8].address(r1, r2, r3, r4, r5, context); #line 272 "sample/undocked/map.c" @@ -8152,96 +8165,83 @@ test_maps(void* context) return 0; #line 272 "sample/undocked/map.c" } - // EBPF_OP_MOV64_REG pc=2621 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2623 dst=r7 src=r0 offset=0 imm=0 #line 272 "sample/undocked/map.c" r7 = r0; - // EBPF_OP_MOV64_REG pc=2622 dst=r4 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2624 dst=r4 src=r7 offset=0 imm=0 #line 272 "sample/undocked/map.c" r4 = r7; - // EBPF_OP_LSH64_IMM pc=2623 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=2625 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=2624 dst=r1 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2626 dst=r1 src=r4 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r4; - // EBPF_OP_RSH64_IMM pc=2625 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=2627 dst=r1 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=2626 dst=r1 src=r0 offset=26 imm=0 + // EBPF_OP_JEQ_IMM pc=2628 dst=r1 src=r0 offset=24 imm=0 #line 272 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 272 "sample/undocked/map.c" goto label_165; #line 272 "sample/undocked/map.c" } -label_163: - // EBPF_OP_LDDW pc=2627 dst=r1 src=r0 offset=0 imm=1701737077 +label_164: + // EBPF_OP_LDDW pc=2629 dst=r1 src=r0 offset=0 imm=1701737077 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7216209593501643381; - // EBPF_OP_STXDW pc=2629 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXDW pc=2631 dst=r10 src=r1 offset=-72 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2630 dst=r1 src=r0 offset=0 imm=1680154740 + // EBPF_OP_LDDW pc=2632 dst=r1 src=r0 offset=0 imm=1680154740 #line 272 "sample/undocked/map.c" r1 = (uint64_t)8387235364492091508; - // EBPF_OP_STXDW pc=2632 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=2634 dst=r10 src=r1 offset=-80 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2633 dst=r1 src=r0 offset=0 imm=1914726254 + // EBPF_OP_LDDW pc=2635 dst=r1 src=r0 offset=0 imm=1914726254 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7815279607914981230; - // EBPF_OP_STXDW pc=2635 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=2637 dst=r10 src=r1 offset=-88 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2636 dst=r1 src=r0 offset=0 imm=1886938400 + // EBPF_OP_LDDW pc=2638 dst=r1 src=r0 offset=0 imm=1886938400 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7598807758610654496; - // EBPF_OP_STXDW pc=2638 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=2640 dst=r10 src=r1 offset=-96 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2639 dst=r1 src=r0 offset=0 imm=1601204080 + // EBPF_OP_LDDW pc=2641 dst=r1 src=r0 offset=0 imm=1601204080 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7882825905430622064; - // EBPF_OP_STXDW pc=2641 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=2643 dst=r10 src=r1 offset=-104 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2642 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=2644 dst=r1 src=r0 offset=0 imm=1600548962 #line 272 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=2644 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=2646 dst=r10 src=r1 offset=-112 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_STXB pc=2645 dst=r10 src=r6 offset=-64 imm=0 + // EBPF_OP_STXB pc=2647 dst=r10 src=r6 offset=-64 imm=0 #line 272 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint8_t)r6; - // EBPF_OP_ARSH64_IMM pc=2646 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_ARSH64_IMM pc=2648 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 = (int64_t)r4 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=2647 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2649 dst=r1 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=2648 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=2650 dst=r1 src=r0 offset=0 imm=-112 #line 272 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=2649 dst=r2 src=r0 offset=0 imm=49 + // EBPF_OP_MOV64_IMM pc=2651 dst=r2 src=r0 offset=0 imm=49 #line 272 "sample/undocked/map.c" r2 = IMMEDIATE(49); -label_164: - // EBPF_OP_MOV64_IMM pc=2650 dst=r3 src=r0 offset=0 imm=0 -#line 272 "sample/undocked/map.c" - r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=2651 dst=r0 src=r0 offset=0 imm=14 -#line 272 "sample/undocked/map.c" - r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); -#line 272 "sample/undocked/map.c" - if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { -#line 272 "sample/undocked/map.c" - return 0; -#line 272 "sample/undocked/map.c" - } - // EBPF_OP_JA pc=2652 dst=r0 src=r0 offset=-451 imm=0 + // EBPF_OP_JA pc=2652 dst=r0 src=r0 offset=-64 imm=0 #line 272 "sample/undocked/map.c" - goto label_140; + goto label_161; label_165: // EBPF_OP_LDXW pc=2653 dst=r3 src=r10 offset=-4 imm=0 #line 272 "sample/undocked/map.c" @@ -8342,9 +8342,9 @@ test_maps(void* context) goto label_167; #line 273 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2687 dst=r0 src=r0 offset=-61 imm=0 + // EBPF_OP_JA pc=2687 dst=r0 src=r0 offset=-59 imm=0 #line 273 "sample/undocked/map.c" - goto label_163; + goto label_164; label_167: // EBPF_OP_LDXW pc=2688 dst=r3 src=r10 offset=-4 imm=0 #line 273 "sample/undocked/map.c" @@ -8445,9 +8445,9 @@ test_maps(void* context) goto label_169; #line 274 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2722 dst=r0 src=r0 offset=-96 imm=0 + // EBPF_OP_JA pc=2722 dst=r0 src=r0 offset=-94 imm=0 #line 274 "sample/undocked/map.c" - goto label_163; + goto label_164; label_169: // EBPF_OP_LDXW pc=2723 dst=r3 src=r10 offset=-4 imm=0 #line 274 "sample/undocked/map.c" @@ -8548,9 +8548,9 @@ test_maps(void* context) goto label_171; #line 275 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2757 dst=r0 src=r0 offset=-131 imm=0 + // EBPF_OP_JA pc=2757 dst=r0 src=r0 offset=-129 imm=0 #line 275 "sample/undocked/map.c" - goto label_163; + goto label_164; label_171: // EBPF_OP_LDXW pc=2758 dst=r3 src=r10 offset=-4 imm=0 #line 275 "sample/undocked/map.c" @@ -8651,9 +8651,9 @@ test_maps(void* context) goto label_173; #line 276 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2792 dst=r0 src=r0 offset=-166 imm=0 + // EBPF_OP_JA pc=2792 dst=r0 src=r0 offset=-164 imm=0 #line 276 "sample/undocked/map.c" - goto label_163; + goto label_164; label_173: // EBPF_OP_LDXW pc=2793 dst=r3 src=r10 offset=-4 imm=0 #line 276 "sample/undocked/map.c" @@ -8754,9 +8754,9 @@ test_maps(void* context) goto label_175; #line 277 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2827 dst=r0 src=r0 offset=-201 imm=0 + // EBPF_OP_JA pc=2827 dst=r0 src=r0 offset=-199 imm=0 #line 277 "sample/undocked/map.c" - goto label_163; + goto label_164; label_175: // EBPF_OP_LDXW pc=2828 dst=r3 src=r10 offset=-4 imm=0 #line 277 "sample/undocked/map.c" @@ -8857,9 +8857,9 @@ test_maps(void* context) goto label_177; #line 278 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2862 dst=r0 src=r0 offset=-236 imm=0 + // EBPF_OP_JA pc=2862 dst=r0 src=r0 offset=-234 imm=0 #line 278 "sample/undocked/map.c" - goto label_163; + goto label_164; label_177: // EBPF_OP_LDXW pc=2863 dst=r3 src=r10 offset=-4 imm=0 #line 278 "sample/undocked/map.c" @@ -8960,9 +8960,9 @@ test_maps(void* context) goto label_179; #line 279 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2897 dst=r0 src=r0 offset=-271 imm=0 + // EBPF_OP_JA pc=2897 dst=r0 src=r0 offset=-269 imm=0 #line 279 "sample/undocked/map.c" - goto label_163; + goto label_164; label_179: // EBPF_OP_LDXW pc=2898 dst=r3 src=r10 offset=-4 imm=0 #line 279 "sample/undocked/map.c" @@ -9063,9 +9063,9 @@ test_maps(void* context) goto label_181; #line 280 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2932 dst=r0 src=r0 offset=-306 imm=0 + // EBPF_OP_JA pc=2932 dst=r0 src=r0 offset=-304 imm=0 #line 280 "sample/undocked/map.c" - goto label_163; + goto label_164; label_181: // EBPF_OP_LDXW pc=2933 dst=r3 src=r10 offset=-4 imm=0 #line 280 "sample/undocked/map.c" @@ -9166,9 +9166,9 @@ test_maps(void* context) goto label_183; #line 281 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2967 dst=r0 src=r0 offset=-341 imm=0 + // EBPF_OP_JA pc=2967 dst=r0 src=r0 offset=-339 imm=0 #line 281 "sample/undocked/map.c" - goto label_163; + goto label_164; label_183: // EBPF_OP_LDXW pc=2968 dst=r3 src=r10 offset=-4 imm=0 #line 281 "sample/undocked/map.c" @@ -9391,7 +9391,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_btf_dll.c b/tests/bpf2c_tests/expected/map_in_map_btf_dll.c index f484e1215d..e027b46ae6 100644 --- a/tests/bpf2c_tests/expected/map_in_map_btf_dll.c +++ b/tests/bpf2c_tests/expected/map_in_map_btf_dll.c @@ -224,7 +224,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_btf_raw.c b/tests/bpf2c_tests/expected/map_in_map_btf_raw.c index 5efa14add5..544e7f60d6 100644 --- a/tests/bpf2c_tests/expected/map_in_map_btf_raw.c +++ b/tests/bpf2c_tests/expected/map_in_map_btf_raw.c @@ -198,7 +198,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_btf_sys.c b/tests/bpf2c_tests/expected/map_in_map_btf_sys.c index 7c0d0a456f..d763e9827c 100644 --- a/tests/bpf2c_tests/expected/map_in_map_btf_sys.c +++ b/tests/bpf2c_tests/expected/map_in_map_btf_sys.c @@ -359,7 +359,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_legacy_id_dll.c b/tests/bpf2c_tests/expected/map_in_map_legacy_id_dll.c index 4b9ee3bc60..251b15e691 100644 --- a/tests/bpf2c_tests/expected/map_in_map_legacy_id_dll.c +++ b/tests/bpf2c_tests/expected/map_in_map_legacy_id_dll.c @@ -224,7 +224,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_legacy_id_raw.c b/tests/bpf2c_tests/expected/map_in_map_legacy_id_raw.c index 1b1e8b2a81..af8a153daf 100644 --- a/tests/bpf2c_tests/expected/map_in_map_legacy_id_raw.c +++ b/tests/bpf2c_tests/expected/map_in_map_legacy_id_raw.c @@ -198,7 +198,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_legacy_id_sys.c b/tests/bpf2c_tests/expected/map_in_map_legacy_id_sys.c index 0b95fa1f7f..8d2d005d6c 100644 --- a/tests/bpf2c_tests/expected/map_in_map_legacy_id_sys.c +++ b/tests/bpf2c_tests/expected/map_in_map_legacy_id_sys.c @@ -359,7 +359,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_legacy_idx_dll.c b/tests/bpf2c_tests/expected/map_in_map_legacy_idx_dll.c index 198428f278..b7c5fa509e 100644 --- a/tests/bpf2c_tests/expected/map_in_map_legacy_idx_dll.c +++ b/tests/bpf2c_tests/expected/map_in_map_legacy_idx_dll.c @@ -224,7 +224,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_legacy_idx_raw.c b/tests/bpf2c_tests/expected/map_in_map_legacy_idx_raw.c index e239efce53..e747bd5710 100644 --- a/tests/bpf2c_tests/expected/map_in_map_legacy_idx_raw.c +++ b/tests/bpf2c_tests/expected/map_in_map_legacy_idx_raw.c @@ -198,7 +198,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_in_map_legacy_idx_sys.c b/tests/bpf2c_tests/expected/map_in_map_legacy_idx_sys.c index 6799a8db4a..c9c029a3c8 100644 --- a/tests/bpf2c_tests/expected/map_in_map_legacy_idx_sys.c +++ b/tests/bpf2c_tests/expected/map_in_map_legacy_idx_sys.c @@ -359,7 +359,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_raw.c b/tests/bpf2c_tests/expected/map_raw.c index 37e780b591..9811005537 100644 --- a/tests/bpf2c_tests/expected/map_raw.c +++ b/tests/bpf2c_tests/expected/map_raw.c @@ -5433,11 +5433,11 @@ test_maps(void* context) // EBPF_OP_RSH64_IMM pc=1712 dst=r1 src=r0 offset=0 imm=32 #line 264 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=1713 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JEQ_IMM pc=1713 dst=r1 src=r0 offset=27 imm=0 #line 264 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 264 "sample/undocked/map.c" - goto label_109; + goto label_110; #line 264 "sample/undocked/map.c" } // EBPF_OP_MOV64_IMM pc=1714 dst=r1 src=r0 offset=0 imm=100 @@ -5494,88 +5494,101 @@ test_maps(void* context) // EBPF_OP_MOV64_IMM pc=1737 dst=r2 src=r0 offset=0 imm=50 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(50); - // EBPF_OP_JA pc=1738 dst=r0 src=r0 offset=60 imm=0 -#line 264 "sample/undocked/map.c" - goto label_112; label_109: - // EBPF_OP_LDXW pc=1739 dst=r3 src=r10 offset=-4 imm=0 + // EBPF_OP_MOV64_IMM pc=1738 dst=r3 src=r0 offset=0 imm=0 +#line 264 "sample/undocked/map.c" + r3 = IMMEDIATE(0); + // EBPF_OP_CALL pc=1739 dst=r0 src=r0 offset=0 imm=14 +#line 264 "sample/undocked/map.c" + r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); +#line 264 "sample/undocked/map.c" + if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { +#line 264 "sample/undocked/map.c" + return 0; +#line 264 "sample/undocked/map.c" + } + // EBPF_OP_JA pc=1740 dst=r0 src=r0 offset=-429 imm=0 +#line 264 "sample/undocked/map.c" + goto label_84; +label_110: + // EBPF_OP_LDXW pc=1741 dst=r3 src=r10 offset=-4 imm=0 #line 264 "sample/undocked/map.c" r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)); - // EBPF_OP_JEQ_IMM pc=1740 dst=r3 src=r0 offset=22 imm=1 + // EBPF_OP_JEQ_IMM pc=1742 dst=r3 src=r0 offset=22 imm=1 #line 264 "sample/undocked/map.c" if (r3 == IMMEDIATE(1)) { #line 264 "sample/undocked/map.c" - goto label_110; + goto label_111; #line 264 "sample/undocked/map.c" } - // EBPF_OP_MOV64_IMM pc=1741 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1743 dst=r1 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXB pc=1742 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXB pc=1744 dst=r10 src=r1 offset=-72 imm=0 #line 264 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint8_t)r1; - // EBPF_OP_LDDW pc=1743 dst=r1 src=r0 offset=0 imm=1852404835 + // EBPF_OP_LDDW pc=1745 dst=r1 src=r0 offset=0 imm=1852404835 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7216209606537213027; - // EBPF_OP_STXDW pc=1745 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=1747 dst=r10 src=r1 offset=-80 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1746 dst=r1 src=r0 offset=0 imm=543434016 + // EBPF_OP_LDDW pc=1748 dst=r1 src=r0 offset=0 imm=543434016 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7309474570952779040; - // EBPF_OP_STXDW pc=1748 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=1750 dst=r10 src=r1 offset=-88 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1749 dst=r1 src=r0 offset=0 imm=1701978221 + // EBPF_OP_LDDW pc=1751 dst=r1 src=r0 offset=0 imm=1701978221 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7958552634295722093; - // EBPF_OP_STXDW pc=1751 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=1753 dst=r10 src=r1 offset=-96 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1752 dst=r1 src=r0 offset=0 imm=1801807216 + // EBPF_OP_LDDW pc=1754 dst=r1 src=r0 offset=0 imm=1801807216 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7308327755813578096; - // EBPF_OP_STXDW pc=1754 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=1756 dst=r10 src=r1 offset=-104 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1755 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=1757 dst=r1 src=r0 offset=0 imm=1600548962 #line 264 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=1757 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=1759 dst=r10 src=r1 offset=-112 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=1758 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1760 dst=r1 src=r10 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=1759 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=1761 dst=r1 src=r0 offset=0 imm=-112 #line 264 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=1760 dst=r2 src=r0 offset=0 imm=41 + // EBPF_OP_MOV64_IMM pc=1762 dst=r2 src=r0 offset=0 imm=41 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(41); - // EBPF_OP_MOV64_IMM pc=1761 dst=r4 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=1763 dst=r4 src=r0 offset=0 imm=1 #line 264 "sample/undocked/map.c" r4 = IMMEDIATE(1); - // EBPF_OP_JA pc=1762 dst=r0 src=r0 offset=-454 imm=0 + // EBPF_OP_JA pc=1764 dst=r0 src=r0 offset=-456 imm=0 #line 264 "sample/undocked/map.c" goto label_83; -label_110: - // EBPF_OP_MOV64_IMM pc=1763 dst=r7 src=r0 offset=0 imm=0 +label_111: + // EBPF_OP_MOV64_IMM pc=1765 dst=r7 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=1764 dst=r10 src=r7 offset=-4 imm=0 + // EBPF_OP_STXW pc=1766 dst=r10 src=r7 offset=-4 imm=0 #line 272 "sample/undocked/map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r7; - // EBPF_OP_MOV64_REG pc=1765 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1767 dst=r2 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=1766 dst=r2 src=r0 offset=0 imm=-4 + // EBPF_OP_ADD64_IMM pc=1768 dst=r2 src=r0 offset=0 imm=-4 #line 272 "sample/undocked/map.c" r2 += IMMEDIATE(-4); - // EBPF_OP_LDDW pc=1767 dst=r1 src=r1 offset=0 imm=7 + // EBPF_OP_LDDW pc=1769 dst=r1 src=r1 offset=0 imm=7 #line 272 "sample/undocked/map.c" r1 = POINTER(_maps[6].address); - // EBPF_OP_CALL pc=1769 dst=r0 src=r0 offset=0 imm=17 + // EBPF_OP_CALL pc=1771 dst=r0 src=r0 offset=0 imm=17 #line 272 "sample/undocked/map.c" r0 = test_maps_helpers[8].address(r1, r2, r3, r4, r5, context); #line 272 "sample/undocked/map.c" @@ -5584,96 +5597,83 @@ test_maps(void* context) return 0; #line 272 "sample/undocked/map.c" } - // EBPF_OP_MOV64_REG pc=1770 dst=r6 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1772 dst=r6 src=r0 offset=0 imm=0 #line 272 "sample/undocked/map.c" r6 = r0; - // EBPF_OP_MOV64_REG pc=1771 dst=r4 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1773 dst=r4 src=r6 offset=0 imm=0 #line 272 "sample/undocked/map.c" r4 = r6; - // EBPF_OP_LSH64_IMM pc=1772 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=1774 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=1773 dst=r1 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1775 dst=r1 src=r4 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r4; - // EBPF_OP_RSH64_IMM pc=1774 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=1776 dst=r1 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=1775 dst=r1 src=r0 offset=26 imm=0 + // EBPF_OP_JEQ_IMM pc=1777 dst=r1 src=r0 offset=24 imm=0 #line 272 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 272 "sample/undocked/map.c" goto label_113; #line 272 "sample/undocked/map.c" } -label_111: - // EBPF_OP_LDDW pc=1776 dst=r1 src=r0 offset=0 imm=1701737077 +label_112: + // EBPF_OP_LDDW pc=1778 dst=r1 src=r0 offset=0 imm=1701737077 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7216209593501643381; - // EBPF_OP_STXDW pc=1778 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXDW pc=1780 dst=r10 src=r1 offset=-72 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1779 dst=r1 src=r0 offset=0 imm=1680154740 + // EBPF_OP_LDDW pc=1781 dst=r1 src=r0 offset=0 imm=1680154740 #line 272 "sample/undocked/map.c" r1 = (uint64_t)8387235364492091508; - // EBPF_OP_STXDW pc=1781 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=1783 dst=r10 src=r1 offset=-80 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1782 dst=r1 src=r0 offset=0 imm=1914726254 + // EBPF_OP_LDDW pc=1784 dst=r1 src=r0 offset=0 imm=1914726254 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7815279607914981230; - // EBPF_OP_STXDW pc=1784 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=1786 dst=r10 src=r1 offset=-88 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1785 dst=r1 src=r0 offset=0 imm=1886938400 + // EBPF_OP_LDDW pc=1787 dst=r1 src=r0 offset=0 imm=1886938400 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7598807758610654496; - // EBPF_OP_STXDW pc=1787 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=1789 dst=r10 src=r1 offset=-96 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1788 dst=r1 src=r0 offset=0 imm=1601204080 + // EBPF_OP_LDDW pc=1790 dst=r1 src=r0 offset=0 imm=1601204080 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7882825905430622064; - // EBPF_OP_STXDW pc=1790 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=1792 dst=r10 src=r1 offset=-104 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1791 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=1793 dst=r1 src=r0 offset=0 imm=1600548962 #line 272 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=1793 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=1795 dst=r10 src=r1 offset=-112 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_STXB pc=1794 dst=r10 src=r7 offset=-64 imm=0 + // EBPF_OP_STXB pc=1796 dst=r10 src=r7 offset=-64 imm=0 #line 272 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint8_t)r7; - // EBPF_OP_ARSH64_IMM pc=1795 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_ARSH64_IMM pc=1797 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 = (int64_t)r4 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=1796 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1798 dst=r1 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=1797 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=1799 dst=r1 src=r0 offset=0 imm=-112 #line 272 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=1798 dst=r2 src=r0 offset=0 imm=49 + // EBPF_OP_MOV64_IMM pc=1800 dst=r2 src=r0 offset=0 imm=49 #line 272 "sample/undocked/map.c" r2 = IMMEDIATE(49); -label_112: - // EBPF_OP_MOV64_IMM pc=1799 dst=r3 src=r0 offset=0 imm=0 -#line 272 "sample/undocked/map.c" - r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=1800 dst=r0 src=r0 offset=0 imm=14 -#line 272 "sample/undocked/map.c" - r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); -#line 272 "sample/undocked/map.c" - if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { -#line 272 "sample/undocked/map.c" - return 0; -#line 272 "sample/undocked/map.c" - } - // EBPF_OP_JA pc=1801 dst=r0 src=r0 offset=-490 imm=0 + // EBPF_OP_JA pc=1801 dst=r0 src=r0 offset=-64 imm=0 #line 272 "sample/undocked/map.c" - goto label_84; + goto label_109; label_113: // EBPF_OP_LDXW pc=1802 dst=r3 src=r10 offset=-4 imm=0 #line 272 "sample/undocked/map.c" @@ -5774,9 +5774,9 @@ test_maps(void* context) goto label_115; #line 273 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1836 dst=r0 src=r0 offset=-61 imm=0 + // EBPF_OP_JA pc=1836 dst=r0 src=r0 offset=-59 imm=0 #line 273 "sample/undocked/map.c" - goto label_111; + goto label_112; label_115: // EBPF_OP_LDXW pc=1837 dst=r3 src=r10 offset=-4 imm=0 #line 273 "sample/undocked/map.c" @@ -5877,9 +5877,9 @@ test_maps(void* context) goto label_117; #line 274 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1871 dst=r0 src=r0 offset=-96 imm=0 + // EBPF_OP_JA pc=1871 dst=r0 src=r0 offset=-94 imm=0 #line 274 "sample/undocked/map.c" - goto label_111; + goto label_112; label_117: // EBPF_OP_LDXW pc=1872 dst=r3 src=r10 offset=-4 imm=0 #line 274 "sample/undocked/map.c" @@ -5980,9 +5980,9 @@ test_maps(void* context) goto label_119; #line 275 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1906 dst=r0 src=r0 offset=-131 imm=0 + // EBPF_OP_JA pc=1906 dst=r0 src=r0 offset=-129 imm=0 #line 275 "sample/undocked/map.c" - goto label_111; + goto label_112; label_119: // EBPF_OP_LDXW pc=1907 dst=r3 src=r10 offset=-4 imm=0 #line 275 "sample/undocked/map.c" @@ -6083,9 +6083,9 @@ test_maps(void* context) goto label_121; #line 276 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1941 dst=r0 src=r0 offset=-166 imm=0 + // EBPF_OP_JA pc=1941 dst=r0 src=r0 offset=-164 imm=0 #line 276 "sample/undocked/map.c" - goto label_111; + goto label_112; label_121: // EBPF_OP_LDXW pc=1942 dst=r3 src=r10 offset=-4 imm=0 #line 276 "sample/undocked/map.c" @@ -6186,9 +6186,9 @@ test_maps(void* context) goto label_123; #line 277 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1976 dst=r0 src=r0 offset=-201 imm=0 + // EBPF_OP_JA pc=1976 dst=r0 src=r0 offset=-199 imm=0 #line 277 "sample/undocked/map.c" - goto label_111; + goto label_112; label_123: // EBPF_OP_LDXW pc=1977 dst=r3 src=r10 offset=-4 imm=0 #line 277 "sample/undocked/map.c" @@ -6289,9 +6289,9 @@ test_maps(void* context) goto label_125; #line 278 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2011 dst=r0 src=r0 offset=-236 imm=0 + // EBPF_OP_JA pc=2011 dst=r0 src=r0 offset=-234 imm=0 #line 278 "sample/undocked/map.c" - goto label_111; + goto label_112; label_125: // EBPF_OP_LDXW pc=2012 dst=r3 src=r10 offset=-4 imm=0 #line 278 "sample/undocked/map.c" @@ -6392,9 +6392,9 @@ test_maps(void* context) goto label_127; #line 279 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2046 dst=r0 src=r0 offset=-271 imm=0 + // EBPF_OP_JA pc=2046 dst=r0 src=r0 offset=-269 imm=0 #line 279 "sample/undocked/map.c" - goto label_111; + goto label_112; label_127: // EBPF_OP_LDXW pc=2047 dst=r3 src=r10 offset=-4 imm=0 #line 279 "sample/undocked/map.c" @@ -6495,9 +6495,9 @@ test_maps(void* context) goto label_129; #line 280 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2081 dst=r0 src=r0 offset=-306 imm=0 + // EBPF_OP_JA pc=2081 dst=r0 src=r0 offset=-304 imm=0 #line 280 "sample/undocked/map.c" - goto label_111; + goto label_112; label_129: // EBPF_OP_LDXW pc=2082 dst=r3 src=r10 offset=-4 imm=0 #line 280 "sample/undocked/map.c" @@ -6598,9 +6598,9 @@ test_maps(void* context) goto label_131; #line 281 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2116 dst=r0 src=r0 offset=-341 imm=0 + // EBPF_OP_JA pc=2116 dst=r0 src=r0 offset=-339 imm=0 #line 281 "sample/undocked/map.c" - goto label_111; + goto label_112; label_131: // EBPF_OP_LDXW pc=2117 dst=r3 src=r10 offset=-4 imm=0 #line 281 "sample/undocked/map.c" @@ -7975,11 +7975,11 @@ test_maps(void* context) // EBPF_OP_RSH64_IMM pc=2563 dst=r1 src=r0 offset=0 imm=32 #line 264 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=2564 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JEQ_IMM pc=2564 dst=r1 src=r0 offset=27 imm=0 #line 264 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 264 "sample/undocked/map.c" - goto label_161; + goto label_162; #line 264 "sample/undocked/map.c" } // EBPF_OP_MOV64_IMM pc=2565 dst=r1 src=r0 offset=0 imm=100 @@ -8036,88 +8036,101 @@ test_maps(void* context) // EBPF_OP_MOV64_IMM pc=2588 dst=r2 src=r0 offset=0 imm=50 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(50); - // EBPF_OP_JA pc=2589 dst=r0 src=r0 offset=60 imm=0 -#line 264 "sample/undocked/map.c" - goto label_164; label_161: - // EBPF_OP_LDXW pc=2590 dst=r3 src=r10 offset=-4 imm=0 + // EBPF_OP_MOV64_IMM pc=2589 dst=r3 src=r0 offset=0 imm=0 +#line 264 "sample/undocked/map.c" + r3 = IMMEDIATE(0); + // EBPF_OP_CALL pc=2590 dst=r0 src=r0 offset=0 imm=14 +#line 264 "sample/undocked/map.c" + r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); +#line 264 "sample/undocked/map.c" + if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { +#line 264 "sample/undocked/map.c" + return 0; +#line 264 "sample/undocked/map.c" + } + // EBPF_OP_JA pc=2591 dst=r0 src=r0 offset=-390 imm=0 +#line 264 "sample/undocked/map.c" + goto label_140; +label_162: + // EBPF_OP_LDXW pc=2592 dst=r3 src=r10 offset=-4 imm=0 #line 264 "sample/undocked/map.c" r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)); - // EBPF_OP_JEQ_IMM pc=2591 dst=r3 src=r0 offset=22 imm=10 + // EBPF_OP_JEQ_IMM pc=2593 dst=r3 src=r0 offset=22 imm=10 #line 264 "sample/undocked/map.c" if (r3 == IMMEDIATE(10)) { #line 264 "sample/undocked/map.c" - goto label_162; + goto label_163; #line 264 "sample/undocked/map.c" } - // EBPF_OP_MOV64_IMM pc=2592 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=2594 dst=r1 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXB pc=2593 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXB pc=2595 dst=r10 src=r1 offset=-72 imm=0 #line 264 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint8_t)r1; - // EBPF_OP_LDDW pc=2594 dst=r1 src=r0 offset=0 imm=1852404835 + // EBPF_OP_LDDW pc=2596 dst=r1 src=r0 offset=0 imm=1852404835 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7216209606537213027; - // EBPF_OP_STXDW pc=2596 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=2598 dst=r10 src=r1 offset=-80 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2597 dst=r1 src=r0 offset=0 imm=543434016 + // EBPF_OP_LDDW pc=2599 dst=r1 src=r0 offset=0 imm=543434016 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7309474570952779040; - // EBPF_OP_STXDW pc=2599 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=2601 dst=r10 src=r1 offset=-88 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2600 dst=r1 src=r0 offset=0 imm=1701978221 + // EBPF_OP_LDDW pc=2602 dst=r1 src=r0 offset=0 imm=1701978221 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7958552634295722093; - // EBPF_OP_STXDW pc=2602 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=2604 dst=r10 src=r1 offset=-96 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2603 dst=r1 src=r0 offset=0 imm=1801807216 + // EBPF_OP_LDDW pc=2605 dst=r1 src=r0 offset=0 imm=1801807216 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7308327755813578096; - // EBPF_OP_STXDW pc=2605 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=2607 dst=r10 src=r1 offset=-104 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2606 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=2608 dst=r1 src=r0 offset=0 imm=1600548962 #line 264 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=2608 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=2610 dst=r10 src=r1 offset=-112 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=2609 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2611 dst=r1 src=r10 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=2610 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=2612 dst=r1 src=r0 offset=0 imm=-112 #line 264 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=2611 dst=r2 src=r0 offset=0 imm=41 + // EBPF_OP_MOV64_IMM pc=2613 dst=r2 src=r0 offset=0 imm=41 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(41); - // EBPF_OP_MOV64_IMM pc=2612 dst=r4 src=r0 offset=0 imm=10 + // EBPF_OP_MOV64_IMM pc=2614 dst=r4 src=r0 offset=0 imm=10 #line 264 "sample/undocked/map.c" r4 = IMMEDIATE(10); - // EBPF_OP_JA pc=2613 dst=r0 src=r0 offset=-415 imm=0 + // EBPF_OP_JA pc=2615 dst=r0 src=r0 offset=-417 imm=0 #line 264 "sample/undocked/map.c" goto label_139; -label_162: - // EBPF_OP_MOV64_IMM pc=2614 dst=r6 src=r0 offset=0 imm=0 +label_163: + // EBPF_OP_MOV64_IMM pc=2616 dst=r6 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r6 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2615 dst=r10 src=r6 offset=-4 imm=0 + // EBPF_OP_STXW pc=2617 dst=r10 src=r6 offset=-4 imm=0 #line 272 "sample/undocked/map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r6; - // EBPF_OP_MOV64_REG pc=2616 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2618 dst=r2 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=2617 dst=r2 src=r0 offset=0 imm=-4 + // EBPF_OP_ADD64_IMM pc=2619 dst=r2 src=r0 offset=0 imm=-4 #line 272 "sample/undocked/map.c" r2 += IMMEDIATE(-4); - // EBPF_OP_LDDW pc=2618 dst=r1 src=r1 offset=0 imm=8 + // EBPF_OP_LDDW pc=2620 dst=r1 src=r1 offset=0 imm=8 #line 272 "sample/undocked/map.c" r1 = POINTER(_maps[7].address); - // EBPF_OP_CALL pc=2620 dst=r0 src=r0 offset=0 imm=17 + // EBPF_OP_CALL pc=2622 dst=r0 src=r0 offset=0 imm=17 #line 272 "sample/undocked/map.c" r0 = test_maps_helpers[8].address(r1, r2, r3, r4, r5, context); #line 272 "sample/undocked/map.c" @@ -8126,96 +8139,83 @@ test_maps(void* context) return 0; #line 272 "sample/undocked/map.c" } - // EBPF_OP_MOV64_REG pc=2621 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2623 dst=r7 src=r0 offset=0 imm=0 #line 272 "sample/undocked/map.c" r7 = r0; - // EBPF_OP_MOV64_REG pc=2622 dst=r4 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2624 dst=r4 src=r7 offset=0 imm=0 #line 272 "sample/undocked/map.c" r4 = r7; - // EBPF_OP_LSH64_IMM pc=2623 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=2625 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=2624 dst=r1 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2626 dst=r1 src=r4 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r4; - // EBPF_OP_RSH64_IMM pc=2625 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=2627 dst=r1 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=2626 dst=r1 src=r0 offset=26 imm=0 + // EBPF_OP_JEQ_IMM pc=2628 dst=r1 src=r0 offset=24 imm=0 #line 272 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 272 "sample/undocked/map.c" goto label_165; #line 272 "sample/undocked/map.c" } -label_163: - // EBPF_OP_LDDW pc=2627 dst=r1 src=r0 offset=0 imm=1701737077 +label_164: + // EBPF_OP_LDDW pc=2629 dst=r1 src=r0 offset=0 imm=1701737077 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7216209593501643381; - // EBPF_OP_STXDW pc=2629 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXDW pc=2631 dst=r10 src=r1 offset=-72 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2630 dst=r1 src=r0 offset=0 imm=1680154740 + // EBPF_OP_LDDW pc=2632 dst=r1 src=r0 offset=0 imm=1680154740 #line 272 "sample/undocked/map.c" r1 = (uint64_t)8387235364492091508; - // EBPF_OP_STXDW pc=2632 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=2634 dst=r10 src=r1 offset=-80 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2633 dst=r1 src=r0 offset=0 imm=1914726254 + // EBPF_OP_LDDW pc=2635 dst=r1 src=r0 offset=0 imm=1914726254 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7815279607914981230; - // EBPF_OP_STXDW pc=2635 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=2637 dst=r10 src=r1 offset=-88 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2636 dst=r1 src=r0 offset=0 imm=1886938400 + // EBPF_OP_LDDW pc=2638 dst=r1 src=r0 offset=0 imm=1886938400 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7598807758610654496; - // EBPF_OP_STXDW pc=2638 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=2640 dst=r10 src=r1 offset=-96 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2639 dst=r1 src=r0 offset=0 imm=1601204080 + // EBPF_OP_LDDW pc=2641 dst=r1 src=r0 offset=0 imm=1601204080 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7882825905430622064; - // EBPF_OP_STXDW pc=2641 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=2643 dst=r10 src=r1 offset=-104 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2642 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=2644 dst=r1 src=r0 offset=0 imm=1600548962 #line 272 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=2644 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=2646 dst=r10 src=r1 offset=-112 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_STXB pc=2645 dst=r10 src=r6 offset=-64 imm=0 + // EBPF_OP_STXB pc=2647 dst=r10 src=r6 offset=-64 imm=0 #line 272 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint8_t)r6; - // EBPF_OP_ARSH64_IMM pc=2646 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_ARSH64_IMM pc=2648 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 = (int64_t)r4 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=2647 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2649 dst=r1 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=2648 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=2650 dst=r1 src=r0 offset=0 imm=-112 #line 272 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=2649 dst=r2 src=r0 offset=0 imm=49 + // EBPF_OP_MOV64_IMM pc=2651 dst=r2 src=r0 offset=0 imm=49 #line 272 "sample/undocked/map.c" r2 = IMMEDIATE(49); -label_164: - // EBPF_OP_MOV64_IMM pc=2650 dst=r3 src=r0 offset=0 imm=0 -#line 272 "sample/undocked/map.c" - r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=2651 dst=r0 src=r0 offset=0 imm=14 -#line 272 "sample/undocked/map.c" - r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); -#line 272 "sample/undocked/map.c" - if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { -#line 272 "sample/undocked/map.c" - return 0; -#line 272 "sample/undocked/map.c" - } - // EBPF_OP_JA pc=2652 dst=r0 src=r0 offset=-451 imm=0 + // EBPF_OP_JA pc=2652 dst=r0 src=r0 offset=-64 imm=0 #line 272 "sample/undocked/map.c" - goto label_140; + goto label_161; label_165: // EBPF_OP_LDXW pc=2653 dst=r3 src=r10 offset=-4 imm=0 #line 272 "sample/undocked/map.c" @@ -8316,9 +8316,9 @@ test_maps(void* context) goto label_167; #line 273 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2687 dst=r0 src=r0 offset=-61 imm=0 + // EBPF_OP_JA pc=2687 dst=r0 src=r0 offset=-59 imm=0 #line 273 "sample/undocked/map.c" - goto label_163; + goto label_164; label_167: // EBPF_OP_LDXW pc=2688 dst=r3 src=r10 offset=-4 imm=0 #line 273 "sample/undocked/map.c" @@ -8419,9 +8419,9 @@ test_maps(void* context) goto label_169; #line 274 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2722 dst=r0 src=r0 offset=-96 imm=0 + // EBPF_OP_JA pc=2722 dst=r0 src=r0 offset=-94 imm=0 #line 274 "sample/undocked/map.c" - goto label_163; + goto label_164; label_169: // EBPF_OP_LDXW pc=2723 dst=r3 src=r10 offset=-4 imm=0 #line 274 "sample/undocked/map.c" @@ -8522,9 +8522,9 @@ test_maps(void* context) goto label_171; #line 275 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2757 dst=r0 src=r0 offset=-131 imm=0 + // EBPF_OP_JA pc=2757 dst=r0 src=r0 offset=-129 imm=0 #line 275 "sample/undocked/map.c" - goto label_163; + goto label_164; label_171: // EBPF_OP_LDXW pc=2758 dst=r3 src=r10 offset=-4 imm=0 #line 275 "sample/undocked/map.c" @@ -8625,9 +8625,9 @@ test_maps(void* context) goto label_173; #line 276 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2792 dst=r0 src=r0 offset=-166 imm=0 + // EBPF_OP_JA pc=2792 dst=r0 src=r0 offset=-164 imm=0 #line 276 "sample/undocked/map.c" - goto label_163; + goto label_164; label_173: // EBPF_OP_LDXW pc=2793 dst=r3 src=r10 offset=-4 imm=0 #line 276 "sample/undocked/map.c" @@ -8728,9 +8728,9 @@ test_maps(void* context) goto label_175; #line 277 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2827 dst=r0 src=r0 offset=-201 imm=0 + // EBPF_OP_JA pc=2827 dst=r0 src=r0 offset=-199 imm=0 #line 277 "sample/undocked/map.c" - goto label_163; + goto label_164; label_175: // EBPF_OP_LDXW pc=2828 dst=r3 src=r10 offset=-4 imm=0 #line 277 "sample/undocked/map.c" @@ -8831,9 +8831,9 @@ test_maps(void* context) goto label_177; #line 278 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2862 dst=r0 src=r0 offset=-236 imm=0 + // EBPF_OP_JA pc=2862 dst=r0 src=r0 offset=-234 imm=0 #line 278 "sample/undocked/map.c" - goto label_163; + goto label_164; label_177: // EBPF_OP_LDXW pc=2863 dst=r3 src=r10 offset=-4 imm=0 #line 278 "sample/undocked/map.c" @@ -8934,9 +8934,9 @@ test_maps(void* context) goto label_179; #line 279 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2897 dst=r0 src=r0 offset=-271 imm=0 + // EBPF_OP_JA pc=2897 dst=r0 src=r0 offset=-269 imm=0 #line 279 "sample/undocked/map.c" - goto label_163; + goto label_164; label_179: // EBPF_OP_LDXW pc=2898 dst=r3 src=r10 offset=-4 imm=0 #line 279 "sample/undocked/map.c" @@ -9037,9 +9037,9 @@ test_maps(void* context) goto label_181; #line 280 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2932 dst=r0 src=r0 offset=-306 imm=0 + // EBPF_OP_JA pc=2932 dst=r0 src=r0 offset=-304 imm=0 #line 280 "sample/undocked/map.c" - goto label_163; + goto label_164; label_181: // EBPF_OP_LDXW pc=2933 dst=r3 src=r10 offset=-4 imm=0 #line 280 "sample/undocked/map.c" @@ -9140,9 +9140,9 @@ test_maps(void* context) goto label_183; #line 281 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2967 dst=r0 src=r0 offset=-341 imm=0 + // EBPF_OP_JA pc=2967 dst=r0 src=r0 offset=-339 imm=0 #line 281 "sample/undocked/map.c" - goto label_163; + goto label_164; label_183: // EBPF_OP_LDXW pc=2968 dst=r3 src=r10 offset=-4 imm=0 #line 281 "sample/undocked/map.c" @@ -9365,7 +9365,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_reuse_2_dll.c b/tests/bpf2c_tests/expected/map_reuse_2_dll.c index 6041a618c9..a93ccd27ab 100644 --- a/tests/bpf2c_tests/expected/map_reuse_2_dll.c +++ b/tests/bpf2c_tests/expected/map_reuse_2_dll.c @@ -124,6 +124,8 @@ lookup_update(void* context) register uint64_t r5 = 0; #line 50 "sample/undocked/map_reuse_2.c" register uint64_t r6 = 0; +#line 50 "sample/undocked/map_reuse_2.c" + register uint64_t r7 = 0; #line 50 "sample/undocked/map_reuse_2.c" register uint64_t r10 = 0; @@ -184,47 +186,47 @@ lookup_update(void* context) return 0; #line 58 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_JNE_IMM pc=13 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_MOV64_REG pc=13 dst=r7 src=r0 offset=0 imm=0 +#line 58 "sample/undocked/map_reuse_2.c" + r7 = r0; + // EBPF_OP_JNE_IMM pc=14 dst=r7 src=r0 offset=1 imm=0 #line 59 "sample/undocked/map_reuse_2.c" - if (r0 != IMMEDIATE(0)) { + if (r7 != IMMEDIATE(0)) { #line 59 "sample/undocked/map_reuse_2.c" goto label_1; #line 59 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_JA pc=14 dst=r0 src=r0 offset=13 imm=0 + // EBPF_OP_JA pc=15 dst=r0 src=r0 offset=12 imm=0 #line 59 "sample/undocked/map_reuse_2.c" goto label_2; label_1: - // EBPF_OP_STXW pc=15 dst=r10 src=r6 offset=-12 imm=0 + // EBPF_OP_STXW pc=16 dst=r10 src=r6 offset=-12 imm=0 #line 61 "sample/undocked/map_reuse_2.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint32_t)r6; - // EBPF_OP_LDXW pc=16 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=17 dst=r1 src=r7 offset=0 imm=0 #line 62 "sample/undocked/map_reuse_2.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_STXW pc=17 dst=r10 src=r1 offset=-16 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_STXW pc=18 dst=r10 src=r1 offset=-16 imm=0 #line 62 "sample/undocked/map_reuse_2.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=18 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 #line 62 "sample/undocked/map_reuse_2.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r2 src=r0 offset=0 imm=-12 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-12 #line 61 "sample/undocked/map_reuse_2.c" r2 += IMMEDIATE(-12); - // EBPF_OP_MOV64_REG pc=20 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=21 dst=r3 src=r10 offset=0 imm=0 #line 61 "sample/undocked/map_reuse_2.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=22 dst=r3 src=r0 offset=0 imm=-16 #line 61 "sample/undocked/map_reuse_2.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=3 + // EBPF_OP_LDDW pc=23 dst=r1 src=r1 offset=0 imm=3 #line 63 "sample/undocked/map_reuse_2.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=24 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=25 dst=r4 src=r0 offset=0 imm=0 #line 63 "sample/undocked/map_reuse_2.c" r4 = IMMEDIATE(0); - // EBPF_OP_MOV64_REG pc=25 dst=r6 src=r0 offset=0 imm=0 -#line 63 "sample/undocked/map_reuse_2.c" - r6 = r0; // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=2 #line 63 "sample/undocked/map_reuse_2.c" r0 = lookup_update_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -234,9 +236,9 @@ lookup_update(void* context) return 0; #line 63 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_LDXW pc=27 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r6 src=r7 offset=0 imm=0 #line 65 "sample/undocked/map_reuse_2.c" - r6 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(0)); + r6 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); label_2: // EBPF_OP_MOV64_REG pc=28 dst=r0 src=r6 offset=0 imm=0 #line 69 "sample/undocked/map_reuse_2.c" @@ -279,7 +281,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_reuse_2_raw.c b/tests/bpf2c_tests/expected/map_reuse_2_raw.c index 288de43426..d18f0e6ee2 100644 --- a/tests/bpf2c_tests/expected/map_reuse_2_raw.c +++ b/tests/bpf2c_tests/expected/map_reuse_2_raw.c @@ -98,6 +98,8 @@ lookup_update(void* context) register uint64_t r5 = 0; #line 50 "sample/undocked/map_reuse_2.c" register uint64_t r6 = 0; +#line 50 "sample/undocked/map_reuse_2.c" + register uint64_t r7 = 0; #line 50 "sample/undocked/map_reuse_2.c" register uint64_t r10 = 0; @@ -158,47 +160,47 @@ lookup_update(void* context) return 0; #line 58 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_JNE_IMM pc=13 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_MOV64_REG pc=13 dst=r7 src=r0 offset=0 imm=0 +#line 58 "sample/undocked/map_reuse_2.c" + r7 = r0; + // EBPF_OP_JNE_IMM pc=14 dst=r7 src=r0 offset=1 imm=0 #line 59 "sample/undocked/map_reuse_2.c" - if (r0 != IMMEDIATE(0)) { + if (r7 != IMMEDIATE(0)) { #line 59 "sample/undocked/map_reuse_2.c" goto label_1; #line 59 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_JA pc=14 dst=r0 src=r0 offset=13 imm=0 + // EBPF_OP_JA pc=15 dst=r0 src=r0 offset=12 imm=0 #line 59 "sample/undocked/map_reuse_2.c" goto label_2; label_1: - // EBPF_OP_STXW pc=15 dst=r10 src=r6 offset=-12 imm=0 + // EBPF_OP_STXW pc=16 dst=r10 src=r6 offset=-12 imm=0 #line 61 "sample/undocked/map_reuse_2.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint32_t)r6; - // EBPF_OP_LDXW pc=16 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=17 dst=r1 src=r7 offset=0 imm=0 #line 62 "sample/undocked/map_reuse_2.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_STXW pc=17 dst=r10 src=r1 offset=-16 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_STXW pc=18 dst=r10 src=r1 offset=-16 imm=0 #line 62 "sample/undocked/map_reuse_2.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=18 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 #line 62 "sample/undocked/map_reuse_2.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r2 src=r0 offset=0 imm=-12 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-12 #line 61 "sample/undocked/map_reuse_2.c" r2 += IMMEDIATE(-12); - // EBPF_OP_MOV64_REG pc=20 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=21 dst=r3 src=r10 offset=0 imm=0 #line 61 "sample/undocked/map_reuse_2.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=22 dst=r3 src=r0 offset=0 imm=-16 #line 61 "sample/undocked/map_reuse_2.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=3 + // EBPF_OP_LDDW pc=23 dst=r1 src=r1 offset=0 imm=3 #line 63 "sample/undocked/map_reuse_2.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=24 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=25 dst=r4 src=r0 offset=0 imm=0 #line 63 "sample/undocked/map_reuse_2.c" r4 = IMMEDIATE(0); - // EBPF_OP_MOV64_REG pc=25 dst=r6 src=r0 offset=0 imm=0 -#line 63 "sample/undocked/map_reuse_2.c" - r6 = r0; // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=2 #line 63 "sample/undocked/map_reuse_2.c" r0 = lookup_update_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -208,9 +210,9 @@ lookup_update(void* context) return 0; #line 63 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_LDXW pc=27 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r6 src=r7 offset=0 imm=0 #line 65 "sample/undocked/map_reuse_2.c" - r6 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(0)); + r6 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); label_2: // EBPF_OP_MOV64_REG pc=28 dst=r0 src=r6 offset=0 imm=0 #line 69 "sample/undocked/map_reuse_2.c" @@ -253,7 +255,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_reuse_2_sys.c b/tests/bpf2c_tests/expected/map_reuse_2_sys.c index 51e324fd67..fe7ebd13f7 100644 --- a/tests/bpf2c_tests/expected/map_reuse_2_sys.c +++ b/tests/bpf2c_tests/expected/map_reuse_2_sys.c @@ -259,6 +259,8 @@ lookup_update(void* context) register uint64_t r5 = 0; #line 50 "sample/undocked/map_reuse_2.c" register uint64_t r6 = 0; +#line 50 "sample/undocked/map_reuse_2.c" + register uint64_t r7 = 0; #line 50 "sample/undocked/map_reuse_2.c" register uint64_t r10 = 0; @@ -319,47 +321,47 @@ lookup_update(void* context) return 0; #line 58 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_JNE_IMM pc=13 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_MOV64_REG pc=13 dst=r7 src=r0 offset=0 imm=0 +#line 58 "sample/undocked/map_reuse_2.c" + r7 = r0; + // EBPF_OP_JNE_IMM pc=14 dst=r7 src=r0 offset=1 imm=0 #line 59 "sample/undocked/map_reuse_2.c" - if (r0 != IMMEDIATE(0)) { + if (r7 != IMMEDIATE(0)) { #line 59 "sample/undocked/map_reuse_2.c" goto label_1; #line 59 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_JA pc=14 dst=r0 src=r0 offset=13 imm=0 + // EBPF_OP_JA pc=15 dst=r0 src=r0 offset=12 imm=0 #line 59 "sample/undocked/map_reuse_2.c" goto label_2; label_1: - // EBPF_OP_STXW pc=15 dst=r10 src=r6 offset=-12 imm=0 + // EBPF_OP_STXW pc=16 dst=r10 src=r6 offset=-12 imm=0 #line 61 "sample/undocked/map_reuse_2.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint32_t)r6; - // EBPF_OP_LDXW pc=16 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=17 dst=r1 src=r7 offset=0 imm=0 #line 62 "sample/undocked/map_reuse_2.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_STXW pc=17 dst=r10 src=r1 offset=-16 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_STXW pc=18 dst=r10 src=r1 offset=-16 imm=0 #line 62 "sample/undocked/map_reuse_2.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=18 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 #line 62 "sample/undocked/map_reuse_2.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r2 src=r0 offset=0 imm=-12 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-12 #line 61 "sample/undocked/map_reuse_2.c" r2 += IMMEDIATE(-12); - // EBPF_OP_MOV64_REG pc=20 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=21 dst=r3 src=r10 offset=0 imm=0 #line 61 "sample/undocked/map_reuse_2.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=22 dst=r3 src=r0 offset=0 imm=-16 #line 61 "sample/undocked/map_reuse_2.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=3 + // EBPF_OP_LDDW pc=23 dst=r1 src=r1 offset=0 imm=3 #line 63 "sample/undocked/map_reuse_2.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=24 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=25 dst=r4 src=r0 offset=0 imm=0 #line 63 "sample/undocked/map_reuse_2.c" r4 = IMMEDIATE(0); - // EBPF_OP_MOV64_REG pc=25 dst=r6 src=r0 offset=0 imm=0 -#line 63 "sample/undocked/map_reuse_2.c" - r6 = r0; // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=2 #line 63 "sample/undocked/map_reuse_2.c" r0 = lookup_update_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -369,9 +371,9 @@ lookup_update(void* context) return 0; #line 63 "sample/undocked/map_reuse_2.c" } - // EBPF_OP_LDXW pc=27 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r6 src=r7 offset=0 imm=0 #line 65 "sample/undocked/map_reuse_2.c" - r6 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(0)); + r6 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); label_2: // EBPF_OP_MOV64_REG pc=28 dst=r0 src=r6 offset=0 imm=0 #line 69 "sample/undocked/map_reuse_2.c" @@ -414,7 +416,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_reuse_dll.c b/tests/bpf2c_tests/expected/map_reuse_dll.c index 5a753413ae..ef43b4fd6f 100644 --- a/tests/bpf2c_tests/expected/map_reuse_dll.c +++ b/tests/bpf2c_tests/expected/map_reuse_dll.c @@ -124,6 +124,8 @@ lookup_update(void* context) register uint64_t r5 = 0; #line 49 "sample/undocked/map_reuse.c" register uint64_t r6 = 0; +#line 49 "sample/undocked/map_reuse.c" + register uint64_t r7 = 0; #line 49 "sample/undocked/map_reuse.c" register uint64_t r10 = 0; @@ -184,47 +186,47 @@ lookup_update(void* context) return 0; #line 57 "sample/undocked/map_reuse.c" } - // EBPF_OP_JNE_IMM pc=13 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_MOV64_REG pc=13 dst=r7 src=r0 offset=0 imm=0 +#line 57 "sample/undocked/map_reuse.c" + r7 = r0; + // EBPF_OP_JNE_IMM pc=14 dst=r7 src=r0 offset=1 imm=0 #line 58 "sample/undocked/map_reuse.c" - if (r0 != IMMEDIATE(0)) { + if (r7 != IMMEDIATE(0)) { #line 58 "sample/undocked/map_reuse.c" goto label_1; #line 58 "sample/undocked/map_reuse.c" } - // EBPF_OP_JA pc=14 dst=r0 src=r0 offset=13 imm=0 + // EBPF_OP_JA pc=15 dst=r0 src=r0 offset=12 imm=0 #line 58 "sample/undocked/map_reuse.c" goto label_2; label_1: - // EBPF_OP_STXW pc=15 dst=r10 src=r6 offset=-12 imm=0 + // EBPF_OP_STXW pc=16 dst=r10 src=r6 offset=-12 imm=0 #line 60 "sample/undocked/map_reuse.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint32_t)r6; - // EBPF_OP_LDXW pc=16 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=17 dst=r1 src=r7 offset=0 imm=0 #line 61 "sample/undocked/map_reuse.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_STXW pc=17 dst=r10 src=r1 offset=-16 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_STXW pc=18 dst=r10 src=r1 offset=-16 imm=0 #line 61 "sample/undocked/map_reuse.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=18 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 #line 61 "sample/undocked/map_reuse.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r2 src=r0 offset=0 imm=-12 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-12 #line 60 "sample/undocked/map_reuse.c" r2 += IMMEDIATE(-12); - // EBPF_OP_MOV64_REG pc=20 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=21 dst=r3 src=r10 offset=0 imm=0 #line 60 "sample/undocked/map_reuse.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=22 dst=r3 src=r0 offset=0 imm=-16 #line 60 "sample/undocked/map_reuse.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=3 + // EBPF_OP_LDDW pc=23 dst=r1 src=r1 offset=0 imm=3 #line 62 "sample/undocked/map_reuse.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=24 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=25 dst=r4 src=r0 offset=0 imm=0 #line 62 "sample/undocked/map_reuse.c" r4 = IMMEDIATE(0); - // EBPF_OP_MOV64_REG pc=25 dst=r6 src=r0 offset=0 imm=0 -#line 62 "sample/undocked/map_reuse.c" - r6 = r0; // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=2 #line 62 "sample/undocked/map_reuse.c" r0 = lookup_update_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -234,9 +236,9 @@ lookup_update(void* context) return 0; #line 62 "sample/undocked/map_reuse.c" } - // EBPF_OP_LDXW pc=27 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r6 src=r7 offset=0 imm=0 #line 64 "sample/undocked/map_reuse.c" - r6 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(0)); + r6 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); label_2: // EBPF_OP_MOV64_REG pc=28 dst=r0 src=r6 offset=0 imm=0 #line 68 "sample/undocked/map_reuse.c" @@ -279,7 +281,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_reuse_raw.c b/tests/bpf2c_tests/expected/map_reuse_raw.c index 36238cf4d8..0d22792ecb 100644 --- a/tests/bpf2c_tests/expected/map_reuse_raw.c +++ b/tests/bpf2c_tests/expected/map_reuse_raw.c @@ -98,6 +98,8 @@ lookup_update(void* context) register uint64_t r5 = 0; #line 49 "sample/undocked/map_reuse.c" register uint64_t r6 = 0; +#line 49 "sample/undocked/map_reuse.c" + register uint64_t r7 = 0; #line 49 "sample/undocked/map_reuse.c" register uint64_t r10 = 0; @@ -158,47 +160,47 @@ lookup_update(void* context) return 0; #line 57 "sample/undocked/map_reuse.c" } - // EBPF_OP_JNE_IMM pc=13 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_MOV64_REG pc=13 dst=r7 src=r0 offset=0 imm=0 +#line 57 "sample/undocked/map_reuse.c" + r7 = r0; + // EBPF_OP_JNE_IMM pc=14 dst=r7 src=r0 offset=1 imm=0 #line 58 "sample/undocked/map_reuse.c" - if (r0 != IMMEDIATE(0)) { + if (r7 != IMMEDIATE(0)) { #line 58 "sample/undocked/map_reuse.c" goto label_1; #line 58 "sample/undocked/map_reuse.c" } - // EBPF_OP_JA pc=14 dst=r0 src=r0 offset=13 imm=0 + // EBPF_OP_JA pc=15 dst=r0 src=r0 offset=12 imm=0 #line 58 "sample/undocked/map_reuse.c" goto label_2; label_1: - // EBPF_OP_STXW pc=15 dst=r10 src=r6 offset=-12 imm=0 + // EBPF_OP_STXW pc=16 dst=r10 src=r6 offset=-12 imm=0 #line 60 "sample/undocked/map_reuse.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint32_t)r6; - // EBPF_OP_LDXW pc=16 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=17 dst=r1 src=r7 offset=0 imm=0 #line 61 "sample/undocked/map_reuse.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_STXW pc=17 dst=r10 src=r1 offset=-16 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_STXW pc=18 dst=r10 src=r1 offset=-16 imm=0 #line 61 "sample/undocked/map_reuse.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=18 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 #line 61 "sample/undocked/map_reuse.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r2 src=r0 offset=0 imm=-12 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-12 #line 60 "sample/undocked/map_reuse.c" r2 += IMMEDIATE(-12); - // EBPF_OP_MOV64_REG pc=20 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=21 dst=r3 src=r10 offset=0 imm=0 #line 60 "sample/undocked/map_reuse.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=22 dst=r3 src=r0 offset=0 imm=-16 #line 60 "sample/undocked/map_reuse.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=3 + // EBPF_OP_LDDW pc=23 dst=r1 src=r1 offset=0 imm=3 #line 62 "sample/undocked/map_reuse.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=24 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=25 dst=r4 src=r0 offset=0 imm=0 #line 62 "sample/undocked/map_reuse.c" r4 = IMMEDIATE(0); - // EBPF_OP_MOV64_REG pc=25 dst=r6 src=r0 offset=0 imm=0 -#line 62 "sample/undocked/map_reuse.c" - r6 = r0; // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=2 #line 62 "sample/undocked/map_reuse.c" r0 = lookup_update_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -208,9 +210,9 @@ lookup_update(void* context) return 0; #line 62 "sample/undocked/map_reuse.c" } - // EBPF_OP_LDXW pc=27 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r6 src=r7 offset=0 imm=0 #line 64 "sample/undocked/map_reuse.c" - r6 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(0)); + r6 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); label_2: // EBPF_OP_MOV64_REG pc=28 dst=r0 src=r6 offset=0 imm=0 #line 68 "sample/undocked/map_reuse.c" @@ -253,7 +255,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_reuse_sys.c b/tests/bpf2c_tests/expected/map_reuse_sys.c index 4820efe4f4..2b3b80438d 100644 --- a/tests/bpf2c_tests/expected/map_reuse_sys.c +++ b/tests/bpf2c_tests/expected/map_reuse_sys.c @@ -259,6 +259,8 @@ lookup_update(void* context) register uint64_t r5 = 0; #line 49 "sample/undocked/map_reuse.c" register uint64_t r6 = 0; +#line 49 "sample/undocked/map_reuse.c" + register uint64_t r7 = 0; #line 49 "sample/undocked/map_reuse.c" register uint64_t r10 = 0; @@ -319,47 +321,47 @@ lookup_update(void* context) return 0; #line 57 "sample/undocked/map_reuse.c" } - // EBPF_OP_JNE_IMM pc=13 dst=r0 src=r0 offset=1 imm=0 + // EBPF_OP_MOV64_REG pc=13 dst=r7 src=r0 offset=0 imm=0 +#line 57 "sample/undocked/map_reuse.c" + r7 = r0; + // EBPF_OP_JNE_IMM pc=14 dst=r7 src=r0 offset=1 imm=0 #line 58 "sample/undocked/map_reuse.c" - if (r0 != IMMEDIATE(0)) { + if (r7 != IMMEDIATE(0)) { #line 58 "sample/undocked/map_reuse.c" goto label_1; #line 58 "sample/undocked/map_reuse.c" } - // EBPF_OP_JA pc=14 dst=r0 src=r0 offset=13 imm=0 + // EBPF_OP_JA pc=15 dst=r0 src=r0 offset=12 imm=0 #line 58 "sample/undocked/map_reuse.c" goto label_2; label_1: - // EBPF_OP_STXW pc=15 dst=r10 src=r6 offset=-12 imm=0 + // EBPF_OP_STXW pc=16 dst=r10 src=r6 offset=-12 imm=0 #line 60 "sample/undocked/map_reuse.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint32_t)r6; - // EBPF_OP_LDXW pc=16 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=17 dst=r1 src=r7 offset=0 imm=0 #line 61 "sample/undocked/map_reuse.c" - r1 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_STXW pc=17 dst=r10 src=r1 offset=-16 imm=0 + r1 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_STXW pc=18 dst=r10 src=r1 offset=-16 imm=0 #line 61 "sample/undocked/map_reuse.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=18 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r10 offset=0 imm=0 #line 61 "sample/undocked/map_reuse.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r2 src=r0 offset=0 imm=-12 + // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=-12 #line 60 "sample/undocked/map_reuse.c" r2 += IMMEDIATE(-12); - // EBPF_OP_MOV64_REG pc=20 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=21 dst=r3 src=r10 offset=0 imm=0 #line 60 "sample/undocked/map_reuse.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=21 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=22 dst=r3 src=r0 offset=0 imm=-16 #line 60 "sample/undocked/map_reuse.c" r3 += IMMEDIATE(-16); - // EBPF_OP_LDDW pc=22 dst=r1 src=r1 offset=0 imm=3 + // EBPF_OP_LDDW pc=23 dst=r1 src=r1 offset=0 imm=3 #line 62 "sample/undocked/map_reuse.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=24 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=25 dst=r4 src=r0 offset=0 imm=0 #line 62 "sample/undocked/map_reuse.c" r4 = IMMEDIATE(0); - // EBPF_OP_MOV64_REG pc=25 dst=r6 src=r0 offset=0 imm=0 -#line 62 "sample/undocked/map_reuse.c" - r6 = r0; // EBPF_OP_CALL pc=26 dst=r0 src=r0 offset=0 imm=2 #line 62 "sample/undocked/map_reuse.c" r0 = lookup_update_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -369,9 +371,9 @@ lookup_update(void* context) return 0; #line 62 "sample/undocked/map_reuse.c" } - // EBPF_OP_LDXW pc=27 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXW pc=27 dst=r6 src=r7 offset=0 imm=0 #line 64 "sample/undocked/map_reuse.c" - r6 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(0)); + r6 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); label_2: // EBPF_OP_MOV64_REG pc=28 dst=r0 src=r6 offset=0 imm=0 #line 68 "sample/undocked/map_reuse.c" @@ -414,7 +416,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/map_sys.c b/tests/bpf2c_tests/expected/map_sys.c index 34627cadbb..1e6f51d08a 100644 --- a/tests/bpf2c_tests/expected/map_sys.c +++ b/tests/bpf2c_tests/expected/map_sys.c @@ -5594,11 +5594,11 @@ test_maps(void* context) // EBPF_OP_RSH64_IMM pc=1712 dst=r1 src=r0 offset=0 imm=32 #line 264 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=1713 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JEQ_IMM pc=1713 dst=r1 src=r0 offset=27 imm=0 #line 264 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 264 "sample/undocked/map.c" - goto label_109; + goto label_110; #line 264 "sample/undocked/map.c" } // EBPF_OP_MOV64_IMM pc=1714 dst=r1 src=r0 offset=0 imm=100 @@ -5655,88 +5655,101 @@ test_maps(void* context) // EBPF_OP_MOV64_IMM pc=1737 dst=r2 src=r0 offset=0 imm=50 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(50); - // EBPF_OP_JA pc=1738 dst=r0 src=r0 offset=60 imm=0 -#line 264 "sample/undocked/map.c" - goto label_112; label_109: - // EBPF_OP_LDXW pc=1739 dst=r3 src=r10 offset=-4 imm=0 + // EBPF_OP_MOV64_IMM pc=1738 dst=r3 src=r0 offset=0 imm=0 +#line 264 "sample/undocked/map.c" + r3 = IMMEDIATE(0); + // EBPF_OP_CALL pc=1739 dst=r0 src=r0 offset=0 imm=14 +#line 264 "sample/undocked/map.c" + r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); +#line 264 "sample/undocked/map.c" + if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { +#line 264 "sample/undocked/map.c" + return 0; +#line 264 "sample/undocked/map.c" + } + // EBPF_OP_JA pc=1740 dst=r0 src=r0 offset=-429 imm=0 +#line 264 "sample/undocked/map.c" + goto label_84; +label_110: + // EBPF_OP_LDXW pc=1741 dst=r3 src=r10 offset=-4 imm=0 #line 264 "sample/undocked/map.c" r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)); - // EBPF_OP_JEQ_IMM pc=1740 dst=r3 src=r0 offset=22 imm=1 + // EBPF_OP_JEQ_IMM pc=1742 dst=r3 src=r0 offset=22 imm=1 #line 264 "sample/undocked/map.c" if (r3 == IMMEDIATE(1)) { #line 264 "sample/undocked/map.c" - goto label_110; + goto label_111; #line 264 "sample/undocked/map.c" } - // EBPF_OP_MOV64_IMM pc=1741 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1743 dst=r1 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXB pc=1742 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXB pc=1744 dst=r10 src=r1 offset=-72 imm=0 #line 264 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint8_t)r1; - // EBPF_OP_LDDW pc=1743 dst=r1 src=r0 offset=0 imm=1852404835 + // EBPF_OP_LDDW pc=1745 dst=r1 src=r0 offset=0 imm=1852404835 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7216209606537213027; - // EBPF_OP_STXDW pc=1745 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=1747 dst=r10 src=r1 offset=-80 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1746 dst=r1 src=r0 offset=0 imm=543434016 + // EBPF_OP_LDDW pc=1748 dst=r1 src=r0 offset=0 imm=543434016 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7309474570952779040; - // EBPF_OP_STXDW pc=1748 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=1750 dst=r10 src=r1 offset=-88 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1749 dst=r1 src=r0 offset=0 imm=1701978221 + // EBPF_OP_LDDW pc=1751 dst=r1 src=r0 offset=0 imm=1701978221 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7958552634295722093; - // EBPF_OP_STXDW pc=1751 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=1753 dst=r10 src=r1 offset=-96 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1752 dst=r1 src=r0 offset=0 imm=1801807216 + // EBPF_OP_LDDW pc=1754 dst=r1 src=r0 offset=0 imm=1801807216 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7308327755813578096; - // EBPF_OP_STXDW pc=1754 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=1756 dst=r10 src=r1 offset=-104 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1755 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=1757 dst=r1 src=r0 offset=0 imm=1600548962 #line 264 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=1757 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=1759 dst=r10 src=r1 offset=-112 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=1758 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1760 dst=r1 src=r10 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=1759 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=1761 dst=r1 src=r0 offset=0 imm=-112 #line 264 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=1760 dst=r2 src=r0 offset=0 imm=41 + // EBPF_OP_MOV64_IMM pc=1762 dst=r2 src=r0 offset=0 imm=41 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(41); - // EBPF_OP_MOV64_IMM pc=1761 dst=r4 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=1763 dst=r4 src=r0 offset=0 imm=1 #line 264 "sample/undocked/map.c" r4 = IMMEDIATE(1); - // EBPF_OP_JA pc=1762 dst=r0 src=r0 offset=-454 imm=0 + // EBPF_OP_JA pc=1764 dst=r0 src=r0 offset=-456 imm=0 #line 264 "sample/undocked/map.c" goto label_83; -label_110: - // EBPF_OP_MOV64_IMM pc=1763 dst=r7 src=r0 offset=0 imm=0 +label_111: + // EBPF_OP_MOV64_IMM pc=1765 dst=r7 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=1764 dst=r10 src=r7 offset=-4 imm=0 + // EBPF_OP_STXW pc=1766 dst=r10 src=r7 offset=-4 imm=0 #line 272 "sample/undocked/map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r7; - // EBPF_OP_MOV64_REG pc=1765 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1767 dst=r2 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=1766 dst=r2 src=r0 offset=0 imm=-4 + // EBPF_OP_ADD64_IMM pc=1768 dst=r2 src=r0 offset=0 imm=-4 #line 272 "sample/undocked/map.c" r2 += IMMEDIATE(-4); - // EBPF_OP_LDDW pc=1767 dst=r1 src=r1 offset=0 imm=7 + // EBPF_OP_LDDW pc=1769 dst=r1 src=r1 offset=0 imm=7 #line 272 "sample/undocked/map.c" r1 = POINTER(_maps[6].address); - // EBPF_OP_CALL pc=1769 dst=r0 src=r0 offset=0 imm=17 + // EBPF_OP_CALL pc=1771 dst=r0 src=r0 offset=0 imm=17 #line 272 "sample/undocked/map.c" r0 = test_maps_helpers[8].address(r1, r2, r3, r4, r5, context); #line 272 "sample/undocked/map.c" @@ -5745,96 +5758,83 @@ test_maps(void* context) return 0; #line 272 "sample/undocked/map.c" } - // EBPF_OP_MOV64_REG pc=1770 dst=r6 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1772 dst=r6 src=r0 offset=0 imm=0 #line 272 "sample/undocked/map.c" r6 = r0; - // EBPF_OP_MOV64_REG pc=1771 dst=r4 src=r6 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1773 dst=r4 src=r6 offset=0 imm=0 #line 272 "sample/undocked/map.c" r4 = r6; - // EBPF_OP_LSH64_IMM pc=1772 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=1774 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=1773 dst=r1 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1775 dst=r1 src=r4 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r4; - // EBPF_OP_RSH64_IMM pc=1774 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=1776 dst=r1 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=1775 dst=r1 src=r0 offset=26 imm=0 + // EBPF_OP_JEQ_IMM pc=1777 dst=r1 src=r0 offset=24 imm=0 #line 272 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 272 "sample/undocked/map.c" goto label_113; #line 272 "sample/undocked/map.c" } -label_111: - // EBPF_OP_LDDW pc=1776 dst=r1 src=r0 offset=0 imm=1701737077 +label_112: + // EBPF_OP_LDDW pc=1778 dst=r1 src=r0 offset=0 imm=1701737077 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7216209593501643381; - // EBPF_OP_STXDW pc=1778 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXDW pc=1780 dst=r10 src=r1 offset=-72 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1779 dst=r1 src=r0 offset=0 imm=1680154740 + // EBPF_OP_LDDW pc=1781 dst=r1 src=r0 offset=0 imm=1680154740 #line 272 "sample/undocked/map.c" r1 = (uint64_t)8387235364492091508; - // EBPF_OP_STXDW pc=1781 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=1783 dst=r10 src=r1 offset=-80 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1782 dst=r1 src=r0 offset=0 imm=1914726254 + // EBPF_OP_LDDW pc=1784 dst=r1 src=r0 offset=0 imm=1914726254 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7815279607914981230; - // EBPF_OP_STXDW pc=1784 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=1786 dst=r10 src=r1 offset=-88 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1785 dst=r1 src=r0 offset=0 imm=1886938400 + // EBPF_OP_LDDW pc=1787 dst=r1 src=r0 offset=0 imm=1886938400 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7598807758610654496; - // EBPF_OP_STXDW pc=1787 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=1789 dst=r10 src=r1 offset=-96 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1788 dst=r1 src=r0 offset=0 imm=1601204080 + // EBPF_OP_LDDW pc=1790 dst=r1 src=r0 offset=0 imm=1601204080 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7882825905430622064; - // EBPF_OP_STXDW pc=1790 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=1792 dst=r10 src=r1 offset=-104 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=1791 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=1793 dst=r1 src=r0 offset=0 imm=1600548962 #line 272 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=1793 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=1795 dst=r10 src=r1 offset=-112 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_STXB pc=1794 dst=r10 src=r7 offset=-64 imm=0 + // EBPF_OP_STXB pc=1796 dst=r10 src=r7 offset=-64 imm=0 #line 272 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint8_t)r7; - // EBPF_OP_ARSH64_IMM pc=1795 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_ARSH64_IMM pc=1797 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 = (int64_t)r4 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=1796 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=1798 dst=r1 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=1797 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=1799 dst=r1 src=r0 offset=0 imm=-112 #line 272 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=1798 dst=r2 src=r0 offset=0 imm=49 + // EBPF_OP_MOV64_IMM pc=1800 dst=r2 src=r0 offset=0 imm=49 #line 272 "sample/undocked/map.c" r2 = IMMEDIATE(49); -label_112: - // EBPF_OP_MOV64_IMM pc=1799 dst=r3 src=r0 offset=0 imm=0 -#line 272 "sample/undocked/map.c" - r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=1800 dst=r0 src=r0 offset=0 imm=14 -#line 272 "sample/undocked/map.c" - r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); -#line 272 "sample/undocked/map.c" - if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { -#line 272 "sample/undocked/map.c" - return 0; -#line 272 "sample/undocked/map.c" - } - // EBPF_OP_JA pc=1801 dst=r0 src=r0 offset=-490 imm=0 + // EBPF_OP_JA pc=1801 dst=r0 src=r0 offset=-64 imm=0 #line 272 "sample/undocked/map.c" - goto label_84; + goto label_109; label_113: // EBPF_OP_LDXW pc=1802 dst=r3 src=r10 offset=-4 imm=0 #line 272 "sample/undocked/map.c" @@ -5935,9 +5935,9 @@ test_maps(void* context) goto label_115; #line 273 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1836 dst=r0 src=r0 offset=-61 imm=0 + // EBPF_OP_JA pc=1836 dst=r0 src=r0 offset=-59 imm=0 #line 273 "sample/undocked/map.c" - goto label_111; + goto label_112; label_115: // EBPF_OP_LDXW pc=1837 dst=r3 src=r10 offset=-4 imm=0 #line 273 "sample/undocked/map.c" @@ -6038,9 +6038,9 @@ test_maps(void* context) goto label_117; #line 274 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1871 dst=r0 src=r0 offset=-96 imm=0 + // EBPF_OP_JA pc=1871 dst=r0 src=r0 offset=-94 imm=0 #line 274 "sample/undocked/map.c" - goto label_111; + goto label_112; label_117: // EBPF_OP_LDXW pc=1872 dst=r3 src=r10 offset=-4 imm=0 #line 274 "sample/undocked/map.c" @@ -6141,9 +6141,9 @@ test_maps(void* context) goto label_119; #line 275 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1906 dst=r0 src=r0 offset=-131 imm=0 + // EBPF_OP_JA pc=1906 dst=r0 src=r0 offset=-129 imm=0 #line 275 "sample/undocked/map.c" - goto label_111; + goto label_112; label_119: // EBPF_OP_LDXW pc=1907 dst=r3 src=r10 offset=-4 imm=0 #line 275 "sample/undocked/map.c" @@ -6244,9 +6244,9 @@ test_maps(void* context) goto label_121; #line 276 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1941 dst=r0 src=r0 offset=-166 imm=0 + // EBPF_OP_JA pc=1941 dst=r0 src=r0 offset=-164 imm=0 #line 276 "sample/undocked/map.c" - goto label_111; + goto label_112; label_121: // EBPF_OP_LDXW pc=1942 dst=r3 src=r10 offset=-4 imm=0 #line 276 "sample/undocked/map.c" @@ -6347,9 +6347,9 @@ test_maps(void* context) goto label_123; #line 277 "sample/undocked/map.c" } - // EBPF_OP_JA pc=1976 dst=r0 src=r0 offset=-201 imm=0 + // EBPF_OP_JA pc=1976 dst=r0 src=r0 offset=-199 imm=0 #line 277 "sample/undocked/map.c" - goto label_111; + goto label_112; label_123: // EBPF_OP_LDXW pc=1977 dst=r3 src=r10 offset=-4 imm=0 #line 277 "sample/undocked/map.c" @@ -6450,9 +6450,9 @@ test_maps(void* context) goto label_125; #line 278 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2011 dst=r0 src=r0 offset=-236 imm=0 + // EBPF_OP_JA pc=2011 dst=r0 src=r0 offset=-234 imm=0 #line 278 "sample/undocked/map.c" - goto label_111; + goto label_112; label_125: // EBPF_OP_LDXW pc=2012 dst=r3 src=r10 offset=-4 imm=0 #line 278 "sample/undocked/map.c" @@ -6553,9 +6553,9 @@ test_maps(void* context) goto label_127; #line 279 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2046 dst=r0 src=r0 offset=-271 imm=0 + // EBPF_OP_JA pc=2046 dst=r0 src=r0 offset=-269 imm=0 #line 279 "sample/undocked/map.c" - goto label_111; + goto label_112; label_127: // EBPF_OP_LDXW pc=2047 dst=r3 src=r10 offset=-4 imm=0 #line 279 "sample/undocked/map.c" @@ -6656,9 +6656,9 @@ test_maps(void* context) goto label_129; #line 280 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2081 dst=r0 src=r0 offset=-306 imm=0 + // EBPF_OP_JA pc=2081 dst=r0 src=r0 offset=-304 imm=0 #line 280 "sample/undocked/map.c" - goto label_111; + goto label_112; label_129: // EBPF_OP_LDXW pc=2082 dst=r3 src=r10 offset=-4 imm=0 #line 280 "sample/undocked/map.c" @@ -6759,9 +6759,9 @@ test_maps(void* context) goto label_131; #line 281 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2116 dst=r0 src=r0 offset=-341 imm=0 + // EBPF_OP_JA pc=2116 dst=r0 src=r0 offset=-339 imm=0 #line 281 "sample/undocked/map.c" - goto label_111; + goto label_112; label_131: // EBPF_OP_LDXW pc=2117 dst=r3 src=r10 offset=-4 imm=0 #line 281 "sample/undocked/map.c" @@ -8136,11 +8136,11 @@ test_maps(void* context) // EBPF_OP_RSH64_IMM pc=2563 dst=r1 src=r0 offset=0 imm=32 #line 264 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=2564 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JEQ_IMM pc=2564 dst=r1 src=r0 offset=27 imm=0 #line 264 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 264 "sample/undocked/map.c" - goto label_161; + goto label_162; #line 264 "sample/undocked/map.c" } // EBPF_OP_MOV64_IMM pc=2565 dst=r1 src=r0 offset=0 imm=100 @@ -8197,88 +8197,101 @@ test_maps(void* context) // EBPF_OP_MOV64_IMM pc=2588 dst=r2 src=r0 offset=0 imm=50 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(50); - // EBPF_OP_JA pc=2589 dst=r0 src=r0 offset=60 imm=0 -#line 264 "sample/undocked/map.c" - goto label_164; label_161: - // EBPF_OP_LDXW pc=2590 dst=r3 src=r10 offset=-4 imm=0 + // EBPF_OP_MOV64_IMM pc=2589 dst=r3 src=r0 offset=0 imm=0 +#line 264 "sample/undocked/map.c" + r3 = IMMEDIATE(0); + // EBPF_OP_CALL pc=2590 dst=r0 src=r0 offset=0 imm=14 +#line 264 "sample/undocked/map.c" + r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); +#line 264 "sample/undocked/map.c" + if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { +#line 264 "sample/undocked/map.c" + return 0; +#line 264 "sample/undocked/map.c" + } + // EBPF_OP_JA pc=2591 dst=r0 src=r0 offset=-390 imm=0 +#line 264 "sample/undocked/map.c" + goto label_140; +label_162: + // EBPF_OP_LDXW pc=2592 dst=r3 src=r10 offset=-4 imm=0 #line 264 "sample/undocked/map.c" r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)); - // EBPF_OP_JEQ_IMM pc=2591 dst=r3 src=r0 offset=22 imm=10 + // EBPF_OP_JEQ_IMM pc=2593 dst=r3 src=r0 offset=22 imm=10 #line 264 "sample/undocked/map.c" if (r3 == IMMEDIATE(10)) { #line 264 "sample/undocked/map.c" - goto label_162; + goto label_163; #line 264 "sample/undocked/map.c" } - // EBPF_OP_MOV64_IMM pc=2592 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=2594 dst=r1 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXB pc=2593 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXB pc=2595 dst=r10 src=r1 offset=-72 imm=0 #line 264 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint8_t)r1; - // EBPF_OP_LDDW pc=2594 dst=r1 src=r0 offset=0 imm=1852404835 + // EBPF_OP_LDDW pc=2596 dst=r1 src=r0 offset=0 imm=1852404835 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7216209606537213027; - // EBPF_OP_STXDW pc=2596 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=2598 dst=r10 src=r1 offset=-80 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2597 dst=r1 src=r0 offset=0 imm=543434016 + // EBPF_OP_LDDW pc=2599 dst=r1 src=r0 offset=0 imm=543434016 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7309474570952779040; - // EBPF_OP_STXDW pc=2599 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=2601 dst=r10 src=r1 offset=-88 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2600 dst=r1 src=r0 offset=0 imm=1701978221 + // EBPF_OP_LDDW pc=2602 dst=r1 src=r0 offset=0 imm=1701978221 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7958552634295722093; - // EBPF_OP_STXDW pc=2602 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=2604 dst=r10 src=r1 offset=-96 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2603 dst=r1 src=r0 offset=0 imm=1801807216 + // EBPF_OP_LDDW pc=2605 dst=r1 src=r0 offset=0 imm=1801807216 #line 264 "sample/undocked/map.c" r1 = (uint64_t)7308327755813578096; - // EBPF_OP_STXDW pc=2605 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=2607 dst=r10 src=r1 offset=-104 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2606 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=2608 dst=r1 src=r0 offset=0 imm=1600548962 #line 264 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=2608 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=2610 dst=r10 src=r1 offset=-112 imm=0 #line 264 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_MOV64_REG pc=2609 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2611 dst=r1 src=r10 offset=0 imm=0 #line 264 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=2610 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=2612 dst=r1 src=r0 offset=0 imm=-112 #line 264 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=2611 dst=r2 src=r0 offset=0 imm=41 + // EBPF_OP_MOV64_IMM pc=2613 dst=r2 src=r0 offset=0 imm=41 #line 264 "sample/undocked/map.c" r2 = IMMEDIATE(41); - // EBPF_OP_MOV64_IMM pc=2612 dst=r4 src=r0 offset=0 imm=10 + // EBPF_OP_MOV64_IMM pc=2614 dst=r4 src=r0 offset=0 imm=10 #line 264 "sample/undocked/map.c" r4 = IMMEDIATE(10); - // EBPF_OP_JA pc=2613 dst=r0 src=r0 offset=-415 imm=0 + // EBPF_OP_JA pc=2615 dst=r0 src=r0 offset=-417 imm=0 #line 264 "sample/undocked/map.c" goto label_139; -label_162: - // EBPF_OP_MOV64_IMM pc=2614 dst=r6 src=r0 offset=0 imm=0 +label_163: + // EBPF_OP_MOV64_IMM pc=2616 dst=r6 src=r0 offset=0 imm=0 #line 264 "sample/undocked/map.c" r6 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2615 dst=r10 src=r6 offset=-4 imm=0 + // EBPF_OP_STXW pc=2617 dst=r10 src=r6 offset=-4 imm=0 #line 272 "sample/undocked/map.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r6; - // EBPF_OP_MOV64_REG pc=2616 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2618 dst=r2 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=2617 dst=r2 src=r0 offset=0 imm=-4 + // EBPF_OP_ADD64_IMM pc=2619 dst=r2 src=r0 offset=0 imm=-4 #line 272 "sample/undocked/map.c" r2 += IMMEDIATE(-4); - // EBPF_OP_LDDW pc=2618 dst=r1 src=r1 offset=0 imm=8 + // EBPF_OP_LDDW pc=2620 dst=r1 src=r1 offset=0 imm=8 #line 272 "sample/undocked/map.c" r1 = POINTER(_maps[7].address); - // EBPF_OP_CALL pc=2620 dst=r0 src=r0 offset=0 imm=17 + // EBPF_OP_CALL pc=2622 dst=r0 src=r0 offset=0 imm=17 #line 272 "sample/undocked/map.c" r0 = test_maps_helpers[8].address(r1, r2, r3, r4, r5, context); #line 272 "sample/undocked/map.c" @@ -8287,96 +8300,83 @@ test_maps(void* context) return 0; #line 272 "sample/undocked/map.c" } - // EBPF_OP_MOV64_REG pc=2621 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2623 dst=r7 src=r0 offset=0 imm=0 #line 272 "sample/undocked/map.c" r7 = r0; - // EBPF_OP_MOV64_REG pc=2622 dst=r4 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2624 dst=r4 src=r7 offset=0 imm=0 #line 272 "sample/undocked/map.c" r4 = r7; - // EBPF_OP_LSH64_IMM pc=2623 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=2625 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=2624 dst=r1 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2626 dst=r1 src=r4 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r4; - // EBPF_OP_RSH64_IMM pc=2625 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=2627 dst=r1 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JEQ_IMM pc=2626 dst=r1 src=r0 offset=26 imm=0 + // EBPF_OP_JEQ_IMM pc=2628 dst=r1 src=r0 offset=24 imm=0 #line 272 "sample/undocked/map.c" if (r1 == IMMEDIATE(0)) { #line 272 "sample/undocked/map.c" goto label_165; #line 272 "sample/undocked/map.c" } -label_163: - // EBPF_OP_LDDW pc=2627 dst=r1 src=r0 offset=0 imm=1701737077 +label_164: + // EBPF_OP_LDDW pc=2629 dst=r1 src=r0 offset=0 imm=1701737077 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7216209593501643381; - // EBPF_OP_STXDW pc=2629 dst=r10 src=r1 offset=-72 imm=0 + // EBPF_OP_STXDW pc=2631 dst=r10 src=r1 offset=-72 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2630 dst=r1 src=r0 offset=0 imm=1680154740 + // EBPF_OP_LDDW pc=2632 dst=r1 src=r0 offset=0 imm=1680154740 #line 272 "sample/undocked/map.c" r1 = (uint64_t)8387235364492091508; - // EBPF_OP_STXDW pc=2632 dst=r10 src=r1 offset=-80 imm=0 + // EBPF_OP_STXDW pc=2634 dst=r10 src=r1 offset=-80 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-80)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2633 dst=r1 src=r0 offset=0 imm=1914726254 + // EBPF_OP_LDDW pc=2635 dst=r1 src=r0 offset=0 imm=1914726254 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7815279607914981230; - // EBPF_OP_STXDW pc=2635 dst=r10 src=r1 offset=-88 imm=0 + // EBPF_OP_STXDW pc=2637 dst=r10 src=r1 offset=-88 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-88)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2636 dst=r1 src=r0 offset=0 imm=1886938400 + // EBPF_OP_LDDW pc=2638 dst=r1 src=r0 offset=0 imm=1886938400 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7598807758610654496; - // EBPF_OP_STXDW pc=2638 dst=r10 src=r1 offset=-96 imm=0 + // EBPF_OP_STXDW pc=2640 dst=r10 src=r1 offset=-96 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-96)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2639 dst=r1 src=r0 offset=0 imm=1601204080 + // EBPF_OP_LDDW pc=2641 dst=r1 src=r0 offset=0 imm=1601204080 #line 272 "sample/undocked/map.c" r1 = (uint64_t)7882825905430622064; - // EBPF_OP_STXDW pc=2641 dst=r10 src=r1 offset=-104 imm=0 + // EBPF_OP_STXDW pc=2643 dst=r10 src=r1 offset=-104 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-104)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=2642 dst=r1 src=r0 offset=0 imm=1600548962 + // EBPF_OP_LDDW pc=2644 dst=r1 src=r0 offset=0 imm=1600548962 #line 272 "sample/undocked/map.c" r1 = (uint64_t)6877103753374625890; - // EBPF_OP_STXDW pc=2644 dst=r10 src=r1 offset=-112 imm=0 + // EBPF_OP_STXDW pc=2646 dst=r10 src=r1 offset=-112 imm=0 #line 272 "sample/undocked/map.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-112)) = (uint64_t)r1; - // EBPF_OP_STXB pc=2645 dst=r10 src=r6 offset=-64 imm=0 + // EBPF_OP_STXB pc=2647 dst=r10 src=r6 offset=-64 imm=0 #line 272 "sample/undocked/map.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint8_t)r6; - // EBPF_OP_ARSH64_IMM pc=2646 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_ARSH64_IMM pc=2648 dst=r4 src=r0 offset=0 imm=32 #line 272 "sample/undocked/map.c" r4 = (int64_t)r4 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_REG pc=2647 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=2649 dst=r1 src=r10 offset=0 imm=0 #line 272 "sample/undocked/map.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=2648 dst=r1 src=r0 offset=0 imm=-112 + // EBPF_OP_ADD64_IMM pc=2650 dst=r1 src=r0 offset=0 imm=-112 #line 272 "sample/undocked/map.c" r1 += IMMEDIATE(-112); - // EBPF_OP_MOV64_IMM pc=2649 dst=r2 src=r0 offset=0 imm=49 + // EBPF_OP_MOV64_IMM pc=2651 dst=r2 src=r0 offset=0 imm=49 #line 272 "sample/undocked/map.c" r2 = IMMEDIATE(49); -label_164: - // EBPF_OP_MOV64_IMM pc=2650 dst=r3 src=r0 offset=0 imm=0 -#line 272 "sample/undocked/map.c" - r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=2651 dst=r0 src=r0 offset=0 imm=14 -#line 272 "sample/undocked/map.c" - r0 = test_maps_helpers[7].address(r1, r2, r3, r4, r5, context); -#line 272 "sample/undocked/map.c" - if ((test_maps_helpers[7].tail_call) && (r0 == 0)) { -#line 272 "sample/undocked/map.c" - return 0; -#line 272 "sample/undocked/map.c" - } - // EBPF_OP_JA pc=2652 dst=r0 src=r0 offset=-451 imm=0 + // EBPF_OP_JA pc=2652 dst=r0 src=r0 offset=-64 imm=0 #line 272 "sample/undocked/map.c" - goto label_140; + goto label_161; label_165: // EBPF_OP_LDXW pc=2653 dst=r3 src=r10 offset=-4 imm=0 #line 272 "sample/undocked/map.c" @@ -8477,9 +8477,9 @@ test_maps(void* context) goto label_167; #line 273 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2687 dst=r0 src=r0 offset=-61 imm=0 + // EBPF_OP_JA pc=2687 dst=r0 src=r0 offset=-59 imm=0 #line 273 "sample/undocked/map.c" - goto label_163; + goto label_164; label_167: // EBPF_OP_LDXW pc=2688 dst=r3 src=r10 offset=-4 imm=0 #line 273 "sample/undocked/map.c" @@ -8580,9 +8580,9 @@ test_maps(void* context) goto label_169; #line 274 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2722 dst=r0 src=r0 offset=-96 imm=0 + // EBPF_OP_JA pc=2722 dst=r0 src=r0 offset=-94 imm=0 #line 274 "sample/undocked/map.c" - goto label_163; + goto label_164; label_169: // EBPF_OP_LDXW pc=2723 dst=r3 src=r10 offset=-4 imm=0 #line 274 "sample/undocked/map.c" @@ -8683,9 +8683,9 @@ test_maps(void* context) goto label_171; #line 275 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2757 dst=r0 src=r0 offset=-131 imm=0 + // EBPF_OP_JA pc=2757 dst=r0 src=r0 offset=-129 imm=0 #line 275 "sample/undocked/map.c" - goto label_163; + goto label_164; label_171: // EBPF_OP_LDXW pc=2758 dst=r3 src=r10 offset=-4 imm=0 #line 275 "sample/undocked/map.c" @@ -8786,9 +8786,9 @@ test_maps(void* context) goto label_173; #line 276 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2792 dst=r0 src=r0 offset=-166 imm=0 + // EBPF_OP_JA pc=2792 dst=r0 src=r0 offset=-164 imm=0 #line 276 "sample/undocked/map.c" - goto label_163; + goto label_164; label_173: // EBPF_OP_LDXW pc=2793 dst=r3 src=r10 offset=-4 imm=0 #line 276 "sample/undocked/map.c" @@ -8889,9 +8889,9 @@ test_maps(void* context) goto label_175; #line 277 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2827 dst=r0 src=r0 offset=-201 imm=0 + // EBPF_OP_JA pc=2827 dst=r0 src=r0 offset=-199 imm=0 #line 277 "sample/undocked/map.c" - goto label_163; + goto label_164; label_175: // EBPF_OP_LDXW pc=2828 dst=r3 src=r10 offset=-4 imm=0 #line 277 "sample/undocked/map.c" @@ -8992,9 +8992,9 @@ test_maps(void* context) goto label_177; #line 278 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2862 dst=r0 src=r0 offset=-236 imm=0 + // EBPF_OP_JA pc=2862 dst=r0 src=r0 offset=-234 imm=0 #line 278 "sample/undocked/map.c" - goto label_163; + goto label_164; label_177: // EBPF_OP_LDXW pc=2863 dst=r3 src=r10 offset=-4 imm=0 #line 278 "sample/undocked/map.c" @@ -9095,9 +9095,9 @@ test_maps(void* context) goto label_179; #line 279 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2897 dst=r0 src=r0 offset=-271 imm=0 + // EBPF_OP_JA pc=2897 dst=r0 src=r0 offset=-269 imm=0 #line 279 "sample/undocked/map.c" - goto label_163; + goto label_164; label_179: // EBPF_OP_LDXW pc=2898 dst=r3 src=r10 offset=-4 imm=0 #line 279 "sample/undocked/map.c" @@ -9198,9 +9198,9 @@ test_maps(void* context) goto label_181; #line 280 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2932 dst=r0 src=r0 offset=-306 imm=0 + // EBPF_OP_JA pc=2932 dst=r0 src=r0 offset=-304 imm=0 #line 280 "sample/undocked/map.c" - goto label_163; + goto label_164; label_181: // EBPF_OP_LDXW pc=2933 dst=r3 src=r10 offset=-4 imm=0 #line 280 "sample/undocked/map.c" @@ -9301,9 +9301,9 @@ test_maps(void* context) goto label_183; #line 281 "sample/undocked/map.c" } - // EBPF_OP_JA pc=2967 dst=r0 src=r0 offset=-341 imm=0 + // EBPF_OP_JA pc=2967 dst=r0 src=r0 offset=-339 imm=0 #line 281 "sample/undocked/map.c" - goto label_163; + goto label_164; label_183: // EBPF_OP_LDXW pc=2968 dst=r3 src=r10 offset=-4 imm=0 #line 281 "sample/undocked/map.c" @@ -9526,7 +9526,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/multiple_programs_dll.c b/tests/bpf2c_tests/expected/multiple_programs_dll.c index 67bd4b0edf..dbe4fd1e74 100644 --- a/tests/bpf2c_tests/expected/multiple_programs_dll.c +++ b/tests/bpf2c_tests/expected/multiple_programs_dll.c @@ -254,7 +254,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/multiple_programs_raw.c b/tests/bpf2c_tests/expected/multiple_programs_raw.c index ff33eaee4b..63c3784bce 100644 --- a/tests/bpf2c_tests/expected/multiple_programs_raw.c +++ b/tests/bpf2c_tests/expected/multiple_programs_raw.c @@ -228,7 +228,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/multiple_programs_sys.c b/tests/bpf2c_tests/expected/multiple_programs_sys.c index 9d71fdd80a..aa8a3db8a8 100644 --- a/tests/bpf2c_tests/expected/multiple_programs_sys.c +++ b/tests/bpf2c_tests/expected/multiple_programs_sys.c @@ -389,7 +389,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/pidtgid_dll.c b/tests/bpf2c_tests/expected/pidtgid_dll.c index 01fbc37c92..ac22565e48 100644 --- a/tests/bpf2c_tests/expected/pidtgid_dll.c +++ b/tests/bpf2c_tests/expected/pidtgid_dll.c @@ -77,60 +77,60 @@ static uint16_t func_maps[] = { #pragma code_seg(push, "bind") static uint64_t func(void* context) -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" { -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" // Prologue. -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" uint64_t stack[(UBPF_STACK_SIZE + 7) / 8]; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r0 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r1 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r2 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r3 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r4 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r5 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r6 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r10 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" r1 = (uintptr_t)context; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_LDXB pc=0 dst=r2 src=r1 offset=40 imm=0 + // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 +#line 34 "sample/pidtgid.c" + r6 = r1; + // EBPF_OP_LDXB pc=1 dst=r1 src=r6 offset=40 imm=0 #line 46 "sample/pidtgid.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_MOV64_IMM pc=1 dst=r3 src=r0 offset=0 imm=16 + r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(40)); + // EBPF_OP_MOV64_IMM pc=2 dst=r2 src=r0 offset=0 imm=16 #line 46 "sample/pidtgid.c" - r3 = IMMEDIATE(16); - // EBPF_OP_JGT_REG pc=2 dst=r3 src=r2 offset=19 imm=0 + r2 = IMMEDIATE(16); + // EBPF_OP_JGT_REG pc=3 dst=r2 src=r1 offset=18 imm=0 #line 46 "sample/pidtgid.c" - if (r3 > r2) { + if (r2 > r1) { #line 46 "sample/pidtgid.c" goto label_1; #line 46 "sample/pidtgid.c" } - // EBPF_OP_LDXH pc=3 dst=r2 src=r1 offset=26 imm=0 + // EBPF_OP_LDXH pc=4 dst=r1 src=r6 offset=26 imm=0 #line 46 "sample/pidtgid.c" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_JNE_IMM pc=4 dst=r2 src=r0 offset=17 imm=15295 + r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(26)); + // EBPF_OP_JNE_IMM pc=5 dst=r1 src=r0 offset=16 imm=15295 #line 46 "sample/pidtgid.c" - if (r2 != IMMEDIATE(15295)) { + if (r1 != IMMEDIATE(15295)) { #line 46 "sample/pidtgid.c" goto label_1; #line 46 "sample/pidtgid.c" } - // EBPF_OP_MOV64_REG pc=5 dst=r6 src=r1 offset=0 imm=0 -#line 46 "sample/pidtgid.c" - r6 = r1; // EBPF_OP_CALL pc=6 dst=r0 src=r0 offset=0 imm=19 #line 47 "sample/pidtgid.c" r0 = func_helpers[0].address(r1, r2, r3, r4, r5, context); @@ -195,7 +195,7 @@ func(void* context) // EBPF_OP_EXIT pc=23 dst=r0 src=r0 offset=0 imm=0 #line 54 "sample/pidtgid.c" return r0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -230,7 +230,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/pidtgid_raw.c b/tests/bpf2c_tests/expected/pidtgid_raw.c index c3a2232673..79c922c1a3 100644 --- a/tests/bpf2c_tests/expected/pidtgid_raw.c +++ b/tests/bpf2c_tests/expected/pidtgid_raw.c @@ -51,60 +51,60 @@ static uint16_t func_maps[] = { #pragma code_seg(push, "bind") static uint64_t func(void* context) -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" { -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" // Prologue. -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" uint64_t stack[(UBPF_STACK_SIZE + 7) / 8]; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r0 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r1 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r2 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r3 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r4 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r5 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r6 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r10 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" r1 = (uintptr_t)context; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_LDXB pc=0 dst=r2 src=r1 offset=40 imm=0 + // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 +#line 34 "sample/pidtgid.c" + r6 = r1; + // EBPF_OP_LDXB pc=1 dst=r1 src=r6 offset=40 imm=0 #line 46 "sample/pidtgid.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_MOV64_IMM pc=1 dst=r3 src=r0 offset=0 imm=16 + r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(40)); + // EBPF_OP_MOV64_IMM pc=2 dst=r2 src=r0 offset=0 imm=16 #line 46 "sample/pidtgid.c" - r3 = IMMEDIATE(16); - // EBPF_OP_JGT_REG pc=2 dst=r3 src=r2 offset=19 imm=0 + r2 = IMMEDIATE(16); + // EBPF_OP_JGT_REG pc=3 dst=r2 src=r1 offset=18 imm=0 #line 46 "sample/pidtgid.c" - if (r3 > r2) { + if (r2 > r1) { #line 46 "sample/pidtgid.c" goto label_1; #line 46 "sample/pidtgid.c" } - // EBPF_OP_LDXH pc=3 dst=r2 src=r1 offset=26 imm=0 + // EBPF_OP_LDXH pc=4 dst=r1 src=r6 offset=26 imm=0 #line 46 "sample/pidtgid.c" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_JNE_IMM pc=4 dst=r2 src=r0 offset=17 imm=15295 + r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(26)); + // EBPF_OP_JNE_IMM pc=5 dst=r1 src=r0 offset=16 imm=15295 #line 46 "sample/pidtgid.c" - if (r2 != IMMEDIATE(15295)) { + if (r1 != IMMEDIATE(15295)) { #line 46 "sample/pidtgid.c" goto label_1; #line 46 "sample/pidtgid.c" } - // EBPF_OP_MOV64_REG pc=5 dst=r6 src=r1 offset=0 imm=0 -#line 46 "sample/pidtgid.c" - r6 = r1; // EBPF_OP_CALL pc=6 dst=r0 src=r0 offset=0 imm=19 #line 47 "sample/pidtgid.c" r0 = func_helpers[0].address(r1, r2, r3, r4, r5, context); @@ -169,7 +169,7 @@ func(void* context) // EBPF_OP_EXIT pc=23 dst=r0 src=r0 offset=0 imm=0 #line 54 "sample/pidtgid.c" return r0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -204,7 +204,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/pidtgid_sys.c b/tests/bpf2c_tests/expected/pidtgid_sys.c index 14044daadd..37ab8db9ea 100644 --- a/tests/bpf2c_tests/expected/pidtgid_sys.c +++ b/tests/bpf2c_tests/expected/pidtgid_sys.c @@ -212,60 +212,60 @@ static uint16_t func_maps[] = { #pragma code_seg(push, "bind") static uint64_t func(void* context) -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" { -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" // Prologue. -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" uint64_t stack[(UBPF_STACK_SIZE + 7) / 8]; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r0 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r1 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r2 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r3 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r4 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r5 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r6 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" register uint64_t r10 = 0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" r1 = (uintptr_t)context; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); - // EBPF_OP_LDXB pc=0 dst=r2 src=r1 offset=40 imm=0 + // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 +#line 34 "sample/pidtgid.c" + r6 = r1; + // EBPF_OP_LDXB pc=1 dst=r1 src=r6 offset=40 imm=0 #line 46 "sample/pidtgid.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_MOV64_IMM pc=1 dst=r3 src=r0 offset=0 imm=16 + r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(40)); + // EBPF_OP_MOV64_IMM pc=2 dst=r2 src=r0 offset=0 imm=16 #line 46 "sample/pidtgid.c" - r3 = IMMEDIATE(16); - // EBPF_OP_JGT_REG pc=2 dst=r3 src=r2 offset=19 imm=0 + r2 = IMMEDIATE(16); + // EBPF_OP_JGT_REG pc=3 dst=r2 src=r1 offset=18 imm=0 #line 46 "sample/pidtgid.c" - if (r3 > r2) { + if (r2 > r1) { #line 46 "sample/pidtgid.c" goto label_1; #line 46 "sample/pidtgid.c" } - // EBPF_OP_LDXH pc=3 dst=r2 src=r1 offset=26 imm=0 + // EBPF_OP_LDXH pc=4 dst=r1 src=r6 offset=26 imm=0 #line 46 "sample/pidtgid.c" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_JNE_IMM pc=4 dst=r2 src=r0 offset=17 imm=15295 + r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(26)); + // EBPF_OP_JNE_IMM pc=5 dst=r1 src=r0 offset=16 imm=15295 #line 46 "sample/pidtgid.c" - if (r2 != IMMEDIATE(15295)) { + if (r1 != IMMEDIATE(15295)) { #line 46 "sample/pidtgid.c" goto label_1; #line 46 "sample/pidtgid.c" } - // EBPF_OP_MOV64_REG pc=5 dst=r6 src=r1 offset=0 imm=0 -#line 46 "sample/pidtgid.c" - r6 = r1; // EBPF_OP_CALL pc=6 dst=r0 src=r0 offset=0 imm=19 #line 47 "sample/pidtgid.c" r0 = func_helpers[0].address(r1, r2, r3, r4, r5, context); @@ -330,7 +330,7 @@ func(void* context) // EBPF_OP_EXIT pc=23 dst=r0 src=r0 offset=0 imm=0 #line 54 "sample/pidtgid.c" return r0; -#line 46 "sample/pidtgid.c" +#line 34 "sample/pidtgid.c" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -365,7 +365,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/printk_dll.c b/tests/bpf2c_tests/expected/printk_dll.c index 32344a15b3..08117fcf3c 100644 --- a/tests/bpf2c_tests/expected/printk_dll.c +++ b/tests/bpf2c_tests/expected/printk_dll.c @@ -683,7 +683,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/printk_legacy_dll.c b/tests/bpf2c_tests/expected/printk_legacy_dll.c index 6920b7acfe..4ba21df97f 100644 --- a/tests/bpf2c_tests/expected/printk_legacy_dll.c +++ b/tests/bpf2c_tests/expected/printk_legacy_dll.c @@ -568,7 +568,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/printk_legacy_raw.c b/tests/bpf2c_tests/expected/printk_legacy_raw.c index b1e1ad245f..d18d31a22a 100644 --- a/tests/bpf2c_tests/expected/printk_legacy_raw.c +++ b/tests/bpf2c_tests/expected/printk_legacy_raw.c @@ -542,7 +542,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/printk_legacy_sys.c b/tests/bpf2c_tests/expected/printk_legacy_sys.c index ab786669f5..03a6013582 100644 --- a/tests/bpf2c_tests/expected/printk_legacy_sys.c +++ b/tests/bpf2c_tests/expected/printk_legacy_sys.c @@ -703,7 +703,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/printk_raw.c b/tests/bpf2c_tests/expected/printk_raw.c index 2236ab0922..0ba9ab6c9f 100644 --- a/tests/bpf2c_tests/expected/printk_raw.c +++ b/tests/bpf2c_tests/expected/printk_raw.c @@ -657,7 +657,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/printk_sys.c b/tests/bpf2c_tests/expected/printk_sys.c index b7dcf809f5..cf2f24158f 100644 --- a/tests/bpf2c_tests/expected/printk_sys.c +++ b/tests/bpf2c_tests/expected/printk_sys.c @@ -818,7 +818,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/reflect_packet_dll.c b/tests/bpf2c_tests/expected/reflect_packet_dll.c index 58b04afc27..955042fbba 100644 --- a/tests/bpf2c_tests/expected/reflect_packet_dll.c +++ b/tests/bpf2c_tests/expected/reflect_packet_dll.c @@ -815,7 +815,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/reflect_packet_raw.c b/tests/bpf2c_tests/expected/reflect_packet_raw.c index 3010bd7da4..611648acb5 100644 --- a/tests/bpf2c_tests/expected/reflect_packet_raw.c +++ b/tests/bpf2c_tests/expected/reflect_packet_raw.c @@ -789,7 +789,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/reflect_packet_sys.c b/tests/bpf2c_tests/expected/reflect_packet_sys.c index 87db24c698..09225b826d 100644 --- a/tests/bpf2c_tests/expected/reflect_packet_sys.c +++ b/tests/bpf2c_tests/expected/reflect_packet_sys.c @@ -950,7 +950,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/sockops_dll.c b/tests/bpf2c_tests/expected/sockops_dll.c index 1321ff4793..edb0397313 100644 --- a/tests/bpf2c_tests/expected/sockops_dll.c +++ b/tests/bpf2c_tests/expected/sockops_dll.c @@ -113,6 +113,8 @@ connection_monitor(void* context) register uint64_t r5 = 0; #line 78 "sample/sockops.c" register uint64_t r6 = 0; +#line 78 "sample/sockops.c" + register uint64_t r7 = 0; #line 78 "sample/sockops.c" register uint64_t r10 = 0; @@ -124,22 +126,22 @@ connection_monitor(void* context) // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=2 #line 78 "sample/sockops.c" r6 = IMMEDIATE(2); - // EBPF_OP_MOV64_IMM pc=1 dst=r2 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=1 dst=r3 src=r0 offset=0 imm=1 #line 78 "sample/sockops.c" - r2 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=2 dst=r3 src=r1 offset=0 imm=0 + r3 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=2 dst=r2 src=r1 offset=0 imm=0 #line 83 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=3 dst=r3 src=r0 offset=8 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=3 dst=r2 src=r0 offset=8 imm=0 #line 83 "sample/sockops.c" - if (r3 == IMMEDIATE(0)) { + if (r2 == IMMEDIATE(0)) { #line 83 "sample/sockops.c" goto label_2; #line 83 "sample/sockops.c" } - // EBPF_OP_JEQ_IMM pc=4 dst=r3 src=r0 offset=5 imm=2 + // EBPF_OP_JEQ_IMM pc=4 dst=r2 src=r0 offset=5 imm=2 #line 83 "sample/sockops.c" - if (r3 == IMMEDIATE(2)) { + if (r2 == IMMEDIATE(2)) { #line 83 "sample/sockops.c" goto label_1; #line 83 "sample/sockops.c" @@ -147,88 +149,88 @@ connection_monitor(void* context) // EBPF_OP_LDDW pc=5 dst=r0 src=r0 offset=0 imm=-1 #line 83 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JNE_IMM pc=7 dst=r3 src=r0 offset=170 imm=1 + // EBPF_OP_JNE_IMM pc=7 dst=r2 src=r0 offset=172 imm=1 #line 83 "sample/sockops.c" - if (r3 != IMMEDIATE(1)) { + if (r2 != IMMEDIATE(1)) { #line 83 "sample/sockops.c" goto label_5; #line 83 "sample/sockops.c" } - // EBPF_OP_MOV64_IMM pc=8 dst=r2 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=8 dst=r3 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" - r2 = IMMEDIATE(0); + r3 = IMMEDIATE(0); // EBPF_OP_JA pc=9 dst=r0 src=r0 offset=2 imm=0 #line 83 "sample/sockops.c" goto label_2; label_1: - // EBPF_OP_MOV64_IMM pc=10 dst=r2 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=10 dst=r3 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" - r2 = IMMEDIATE(0); + r3 = IMMEDIATE(0); // EBPF_OP_MOV64_IMM pc=11 dst=r6 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" r6 = IMMEDIATE(0); label_2: - // EBPF_OP_LDXW pc=12 dst=r3 src=r1 offset=4 imm=0 + // EBPF_OP_LDXW pc=12 dst=r2 src=r1 offset=4 imm=0 #line 100 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_JNE_IMM pc=13 dst=r3 src=r0 offset=37 imm=2 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_JNE_IMM pc=13 dst=r2 src=r0 offset=37 imm=2 #line 100 "sample/sockops.c" - if (r3 != IMMEDIATE(2)) { + if (r2 != IMMEDIATE(2)) { #line 100 "sample/sockops.c" goto label_3; #line 100 "sample/sockops.c" } - // EBPF_OP_MOV64_IMM pc=14 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=14 dst=r2 src=r0 offset=0 imm=0 #line 100 "sample/sockops.c" - r3 = IMMEDIATE(0); - // EBPF_OP_STXDW pc=15 dst=r10 src=r3 offset=-8 imm=0 + r2 = IMMEDIATE(0); + // EBPF_OP_STXDW pc=15 dst=r10 src=r2 offset=-8 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=16 dst=r10 src=r3 offset=-16 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=16 dst=r10 src=r2 offset=-16 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=17 dst=r10 src=r3 offset=-24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=17 dst=r10 src=r2 offset=-24 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=18 dst=r10 src=r3 offset=-32 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=18 dst=r10 src=r2 offset=-32 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=19 dst=r10 src=r3 offset=-40 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=19 dst=r10 src=r2 offset=-40 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=20 dst=r10 src=r3 offset=-48 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=20 dst=r10 src=r2 offset=-48 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=21 dst=r10 src=r3 offset=-56 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=21 dst=r10 src=r2 offset=-56 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=22 dst=r10 src=r3 offset=-64 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=22 dst=r10 src=r2 offset=-64 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=23 dst=r10 src=r3 offset=-72 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=23 dst=r10 src=r2 offset=-72 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r3; - // EBPF_OP_LDXW pc=24 dst=r3 src=r1 offset=8 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r2; + // EBPF_OP_LDXW pc=24 dst=r2 src=r1 offset=8 imm=0 #line 38 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXW pc=25 dst=r10 src=r3 offset=-72 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_STXW pc=25 dst=r10 src=r2 offset=-72 imm=0 #line 38 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint32_t)r3; - // EBPF_OP_LDXW pc=26 dst=r3 src=r1 offset=24 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=26 dst=r2 src=r1 offset=24 imm=0 #line 39 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); - // EBPF_OP_STXH pc=27 dst=r10 src=r3 offset=-56 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); + // EBPF_OP_STXH pc=27 dst=r10 src=r2 offset=-56 imm=0 #line 39 "sample/sockops.c" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r3; - // EBPF_OP_LDXW pc=28 dst=r3 src=r1 offset=28 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=28 dst=r2 src=r1 offset=28 imm=0 #line 40 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(28)); - // EBPF_OP_STXW pc=29 dst=r10 src=r3 offset=-52 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(28)); + // EBPF_OP_STXW pc=29 dst=r10 src=r2 offset=-52 imm=0 #line 40 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r3; - // EBPF_OP_OR64_REG pc=30 dst=r6 src=r2 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r2; + // EBPF_OP_OR64_REG pc=30 dst=r6 src=r3 offset=0 imm=0 #line 47 "sample/sockops.c" - r6 |= r2; + r6 |= r3; // EBPF_OP_LDXW pc=31 dst=r2 src=r1 offset=44 imm=0 #line 41 "sample/sockops.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); @@ -289,339 +291,345 @@ connection_monitor(void* context) // EBPF_OP_LDDW pc=47 dst=r0 src=r0 offset=0 imm=-1 #line 26 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JEQ_IMM pc=49 dst=r1 src=r0 offset=128 imm=0 + // EBPF_OP_JEQ_IMM pc=49 dst=r1 src=r0 offset=130 imm=0 #line 26 "sample/sockops.c" if (r1 == IMMEDIATE(0)) { #line 26 "sample/sockops.c" goto label_5; #line 26 "sample/sockops.c" } - // EBPF_OP_JA pc=50 dst=r0 src=r0 offset=120 imm=0 + // EBPF_OP_JA pc=50 dst=r0 src=r0 offset=122 imm=0 #line 26 "sample/sockops.c" goto label_4; label_3: - // EBPF_OP_MOV64_IMM pc=51 dst=r3 src=r0 offset=0 imm=0 -#line 26 "sample/sockops.c" - r3 = IMMEDIATE(0); - // EBPF_OP_STXDW pc=52 dst=r10 src=r3 offset=-8 imm=0 + // EBPF_OP_MOV64_REG pc=51 dst=r2 src=r1 offset=0 imm=0 +#line 100 "sample/sockops.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=52 dst=r2 src=r0 offset=0 imm=28 +#line 100 "sample/sockops.c" + r2 += IMMEDIATE(28); + // EBPF_OP_MOV64_IMM pc=53 dst=r4 src=r0 offset=0 imm=0 +#line 100 "sample/sockops.c" + r4 = IMMEDIATE(0); + // EBPF_OP_STXDW pc=54 dst=r10 src=r4 offset=-8 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=53 dst=r10 src=r3 offset=-16 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=55 dst=r10 src=r4 offset=-16 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=54 dst=r10 src=r3 offset=-24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=56 dst=r10 src=r4 offset=-24 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=55 dst=r10 src=r3 offset=-32 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=57 dst=r10 src=r4 offset=-32 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=56 dst=r10 src=r3 offset=-40 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=58 dst=r10 src=r4 offset=-40 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=57 dst=r10 src=r3 offset=-48 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=59 dst=r10 src=r4 offset=-48 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=58 dst=r10 src=r3 offset=-56 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=60 dst=r10 src=r4 offset=-56 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r3; - // EBPF_OP_LDXB pc=59 dst=r4 src=r1 offset=17 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r4; + // EBPF_OP_LDXB pc=61 dst=r5 src=r1 offset=17 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(17)); - // EBPF_OP_LSH64_IMM pc=60 dst=r4 src=r0 offset=0 imm=8 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(17)); + // EBPF_OP_LSH64_IMM pc=62 dst=r5 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=61 dst=r3 src=r1 offset=16 imm=0 + r5 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=63 dst=r4 src=r1 offset=16 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(16)); - // EBPF_OP_OR64_REG pc=62 dst=r4 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(16)); + // EBPF_OP_OR64_REG pc=64 dst=r5 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_LDXB pc=63 dst=r5 src=r1 offset=18 imm=0 + r5 |= r4; + // EBPF_OP_LDXB pc=65 dst=r0 src=r1 offset=18 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(18)); - // EBPF_OP_LSH64_IMM pc=64 dst=r5 src=r0 offset=0 imm=16 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(18)); + // EBPF_OP_LSH64_IMM pc=66 dst=r0 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=65 dst=r3 src=r1 offset=19 imm=0 + r0 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=67 dst=r4 src=r1 offset=19 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(19)); - // EBPF_OP_LSH64_IMM pc=66 dst=r3 src=r0 offset=0 imm=24 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(19)); + // EBPF_OP_LSH64_IMM pc=68 dst=r4 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r3 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=67 dst=r3 src=r5 offset=0 imm=0 + r4 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=69 dst=r4 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_OR64_REG pc=68 dst=r3 src=r4 offset=0 imm=0 + r4 |= r0; + // EBPF_OP_OR64_REG pc=70 dst=r4 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r4; - // EBPF_OP_LDXB pc=69 dst=r5 src=r1 offset=21 imm=0 + r4 |= r5; + // EBPF_OP_LDXB pc=71 dst=r0 src=r1 offset=21 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(21)); - // EBPF_OP_LSH64_IMM pc=70 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(21)); + // EBPF_OP_LSH64_IMM pc=72 dst=r0 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=71 dst=r4 src=r1 offset=20 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=73 dst=r5 src=r1 offset=20 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); - // EBPF_OP_OR64_REG pc=72 dst=r5 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); + // EBPF_OP_OR64_REG pc=74 dst=r0 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_LDXB pc=73 dst=r0 src=r1 offset=22 imm=0 + r0 |= r5; + // EBPF_OP_LDXB pc=75 dst=r7 src=r1 offset=22 imm=0 #line 60 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)); - // EBPF_OP_LSH64_IMM pc=74 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)); + // EBPF_OP_LSH64_IMM pc=76 dst=r7 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=75 dst=r4 src=r1 offset=23 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=77 dst=r5 src=r1 offset=23 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); - // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=24 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); + // EBPF_OP_LSH64_IMM pc=78 dst=r5 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=77 dst=r4 src=r0 offset=0 imm=0 + r5 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=79 dst=r5 src=r7 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r0; - // EBPF_OP_OR64_REG pc=78 dst=r4 src=r5 offset=0 imm=0 + r5 |= r7; + // EBPF_OP_OR64_REG pc=80 dst=r5 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r5; - // EBPF_OP_LSH64_IMM pc=79 dst=r4 src=r0 offset=0 imm=32 + r5 |= r0; + // EBPF_OP_LSH64_IMM pc=81 dst=r5 src=r0 offset=0 imm=32 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=80 dst=r4 src=r3 offset=0 imm=0 + r5 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=82 dst=r5 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_LDXB pc=81 dst=r5 src=r1 offset=9 imm=0 + r5 |= r4; + // EBPF_OP_LDXB pc=83 dst=r0 src=r1 offset=9 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)); - // EBPF_OP_LSH64_IMM pc=82 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)); + // EBPF_OP_LSH64_IMM pc=84 dst=r0 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=83 dst=r3 src=r1 offset=8 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=85 dst=r4 src=r1 offset=8 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_OR64_REG pc=84 dst=r5 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_OR64_REG pc=86 dst=r0 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r3; - // EBPF_OP_LDXB pc=85 dst=r0 src=r1 offset=10 imm=0 + r0 |= r4; + // EBPF_OP_LDXB pc=87 dst=r7 src=r1 offset=10 imm=0 #line 60 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_LSH64_IMM pc=86 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)); + // EBPF_OP_LSH64_IMM pc=88 dst=r7 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=87 dst=r3 src=r1 offset=11 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=89 dst=r4 src=r1 offset=11 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)); - // EBPF_OP_LSH64_IMM pc=88 dst=r3 src=r0 offset=0 imm=24 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)); + // EBPF_OP_LSH64_IMM pc=90 dst=r4 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r3 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=89 dst=r3 src=r0 offset=0 imm=0 + r4 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=91 dst=r4 src=r7 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r0; - // EBPF_OP_OR64_REG pc=90 dst=r6 src=r2 offset=0 imm=0 + r4 |= r7; + // EBPF_OP_OR64_REG pc=92 dst=r6 src=r3 offset=0 imm=0 #line 70 "sample/sockops.c" - r6 |= r2; - // EBPF_OP_STXDW pc=91 dst=r10 src=r4 offset=-64 imm=0 + r6 |= r3; + // EBPF_OP_STXDW pc=93 dst=r10 src=r5 offset=-64 imm=0 #line 60 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r4; - // EBPF_OP_OR64_REG pc=92 dst=r3 src=r5 offset=0 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r5; + // EBPF_OP_OR64_REG pc=94 dst=r4 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_LDXB pc=93 dst=r2 src=r1 offset=13 imm=0 + r4 |= r0; + // EBPF_OP_LDXB pc=95 dst=r3 src=r1 offset=13 imm=0 #line 60 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(13)); - // EBPF_OP_LSH64_IMM pc=94 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(13)); + // EBPF_OP_LSH64_IMM pc=96 dst=r3 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=95 dst=r4 src=r1 offset=12 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=97 dst=r5 src=r1 offset=12 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_OR64_REG pc=96 dst=r2 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(12)); + // EBPF_OP_OR64_REG pc=98 dst=r3 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r2 |= r4; - // EBPF_OP_LDXB pc=97 dst=r4 src=r1 offset=14 imm=0 + r3 |= r5; + // EBPF_OP_LDXB pc=99 dst=r5 src=r1 offset=14 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); - // EBPF_OP_LSH64_IMM pc=98 dst=r4 src=r0 offset=0 imm=16 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=100 dst=r5 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=99 dst=r5 src=r1 offset=15 imm=0 + r5 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=101 dst=r0 src=r1 offset=15 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(15)); - // EBPF_OP_LSH64_IMM pc=100 dst=r5 src=r0 offset=0 imm=24 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(15)); + // EBPF_OP_LSH64_IMM pc=102 dst=r0 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=101 dst=r5 src=r4 offset=0 imm=0 + r0 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=103 dst=r0 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_OR64_REG pc=102 dst=r5 src=r2 offset=0 imm=0 + r0 |= r5; + // EBPF_OP_OR64_REG pc=104 dst=r0 src=r3 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r2; - // EBPF_OP_LSH64_IMM pc=103 dst=r5 src=r0 offset=0 imm=32 + r0 |= r3; + // EBPF_OP_LSH64_IMM pc=105 dst=r0 src=r0 offset=0 imm=32 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=104 dst=r5 src=r3 offset=0 imm=0 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=106 dst=r0 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r3; - // EBPF_OP_STXDW pc=105 dst=r10 src=r5 offset=-72 imm=0 + r0 |= r4; + // EBPF_OP_STXDW pc=107 dst=r10 src=r0 offset=-72 imm=0 #line 60 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r5; - // EBPF_OP_LDXW pc=106 dst=r2 src=r1 offset=24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r0; + // EBPF_OP_LDXW pc=108 dst=r3 src=r1 offset=24 imm=0 #line 61 "sample/sockops.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); - // EBPF_OP_STXH pc=107 dst=r10 src=r2 offset=-56 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); + // EBPF_OP_STXH pc=109 dst=r10 src=r3 offset=-56 imm=0 #line 61 "sample/sockops.c" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=108 dst=r3 src=r1 offset=41 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r3; + // EBPF_OP_LDXB pc=110 dst=r4 src=r2 offset=13 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(41)); - // EBPF_OP_LSH64_IMM pc=109 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(13)); + // EBPF_OP_LSH64_IMM pc=111 dst=r4 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=110 dst=r2 src=r1 offset=40 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=112 dst=r3 src=r2 offset=12 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_OR64_REG pc=111 dst=r3 src=r2 offset=0 imm=0 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_OR64_REG pc=113 dst=r4 src=r3 offset=0 imm=0 #line 63 "sample/sockops.c" - r3 |= r2; - // EBPF_OP_LDXB pc=112 dst=r4 src=r1 offset=42 imm=0 + r4 |= r3; + // EBPF_OP_LDXB pc=114 dst=r5 src=r2 offset=14 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(42)); - // EBPF_OP_LSH64_IMM pc=113 dst=r4 src=r0 offset=0 imm=16 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=115 dst=r5 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=114 dst=r2 src=r1 offset=43 imm=0 + r5 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=116 dst=r3 src=r2 offset=15 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(43)); - // EBPF_OP_LSH64_IMM pc=115 dst=r2 src=r0 offset=0 imm=24 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(15)); + // EBPF_OP_LSH64_IMM pc=117 dst=r3 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r2 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=116 dst=r2 src=r4 offset=0 imm=0 + r3 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=118 dst=r3 src=r5 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r4; - // EBPF_OP_LDXB pc=117 dst=r5 src=r1 offset=29 imm=0 + r3 |= r5; + // EBPF_OP_LDXB pc=119 dst=r0 src=r2 offset=1 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(29)); - // EBPF_OP_LSH64_IMM pc=118 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(1)); + // EBPF_OP_LSH64_IMM pc=120 dst=r0 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=119 dst=r4 src=r1 offset=28 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=121 dst=r5 src=r2 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(28)); - // EBPF_OP_OR64_REG pc=120 dst=r5 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_OR64_REG pc=122 dst=r0 src=r5 offset=0 imm=0 #line 63 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_LDXB pc=121 dst=r0 src=r1 offset=30 imm=0 + r0 |= r5; + // EBPF_OP_LDXB pc=123 dst=r7 src=r2 offset=2 imm=0 #line 63 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_LSH64_IMM pc=122 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_LSH64_IMM pc=124 dst=r7 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=123 dst=r4 src=r1 offset=31 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=125 dst=r5 src=r2 offset=3 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(31)); - // EBPF_OP_LSH64_IMM pc=124 dst=r4 src=r0 offset=0 imm=24 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(3)); + // EBPF_OP_LSH64_IMM pc=126 dst=r5 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=125 dst=r4 src=r0 offset=0 imm=0 + r5 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=127 dst=r5 src=r7 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r0; - // EBPF_OP_OR64_REG pc=126 dst=r4 src=r5 offset=0 imm=0 + r5 |= r7; + // EBPF_OP_OR64_REG pc=128 dst=r5 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r5; - // EBPF_OP_OR64_REG pc=127 dst=r2 src=r3 offset=0 imm=0 + r5 |= r0; + // EBPF_OP_OR64_REG pc=129 dst=r3 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r3; - // EBPF_OP_LDXB pc=128 dst=r3 src=r1 offset=37 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=130 dst=r4 src=r2 offset=9 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(37)); - // EBPF_OP_LSH64_IMM pc=129 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(9)); + // EBPF_OP_LSH64_IMM pc=131 dst=r4 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=130 dst=r5 src=r1 offset=36 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=132 dst=r0 src=r2 offset=8 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(36)); - // EBPF_OP_OR64_REG pc=131 dst=r3 src=r5 offset=0 imm=0 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(8)); + // EBPF_OP_OR64_REG pc=133 dst=r4 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_LDXB pc=132 dst=r5 src=r1 offset=38 imm=0 + r4 |= r0; + // EBPF_OP_LDXB pc=134 dst=r0 src=r2 offset=10 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(38)); - // EBPF_OP_LSH64_IMM pc=133 dst=r5 src=r0 offset=0 imm=16 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(10)); + // EBPF_OP_LSH64_IMM pc=135 dst=r0 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=134 dst=r0 src=r1 offset=39 imm=0 + r0 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=136 dst=r7 src=r2 offset=11 imm=0 #line 63 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(39)); - // EBPF_OP_LSH64_IMM pc=135 dst=r0 src=r0 offset=0 imm=24 + r7 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(11)); + // EBPF_OP_LSH64_IMM pc=137 dst=r7 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r0 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=136 dst=r0 src=r5 offset=0 imm=0 + r7 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=138 dst=r7 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r0 |= r5; - // EBPF_OP_OR64_REG pc=137 dst=r0 src=r3 offset=0 imm=0 + r7 |= r0; + // EBPF_OP_OR64_REG pc=139 dst=r7 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r0 |= r3; - // EBPF_OP_STXW pc=138 dst=r10 src=r0 offset=-44 imm=0 + r7 |= r4; + // EBPF_OP_STXW pc=140 dst=r10 src=r7 offset=-44 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-44)) = (uint32_t)r0; - // EBPF_OP_STXW pc=139 dst=r10 src=r2 offset=-40 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-44)) = (uint32_t)r7; + // EBPF_OP_STXW pc=141 dst=r10 src=r3 offset=-40 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint32_t)r2; - // EBPF_OP_STXW pc=140 dst=r10 src=r4 offset=-52 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint32_t)r3; + // EBPF_OP_STXW pc=142 dst=r10 src=r5 offset=-52 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r4; - // EBPF_OP_LDXB pc=141 dst=r2 src=r1 offset=33 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r5; + // EBPF_OP_LDXB pc=143 dst=r3 src=r2 offset=5 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(33)); - // EBPF_OP_LSH64_IMM pc=142 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(5)); + // EBPF_OP_LSH64_IMM pc=144 dst=r3 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=143 dst=r3 src=r1 offset=32 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=145 dst=r4 src=r2 offset=4 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(32)); - // EBPF_OP_OR64_REG pc=144 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_OR64_REG pc=146 dst=r3 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r3; - // EBPF_OP_LDXB pc=145 dst=r3 src=r1 offset=34 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=147 dst=r4 src=r2 offset=6 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(34)); - // EBPF_OP_LSH64_IMM pc=146 dst=r3 src=r0 offset=0 imm=16 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=147 dst=r4 src=r1 offset=35 imm=0 + r4 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=149 dst=r2 src=r2 offset=7 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(35)); - // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=24 + r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(7)); + // EBPF_OP_LSH64_IMM pc=150 dst=r2 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=149 dst=r4 src=r3 offset=0 imm=0 + r2 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=151 dst=r2 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_OR64_REG pc=150 dst=r4 src=r2 offset=0 imm=0 + r2 |= r4; + // EBPF_OP_OR64_REG pc=152 dst=r2 src=r3 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r2; - // EBPF_OP_STXW pc=151 dst=r10 src=r4 offset=-48 imm=0 + r2 |= r3; + // EBPF_OP_STXW pc=153 dst=r10 src=r2 offset=-48 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=152 dst=r2 src=r1 offset=44 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=154 dst=r2 src=r1 offset=44 imm=0 #line 64 "sample/sockops.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_STXH pc=153 dst=r10 src=r2 offset=-36 imm=0 + // EBPF_OP_STXH pc=155 dst=r10 src=r2 offset=-36 imm=0 #line 64 "sample/sockops.c" *(uint16_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=154 dst=r2 src=r1 offset=48 imm=0 + // EBPF_OP_LDXB pc=156 dst=r2 src=r1 offset=48 imm=0 #line 65 "sample/sockops.c" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(48)); - // EBPF_OP_STXW pc=155 dst=r10 src=r2 offset=-32 imm=0 + // EBPF_OP_STXW pc=157 dst=r10 src=r2 offset=-32 imm=0 #line 65 "sample/sockops.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint32_t)r2; - // EBPF_OP_LDXDW pc=156 dst=r1 src=r1 offset=56 imm=0 + // EBPF_OP_LDXDW pc=158 dst=r1 src=r1 offset=56 imm=0 #line 66 "sample/sockops.c" r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(56)); - // EBPF_OP_STXDW pc=157 dst=r10 src=r1 offset=-24 imm=0 + // EBPF_OP_STXDW pc=159 dst=r10 src=r1 offset=-24 imm=0 #line 66 "sample/sockops.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r1; - // EBPF_OP_CALL pc=158 dst=r0 src=r0 offset=0 imm=19 + // EBPF_OP_CALL pc=160 dst=r0 src=r0 offset=0 imm=19 #line 67 "sample/sockops.c" r0 = connection_monitor_helpers[0].address(r1, r2, r3, r4, r5, context); #line 67 "sample/sockops.c" @@ -630,25 +638,25 @@ connection_monitor(void* context) return 0; #line 67 "sample/sockops.c" } - // EBPF_OP_STXB pc=159 dst=r10 src=r6 offset=-8 imm=0 + // EBPF_OP_STXB pc=161 dst=r10 src=r6 offset=-8 imm=0 #line 71 "sample/sockops.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint8_t)r6; - // EBPF_OP_RSH64_IMM pc=160 dst=r0 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=162 dst=r0 src=r0 offset=0 imm=32 #line 69 "sample/sockops.c" r0 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXDW pc=161 dst=r10 src=r0 offset=-16 imm=0 + // EBPF_OP_STXDW pc=163 dst=r10 src=r0 offset=-16 imm=0 #line 69 "sample/sockops.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r0; - // EBPF_OP_MOV64_REG pc=162 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=164 dst=r2 src=r10 offset=0 imm=0 #line 69 "sample/sockops.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=163 dst=r2 src=r0 offset=0 imm=-72 -#line 69 "sample/sockops.c" + // EBPF_OP_ADD64_IMM pc=165 dst=r2 src=r0 offset=0 imm=-72 +#line 100 "sample/sockops.c" r2 += IMMEDIATE(-72); - // EBPF_OP_LDDW pc=164 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=166 dst=r1 src=r1 offset=0 imm=1 #line 26 "sample/sockops.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_CALL pc=166 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=168 dst=r0 src=r0 offset=0 imm=1 #line 26 "sample/sockops.c" r0 = connection_monitor_helpers[1].address(r1, r2, r3, r4, r5, context); #line 26 "sample/sockops.c" @@ -657,13 +665,13 @@ connection_monitor(void* context) return 0; #line 26 "sample/sockops.c" } - // EBPF_OP_MOV64_REG pc=167 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=169 dst=r1 src=r0 offset=0 imm=0 #line 26 "sample/sockops.c" r1 = r0; - // EBPF_OP_LDDW pc=168 dst=r0 src=r0 offset=0 imm=-1 + // EBPF_OP_LDDW pc=170 dst=r0 src=r0 offset=0 imm=-1 #line 26 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JEQ_IMM pc=170 dst=r1 src=r0 offset=7 imm=0 + // EBPF_OP_JEQ_IMM pc=172 dst=r1 src=r0 offset=7 imm=0 #line 26 "sample/sockops.c" if (r1 == IMMEDIATE(0)) { #line 26 "sample/sockops.c" @@ -671,22 +679,22 @@ connection_monitor(void* context) #line 26 "sample/sockops.c" } label_4: - // EBPF_OP_MOV64_REG pc=171 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=173 dst=r2 src=r10 offset=0 imm=0 #line 26 "sample/sockops.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=172 dst=r2 src=r0 offset=0 imm=-72 + // EBPF_OP_ADD64_IMM pc=174 dst=r2 src=r0 offset=0 imm=-72 #line 100 "sample/sockops.c" r2 += IMMEDIATE(-72); - // EBPF_OP_LDDW pc=173 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=175 dst=r1 src=r1 offset=0 imm=2 #line 100 "sample/sockops.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=175 dst=r3 src=r0 offset=0 imm=72 + // EBPF_OP_MOV64_IMM pc=177 dst=r3 src=r0 offset=0 imm=72 #line 100 "sample/sockops.c" r3 = IMMEDIATE(72); - // EBPF_OP_MOV64_IMM pc=176 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=178 dst=r4 src=r0 offset=0 imm=0 #line 100 "sample/sockops.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=177 dst=r0 src=r0 offset=0 imm=11 + // EBPF_OP_CALL pc=179 dst=r0 src=r0 offset=0 imm=11 #line 100 "sample/sockops.c" r0 = connection_monitor_helpers[2].address(r1, r2, r3, r4, r5, context); #line 100 "sample/sockops.c" @@ -696,7 +704,7 @@ connection_monitor(void* context) #line 100 "sample/sockops.c" } label_5: - // EBPF_OP_EXIT pc=178 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_EXIT pc=180 dst=r0 src=r0 offset=0 imm=0 #line 103 "sample/sockops.c" return r0; #line 78 "sample/sockops.c" @@ -716,7 +724,7 @@ static program_entry_t _programs[] = { 2, connection_monitor_helpers, 3, - 179, + 181, &connection_monitor_program_type_guid, &connection_monitor_attach_type_guid, }, @@ -734,7 +742,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/sockops_raw.c b/tests/bpf2c_tests/expected/sockops_raw.c index 7e1eed3655..6dcb16fa7c 100644 --- a/tests/bpf2c_tests/expected/sockops_raw.c +++ b/tests/bpf2c_tests/expected/sockops_raw.c @@ -87,6 +87,8 @@ connection_monitor(void* context) register uint64_t r5 = 0; #line 78 "sample/sockops.c" register uint64_t r6 = 0; +#line 78 "sample/sockops.c" + register uint64_t r7 = 0; #line 78 "sample/sockops.c" register uint64_t r10 = 0; @@ -98,22 +100,22 @@ connection_monitor(void* context) // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=2 #line 78 "sample/sockops.c" r6 = IMMEDIATE(2); - // EBPF_OP_MOV64_IMM pc=1 dst=r2 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=1 dst=r3 src=r0 offset=0 imm=1 #line 78 "sample/sockops.c" - r2 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=2 dst=r3 src=r1 offset=0 imm=0 + r3 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=2 dst=r2 src=r1 offset=0 imm=0 #line 83 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=3 dst=r3 src=r0 offset=8 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=3 dst=r2 src=r0 offset=8 imm=0 #line 83 "sample/sockops.c" - if (r3 == IMMEDIATE(0)) { + if (r2 == IMMEDIATE(0)) { #line 83 "sample/sockops.c" goto label_2; #line 83 "sample/sockops.c" } - // EBPF_OP_JEQ_IMM pc=4 dst=r3 src=r0 offset=5 imm=2 + // EBPF_OP_JEQ_IMM pc=4 dst=r2 src=r0 offset=5 imm=2 #line 83 "sample/sockops.c" - if (r3 == IMMEDIATE(2)) { + if (r2 == IMMEDIATE(2)) { #line 83 "sample/sockops.c" goto label_1; #line 83 "sample/sockops.c" @@ -121,88 +123,88 @@ connection_monitor(void* context) // EBPF_OP_LDDW pc=5 dst=r0 src=r0 offset=0 imm=-1 #line 83 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JNE_IMM pc=7 dst=r3 src=r0 offset=170 imm=1 + // EBPF_OP_JNE_IMM pc=7 dst=r2 src=r0 offset=172 imm=1 #line 83 "sample/sockops.c" - if (r3 != IMMEDIATE(1)) { + if (r2 != IMMEDIATE(1)) { #line 83 "sample/sockops.c" goto label_5; #line 83 "sample/sockops.c" } - // EBPF_OP_MOV64_IMM pc=8 dst=r2 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=8 dst=r3 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" - r2 = IMMEDIATE(0); + r3 = IMMEDIATE(0); // EBPF_OP_JA pc=9 dst=r0 src=r0 offset=2 imm=0 #line 83 "sample/sockops.c" goto label_2; label_1: - // EBPF_OP_MOV64_IMM pc=10 dst=r2 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=10 dst=r3 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" - r2 = IMMEDIATE(0); + r3 = IMMEDIATE(0); // EBPF_OP_MOV64_IMM pc=11 dst=r6 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" r6 = IMMEDIATE(0); label_2: - // EBPF_OP_LDXW pc=12 dst=r3 src=r1 offset=4 imm=0 + // EBPF_OP_LDXW pc=12 dst=r2 src=r1 offset=4 imm=0 #line 100 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_JNE_IMM pc=13 dst=r3 src=r0 offset=37 imm=2 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_JNE_IMM pc=13 dst=r2 src=r0 offset=37 imm=2 #line 100 "sample/sockops.c" - if (r3 != IMMEDIATE(2)) { + if (r2 != IMMEDIATE(2)) { #line 100 "sample/sockops.c" goto label_3; #line 100 "sample/sockops.c" } - // EBPF_OP_MOV64_IMM pc=14 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=14 dst=r2 src=r0 offset=0 imm=0 #line 100 "sample/sockops.c" - r3 = IMMEDIATE(0); - // EBPF_OP_STXDW pc=15 dst=r10 src=r3 offset=-8 imm=0 + r2 = IMMEDIATE(0); + // EBPF_OP_STXDW pc=15 dst=r10 src=r2 offset=-8 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=16 dst=r10 src=r3 offset=-16 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=16 dst=r10 src=r2 offset=-16 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=17 dst=r10 src=r3 offset=-24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=17 dst=r10 src=r2 offset=-24 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=18 dst=r10 src=r3 offset=-32 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=18 dst=r10 src=r2 offset=-32 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=19 dst=r10 src=r3 offset=-40 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=19 dst=r10 src=r2 offset=-40 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=20 dst=r10 src=r3 offset=-48 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=20 dst=r10 src=r2 offset=-48 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=21 dst=r10 src=r3 offset=-56 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=21 dst=r10 src=r2 offset=-56 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=22 dst=r10 src=r3 offset=-64 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=22 dst=r10 src=r2 offset=-64 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=23 dst=r10 src=r3 offset=-72 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=23 dst=r10 src=r2 offset=-72 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r3; - // EBPF_OP_LDXW pc=24 dst=r3 src=r1 offset=8 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r2; + // EBPF_OP_LDXW pc=24 dst=r2 src=r1 offset=8 imm=0 #line 38 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXW pc=25 dst=r10 src=r3 offset=-72 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_STXW pc=25 dst=r10 src=r2 offset=-72 imm=0 #line 38 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint32_t)r3; - // EBPF_OP_LDXW pc=26 dst=r3 src=r1 offset=24 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=26 dst=r2 src=r1 offset=24 imm=0 #line 39 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); - // EBPF_OP_STXH pc=27 dst=r10 src=r3 offset=-56 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); + // EBPF_OP_STXH pc=27 dst=r10 src=r2 offset=-56 imm=0 #line 39 "sample/sockops.c" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r3; - // EBPF_OP_LDXW pc=28 dst=r3 src=r1 offset=28 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=28 dst=r2 src=r1 offset=28 imm=0 #line 40 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(28)); - // EBPF_OP_STXW pc=29 dst=r10 src=r3 offset=-52 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(28)); + // EBPF_OP_STXW pc=29 dst=r10 src=r2 offset=-52 imm=0 #line 40 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r3; - // EBPF_OP_OR64_REG pc=30 dst=r6 src=r2 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r2; + // EBPF_OP_OR64_REG pc=30 dst=r6 src=r3 offset=0 imm=0 #line 47 "sample/sockops.c" - r6 |= r2; + r6 |= r3; // EBPF_OP_LDXW pc=31 dst=r2 src=r1 offset=44 imm=0 #line 41 "sample/sockops.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); @@ -263,339 +265,345 @@ connection_monitor(void* context) // EBPF_OP_LDDW pc=47 dst=r0 src=r0 offset=0 imm=-1 #line 26 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JEQ_IMM pc=49 dst=r1 src=r0 offset=128 imm=0 + // EBPF_OP_JEQ_IMM pc=49 dst=r1 src=r0 offset=130 imm=0 #line 26 "sample/sockops.c" if (r1 == IMMEDIATE(0)) { #line 26 "sample/sockops.c" goto label_5; #line 26 "sample/sockops.c" } - // EBPF_OP_JA pc=50 dst=r0 src=r0 offset=120 imm=0 + // EBPF_OP_JA pc=50 dst=r0 src=r0 offset=122 imm=0 #line 26 "sample/sockops.c" goto label_4; label_3: - // EBPF_OP_MOV64_IMM pc=51 dst=r3 src=r0 offset=0 imm=0 -#line 26 "sample/sockops.c" - r3 = IMMEDIATE(0); - // EBPF_OP_STXDW pc=52 dst=r10 src=r3 offset=-8 imm=0 + // EBPF_OP_MOV64_REG pc=51 dst=r2 src=r1 offset=0 imm=0 +#line 100 "sample/sockops.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=52 dst=r2 src=r0 offset=0 imm=28 +#line 100 "sample/sockops.c" + r2 += IMMEDIATE(28); + // EBPF_OP_MOV64_IMM pc=53 dst=r4 src=r0 offset=0 imm=0 +#line 100 "sample/sockops.c" + r4 = IMMEDIATE(0); + // EBPF_OP_STXDW pc=54 dst=r10 src=r4 offset=-8 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=53 dst=r10 src=r3 offset=-16 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=55 dst=r10 src=r4 offset=-16 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=54 dst=r10 src=r3 offset=-24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=56 dst=r10 src=r4 offset=-24 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=55 dst=r10 src=r3 offset=-32 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=57 dst=r10 src=r4 offset=-32 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=56 dst=r10 src=r3 offset=-40 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=58 dst=r10 src=r4 offset=-40 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=57 dst=r10 src=r3 offset=-48 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=59 dst=r10 src=r4 offset=-48 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=58 dst=r10 src=r3 offset=-56 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=60 dst=r10 src=r4 offset=-56 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r3; - // EBPF_OP_LDXB pc=59 dst=r4 src=r1 offset=17 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r4; + // EBPF_OP_LDXB pc=61 dst=r5 src=r1 offset=17 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(17)); - // EBPF_OP_LSH64_IMM pc=60 dst=r4 src=r0 offset=0 imm=8 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(17)); + // EBPF_OP_LSH64_IMM pc=62 dst=r5 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=61 dst=r3 src=r1 offset=16 imm=0 + r5 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=63 dst=r4 src=r1 offset=16 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(16)); - // EBPF_OP_OR64_REG pc=62 dst=r4 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(16)); + // EBPF_OP_OR64_REG pc=64 dst=r5 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_LDXB pc=63 dst=r5 src=r1 offset=18 imm=0 + r5 |= r4; + // EBPF_OP_LDXB pc=65 dst=r0 src=r1 offset=18 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(18)); - // EBPF_OP_LSH64_IMM pc=64 dst=r5 src=r0 offset=0 imm=16 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(18)); + // EBPF_OP_LSH64_IMM pc=66 dst=r0 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=65 dst=r3 src=r1 offset=19 imm=0 + r0 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=67 dst=r4 src=r1 offset=19 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(19)); - // EBPF_OP_LSH64_IMM pc=66 dst=r3 src=r0 offset=0 imm=24 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(19)); + // EBPF_OP_LSH64_IMM pc=68 dst=r4 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r3 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=67 dst=r3 src=r5 offset=0 imm=0 + r4 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=69 dst=r4 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_OR64_REG pc=68 dst=r3 src=r4 offset=0 imm=0 + r4 |= r0; + // EBPF_OP_OR64_REG pc=70 dst=r4 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r4; - // EBPF_OP_LDXB pc=69 dst=r5 src=r1 offset=21 imm=0 + r4 |= r5; + // EBPF_OP_LDXB pc=71 dst=r0 src=r1 offset=21 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(21)); - // EBPF_OP_LSH64_IMM pc=70 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(21)); + // EBPF_OP_LSH64_IMM pc=72 dst=r0 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=71 dst=r4 src=r1 offset=20 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=73 dst=r5 src=r1 offset=20 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); - // EBPF_OP_OR64_REG pc=72 dst=r5 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); + // EBPF_OP_OR64_REG pc=74 dst=r0 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_LDXB pc=73 dst=r0 src=r1 offset=22 imm=0 + r0 |= r5; + // EBPF_OP_LDXB pc=75 dst=r7 src=r1 offset=22 imm=0 #line 60 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)); - // EBPF_OP_LSH64_IMM pc=74 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)); + // EBPF_OP_LSH64_IMM pc=76 dst=r7 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=75 dst=r4 src=r1 offset=23 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=77 dst=r5 src=r1 offset=23 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); - // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=24 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); + // EBPF_OP_LSH64_IMM pc=78 dst=r5 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=77 dst=r4 src=r0 offset=0 imm=0 + r5 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=79 dst=r5 src=r7 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r0; - // EBPF_OP_OR64_REG pc=78 dst=r4 src=r5 offset=0 imm=0 + r5 |= r7; + // EBPF_OP_OR64_REG pc=80 dst=r5 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r5; - // EBPF_OP_LSH64_IMM pc=79 dst=r4 src=r0 offset=0 imm=32 + r5 |= r0; + // EBPF_OP_LSH64_IMM pc=81 dst=r5 src=r0 offset=0 imm=32 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=80 dst=r4 src=r3 offset=0 imm=0 + r5 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=82 dst=r5 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_LDXB pc=81 dst=r5 src=r1 offset=9 imm=0 + r5 |= r4; + // EBPF_OP_LDXB pc=83 dst=r0 src=r1 offset=9 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)); - // EBPF_OP_LSH64_IMM pc=82 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)); + // EBPF_OP_LSH64_IMM pc=84 dst=r0 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=83 dst=r3 src=r1 offset=8 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=85 dst=r4 src=r1 offset=8 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_OR64_REG pc=84 dst=r5 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_OR64_REG pc=86 dst=r0 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r3; - // EBPF_OP_LDXB pc=85 dst=r0 src=r1 offset=10 imm=0 + r0 |= r4; + // EBPF_OP_LDXB pc=87 dst=r7 src=r1 offset=10 imm=0 #line 60 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_LSH64_IMM pc=86 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)); + // EBPF_OP_LSH64_IMM pc=88 dst=r7 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=87 dst=r3 src=r1 offset=11 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=89 dst=r4 src=r1 offset=11 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)); - // EBPF_OP_LSH64_IMM pc=88 dst=r3 src=r0 offset=0 imm=24 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)); + // EBPF_OP_LSH64_IMM pc=90 dst=r4 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r3 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=89 dst=r3 src=r0 offset=0 imm=0 + r4 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=91 dst=r4 src=r7 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r0; - // EBPF_OP_OR64_REG pc=90 dst=r6 src=r2 offset=0 imm=0 + r4 |= r7; + // EBPF_OP_OR64_REG pc=92 dst=r6 src=r3 offset=0 imm=0 #line 70 "sample/sockops.c" - r6 |= r2; - // EBPF_OP_STXDW pc=91 dst=r10 src=r4 offset=-64 imm=0 + r6 |= r3; + // EBPF_OP_STXDW pc=93 dst=r10 src=r5 offset=-64 imm=0 #line 60 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r4; - // EBPF_OP_OR64_REG pc=92 dst=r3 src=r5 offset=0 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r5; + // EBPF_OP_OR64_REG pc=94 dst=r4 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_LDXB pc=93 dst=r2 src=r1 offset=13 imm=0 + r4 |= r0; + // EBPF_OP_LDXB pc=95 dst=r3 src=r1 offset=13 imm=0 #line 60 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(13)); - // EBPF_OP_LSH64_IMM pc=94 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(13)); + // EBPF_OP_LSH64_IMM pc=96 dst=r3 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=95 dst=r4 src=r1 offset=12 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=97 dst=r5 src=r1 offset=12 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_OR64_REG pc=96 dst=r2 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(12)); + // EBPF_OP_OR64_REG pc=98 dst=r3 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r2 |= r4; - // EBPF_OP_LDXB pc=97 dst=r4 src=r1 offset=14 imm=0 + r3 |= r5; + // EBPF_OP_LDXB pc=99 dst=r5 src=r1 offset=14 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); - // EBPF_OP_LSH64_IMM pc=98 dst=r4 src=r0 offset=0 imm=16 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=100 dst=r5 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=99 dst=r5 src=r1 offset=15 imm=0 + r5 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=101 dst=r0 src=r1 offset=15 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(15)); - // EBPF_OP_LSH64_IMM pc=100 dst=r5 src=r0 offset=0 imm=24 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(15)); + // EBPF_OP_LSH64_IMM pc=102 dst=r0 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=101 dst=r5 src=r4 offset=0 imm=0 + r0 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=103 dst=r0 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_OR64_REG pc=102 dst=r5 src=r2 offset=0 imm=0 + r0 |= r5; + // EBPF_OP_OR64_REG pc=104 dst=r0 src=r3 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r2; - // EBPF_OP_LSH64_IMM pc=103 dst=r5 src=r0 offset=0 imm=32 + r0 |= r3; + // EBPF_OP_LSH64_IMM pc=105 dst=r0 src=r0 offset=0 imm=32 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=104 dst=r5 src=r3 offset=0 imm=0 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=106 dst=r0 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r3; - // EBPF_OP_STXDW pc=105 dst=r10 src=r5 offset=-72 imm=0 + r0 |= r4; + // EBPF_OP_STXDW pc=107 dst=r10 src=r0 offset=-72 imm=0 #line 60 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r5; - // EBPF_OP_LDXW pc=106 dst=r2 src=r1 offset=24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r0; + // EBPF_OP_LDXW pc=108 dst=r3 src=r1 offset=24 imm=0 #line 61 "sample/sockops.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); - // EBPF_OP_STXH pc=107 dst=r10 src=r2 offset=-56 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); + // EBPF_OP_STXH pc=109 dst=r10 src=r3 offset=-56 imm=0 #line 61 "sample/sockops.c" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=108 dst=r3 src=r1 offset=41 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r3; + // EBPF_OP_LDXB pc=110 dst=r4 src=r2 offset=13 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(41)); - // EBPF_OP_LSH64_IMM pc=109 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(13)); + // EBPF_OP_LSH64_IMM pc=111 dst=r4 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=110 dst=r2 src=r1 offset=40 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=112 dst=r3 src=r2 offset=12 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_OR64_REG pc=111 dst=r3 src=r2 offset=0 imm=0 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_OR64_REG pc=113 dst=r4 src=r3 offset=0 imm=0 #line 63 "sample/sockops.c" - r3 |= r2; - // EBPF_OP_LDXB pc=112 dst=r4 src=r1 offset=42 imm=0 + r4 |= r3; + // EBPF_OP_LDXB pc=114 dst=r5 src=r2 offset=14 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(42)); - // EBPF_OP_LSH64_IMM pc=113 dst=r4 src=r0 offset=0 imm=16 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=115 dst=r5 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=114 dst=r2 src=r1 offset=43 imm=0 + r5 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=116 dst=r3 src=r2 offset=15 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(43)); - // EBPF_OP_LSH64_IMM pc=115 dst=r2 src=r0 offset=0 imm=24 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(15)); + // EBPF_OP_LSH64_IMM pc=117 dst=r3 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r2 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=116 dst=r2 src=r4 offset=0 imm=0 + r3 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=118 dst=r3 src=r5 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r4; - // EBPF_OP_LDXB pc=117 dst=r5 src=r1 offset=29 imm=0 + r3 |= r5; + // EBPF_OP_LDXB pc=119 dst=r0 src=r2 offset=1 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(29)); - // EBPF_OP_LSH64_IMM pc=118 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(1)); + // EBPF_OP_LSH64_IMM pc=120 dst=r0 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=119 dst=r4 src=r1 offset=28 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=121 dst=r5 src=r2 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(28)); - // EBPF_OP_OR64_REG pc=120 dst=r5 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_OR64_REG pc=122 dst=r0 src=r5 offset=0 imm=0 #line 63 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_LDXB pc=121 dst=r0 src=r1 offset=30 imm=0 + r0 |= r5; + // EBPF_OP_LDXB pc=123 dst=r7 src=r2 offset=2 imm=0 #line 63 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_LSH64_IMM pc=122 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_LSH64_IMM pc=124 dst=r7 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=123 dst=r4 src=r1 offset=31 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=125 dst=r5 src=r2 offset=3 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(31)); - // EBPF_OP_LSH64_IMM pc=124 dst=r4 src=r0 offset=0 imm=24 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(3)); + // EBPF_OP_LSH64_IMM pc=126 dst=r5 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=125 dst=r4 src=r0 offset=0 imm=0 + r5 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=127 dst=r5 src=r7 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r0; - // EBPF_OP_OR64_REG pc=126 dst=r4 src=r5 offset=0 imm=0 + r5 |= r7; + // EBPF_OP_OR64_REG pc=128 dst=r5 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r5; - // EBPF_OP_OR64_REG pc=127 dst=r2 src=r3 offset=0 imm=0 + r5 |= r0; + // EBPF_OP_OR64_REG pc=129 dst=r3 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r3; - // EBPF_OP_LDXB pc=128 dst=r3 src=r1 offset=37 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=130 dst=r4 src=r2 offset=9 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(37)); - // EBPF_OP_LSH64_IMM pc=129 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(9)); + // EBPF_OP_LSH64_IMM pc=131 dst=r4 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=130 dst=r5 src=r1 offset=36 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=132 dst=r0 src=r2 offset=8 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(36)); - // EBPF_OP_OR64_REG pc=131 dst=r3 src=r5 offset=0 imm=0 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(8)); + // EBPF_OP_OR64_REG pc=133 dst=r4 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_LDXB pc=132 dst=r5 src=r1 offset=38 imm=0 + r4 |= r0; + // EBPF_OP_LDXB pc=134 dst=r0 src=r2 offset=10 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(38)); - // EBPF_OP_LSH64_IMM pc=133 dst=r5 src=r0 offset=0 imm=16 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(10)); + // EBPF_OP_LSH64_IMM pc=135 dst=r0 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=134 dst=r0 src=r1 offset=39 imm=0 + r0 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=136 dst=r7 src=r2 offset=11 imm=0 #line 63 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(39)); - // EBPF_OP_LSH64_IMM pc=135 dst=r0 src=r0 offset=0 imm=24 + r7 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(11)); + // EBPF_OP_LSH64_IMM pc=137 dst=r7 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r0 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=136 dst=r0 src=r5 offset=0 imm=0 + r7 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=138 dst=r7 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r0 |= r5; - // EBPF_OP_OR64_REG pc=137 dst=r0 src=r3 offset=0 imm=0 + r7 |= r0; + // EBPF_OP_OR64_REG pc=139 dst=r7 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r0 |= r3; - // EBPF_OP_STXW pc=138 dst=r10 src=r0 offset=-44 imm=0 + r7 |= r4; + // EBPF_OP_STXW pc=140 dst=r10 src=r7 offset=-44 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-44)) = (uint32_t)r0; - // EBPF_OP_STXW pc=139 dst=r10 src=r2 offset=-40 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-44)) = (uint32_t)r7; + // EBPF_OP_STXW pc=141 dst=r10 src=r3 offset=-40 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint32_t)r2; - // EBPF_OP_STXW pc=140 dst=r10 src=r4 offset=-52 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint32_t)r3; + // EBPF_OP_STXW pc=142 dst=r10 src=r5 offset=-52 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r4; - // EBPF_OP_LDXB pc=141 dst=r2 src=r1 offset=33 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r5; + // EBPF_OP_LDXB pc=143 dst=r3 src=r2 offset=5 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(33)); - // EBPF_OP_LSH64_IMM pc=142 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(5)); + // EBPF_OP_LSH64_IMM pc=144 dst=r3 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=143 dst=r3 src=r1 offset=32 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=145 dst=r4 src=r2 offset=4 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(32)); - // EBPF_OP_OR64_REG pc=144 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_OR64_REG pc=146 dst=r3 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r3; - // EBPF_OP_LDXB pc=145 dst=r3 src=r1 offset=34 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=147 dst=r4 src=r2 offset=6 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(34)); - // EBPF_OP_LSH64_IMM pc=146 dst=r3 src=r0 offset=0 imm=16 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=147 dst=r4 src=r1 offset=35 imm=0 + r4 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=149 dst=r2 src=r2 offset=7 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(35)); - // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=24 + r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(7)); + // EBPF_OP_LSH64_IMM pc=150 dst=r2 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=149 dst=r4 src=r3 offset=0 imm=0 + r2 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=151 dst=r2 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_OR64_REG pc=150 dst=r4 src=r2 offset=0 imm=0 + r2 |= r4; + // EBPF_OP_OR64_REG pc=152 dst=r2 src=r3 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r2; - // EBPF_OP_STXW pc=151 dst=r10 src=r4 offset=-48 imm=0 + r2 |= r3; + // EBPF_OP_STXW pc=153 dst=r10 src=r2 offset=-48 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=152 dst=r2 src=r1 offset=44 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=154 dst=r2 src=r1 offset=44 imm=0 #line 64 "sample/sockops.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_STXH pc=153 dst=r10 src=r2 offset=-36 imm=0 + // EBPF_OP_STXH pc=155 dst=r10 src=r2 offset=-36 imm=0 #line 64 "sample/sockops.c" *(uint16_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=154 dst=r2 src=r1 offset=48 imm=0 + // EBPF_OP_LDXB pc=156 dst=r2 src=r1 offset=48 imm=0 #line 65 "sample/sockops.c" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(48)); - // EBPF_OP_STXW pc=155 dst=r10 src=r2 offset=-32 imm=0 + // EBPF_OP_STXW pc=157 dst=r10 src=r2 offset=-32 imm=0 #line 65 "sample/sockops.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint32_t)r2; - // EBPF_OP_LDXDW pc=156 dst=r1 src=r1 offset=56 imm=0 + // EBPF_OP_LDXDW pc=158 dst=r1 src=r1 offset=56 imm=0 #line 66 "sample/sockops.c" r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(56)); - // EBPF_OP_STXDW pc=157 dst=r10 src=r1 offset=-24 imm=0 + // EBPF_OP_STXDW pc=159 dst=r10 src=r1 offset=-24 imm=0 #line 66 "sample/sockops.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r1; - // EBPF_OP_CALL pc=158 dst=r0 src=r0 offset=0 imm=19 + // EBPF_OP_CALL pc=160 dst=r0 src=r0 offset=0 imm=19 #line 67 "sample/sockops.c" r0 = connection_monitor_helpers[0].address(r1, r2, r3, r4, r5, context); #line 67 "sample/sockops.c" @@ -604,25 +612,25 @@ connection_monitor(void* context) return 0; #line 67 "sample/sockops.c" } - // EBPF_OP_STXB pc=159 dst=r10 src=r6 offset=-8 imm=0 + // EBPF_OP_STXB pc=161 dst=r10 src=r6 offset=-8 imm=0 #line 71 "sample/sockops.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint8_t)r6; - // EBPF_OP_RSH64_IMM pc=160 dst=r0 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=162 dst=r0 src=r0 offset=0 imm=32 #line 69 "sample/sockops.c" r0 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXDW pc=161 dst=r10 src=r0 offset=-16 imm=0 + // EBPF_OP_STXDW pc=163 dst=r10 src=r0 offset=-16 imm=0 #line 69 "sample/sockops.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r0; - // EBPF_OP_MOV64_REG pc=162 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=164 dst=r2 src=r10 offset=0 imm=0 #line 69 "sample/sockops.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=163 dst=r2 src=r0 offset=0 imm=-72 -#line 69 "sample/sockops.c" + // EBPF_OP_ADD64_IMM pc=165 dst=r2 src=r0 offset=0 imm=-72 +#line 100 "sample/sockops.c" r2 += IMMEDIATE(-72); - // EBPF_OP_LDDW pc=164 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=166 dst=r1 src=r1 offset=0 imm=1 #line 26 "sample/sockops.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_CALL pc=166 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=168 dst=r0 src=r0 offset=0 imm=1 #line 26 "sample/sockops.c" r0 = connection_monitor_helpers[1].address(r1, r2, r3, r4, r5, context); #line 26 "sample/sockops.c" @@ -631,13 +639,13 @@ connection_monitor(void* context) return 0; #line 26 "sample/sockops.c" } - // EBPF_OP_MOV64_REG pc=167 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=169 dst=r1 src=r0 offset=0 imm=0 #line 26 "sample/sockops.c" r1 = r0; - // EBPF_OP_LDDW pc=168 dst=r0 src=r0 offset=0 imm=-1 + // EBPF_OP_LDDW pc=170 dst=r0 src=r0 offset=0 imm=-1 #line 26 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JEQ_IMM pc=170 dst=r1 src=r0 offset=7 imm=0 + // EBPF_OP_JEQ_IMM pc=172 dst=r1 src=r0 offset=7 imm=0 #line 26 "sample/sockops.c" if (r1 == IMMEDIATE(0)) { #line 26 "sample/sockops.c" @@ -645,22 +653,22 @@ connection_monitor(void* context) #line 26 "sample/sockops.c" } label_4: - // EBPF_OP_MOV64_REG pc=171 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=173 dst=r2 src=r10 offset=0 imm=0 #line 26 "sample/sockops.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=172 dst=r2 src=r0 offset=0 imm=-72 + // EBPF_OP_ADD64_IMM pc=174 dst=r2 src=r0 offset=0 imm=-72 #line 100 "sample/sockops.c" r2 += IMMEDIATE(-72); - // EBPF_OP_LDDW pc=173 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=175 dst=r1 src=r1 offset=0 imm=2 #line 100 "sample/sockops.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=175 dst=r3 src=r0 offset=0 imm=72 + // EBPF_OP_MOV64_IMM pc=177 dst=r3 src=r0 offset=0 imm=72 #line 100 "sample/sockops.c" r3 = IMMEDIATE(72); - // EBPF_OP_MOV64_IMM pc=176 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=178 dst=r4 src=r0 offset=0 imm=0 #line 100 "sample/sockops.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=177 dst=r0 src=r0 offset=0 imm=11 + // EBPF_OP_CALL pc=179 dst=r0 src=r0 offset=0 imm=11 #line 100 "sample/sockops.c" r0 = connection_monitor_helpers[2].address(r1, r2, r3, r4, r5, context); #line 100 "sample/sockops.c" @@ -670,7 +678,7 @@ connection_monitor(void* context) #line 100 "sample/sockops.c" } label_5: - // EBPF_OP_EXIT pc=178 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_EXIT pc=180 dst=r0 src=r0 offset=0 imm=0 #line 103 "sample/sockops.c" return r0; #line 78 "sample/sockops.c" @@ -690,7 +698,7 @@ static program_entry_t _programs[] = { 2, connection_monitor_helpers, 3, - 179, + 181, &connection_monitor_program_type_guid, &connection_monitor_attach_type_guid, }, @@ -708,7 +716,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/sockops_sys.c b/tests/bpf2c_tests/expected/sockops_sys.c index 1d4dfa4046..4b3d6c7aba 100644 --- a/tests/bpf2c_tests/expected/sockops_sys.c +++ b/tests/bpf2c_tests/expected/sockops_sys.c @@ -248,6 +248,8 @@ connection_monitor(void* context) register uint64_t r5 = 0; #line 78 "sample/sockops.c" register uint64_t r6 = 0; +#line 78 "sample/sockops.c" + register uint64_t r7 = 0; #line 78 "sample/sockops.c" register uint64_t r10 = 0; @@ -259,22 +261,22 @@ connection_monitor(void* context) // EBPF_OP_MOV64_IMM pc=0 dst=r6 src=r0 offset=0 imm=2 #line 78 "sample/sockops.c" r6 = IMMEDIATE(2); - // EBPF_OP_MOV64_IMM pc=1 dst=r2 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=1 dst=r3 src=r0 offset=0 imm=1 #line 78 "sample/sockops.c" - r2 = IMMEDIATE(1); - // EBPF_OP_LDXW pc=2 dst=r3 src=r1 offset=0 imm=0 + r3 = IMMEDIATE(1); + // EBPF_OP_LDXW pc=2 dst=r2 src=r1 offset=0 imm=0 #line 83 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_JEQ_IMM pc=3 dst=r3 src=r0 offset=8 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_JEQ_IMM pc=3 dst=r2 src=r0 offset=8 imm=0 #line 83 "sample/sockops.c" - if (r3 == IMMEDIATE(0)) { + if (r2 == IMMEDIATE(0)) { #line 83 "sample/sockops.c" goto label_2; #line 83 "sample/sockops.c" } - // EBPF_OP_JEQ_IMM pc=4 dst=r3 src=r0 offset=5 imm=2 + // EBPF_OP_JEQ_IMM pc=4 dst=r2 src=r0 offset=5 imm=2 #line 83 "sample/sockops.c" - if (r3 == IMMEDIATE(2)) { + if (r2 == IMMEDIATE(2)) { #line 83 "sample/sockops.c" goto label_1; #line 83 "sample/sockops.c" @@ -282,88 +284,88 @@ connection_monitor(void* context) // EBPF_OP_LDDW pc=5 dst=r0 src=r0 offset=0 imm=-1 #line 83 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JNE_IMM pc=7 dst=r3 src=r0 offset=170 imm=1 + // EBPF_OP_JNE_IMM pc=7 dst=r2 src=r0 offset=172 imm=1 #line 83 "sample/sockops.c" - if (r3 != IMMEDIATE(1)) { + if (r2 != IMMEDIATE(1)) { #line 83 "sample/sockops.c" goto label_5; #line 83 "sample/sockops.c" } - // EBPF_OP_MOV64_IMM pc=8 dst=r2 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=8 dst=r3 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" - r2 = IMMEDIATE(0); + r3 = IMMEDIATE(0); // EBPF_OP_JA pc=9 dst=r0 src=r0 offset=2 imm=0 #line 83 "sample/sockops.c" goto label_2; label_1: - // EBPF_OP_MOV64_IMM pc=10 dst=r2 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=10 dst=r3 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" - r2 = IMMEDIATE(0); + r3 = IMMEDIATE(0); // EBPF_OP_MOV64_IMM pc=11 dst=r6 src=r0 offset=0 imm=0 #line 83 "sample/sockops.c" r6 = IMMEDIATE(0); label_2: - // EBPF_OP_LDXW pc=12 dst=r3 src=r1 offset=4 imm=0 + // EBPF_OP_LDXW pc=12 dst=r2 src=r1 offset=4 imm=0 #line 100 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_JNE_IMM pc=13 dst=r3 src=r0 offset=37 imm=2 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_JNE_IMM pc=13 dst=r2 src=r0 offset=37 imm=2 #line 100 "sample/sockops.c" - if (r3 != IMMEDIATE(2)) { + if (r2 != IMMEDIATE(2)) { #line 100 "sample/sockops.c" goto label_3; #line 100 "sample/sockops.c" } - // EBPF_OP_MOV64_IMM pc=14 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=14 dst=r2 src=r0 offset=0 imm=0 #line 100 "sample/sockops.c" - r3 = IMMEDIATE(0); - // EBPF_OP_STXDW pc=15 dst=r10 src=r3 offset=-8 imm=0 + r2 = IMMEDIATE(0); + // EBPF_OP_STXDW pc=15 dst=r10 src=r2 offset=-8 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=16 dst=r10 src=r3 offset=-16 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=16 dst=r10 src=r2 offset=-16 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=17 dst=r10 src=r3 offset=-24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=17 dst=r10 src=r2 offset=-24 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=18 dst=r10 src=r3 offset=-32 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=18 dst=r10 src=r2 offset=-32 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=19 dst=r10 src=r3 offset=-40 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=19 dst=r10 src=r2 offset=-40 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=20 dst=r10 src=r3 offset=-48 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=20 dst=r10 src=r2 offset=-48 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=21 dst=r10 src=r3 offset=-56 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=21 dst=r10 src=r2 offset=-56 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=22 dst=r10 src=r3 offset=-64 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=22 dst=r10 src=r2 offset=-64 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=23 dst=r10 src=r3 offset=-72 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r2; + // EBPF_OP_STXDW pc=23 dst=r10 src=r2 offset=-72 imm=0 #line 36 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r3; - // EBPF_OP_LDXW pc=24 dst=r3 src=r1 offset=8 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r2; + // EBPF_OP_LDXW pc=24 dst=r2 src=r1 offset=8 imm=0 #line 38 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXW pc=25 dst=r10 src=r3 offset=-72 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_STXW pc=25 dst=r10 src=r2 offset=-72 imm=0 #line 38 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint32_t)r3; - // EBPF_OP_LDXW pc=26 dst=r3 src=r1 offset=24 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=26 dst=r2 src=r1 offset=24 imm=0 #line 39 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); - // EBPF_OP_STXH pc=27 dst=r10 src=r3 offset=-56 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); + // EBPF_OP_STXH pc=27 dst=r10 src=r2 offset=-56 imm=0 #line 39 "sample/sockops.c" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r3; - // EBPF_OP_LDXW pc=28 dst=r3 src=r1 offset=28 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=28 dst=r2 src=r1 offset=28 imm=0 #line 40 "sample/sockops.c" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(28)); - // EBPF_OP_STXW pc=29 dst=r10 src=r3 offset=-52 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(28)); + // EBPF_OP_STXW pc=29 dst=r10 src=r2 offset=-52 imm=0 #line 40 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r3; - // EBPF_OP_OR64_REG pc=30 dst=r6 src=r2 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r2; + // EBPF_OP_OR64_REG pc=30 dst=r6 src=r3 offset=0 imm=0 #line 47 "sample/sockops.c" - r6 |= r2; + r6 |= r3; // EBPF_OP_LDXW pc=31 dst=r2 src=r1 offset=44 imm=0 #line 41 "sample/sockops.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); @@ -424,339 +426,345 @@ connection_monitor(void* context) // EBPF_OP_LDDW pc=47 dst=r0 src=r0 offset=0 imm=-1 #line 26 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JEQ_IMM pc=49 dst=r1 src=r0 offset=128 imm=0 + // EBPF_OP_JEQ_IMM pc=49 dst=r1 src=r0 offset=130 imm=0 #line 26 "sample/sockops.c" if (r1 == IMMEDIATE(0)) { #line 26 "sample/sockops.c" goto label_5; #line 26 "sample/sockops.c" } - // EBPF_OP_JA pc=50 dst=r0 src=r0 offset=120 imm=0 + // EBPF_OP_JA pc=50 dst=r0 src=r0 offset=122 imm=0 #line 26 "sample/sockops.c" goto label_4; label_3: - // EBPF_OP_MOV64_IMM pc=51 dst=r3 src=r0 offset=0 imm=0 -#line 26 "sample/sockops.c" - r3 = IMMEDIATE(0); - // EBPF_OP_STXDW pc=52 dst=r10 src=r3 offset=-8 imm=0 + // EBPF_OP_MOV64_REG pc=51 dst=r2 src=r1 offset=0 imm=0 +#line 100 "sample/sockops.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=52 dst=r2 src=r0 offset=0 imm=28 +#line 100 "sample/sockops.c" + r2 += IMMEDIATE(28); + // EBPF_OP_MOV64_IMM pc=53 dst=r4 src=r0 offset=0 imm=0 +#line 100 "sample/sockops.c" + r4 = IMMEDIATE(0); + // EBPF_OP_STXDW pc=54 dst=r10 src=r4 offset=-8 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=53 dst=r10 src=r3 offset=-16 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=55 dst=r10 src=r4 offset=-16 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=54 dst=r10 src=r3 offset=-24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=56 dst=r10 src=r4 offset=-24 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=55 dst=r10 src=r3 offset=-32 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=57 dst=r10 src=r4 offset=-32 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=56 dst=r10 src=r3 offset=-40 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=58 dst=r10 src=r4 offset=-40 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=57 dst=r10 src=r3 offset=-48 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=59 dst=r10 src=r4 offset=-48 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r3; - // EBPF_OP_STXDW pc=58 dst=r10 src=r3 offset=-56 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint64_t)r4; + // EBPF_OP_STXDW pc=60 dst=r10 src=r4 offset=-56 imm=0 #line 56 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r3; - // EBPF_OP_LDXB pc=59 dst=r4 src=r1 offset=17 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint64_t)r4; + // EBPF_OP_LDXB pc=61 dst=r5 src=r1 offset=17 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(17)); - // EBPF_OP_LSH64_IMM pc=60 dst=r4 src=r0 offset=0 imm=8 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(17)); + // EBPF_OP_LSH64_IMM pc=62 dst=r5 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=61 dst=r3 src=r1 offset=16 imm=0 + r5 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=63 dst=r4 src=r1 offset=16 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(16)); - // EBPF_OP_OR64_REG pc=62 dst=r4 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(16)); + // EBPF_OP_OR64_REG pc=64 dst=r5 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_LDXB pc=63 dst=r5 src=r1 offset=18 imm=0 + r5 |= r4; + // EBPF_OP_LDXB pc=65 dst=r0 src=r1 offset=18 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(18)); - // EBPF_OP_LSH64_IMM pc=64 dst=r5 src=r0 offset=0 imm=16 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(18)); + // EBPF_OP_LSH64_IMM pc=66 dst=r0 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=65 dst=r3 src=r1 offset=19 imm=0 + r0 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=67 dst=r4 src=r1 offset=19 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(19)); - // EBPF_OP_LSH64_IMM pc=66 dst=r3 src=r0 offset=0 imm=24 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(19)); + // EBPF_OP_LSH64_IMM pc=68 dst=r4 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r3 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=67 dst=r3 src=r5 offset=0 imm=0 + r4 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=69 dst=r4 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_OR64_REG pc=68 dst=r3 src=r4 offset=0 imm=0 + r4 |= r0; + // EBPF_OP_OR64_REG pc=70 dst=r4 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r4; - // EBPF_OP_LDXB pc=69 dst=r5 src=r1 offset=21 imm=0 + r4 |= r5; + // EBPF_OP_LDXB pc=71 dst=r0 src=r1 offset=21 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(21)); - // EBPF_OP_LSH64_IMM pc=70 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(21)); + // EBPF_OP_LSH64_IMM pc=72 dst=r0 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=71 dst=r4 src=r1 offset=20 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=73 dst=r5 src=r1 offset=20 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); - // EBPF_OP_OR64_REG pc=72 dst=r5 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); + // EBPF_OP_OR64_REG pc=74 dst=r0 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_LDXB pc=73 dst=r0 src=r1 offset=22 imm=0 + r0 |= r5; + // EBPF_OP_LDXB pc=75 dst=r7 src=r1 offset=22 imm=0 #line 60 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)); - // EBPF_OP_LSH64_IMM pc=74 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)); + // EBPF_OP_LSH64_IMM pc=76 dst=r7 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=75 dst=r4 src=r1 offset=23 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=77 dst=r5 src=r1 offset=23 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); - // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=24 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); + // EBPF_OP_LSH64_IMM pc=78 dst=r5 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=77 dst=r4 src=r0 offset=0 imm=0 + r5 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=79 dst=r5 src=r7 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r0; - // EBPF_OP_OR64_REG pc=78 dst=r4 src=r5 offset=0 imm=0 + r5 |= r7; + // EBPF_OP_OR64_REG pc=80 dst=r5 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r5; - // EBPF_OP_LSH64_IMM pc=79 dst=r4 src=r0 offset=0 imm=32 + r5 |= r0; + // EBPF_OP_LSH64_IMM pc=81 dst=r5 src=r0 offset=0 imm=32 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=80 dst=r4 src=r3 offset=0 imm=0 + r5 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=82 dst=r5 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_LDXB pc=81 dst=r5 src=r1 offset=9 imm=0 + r5 |= r4; + // EBPF_OP_LDXB pc=83 dst=r0 src=r1 offset=9 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)); - // EBPF_OP_LSH64_IMM pc=82 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)); + // EBPF_OP_LSH64_IMM pc=84 dst=r0 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=83 dst=r3 src=r1 offset=8 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=85 dst=r4 src=r1 offset=8 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_OR64_REG pc=84 dst=r5 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_OR64_REG pc=86 dst=r0 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r3; - // EBPF_OP_LDXB pc=85 dst=r0 src=r1 offset=10 imm=0 + r0 |= r4; + // EBPF_OP_LDXB pc=87 dst=r7 src=r1 offset=10 imm=0 #line 60 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_LSH64_IMM pc=86 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)); + // EBPF_OP_LSH64_IMM pc=88 dst=r7 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=87 dst=r3 src=r1 offset=11 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=89 dst=r4 src=r1 offset=11 imm=0 #line 60 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)); - // EBPF_OP_LSH64_IMM pc=88 dst=r3 src=r0 offset=0 imm=24 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)); + // EBPF_OP_LSH64_IMM pc=90 dst=r4 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r3 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=89 dst=r3 src=r0 offset=0 imm=0 + r4 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=91 dst=r4 src=r7 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r0; - // EBPF_OP_OR64_REG pc=90 dst=r6 src=r2 offset=0 imm=0 + r4 |= r7; + // EBPF_OP_OR64_REG pc=92 dst=r6 src=r3 offset=0 imm=0 #line 70 "sample/sockops.c" - r6 |= r2; - // EBPF_OP_STXDW pc=91 dst=r10 src=r4 offset=-64 imm=0 + r6 |= r3; + // EBPF_OP_STXDW pc=93 dst=r10 src=r5 offset=-64 imm=0 #line 60 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r4; - // EBPF_OP_OR64_REG pc=92 dst=r3 src=r5 offset=0 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-64)) = (uint64_t)r5; + // EBPF_OP_OR64_REG pc=94 dst=r4 src=r0 offset=0 imm=0 #line 60 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_LDXB pc=93 dst=r2 src=r1 offset=13 imm=0 + r4 |= r0; + // EBPF_OP_LDXB pc=95 dst=r3 src=r1 offset=13 imm=0 #line 60 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(13)); - // EBPF_OP_LSH64_IMM pc=94 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(13)); + // EBPF_OP_LSH64_IMM pc=96 dst=r3 src=r0 offset=0 imm=8 #line 60 "sample/sockops.c" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=95 dst=r4 src=r1 offset=12 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=97 dst=r5 src=r1 offset=12 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_OR64_REG pc=96 dst=r2 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(12)); + // EBPF_OP_OR64_REG pc=98 dst=r3 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r2 |= r4; - // EBPF_OP_LDXB pc=97 dst=r4 src=r1 offset=14 imm=0 + r3 |= r5; + // EBPF_OP_LDXB pc=99 dst=r5 src=r1 offset=14 imm=0 #line 60 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); - // EBPF_OP_LSH64_IMM pc=98 dst=r4 src=r0 offset=0 imm=16 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=100 dst=r5 src=r0 offset=0 imm=16 #line 60 "sample/sockops.c" - r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=99 dst=r5 src=r1 offset=15 imm=0 + r5 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=101 dst=r0 src=r1 offset=15 imm=0 #line 60 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(15)); - // EBPF_OP_LSH64_IMM pc=100 dst=r5 src=r0 offset=0 imm=24 + r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(15)); + // EBPF_OP_LSH64_IMM pc=102 dst=r0 src=r0 offset=0 imm=24 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=101 dst=r5 src=r4 offset=0 imm=0 + r0 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=103 dst=r0 src=r5 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_OR64_REG pc=102 dst=r5 src=r2 offset=0 imm=0 + r0 |= r5; + // EBPF_OP_OR64_REG pc=104 dst=r0 src=r3 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r2; - // EBPF_OP_LSH64_IMM pc=103 dst=r5 src=r0 offset=0 imm=32 + r0 |= r3; + // EBPF_OP_LSH64_IMM pc=105 dst=r0 src=r0 offset=0 imm=32 #line 60 "sample/sockops.c" - r5 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=104 dst=r5 src=r3 offset=0 imm=0 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=106 dst=r0 src=r4 offset=0 imm=0 #line 60 "sample/sockops.c" - r5 |= r3; - // EBPF_OP_STXDW pc=105 dst=r10 src=r5 offset=-72 imm=0 + r0 |= r4; + // EBPF_OP_STXDW pc=107 dst=r10 src=r0 offset=-72 imm=0 #line 60 "sample/sockops.c" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r5; - // EBPF_OP_LDXW pc=106 dst=r2 src=r1 offset=24 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-72)) = (uint64_t)r0; + // EBPF_OP_LDXW pc=108 dst=r3 src=r1 offset=24 imm=0 #line 61 "sample/sockops.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); - // EBPF_OP_STXH pc=107 dst=r10 src=r2 offset=-56 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(24)); + // EBPF_OP_STXH pc=109 dst=r10 src=r3 offset=-56 imm=0 #line 61 "sample/sockops.c" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=108 dst=r3 src=r1 offset=41 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-56)) = (uint16_t)r3; + // EBPF_OP_LDXB pc=110 dst=r4 src=r2 offset=13 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(41)); - // EBPF_OP_LSH64_IMM pc=109 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(13)); + // EBPF_OP_LSH64_IMM pc=111 dst=r4 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=110 dst=r2 src=r1 offset=40 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=112 dst=r3 src=r2 offset=12 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_OR64_REG pc=111 dst=r3 src=r2 offset=0 imm=0 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(12)); + // EBPF_OP_OR64_REG pc=113 dst=r4 src=r3 offset=0 imm=0 #line 63 "sample/sockops.c" - r3 |= r2; - // EBPF_OP_LDXB pc=112 dst=r4 src=r1 offset=42 imm=0 + r4 |= r3; + // EBPF_OP_LDXB pc=114 dst=r5 src=r2 offset=14 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(42)); - // EBPF_OP_LSH64_IMM pc=113 dst=r4 src=r0 offset=0 imm=16 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); + // EBPF_OP_LSH64_IMM pc=115 dst=r5 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=114 dst=r2 src=r1 offset=43 imm=0 + r5 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=116 dst=r3 src=r2 offset=15 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(43)); - // EBPF_OP_LSH64_IMM pc=115 dst=r2 src=r0 offset=0 imm=24 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(15)); + // EBPF_OP_LSH64_IMM pc=117 dst=r3 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r2 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=116 dst=r2 src=r4 offset=0 imm=0 + r3 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=118 dst=r3 src=r5 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r4; - // EBPF_OP_LDXB pc=117 dst=r5 src=r1 offset=29 imm=0 + r3 |= r5; + // EBPF_OP_LDXB pc=119 dst=r0 src=r2 offset=1 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(29)); - // EBPF_OP_LSH64_IMM pc=118 dst=r5 src=r0 offset=0 imm=8 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(1)); + // EBPF_OP_LSH64_IMM pc=120 dst=r0 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=119 dst=r4 src=r1 offset=28 imm=0 + r0 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=121 dst=r5 src=r2 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(28)); - // EBPF_OP_OR64_REG pc=120 dst=r5 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_OR64_REG pc=122 dst=r0 src=r5 offset=0 imm=0 #line 63 "sample/sockops.c" - r5 |= r4; - // EBPF_OP_LDXB pc=121 dst=r0 src=r1 offset=30 imm=0 + r0 |= r5; + // EBPF_OP_LDXB pc=123 dst=r7 src=r2 offset=2 imm=0 #line 63 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_LSH64_IMM pc=122 dst=r0 src=r0 offset=0 imm=16 + r7 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_LSH64_IMM pc=124 dst=r7 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=123 dst=r4 src=r1 offset=31 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=125 dst=r5 src=r2 offset=3 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(31)); - // EBPF_OP_LSH64_IMM pc=124 dst=r4 src=r0 offset=0 imm=24 + r5 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(3)); + // EBPF_OP_LSH64_IMM pc=126 dst=r5 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=125 dst=r4 src=r0 offset=0 imm=0 + r5 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=127 dst=r5 src=r7 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r0; - // EBPF_OP_OR64_REG pc=126 dst=r4 src=r5 offset=0 imm=0 + r5 |= r7; + // EBPF_OP_OR64_REG pc=128 dst=r5 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r5; - // EBPF_OP_OR64_REG pc=127 dst=r2 src=r3 offset=0 imm=0 + r5 |= r0; + // EBPF_OP_OR64_REG pc=129 dst=r3 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r3; - // EBPF_OP_LDXB pc=128 dst=r3 src=r1 offset=37 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=130 dst=r4 src=r2 offset=9 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(37)); - // EBPF_OP_LSH64_IMM pc=129 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(9)); + // EBPF_OP_LSH64_IMM pc=131 dst=r4 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=130 dst=r5 src=r1 offset=36 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=132 dst=r0 src=r2 offset=8 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(36)); - // EBPF_OP_OR64_REG pc=131 dst=r3 src=r5 offset=0 imm=0 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(8)); + // EBPF_OP_OR64_REG pc=133 dst=r4 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r3 |= r5; - // EBPF_OP_LDXB pc=132 dst=r5 src=r1 offset=38 imm=0 + r4 |= r0; + // EBPF_OP_LDXB pc=134 dst=r0 src=r2 offset=10 imm=0 #line 63 "sample/sockops.c" - r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(38)); - // EBPF_OP_LSH64_IMM pc=133 dst=r5 src=r0 offset=0 imm=16 + r0 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(10)); + // EBPF_OP_LSH64_IMM pc=135 dst=r0 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=134 dst=r0 src=r1 offset=39 imm=0 + r0 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=136 dst=r7 src=r2 offset=11 imm=0 #line 63 "sample/sockops.c" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(39)); - // EBPF_OP_LSH64_IMM pc=135 dst=r0 src=r0 offset=0 imm=24 + r7 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(11)); + // EBPF_OP_LSH64_IMM pc=137 dst=r7 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r0 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=136 dst=r0 src=r5 offset=0 imm=0 + r7 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=138 dst=r7 src=r0 offset=0 imm=0 #line 63 "sample/sockops.c" - r0 |= r5; - // EBPF_OP_OR64_REG pc=137 dst=r0 src=r3 offset=0 imm=0 + r7 |= r0; + // EBPF_OP_OR64_REG pc=139 dst=r7 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r0 |= r3; - // EBPF_OP_STXW pc=138 dst=r10 src=r0 offset=-44 imm=0 + r7 |= r4; + // EBPF_OP_STXW pc=140 dst=r10 src=r7 offset=-44 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-44)) = (uint32_t)r0; - // EBPF_OP_STXW pc=139 dst=r10 src=r2 offset=-40 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-44)) = (uint32_t)r7; + // EBPF_OP_STXW pc=141 dst=r10 src=r3 offset=-40 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint32_t)r2; - // EBPF_OP_STXW pc=140 dst=r10 src=r4 offset=-52 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-40)) = (uint32_t)r3; + // EBPF_OP_STXW pc=142 dst=r10 src=r5 offset=-52 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r4; - // EBPF_OP_LDXB pc=141 dst=r2 src=r1 offset=33 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-52)) = (uint32_t)r5; + // EBPF_OP_LDXB pc=143 dst=r3 src=r2 offset=5 imm=0 #line 63 "sample/sockops.c" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(33)); - // EBPF_OP_LSH64_IMM pc=142 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(5)); + // EBPF_OP_LSH64_IMM pc=144 dst=r3 src=r0 offset=0 imm=8 #line 63 "sample/sockops.c" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=143 dst=r3 src=r1 offset=32 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=145 dst=r4 src=r2 offset=4 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(32)); - // EBPF_OP_OR64_REG pc=144 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(4)); + // EBPF_OP_OR64_REG pc=146 dst=r3 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r2 |= r3; - // EBPF_OP_LDXB pc=145 dst=r3 src=r1 offset=34 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=147 dst=r4 src=r2 offset=6 imm=0 #line 63 "sample/sockops.c" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(34)); - // EBPF_OP_LSH64_IMM pc=146 dst=r3 src=r0 offset=0 imm=16 + r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=16 #line 63 "sample/sockops.c" - r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_LDXB pc=147 dst=r4 src=r1 offset=35 imm=0 + r4 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_LDXB pc=149 dst=r2 src=r2 offset=7 imm=0 #line 63 "sample/sockops.c" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(35)); - // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=24 + r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(7)); + // EBPF_OP_LSH64_IMM pc=150 dst=r2 src=r0 offset=0 imm=24 #line 63 "sample/sockops.c" - r4 <<= (IMMEDIATE(24) & 63); - // EBPF_OP_OR64_REG pc=149 dst=r4 src=r3 offset=0 imm=0 + r2 <<= (IMMEDIATE(24) & 63); + // EBPF_OP_OR64_REG pc=151 dst=r2 src=r4 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r3; - // EBPF_OP_OR64_REG pc=150 dst=r4 src=r2 offset=0 imm=0 + r2 |= r4; + // EBPF_OP_OR64_REG pc=152 dst=r2 src=r3 offset=0 imm=0 #line 63 "sample/sockops.c" - r4 |= r2; - // EBPF_OP_STXW pc=151 dst=r10 src=r4 offset=-48 imm=0 + r2 |= r3; + // EBPF_OP_STXW pc=153 dst=r10 src=r2 offset=-48 imm=0 #line 63 "sample/sockops.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=152 dst=r2 src=r1 offset=44 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-48)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=154 dst=r2 src=r1 offset=44 imm=0 #line 64 "sample/sockops.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_STXH pc=153 dst=r10 src=r2 offset=-36 imm=0 + // EBPF_OP_STXH pc=155 dst=r10 src=r2 offset=-36 imm=0 #line 64 "sample/sockops.c" *(uint16_t*)(uintptr_t)(r10 + OFFSET(-36)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=154 dst=r2 src=r1 offset=48 imm=0 + // EBPF_OP_LDXB pc=156 dst=r2 src=r1 offset=48 imm=0 #line 65 "sample/sockops.c" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(48)); - // EBPF_OP_STXW pc=155 dst=r10 src=r2 offset=-32 imm=0 + // EBPF_OP_STXW pc=157 dst=r10 src=r2 offset=-32 imm=0 #line 65 "sample/sockops.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-32)) = (uint32_t)r2; - // EBPF_OP_LDXDW pc=156 dst=r1 src=r1 offset=56 imm=0 + // EBPF_OP_LDXDW pc=158 dst=r1 src=r1 offset=56 imm=0 #line 66 "sample/sockops.c" r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(56)); - // EBPF_OP_STXDW pc=157 dst=r10 src=r1 offset=-24 imm=0 + // EBPF_OP_STXDW pc=159 dst=r10 src=r1 offset=-24 imm=0 #line 66 "sample/sockops.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r1; - // EBPF_OP_CALL pc=158 dst=r0 src=r0 offset=0 imm=19 + // EBPF_OP_CALL pc=160 dst=r0 src=r0 offset=0 imm=19 #line 67 "sample/sockops.c" r0 = connection_monitor_helpers[0].address(r1, r2, r3, r4, r5, context); #line 67 "sample/sockops.c" @@ -765,25 +773,25 @@ connection_monitor(void* context) return 0; #line 67 "sample/sockops.c" } - // EBPF_OP_STXB pc=159 dst=r10 src=r6 offset=-8 imm=0 + // EBPF_OP_STXB pc=161 dst=r10 src=r6 offset=-8 imm=0 #line 71 "sample/sockops.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint8_t)r6; - // EBPF_OP_RSH64_IMM pc=160 dst=r0 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=162 dst=r0 src=r0 offset=0 imm=32 #line 69 "sample/sockops.c" r0 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXDW pc=161 dst=r10 src=r0 offset=-16 imm=0 + // EBPF_OP_STXDW pc=163 dst=r10 src=r0 offset=-16 imm=0 #line 69 "sample/sockops.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r0; - // EBPF_OP_MOV64_REG pc=162 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=164 dst=r2 src=r10 offset=0 imm=0 #line 69 "sample/sockops.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=163 dst=r2 src=r0 offset=0 imm=-72 -#line 69 "sample/sockops.c" + // EBPF_OP_ADD64_IMM pc=165 dst=r2 src=r0 offset=0 imm=-72 +#line 100 "sample/sockops.c" r2 += IMMEDIATE(-72); - // EBPF_OP_LDDW pc=164 dst=r1 src=r1 offset=0 imm=1 + // EBPF_OP_LDDW pc=166 dst=r1 src=r1 offset=0 imm=1 #line 26 "sample/sockops.c" r1 = POINTER(_maps[0].address); - // EBPF_OP_CALL pc=166 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_CALL pc=168 dst=r0 src=r0 offset=0 imm=1 #line 26 "sample/sockops.c" r0 = connection_monitor_helpers[1].address(r1, r2, r3, r4, r5, context); #line 26 "sample/sockops.c" @@ -792,13 +800,13 @@ connection_monitor(void* context) return 0; #line 26 "sample/sockops.c" } - // EBPF_OP_MOV64_REG pc=167 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=169 dst=r1 src=r0 offset=0 imm=0 #line 26 "sample/sockops.c" r1 = r0; - // EBPF_OP_LDDW pc=168 dst=r0 src=r0 offset=0 imm=-1 + // EBPF_OP_LDDW pc=170 dst=r0 src=r0 offset=0 imm=-1 #line 26 "sample/sockops.c" r0 = (uint64_t)4294967295; - // EBPF_OP_JEQ_IMM pc=170 dst=r1 src=r0 offset=7 imm=0 + // EBPF_OP_JEQ_IMM pc=172 dst=r1 src=r0 offset=7 imm=0 #line 26 "sample/sockops.c" if (r1 == IMMEDIATE(0)) { #line 26 "sample/sockops.c" @@ -806,22 +814,22 @@ connection_monitor(void* context) #line 26 "sample/sockops.c" } label_4: - // EBPF_OP_MOV64_REG pc=171 dst=r2 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=173 dst=r2 src=r10 offset=0 imm=0 #line 26 "sample/sockops.c" r2 = r10; - // EBPF_OP_ADD64_IMM pc=172 dst=r2 src=r0 offset=0 imm=-72 + // EBPF_OP_ADD64_IMM pc=174 dst=r2 src=r0 offset=0 imm=-72 #line 100 "sample/sockops.c" r2 += IMMEDIATE(-72); - // EBPF_OP_LDDW pc=173 dst=r1 src=r1 offset=0 imm=2 + // EBPF_OP_LDDW pc=175 dst=r1 src=r1 offset=0 imm=2 #line 100 "sample/sockops.c" r1 = POINTER(_maps[1].address); - // EBPF_OP_MOV64_IMM pc=175 dst=r3 src=r0 offset=0 imm=72 + // EBPF_OP_MOV64_IMM pc=177 dst=r3 src=r0 offset=0 imm=72 #line 100 "sample/sockops.c" r3 = IMMEDIATE(72); - // EBPF_OP_MOV64_IMM pc=176 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=178 dst=r4 src=r0 offset=0 imm=0 #line 100 "sample/sockops.c" r4 = IMMEDIATE(0); - // EBPF_OP_CALL pc=177 dst=r0 src=r0 offset=0 imm=11 + // EBPF_OP_CALL pc=179 dst=r0 src=r0 offset=0 imm=11 #line 100 "sample/sockops.c" r0 = connection_monitor_helpers[2].address(r1, r2, r3, r4, r5, context); #line 100 "sample/sockops.c" @@ -831,7 +839,7 @@ connection_monitor(void* context) #line 100 "sample/sockops.c" } label_5: - // EBPF_OP_EXIT pc=178 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_EXIT pc=180 dst=r0 src=r0 offset=0 imm=0 #line 103 "sample/sockops.c" return r0; #line 78 "sample/sockops.c" @@ -851,7 +859,7 @@ static program_entry_t _programs[] = { 2, connection_monitor_helpers, 3, - 179, + 181, &connection_monitor_program_type_guid, &connection_monitor_attach_type_guid, }, @@ -869,7 +877,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/strings_dll.c b/tests/bpf2c_tests/expected/strings_dll.c index f8278a219f..243a3954f7 100644 --- a/tests/bpf2c_tests/expected/strings_dll.c +++ b/tests/bpf2c_tests/expected/strings_dll.c @@ -500,7 +500,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/strings_raw.c b/tests/bpf2c_tests/expected/strings_raw.c index 0e7cdbc31b..50390280ae 100644 --- a/tests/bpf2c_tests/expected/strings_raw.c +++ b/tests/bpf2c_tests/expected/strings_raw.c @@ -474,7 +474,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/strings_sys.c b/tests/bpf2c_tests/expected/strings_sys.c index 297fa4830b..8c51aff56b 100644 --- a/tests/bpf2c_tests/expected/strings_sys.c +++ b/tests/bpf2c_tests/expected/strings_sys.c @@ -635,7 +635,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_bad_dll.c b/tests/bpf2c_tests/expected/tail_call_bad_dll.c index 862ee720cb..85b1f0193b 100644 --- a/tests/bpf2c_tests/expected/tail_call_bad_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_bad_dll.c @@ -263,7 +263,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_bad_raw.c b/tests/bpf2c_tests/expected/tail_call_bad_raw.c index afa671432f..e71b5bd631 100644 --- a/tests/bpf2c_tests/expected/tail_call_bad_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_bad_raw.c @@ -237,7 +237,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_bad_sys.c b/tests/bpf2c_tests/expected/tail_call_bad_sys.c index 31c9f2456e..9dfe6b4e67 100644 --- a/tests/bpf2c_tests/expected/tail_call_bad_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_bad_sys.c @@ -398,7 +398,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_dll.c b/tests/bpf2c_tests/expected/tail_call_dll.c index b28bc263ef..400b8fcf7c 100644 --- a/tests/bpf2c_tests/expected/tail_call_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_dll.c @@ -258,7 +258,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_map_dll.c b/tests/bpf2c_tests/expected/tail_call_map_dll.c index 4acc84a0af..79316933a9 100644 --- a/tests/bpf2c_tests/expected/tail_call_map_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_map_dll.c @@ -251,7 +251,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_map_raw.c b/tests/bpf2c_tests/expected/tail_call_map_raw.c index 6a487e52ad..5502a8048f 100644 --- a/tests/bpf2c_tests/expected/tail_call_map_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_map_raw.c @@ -225,7 +225,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_map_sys.c b/tests/bpf2c_tests/expected/tail_call_map_sys.c index a95db579c4..11dd0e4ff0 100644 --- a/tests/bpf2c_tests/expected/tail_call_map_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_map_sys.c @@ -386,7 +386,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_max_exceed_dll.c b/tests/bpf2c_tests/expected/tail_call_max_exceed_dll.c index b2f90f99dc..0f607854c3 100644 --- a/tests/bpf2c_tests/expected/tail_call_max_exceed_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_max_exceed_dll.c @@ -7711,7 +7711,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_max_exceed_raw.c b/tests/bpf2c_tests/expected/tail_call_max_exceed_raw.c index da6c5d6640..019929c1d8 100644 --- a/tests/bpf2c_tests/expected/tail_call_max_exceed_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_max_exceed_raw.c @@ -7685,7 +7685,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_max_exceed_sys.c b/tests/bpf2c_tests/expected/tail_call_max_exceed_sys.c index fa80431fb3..c407c99d41 100644 --- a/tests/bpf2c_tests/expected/tail_call_max_exceed_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_max_exceed_sys.c @@ -7846,7 +7846,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_multiple_dll.c b/tests/bpf2c_tests/expected/tail_call_multiple_dll.c index 88381f3fb2..302b38fb71 100644 --- a/tests/bpf2c_tests/expected/tail_call_multiple_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_multiple_dll.c @@ -285,7 +285,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_multiple_raw.c b/tests/bpf2c_tests/expected/tail_call_multiple_raw.c index e500c99782..48d47c06bc 100644 --- a/tests/bpf2c_tests/expected/tail_call_multiple_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_multiple_raw.c @@ -259,7 +259,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_multiple_sys.c b/tests/bpf2c_tests/expected/tail_call_multiple_sys.c index ddb511d3e1..02771bfc3c 100644 --- a/tests/bpf2c_tests/expected/tail_call_multiple_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_multiple_sys.c @@ -420,7 +420,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_raw.c b/tests/bpf2c_tests/expected/tail_call_raw.c index a55ceb7ea7..0d7df95979 100644 --- a/tests/bpf2c_tests/expected/tail_call_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_raw.c @@ -232,7 +232,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_recursive_dll.c b/tests/bpf2c_tests/expected/tail_call_recursive_dll.c index 7526e4bc5e..f21e34b8ad 100644 --- a/tests/bpf2c_tests/expected/tail_call_recursive_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_recursive_dll.c @@ -113,6 +113,8 @@ recurse(void* context) register uint64_t r6 = 0; #line 45 "sample/undocked/tail_call_recursive.c" register uint64_t r7 = 0; +#line 45 "sample/undocked/tail_call_recursive.c" + register uint64_t r8 = 0; #line 45 "sample/undocked/tail_call_recursive.c" register uint64_t r10 = 0; @@ -124,12 +126,12 @@ recurse(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 45 "sample/undocked/tail_call_recursive.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r8 src=r0 offset=0 imm=0 #line 45 "sample/undocked/tail_call_recursive.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-4 imm=0 + r8 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r8 offset=-4 imm=0 #line 47 "sample/undocked/tail_call_recursive.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r8; // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r10 offset=0 imm=0 #line 47 "sample/undocked/tail_call_recursive.c" r2 = r10; @@ -148,46 +150,46 @@ recurse(void* context) return 0; #line 51 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_JEQ_IMM pc=8 dst=r0 src=r0 offset=23 imm=0 + // EBPF_OP_MOV64_REG pc=8 dst=r7 src=r0 offset=0 imm=0 +#line 51 "sample/undocked/tail_call_recursive.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=9 dst=r7 src=r0 offset=22 imm=0 #line 52 "sample/undocked/tail_call_recursive.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 52 "sample/undocked/tail_call_recursive.c" goto label_1; #line 52 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_MOV64_IMM pc=9 dst=r1 src=r0 offset=0 imm=680997 + // EBPF_OP_MOV64_IMM pc=10 dst=r1 src=r0 offset=0 imm=680997 #line 52 "sample/undocked/tail_call_recursive.c" r1 = IMMEDIATE(680997); - // EBPF_OP_STXW pc=10 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXW pc=11 dst=r10 src=r1 offset=-8 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint32_t)r1; - // EBPF_OP_LDDW pc=11 dst=r1 src=r0 offset=0 imm=1635133984 + // EBPF_OP_LDDW pc=12 dst=r1 src=r0 offset=0 imm=1635133984 #line 56 "sample/undocked/tail_call_recursive.c" r1 = (uint64_t)4424071317313432096; - // EBPF_OP_STXDW pc=13 dst=r10 src=r1 offset=-16 imm=0 + // EBPF_OP_STXDW pc=14 dst=r10 src=r1 offset=-16 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=14 dst=r1 src=r0 offset=0 imm=1969448306 + // EBPF_OP_LDDW pc=15 dst=r1 src=r0 offset=0 imm=1969448306 #line 56 "sample/undocked/tail_call_recursive.c" r1 = (uint64_t)4207896362280510834; - // EBPF_OP_STXDW pc=16 dst=r10 src=r1 offset=-24 imm=0 + // EBPF_OP_STXDW pc=17 dst=r10 src=r1 offset=-24 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r1; - // EBPF_OP_LDXW pc=17 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=18 dst=r3 src=r7 offset=0 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" - r3 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=18 dst=r1 src=r10 offset=0 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=19 dst=r1 src=r10 offset=0 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r1 src=r0 offset=0 imm=-24 + // EBPF_OP_ADD64_IMM pc=20 dst=r1 src=r0 offset=0 imm=-24 #line 56 "sample/undocked/tail_call_recursive.c" r1 += IMMEDIATE(-24); - // EBPF_OP_MOV64_IMM pc=20 dst=r2 src=r0 offset=0 imm=20 + // EBPF_OP_MOV64_IMM pc=21 dst=r2 src=r0 offset=0 imm=20 #line 56 "sample/undocked/tail_call_recursive.c" r2 = IMMEDIATE(20); - // EBPF_OP_MOV64_REG pc=21 dst=r7 src=r0 offset=0 imm=0 -#line 56 "sample/undocked/tail_call_recursive.c" - r7 = r0; // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=13 #line 56 "sample/undocked/tail_call_recursive.c" r0 = recurse_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -224,13 +226,13 @@ recurse(void* context) return 0; #line 62 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_MOV64_REG pc=31 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=31 dst=r8 src=r0 offset=0 imm=0 #line 62 "sample/undocked/tail_call_recursive.c" - r7 = r0; + r8 = r0; label_1: - // EBPF_OP_MOV64_REG pc=32 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=32 dst=r0 src=r8 offset=0 imm=0 #line 63 "sample/undocked/tail_call_recursive.c" - r0 = r7; + r0 = r8; // EBPF_OP_EXIT pc=33 dst=r0 src=r0 offset=0 imm=0 #line 63 "sample/undocked/tail_call_recursive.c" return r0; @@ -269,7 +271,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_recursive_raw.c b/tests/bpf2c_tests/expected/tail_call_recursive_raw.c index 8d73560160..18769f583a 100644 --- a/tests/bpf2c_tests/expected/tail_call_recursive_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_recursive_raw.c @@ -87,6 +87,8 @@ recurse(void* context) register uint64_t r6 = 0; #line 45 "sample/undocked/tail_call_recursive.c" register uint64_t r7 = 0; +#line 45 "sample/undocked/tail_call_recursive.c" + register uint64_t r8 = 0; #line 45 "sample/undocked/tail_call_recursive.c" register uint64_t r10 = 0; @@ -98,12 +100,12 @@ recurse(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 45 "sample/undocked/tail_call_recursive.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r8 src=r0 offset=0 imm=0 #line 45 "sample/undocked/tail_call_recursive.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-4 imm=0 + r8 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r8 offset=-4 imm=0 #line 47 "sample/undocked/tail_call_recursive.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r8; // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r10 offset=0 imm=0 #line 47 "sample/undocked/tail_call_recursive.c" r2 = r10; @@ -122,46 +124,46 @@ recurse(void* context) return 0; #line 51 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_JEQ_IMM pc=8 dst=r0 src=r0 offset=23 imm=0 + // EBPF_OP_MOV64_REG pc=8 dst=r7 src=r0 offset=0 imm=0 +#line 51 "sample/undocked/tail_call_recursive.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=9 dst=r7 src=r0 offset=22 imm=0 #line 52 "sample/undocked/tail_call_recursive.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 52 "sample/undocked/tail_call_recursive.c" goto label_1; #line 52 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_MOV64_IMM pc=9 dst=r1 src=r0 offset=0 imm=680997 + // EBPF_OP_MOV64_IMM pc=10 dst=r1 src=r0 offset=0 imm=680997 #line 52 "sample/undocked/tail_call_recursive.c" r1 = IMMEDIATE(680997); - // EBPF_OP_STXW pc=10 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXW pc=11 dst=r10 src=r1 offset=-8 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint32_t)r1; - // EBPF_OP_LDDW pc=11 dst=r1 src=r0 offset=0 imm=1635133984 + // EBPF_OP_LDDW pc=12 dst=r1 src=r0 offset=0 imm=1635133984 #line 56 "sample/undocked/tail_call_recursive.c" r1 = (uint64_t)4424071317313432096; - // EBPF_OP_STXDW pc=13 dst=r10 src=r1 offset=-16 imm=0 + // EBPF_OP_STXDW pc=14 dst=r10 src=r1 offset=-16 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=14 dst=r1 src=r0 offset=0 imm=1969448306 + // EBPF_OP_LDDW pc=15 dst=r1 src=r0 offset=0 imm=1969448306 #line 56 "sample/undocked/tail_call_recursive.c" r1 = (uint64_t)4207896362280510834; - // EBPF_OP_STXDW pc=16 dst=r10 src=r1 offset=-24 imm=0 + // EBPF_OP_STXDW pc=17 dst=r10 src=r1 offset=-24 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r1; - // EBPF_OP_LDXW pc=17 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=18 dst=r3 src=r7 offset=0 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" - r3 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=18 dst=r1 src=r10 offset=0 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=19 dst=r1 src=r10 offset=0 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r1 src=r0 offset=0 imm=-24 + // EBPF_OP_ADD64_IMM pc=20 dst=r1 src=r0 offset=0 imm=-24 #line 56 "sample/undocked/tail_call_recursive.c" r1 += IMMEDIATE(-24); - // EBPF_OP_MOV64_IMM pc=20 dst=r2 src=r0 offset=0 imm=20 + // EBPF_OP_MOV64_IMM pc=21 dst=r2 src=r0 offset=0 imm=20 #line 56 "sample/undocked/tail_call_recursive.c" r2 = IMMEDIATE(20); - // EBPF_OP_MOV64_REG pc=21 dst=r7 src=r0 offset=0 imm=0 -#line 56 "sample/undocked/tail_call_recursive.c" - r7 = r0; // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=13 #line 56 "sample/undocked/tail_call_recursive.c" r0 = recurse_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -198,13 +200,13 @@ recurse(void* context) return 0; #line 62 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_MOV64_REG pc=31 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=31 dst=r8 src=r0 offset=0 imm=0 #line 62 "sample/undocked/tail_call_recursive.c" - r7 = r0; + r8 = r0; label_1: - // EBPF_OP_MOV64_REG pc=32 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=32 dst=r0 src=r8 offset=0 imm=0 #line 63 "sample/undocked/tail_call_recursive.c" - r0 = r7; + r0 = r8; // EBPF_OP_EXIT pc=33 dst=r0 src=r0 offset=0 imm=0 #line 63 "sample/undocked/tail_call_recursive.c" return r0; @@ -243,7 +245,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_recursive_sys.c b/tests/bpf2c_tests/expected/tail_call_recursive_sys.c index 60f662b7c7..3439a2e3b1 100644 --- a/tests/bpf2c_tests/expected/tail_call_recursive_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_recursive_sys.c @@ -248,6 +248,8 @@ recurse(void* context) register uint64_t r6 = 0; #line 45 "sample/undocked/tail_call_recursive.c" register uint64_t r7 = 0; +#line 45 "sample/undocked/tail_call_recursive.c" + register uint64_t r8 = 0; #line 45 "sample/undocked/tail_call_recursive.c" register uint64_t r10 = 0; @@ -259,12 +261,12 @@ recurse(void* context) // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 #line 45 "sample/undocked/tail_call_recursive.c" r6 = r1; - // EBPF_OP_MOV64_IMM pc=1 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=1 dst=r8 src=r0 offset=0 imm=0 #line 45 "sample/undocked/tail_call_recursive.c" - r7 = IMMEDIATE(0); - // EBPF_OP_STXW pc=2 dst=r10 src=r7 offset=-4 imm=0 + r8 = IMMEDIATE(0); + // EBPF_OP_STXW pc=2 dst=r10 src=r8 offset=-4 imm=0 #line 47 "sample/undocked/tail_call_recursive.c" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r7; + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-4)) = (uint32_t)r8; // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r10 offset=0 imm=0 #line 47 "sample/undocked/tail_call_recursive.c" r2 = r10; @@ -283,46 +285,46 @@ recurse(void* context) return 0; #line 51 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_JEQ_IMM pc=8 dst=r0 src=r0 offset=23 imm=0 + // EBPF_OP_MOV64_REG pc=8 dst=r7 src=r0 offset=0 imm=0 +#line 51 "sample/undocked/tail_call_recursive.c" + r7 = r0; + // EBPF_OP_JEQ_IMM pc=9 dst=r7 src=r0 offset=22 imm=0 #line 52 "sample/undocked/tail_call_recursive.c" - if (r0 == IMMEDIATE(0)) { + if (r7 == IMMEDIATE(0)) { #line 52 "sample/undocked/tail_call_recursive.c" goto label_1; #line 52 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_MOV64_IMM pc=9 dst=r1 src=r0 offset=0 imm=680997 + // EBPF_OP_MOV64_IMM pc=10 dst=r1 src=r0 offset=0 imm=680997 #line 52 "sample/undocked/tail_call_recursive.c" r1 = IMMEDIATE(680997); - // EBPF_OP_STXW pc=10 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXW pc=11 dst=r10 src=r1 offset=-8 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint32_t)r1; - // EBPF_OP_LDDW pc=11 dst=r1 src=r0 offset=0 imm=1635133984 + // EBPF_OP_LDDW pc=12 dst=r1 src=r0 offset=0 imm=1635133984 #line 56 "sample/undocked/tail_call_recursive.c" r1 = (uint64_t)4424071317313432096; - // EBPF_OP_STXDW pc=13 dst=r10 src=r1 offset=-16 imm=0 + // EBPF_OP_STXDW pc=14 dst=r10 src=r1 offset=-16 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r1; - // EBPF_OP_LDDW pc=14 dst=r1 src=r0 offset=0 imm=1969448306 + // EBPF_OP_LDDW pc=15 dst=r1 src=r0 offset=0 imm=1969448306 #line 56 "sample/undocked/tail_call_recursive.c" r1 = (uint64_t)4207896362280510834; - // EBPF_OP_STXDW pc=16 dst=r10 src=r1 offset=-24 imm=0 + // EBPF_OP_STXDW pc=17 dst=r10 src=r1 offset=-24 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-24)) = (uint64_t)r1; - // EBPF_OP_LDXW pc=17 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_LDXW pc=18 dst=r3 src=r7 offset=0 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" - r3 = *(uint32_t*)(uintptr_t)(r0 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=18 dst=r1 src=r10 offset=0 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=19 dst=r1 src=r10 offset=0 imm=0 #line 56 "sample/undocked/tail_call_recursive.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=19 dst=r1 src=r0 offset=0 imm=-24 + // EBPF_OP_ADD64_IMM pc=20 dst=r1 src=r0 offset=0 imm=-24 #line 56 "sample/undocked/tail_call_recursive.c" r1 += IMMEDIATE(-24); - // EBPF_OP_MOV64_IMM pc=20 dst=r2 src=r0 offset=0 imm=20 + // EBPF_OP_MOV64_IMM pc=21 dst=r2 src=r0 offset=0 imm=20 #line 56 "sample/undocked/tail_call_recursive.c" r2 = IMMEDIATE(20); - // EBPF_OP_MOV64_REG pc=21 dst=r7 src=r0 offset=0 imm=0 -#line 56 "sample/undocked/tail_call_recursive.c" - r7 = r0; // EBPF_OP_CALL pc=22 dst=r0 src=r0 offset=0 imm=13 #line 56 "sample/undocked/tail_call_recursive.c" r0 = recurse_helpers[1].address(r1, r2, r3, r4, r5, context); @@ -359,13 +361,13 @@ recurse(void* context) return 0; #line 62 "sample/undocked/tail_call_recursive.c" } - // EBPF_OP_MOV64_REG pc=31 dst=r7 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=31 dst=r8 src=r0 offset=0 imm=0 #line 62 "sample/undocked/tail_call_recursive.c" - r7 = r0; + r8 = r0; label_1: - // EBPF_OP_MOV64_REG pc=32 dst=r0 src=r7 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=32 dst=r0 src=r8 offset=0 imm=0 #line 63 "sample/undocked/tail_call_recursive.c" - r0 = r7; + r0 = r8; // EBPF_OP_EXIT pc=33 dst=r0 src=r0 offset=0 imm=0 #line 63 "sample/undocked/tail_call_recursive.c" return r0; @@ -404,7 +406,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_same_section_dll.c b/tests/bpf2c_tests/expected/tail_call_same_section_dll.c index 6d744f2c49..4a5a405a31 100644 --- a/tests/bpf2c_tests/expected/tail_call_same_section_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_same_section_dll.c @@ -312,7 +312,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_same_section_raw.c b/tests/bpf2c_tests/expected/tail_call_same_section_raw.c index 2b10c4e341..9c31fd259c 100644 --- a/tests/bpf2c_tests/expected/tail_call_same_section_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_same_section_raw.c @@ -286,7 +286,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_same_section_sys.c b/tests/bpf2c_tests/expected/tail_call_same_section_sys.c index e276e93b46..1edae78f51 100644 --- a/tests/bpf2c_tests/expected/tail_call_same_section_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_same_section_sys.c @@ -447,7 +447,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_sequential_dll.c b/tests/bpf2c_tests/expected/tail_call_sequential_dll.c index b07ea34bdc..3a0de7a24c 100644 --- a/tests/bpf2c_tests/expected/tail_call_sequential_dll.c +++ b/tests/bpf2c_tests/expected/tail_call_sequential_dll.c @@ -6936,7 +6936,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_sequential_raw.c b/tests/bpf2c_tests/expected/tail_call_sequential_raw.c index 7d8adaefb5..ab5183fdb0 100644 --- a/tests/bpf2c_tests/expected/tail_call_sequential_raw.c +++ b/tests/bpf2c_tests/expected/tail_call_sequential_raw.c @@ -6910,7 +6910,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_sequential_sys.c b/tests/bpf2c_tests/expected/tail_call_sequential_sys.c index c7d2bfd140..d7171e34e2 100644 --- a/tests/bpf2c_tests/expected/tail_call_sequential_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_sequential_sys.c @@ -7071,7 +7071,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/tail_call_sys.c b/tests/bpf2c_tests/expected/tail_call_sys.c index e242a6f7d9..b835102dc5 100644 --- a/tests/bpf2c_tests/expected/tail_call_sys.c +++ b/tests/bpf2c_tests/expected/tail_call_sys.c @@ -393,7 +393,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_sample_ebpf_dll.c b/tests/bpf2c_tests/expected/test_sample_ebpf_dll.c index 322994276a..e8a2ced0ae 100644 --- a/tests/bpf2c_tests/expected/test_sample_ebpf_dll.c +++ b/tests/bpf2c_tests/expected/test_sample_ebpf_dll.c @@ -311,7 +311,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_sample_ebpf_raw.c b/tests/bpf2c_tests/expected/test_sample_ebpf_raw.c index 160fb79b54..bf22bf656f 100644 --- a/tests/bpf2c_tests/expected/test_sample_ebpf_raw.c +++ b/tests/bpf2c_tests/expected/test_sample_ebpf_raw.c @@ -285,7 +285,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_sample_ebpf_sys.c b/tests/bpf2c_tests/expected/test_sample_ebpf_sys.c index 39b987c1c1..8126c15ff1 100644 --- a/tests/bpf2c_tests/expected/test_sample_ebpf_sys.c +++ b/tests/bpf2c_tests/expected/test_sample_ebpf_sys.c @@ -446,7 +446,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_sample_implicit_helpers_dll.c b/tests/bpf2c_tests/expected/test_sample_implicit_helpers_dll.c index 7ab5b2c734..2ddd65c2ea 100644 --- a/tests/bpf2c_tests/expected/test_sample_implicit_helpers_dll.c +++ b/tests/bpf2c_tests/expected/test_sample_implicit_helpers_dll.c @@ -381,7 +381,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_sample_implicit_helpers_raw.c b/tests/bpf2c_tests/expected/test_sample_implicit_helpers_raw.c index c64f63f1a1..7c2a50b6e7 100644 --- a/tests/bpf2c_tests/expected/test_sample_implicit_helpers_raw.c +++ b/tests/bpf2c_tests/expected/test_sample_implicit_helpers_raw.c @@ -355,7 +355,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_sample_implicit_helpers_sys.c b/tests/bpf2c_tests/expected/test_sample_implicit_helpers_sys.c index 617adb155e..cf581c4095 100644 --- a/tests/bpf2c_tests/expected/test_sample_implicit_helpers_sys.c +++ b/tests/bpf2c_tests/expected/test_sample_implicit_helpers_sys.c @@ -516,7 +516,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_utility_helpers_dll.c b/tests/bpf2c_tests/expected/test_utility_helpers_dll.c index 595c12ff37..ea3a28b99c 100644 --- a/tests/bpf2c_tests/expected/test_utility_helpers_dll.c +++ b/tests/bpf2c_tests/expected/test_utility_helpers_dll.c @@ -335,7 +335,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_utility_helpers_raw.c b/tests/bpf2c_tests/expected/test_utility_helpers_raw.c index b0618fc92b..6773112b1a 100644 --- a/tests/bpf2c_tests/expected/test_utility_helpers_raw.c +++ b/tests/bpf2c_tests/expected/test_utility_helpers_raw.c @@ -309,7 +309,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/test_utility_helpers_sys.c b/tests/bpf2c_tests/expected/test_utility_helpers_sys.c index c2efe6811c..3fe1ba1269 100644 --- a/tests/bpf2c_tests/expected/test_utility_helpers_sys.c +++ b/tests/bpf2c_tests/expected/test_utility_helpers_sys.c @@ -470,7 +470,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/utility_dll.c b/tests/bpf2c_tests/expected/utility_dll.c index c1a22eed14..04c3f5d665 100644 --- a/tests/bpf2c_tests/expected/utility_dll.c +++ b/tests/bpf2c_tests/expected/utility_dll.c @@ -78,6 +78,8 @@ UtilityTest(void* context) register uint64_t r4 = 0; #line 24 "sample/utility.c" register uint64_t r5 = 0; +#line 24 "sample/utility.c" + register uint64_t r6 = 0; #line 24 "sample/utility.c" register uint64_t r10 = 0; @@ -146,50 +148,47 @@ UtilityTest(void* context) return 0; #line 31 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=19 dst=r1 src=r0 offset=0 imm=0 -#line 31 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=20 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/utility.c" - r0 = IMMEDIATE(1); - // EBPF_OP_LSH64_IMM pc=21 dst=r1 src=r0 offset=0 imm=32 + r6 = IMMEDIATE(1); + // EBPF_OP_LSH64_IMM pc=20 dst=r0 src=r0 offset=0 imm=32 #line 31 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=22 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_RSH64_IMM pc=21 dst=r0 src=r0 offset=0 imm=32 #line 31 "sample/utility.c" - r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=86 imm=0 + r0 >>= (IMMEDIATE(32) & 63); + // EBPF_OP_JNE_IMM pc=22 dst=r0 src=r0 offset=81 imm=0 #line 31 "sample/utility.c" - if (r1 != IMMEDIATE(0)) { + if (r0 != IMMEDIATE(0)) { #line 31 "sample/utility.c" goto label_1; #line 31 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=24 dst=r1 src=r0 offset=0 imm=84 + // EBPF_OP_MOV64_IMM pc=23 dst=r1 src=r0 offset=0 imm=84 #line 31 "sample/utility.c" r1 = IMMEDIATE(84); - // EBPF_OP_STXB pc=25 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXB pc=24 dst=r10 src=r1 offset=-8 imm=0 #line 35 "sample/utility.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint8_t)r1; - // EBPF_OP_MOV64_REG pc=26 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=25 dst=r1 src=r10 offset=0 imm=0 #line 35 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=27 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=-8 #line 35 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=28 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=27 dst=r3 src=r10 offset=0 imm=0 #line 35 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=29 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=28 dst=r3 src=r0 offset=0 imm=-16 #line 35 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=30 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=29 dst=r2 src=r0 offset=0 imm=4 #line 37 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=31 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=30 dst=r4 src=r0 offset=0 imm=4 #line 37 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=32 dst=r0 src=r0 offset=0 imm=23 + // EBPF_OP_CALL pc=31 dst=r0 src=r0 offset=0 imm=23 #line 37 "sample/utility.c" r0 = UtilityTest_helpers[0].address(r1, r2, r3, r4, r5, context); #line 37 "sample/utility.c" @@ -198,44 +197,44 @@ UtilityTest(void* context) return 0; #line 37 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=33 dst=r1 src=r0 offset=0 imm=0 -#line 37 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=34 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_MOV64_IMM pc=32 dst=r6 src=r0 offset=0 imm=2 #line 37 "sample/utility.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=35 dst=r1 src=r0 offset=0 imm=32 + r6 = IMMEDIATE(2); + // EBPF_OP_LSH64_IMM pc=33 dst=r0 src=r0 offset=0 imm=32 #line 37 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=36 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=34 dst=r0 src=r0 offset=0 imm=32 #line 37 "sample/utility.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_JSGT_IMM pc=37 dst=r1 src=r0 offset=72 imm=-1 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_JSGT_IMM pc=35 dst=r0 src=r0 offset=68 imm=-1 #line 37 "sample/utility.c" - if ((int64_t)r1 > IMMEDIATE(-1)) { + if ((int64_t)r0 > IMMEDIATE(-1)) { #line 37 "sample/utility.c" goto label_1; #line 37 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=38 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=36 dst=r1 src=r10 offset=0 imm=0 #line 37 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=39 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=37 dst=r1 src=r0 offset=0 imm=-8 #line 43 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=40 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=38 dst=r6 src=r0 offset=0 imm=3 +#line 43 "sample/utility.c" + r6 = IMMEDIATE(3); + // EBPF_OP_MOV64_REG pc=39 dst=r3 src=r10 offset=0 imm=0 #line 43 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=41 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=40 dst=r3 src=r0 offset=0 imm=-16 #line 43 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=42 dst=r2 src=r0 offset=0 imm=3 + // EBPF_OP_MOV64_IMM pc=41 dst=r2 src=r0 offset=0 imm=3 #line 43 "sample/utility.c" r2 = IMMEDIATE(3); - // EBPF_OP_MOV64_IMM pc=43 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=42 dst=r4 src=r0 offset=0 imm=4 #line 43 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=44 dst=r0 src=r0 offset=0 imm=23 + // EBPF_OP_CALL pc=43 dst=r0 src=r0 offset=0 imm=23 #line 43 "sample/utility.c" r0 = UtilityTest_helpers[0].address(r1, r2, r3, r4, r5, context); #line 43 "sample/utility.c" @@ -244,50 +243,44 @@ UtilityTest(void* context) return 0; #line 43 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=45 dst=r1 src=r0 offset=0 imm=0 -#line 43 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=46 dst=r0 src=r0 offset=0 imm=3 -#line 43 "sample/utility.c" - r0 = IMMEDIATE(3); - // EBPF_OP_LSH64_IMM pc=47 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=44 dst=r0 src=r0 offset=0 imm=32 #line 43 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=48 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=45 dst=r0 src=r0 offset=0 imm=32 #line 43 "sample/utility.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_JSGT_IMM pc=49 dst=r1 src=r0 offset=60 imm=-1 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_JSGT_IMM pc=46 dst=r0 src=r0 offset=57 imm=-1 #line 43 "sample/utility.c" - if ((int64_t)r1 > IMMEDIATE(-1)) { + if ((int64_t)r0 > IMMEDIATE(-1)) { #line 43 "sample/utility.c" goto label_1; #line 43 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=50 dst=r1 src=r0 offset=0 imm=1414743380 + // EBPF_OP_MOV64_IMM pc=47 dst=r1 src=r0 offset=0 imm=1414743380 #line 43 "sample/utility.c" r1 = IMMEDIATE(1414743380); - // EBPF_OP_STXW pc=51 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXW pc=48 dst=r10 src=r1 offset=-8 imm=0 #line 48 "sample/utility.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=52 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=49 dst=r1 src=r10 offset=0 imm=0 #line 48 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=53 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=50 dst=r1 src=r0 offset=0 imm=-8 #line 48 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=54 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=51 dst=r3 src=r10 offset=0 imm=0 #line 48 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=55 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=52 dst=r3 src=r0 offset=0 imm=-16 #line 48 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=56 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=53 dst=r2 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=57 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=54 dst=r4 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=58 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=55 dst=r0 src=r0 offset=0 imm=22 #line 54 "sample/utility.c" r0 = UtilityTest_helpers[1].address(r1, r2, r3, r4, r5, context); #line 54 "sample/utility.c" @@ -296,78 +289,75 @@ UtilityTest(void* context) return 0; #line 54 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=59 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=56 dst=r1 src=r0 offset=0 imm=0 #line 54 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=60 dst=r2 src=r0 offset=0 imm=0 -#line 54 "sample/utility.c" - r2 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=61 dst=r0 src=r0 offset=0 imm=4 + r1 = IMMEDIATE(0); + // EBPF_OP_MOV64_IMM pc=57 dst=r6 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" - r0 = IMMEDIATE(4); - // EBPF_OP_JSGT_REG pc=62 dst=r2 src=r1 offset=47 imm=0 + r6 = IMMEDIATE(4); + // EBPF_OP_JSGT_REG pc=58 dst=r1 src=r0 offset=45 imm=0 #line 54 "sample/utility.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 54 "sample/utility.c" goto label_1; #line 54 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=63 dst=r0 src=r0 offset=0 imm=5 + // EBPF_OP_MOV64_IMM pc=59 dst=r6 src=r0 offset=0 imm=5 #line 54 "sample/utility.c" - r0 = IMMEDIATE(5); - // EBPF_OP_LDXB pc=64 dst=r1 src=r10 offset=-8 imm=0 + r6 = IMMEDIATE(5); + // EBPF_OP_LDXB pc=60 dst=r1 src=r10 offset=-8 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_JNE_IMM pc=65 dst=r1 src=r0 offset=44 imm=116 + // EBPF_OP_JNE_IMM pc=61 dst=r1 src=r0 offset=42 imm=116 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(116)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=66 dst=r1 src=r10 offset=-7 imm=0 + // EBPF_OP_LDXB pc=62 dst=r1 src=r10 offset=-7 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-7)); - // EBPF_OP_JNE_IMM pc=67 dst=r1 src=r0 offset=42 imm=101 + // EBPF_OP_JNE_IMM pc=63 dst=r1 src=r0 offset=40 imm=101 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(101)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=68 dst=r1 src=r10 offset=-6 imm=0 + // EBPF_OP_LDXB pc=64 dst=r1 src=r10 offset=-6 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-6)); - // EBPF_OP_JNE_IMM pc=69 dst=r1 src=r0 offset=40 imm=115 + // EBPF_OP_JNE_IMM pc=65 dst=r1 src=r0 offset=38 imm=115 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(115)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=70 dst=r1 src=r10 offset=-5 imm=0 + // EBPF_OP_LDXB pc=66 dst=r1 src=r10 offset=-5 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-5)); - // EBPF_OP_JNE_IMM pc=71 dst=r1 src=r0 offset=38 imm=116 + // EBPF_OP_JNE_IMM pc=67 dst=r1 src=r0 offset=36 imm=116 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(116)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=72 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=68 dst=r1 src=r10 offset=0 imm=0 #line 59 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=73 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=69 dst=r1 src=r0 offset=0 imm=-8 #line 64 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_IMM pc=74 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=70 dst=r2 src=r0 offset=0 imm=4 #line 64 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=75 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=71 dst=r3 src=r0 offset=0 imm=0 #line 64 "sample/utility.c" r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=76 dst=r0 src=r0 offset=0 imm=24 + // EBPF_OP_CALL pc=72 dst=r0 src=r0 offset=0 imm=24 #line 64 "sample/utility.c" r0 = UtilityTest_helpers[2].address(r1, r2, r3, r4, r5, context); #line 64 "sample/utility.c" @@ -376,81 +366,78 @@ UtilityTest(void* context) return 0; #line 64 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=77 dst=r1 src=r0 offset=0 imm=0 -#line 64 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=78 dst=r0 src=r0 offset=0 imm=6 + // EBPF_OP_MOV64_IMM pc=73 dst=r6 src=r0 offset=0 imm=6 #line 64 "sample/utility.c" - r0 = IMMEDIATE(6); - // EBPF_OP_JEQ_IMM pc=79 dst=r1 src=r0 offset=30 imm=0 + r6 = IMMEDIATE(6); + // EBPF_OP_JEQ_IMM pc=74 dst=r0 src=r0 offset=29 imm=0 #line 64 "sample/utility.c" - if (r1 == IMMEDIATE(0)) { + if (r0 == IMMEDIATE(0)) { #line 64 "sample/utility.c" goto label_1; #line 64 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=80 dst=r0 src=r0 offset=0 imm=7 + // EBPF_OP_MOV64_IMM pc=75 dst=r6 src=r0 offset=0 imm=7 #line 64 "sample/utility.c" - r0 = IMMEDIATE(7); - // EBPF_OP_LDXB pc=81 dst=r1 src=r10 offset=-8 imm=0 + r6 = IMMEDIATE(7); + // EBPF_OP_LDXB pc=76 dst=r1 src=r10 offset=-8 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_JNE_IMM pc=82 dst=r1 src=r0 offset=27 imm=0 + // EBPF_OP_JNE_IMM pc=77 dst=r1 src=r0 offset=26 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=83 dst=r1 src=r10 offset=-7 imm=0 + // EBPF_OP_LDXB pc=78 dst=r1 src=r10 offset=-7 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-7)); - // EBPF_OP_JNE_IMM pc=84 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JNE_IMM pc=79 dst=r1 src=r0 offset=24 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=85 dst=r1 src=r10 offset=-6 imm=0 + // EBPF_OP_LDXB pc=80 dst=r1 src=r10 offset=-6 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-6)); - // EBPF_OP_JNE_IMM pc=86 dst=r1 src=r0 offset=23 imm=0 + // EBPF_OP_JNE_IMM pc=81 dst=r1 src=r0 offset=22 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=87 dst=r1 src=r10 offset=-5 imm=0 + // EBPF_OP_LDXB pc=82 dst=r1 src=r10 offset=-5 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-5)); - // EBPF_OP_JNE_IMM pc=88 dst=r1 src=r0 offset=21 imm=0 + // EBPF_OP_JNE_IMM pc=83 dst=r1 src=r0 offset=20 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=89 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=84 dst=r1 src=r10 offset=0 imm=0 #line 74 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=90 dst=r1 src=r0 offset=0 imm=-30 + // EBPF_OP_ADD64_IMM pc=85 dst=r1 src=r0 offset=0 imm=-30 #line 74 "sample/utility.c" r1 += IMMEDIATE(-30); - // EBPF_OP_MOV64_REG pc=91 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=86 dst=r3 src=r10 offset=0 imm=0 #line 74 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=92 dst=r3 src=r0 offset=0 imm=-32 + // EBPF_OP_ADD64_IMM pc=87 dst=r3 src=r0 offset=0 imm=-32 #line 74 "sample/utility.c" r3 += IMMEDIATE(-32); - // EBPF_OP_MOV64_IMM pc=93 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=88 dst=r2 src=r0 offset=0 imm=4 #line 74 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=94 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=89 dst=r4 src=r0 offset=0 imm=4 #line 74 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=95 dst=r0 src=r0 offset=0 imm=25 + // EBPF_OP_CALL pc=90 dst=r0 src=r0 offset=0 imm=25 #line 74 "sample/utility.c" r0 = UtilityTest_helpers[3].address(r1, r2, r3, r4, r5, context); #line 74 "sample/utility.c" @@ -459,70 +446,70 @@ UtilityTest(void* context) return 0; #line 74 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=96 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=91 dst=r6 src=r0 offset=0 imm=8 #line 74 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=97 dst=r0 src=r0 offset=0 imm=8 + r6 = IMMEDIATE(8); + // EBPF_OP_MOV64_IMM pc=92 dst=r1 src=r0 offset=0 imm=0 #line 74 "sample/utility.c" - r0 = IMMEDIATE(8); - // EBPF_OP_MOV64_IMM pc=98 dst=r2 src=r0 offset=0 imm=0 -#line 74 "sample/utility.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=99 dst=r2 src=r1 offset=10 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=93 dst=r1 src=r0 offset=10 imm=0 #line 74 "sample/utility.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 74 "sample/utility.c" goto label_1; #line 74 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=100 dst=r0 src=r0 offset=0 imm=9 + // EBPF_OP_MOV64_IMM pc=94 dst=r6 src=r0 offset=0 imm=9 #line 74 "sample/utility.c" - r0 = IMMEDIATE(9); - // EBPF_OP_LDXB pc=101 dst=r1 src=r10 offset=-30 imm=0 + r6 = IMMEDIATE(9); + // EBPF_OP_LDXB pc=95 dst=r1 src=r10 offset=-30 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-30)); - // EBPF_OP_JNE_IMM pc=102 dst=r1 src=r0 offset=7 imm=49 + // EBPF_OP_JNE_IMM pc=96 dst=r1 src=r0 offset=7 imm=49 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(49)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=103 dst=r1 src=r10 offset=-29 imm=0 + // EBPF_OP_LDXB pc=97 dst=r1 src=r10 offset=-29 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-29)); - // EBPF_OP_JNE_IMM pc=104 dst=r1 src=r0 offset=5 imm=50 + // EBPF_OP_JNE_IMM pc=98 dst=r1 src=r0 offset=5 imm=50 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(50)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=105 dst=r1 src=r10 offset=-28 imm=0 + // EBPF_OP_LDXB pc=99 dst=r1 src=r10 offset=-28 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-28)); - // EBPF_OP_JNE_IMM pc=106 dst=r1 src=r0 offset=3 imm=51 + // EBPF_OP_JNE_IMM pc=100 dst=r1 src=r0 offset=3 imm=51 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(51)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=107 dst=r1 src=r10 offset=-27 imm=0 + // EBPF_OP_LDXB pc=101 dst=r1 src=r10 offset=-27 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-27)); - // EBPF_OP_JNE_IMM pc=108 dst=r1 src=r0 offset=1 imm=52 + // EBPF_OP_JNE_IMM pc=102 dst=r1 src=r0 offset=1 imm=52 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(52)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=109 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=103 dst=r6 src=r0 offset=0 imm=0 #line 79 "sample/utility.c" - r0 = IMMEDIATE(0); + r6 = IMMEDIATE(0); label_1: - // EBPF_OP_EXIT pc=110 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=104 dst=r0 src=r6 offset=0 imm=0 +#line 84 "sample/utility.c" + r0 = r6; + // EBPF_OP_EXIT pc=105 dst=r0 src=r0 offset=0 imm=0 #line 84 "sample/utility.c" return r0; #line 24 "sample/utility.c" @@ -542,7 +529,7 @@ static program_entry_t _programs[] = { 0, UtilityTest_helpers, 4, - 111, + 106, &UtilityTest_program_type_guid, &UtilityTest_attach_type_guid, }, @@ -560,7 +547,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/utility_raw.c b/tests/bpf2c_tests/expected/utility_raw.c index 5a75438ace..1f1053ce36 100644 --- a/tests/bpf2c_tests/expected/utility_raw.c +++ b/tests/bpf2c_tests/expected/utility_raw.c @@ -52,6 +52,8 @@ UtilityTest(void* context) register uint64_t r4 = 0; #line 24 "sample/utility.c" register uint64_t r5 = 0; +#line 24 "sample/utility.c" + register uint64_t r6 = 0; #line 24 "sample/utility.c" register uint64_t r10 = 0; @@ -120,50 +122,47 @@ UtilityTest(void* context) return 0; #line 31 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=19 dst=r1 src=r0 offset=0 imm=0 -#line 31 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=20 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/utility.c" - r0 = IMMEDIATE(1); - // EBPF_OP_LSH64_IMM pc=21 dst=r1 src=r0 offset=0 imm=32 + r6 = IMMEDIATE(1); + // EBPF_OP_LSH64_IMM pc=20 dst=r0 src=r0 offset=0 imm=32 #line 31 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=22 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_RSH64_IMM pc=21 dst=r0 src=r0 offset=0 imm=32 #line 31 "sample/utility.c" - r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=86 imm=0 + r0 >>= (IMMEDIATE(32) & 63); + // EBPF_OP_JNE_IMM pc=22 dst=r0 src=r0 offset=81 imm=0 #line 31 "sample/utility.c" - if (r1 != IMMEDIATE(0)) { + if (r0 != IMMEDIATE(0)) { #line 31 "sample/utility.c" goto label_1; #line 31 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=24 dst=r1 src=r0 offset=0 imm=84 + // EBPF_OP_MOV64_IMM pc=23 dst=r1 src=r0 offset=0 imm=84 #line 31 "sample/utility.c" r1 = IMMEDIATE(84); - // EBPF_OP_STXB pc=25 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXB pc=24 dst=r10 src=r1 offset=-8 imm=0 #line 35 "sample/utility.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint8_t)r1; - // EBPF_OP_MOV64_REG pc=26 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=25 dst=r1 src=r10 offset=0 imm=0 #line 35 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=27 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=-8 #line 35 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=28 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=27 dst=r3 src=r10 offset=0 imm=0 #line 35 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=29 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=28 dst=r3 src=r0 offset=0 imm=-16 #line 35 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=30 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=29 dst=r2 src=r0 offset=0 imm=4 #line 37 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=31 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=30 dst=r4 src=r0 offset=0 imm=4 #line 37 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=32 dst=r0 src=r0 offset=0 imm=23 + // EBPF_OP_CALL pc=31 dst=r0 src=r0 offset=0 imm=23 #line 37 "sample/utility.c" r0 = UtilityTest_helpers[0].address(r1, r2, r3, r4, r5, context); #line 37 "sample/utility.c" @@ -172,44 +171,44 @@ UtilityTest(void* context) return 0; #line 37 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=33 dst=r1 src=r0 offset=0 imm=0 -#line 37 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=34 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_MOV64_IMM pc=32 dst=r6 src=r0 offset=0 imm=2 #line 37 "sample/utility.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=35 dst=r1 src=r0 offset=0 imm=32 + r6 = IMMEDIATE(2); + // EBPF_OP_LSH64_IMM pc=33 dst=r0 src=r0 offset=0 imm=32 #line 37 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=36 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=34 dst=r0 src=r0 offset=0 imm=32 #line 37 "sample/utility.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_JSGT_IMM pc=37 dst=r1 src=r0 offset=72 imm=-1 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_JSGT_IMM pc=35 dst=r0 src=r0 offset=68 imm=-1 #line 37 "sample/utility.c" - if ((int64_t)r1 > IMMEDIATE(-1)) { + if ((int64_t)r0 > IMMEDIATE(-1)) { #line 37 "sample/utility.c" goto label_1; #line 37 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=38 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=36 dst=r1 src=r10 offset=0 imm=0 #line 37 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=39 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=37 dst=r1 src=r0 offset=0 imm=-8 #line 43 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=40 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=38 dst=r6 src=r0 offset=0 imm=3 +#line 43 "sample/utility.c" + r6 = IMMEDIATE(3); + // EBPF_OP_MOV64_REG pc=39 dst=r3 src=r10 offset=0 imm=0 #line 43 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=41 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=40 dst=r3 src=r0 offset=0 imm=-16 #line 43 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=42 dst=r2 src=r0 offset=0 imm=3 + // EBPF_OP_MOV64_IMM pc=41 dst=r2 src=r0 offset=0 imm=3 #line 43 "sample/utility.c" r2 = IMMEDIATE(3); - // EBPF_OP_MOV64_IMM pc=43 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=42 dst=r4 src=r0 offset=0 imm=4 #line 43 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=44 dst=r0 src=r0 offset=0 imm=23 + // EBPF_OP_CALL pc=43 dst=r0 src=r0 offset=0 imm=23 #line 43 "sample/utility.c" r0 = UtilityTest_helpers[0].address(r1, r2, r3, r4, r5, context); #line 43 "sample/utility.c" @@ -218,50 +217,44 @@ UtilityTest(void* context) return 0; #line 43 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=45 dst=r1 src=r0 offset=0 imm=0 -#line 43 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=46 dst=r0 src=r0 offset=0 imm=3 -#line 43 "sample/utility.c" - r0 = IMMEDIATE(3); - // EBPF_OP_LSH64_IMM pc=47 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=44 dst=r0 src=r0 offset=0 imm=32 #line 43 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=48 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=45 dst=r0 src=r0 offset=0 imm=32 #line 43 "sample/utility.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_JSGT_IMM pc=49 dst=r1 src=r0 offset=60 imm=-1 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_JSGT_IMM pc=46 dst=r0 src=r0 offset=57 imm=-1 #line 43 "sample/utility.c" - if ((int64_t)r1 > IMMEDIATE(-1)) { + if ((int64_t)r0 > IMMEDIATE(-1)) { #line 43 "sample/utility.c" goto label_1; #line 43 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=50 dst=r1 src=r0 offset=0 imm=1414743380 + // EBPF_OP_MOV64_IMM pc=47 dst=r1 src=r0 offset=0 imm=1414743380 #line 43 "sample/utility.c" r1 = IMMEDIATE(1414743380); - // EBPF_OP_STXW pc=51 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXW pc=48 dst=r10 src=r1 offset=-8 imm=0 #line 48 "sample/utility.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=52 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=49 dst=r1 src=r10 offset=0 imm=0 #line 48 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=53 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=50 dst=r1 src=r0 offset=0 imm=-8 #line 48 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=54 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=51 dst=r3 src=r10 offset=0 imm=0 #line 48 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=55 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=52 dst=r3 src=r0 offset=0 imm=-16 #line 48 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=56 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=53 dst=r2 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=57 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=54 dst=r4 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=58 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=55 dst=r0 src=r0 offset=0 imm=22 #line 54 "sample/utility.c" r0 = UtilityTest_helpers[1].address(r1, r2, r3, r4, r5, context); #line 54 "sample/utility.c" @@ -270,78 +263,75 @@ UtilityTest(void* context) return 0; #line 54 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=59 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=56 dst=r1 src=r0 offset=0 imm=0 #line 54 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=60 dst=r2 src=r0 offset=0 imm=0 -#line 54 "sample/utility.c" - r2 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=61 dst=r0 src=r0 offset=0 imm=4 + r1 = IMMEDIATE(0); + // EBPF_OP_MOV64_IMM pc=57 dst=r6 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" - r0 = IMMEDIATE(4); - // EBPF_OP_JSGT_REG pc=62 dst=r2 src=r1 offset=47 imm=0 + r6 = IMMEDIATE(4); + // EBPF_OP_JSGT_REG pc=58 dst=r1 src=r0 offset=45 imm=0 #line 54 "sample/utility.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 54 "sample/utility.c" goto label_1; #line 54 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=63 dst=r0 src=r0 offset=0 imm=5 + // EBPF_OP_MOV64_IMM pc=59 dst=r6 src=r0 offset=0 imm=5 #line 54 "sample/utility.c" - r0 = IMMEDIATE(5); - // EBPF_OP_LDXB pc=64 dst=r1 src=r10 offset=-8 imm=0 + r6 = IMMEDIATE(5); + // EBPF_OP_LDXB pc=60 dst=r1 src=r10 offset=-8 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_JNE_IMM pc=65 dst=r1 src=r0 offset=44 imm=116 + // EBPF_OP_JNE_IMM pc=61 dst=r1 src=r0 offset=42 imm=116 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(116)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=66 dst=r1 src=r10 offset=-7 imm=0 + // EBPF_OP_LDXB pc=62 dst=r1 src=r10 offset=-7 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-7)); - // EBPF_OP_JNE_IMM pc=67 dst=r1 src=r0 offset=42 imm=101 + // EBPF_OP_JNE_IMM pc=63 dst=r1 src=r0 offset=40 imm=101 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(101)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=68 dst=r1 src=r10 offset=-6 imm=0 + // EBPF_OP_LDXB pc=64 dst=r1 src=r10 offset=-6 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-6)); - // EBPF_OP_JNE_IMM pc=69 dst=r1 src=r0 offset=40 imm=115 + // EBPF_OP_JNE_IMM pc=65 dst=r1 src=r0 offset=38 imm=115 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(115)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=70 dst=r1 src=r10 offset=-5 imm=0 + // EBPF_OP_LDXB pc=66 dst=r1 src=r10 offset=-5 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-5)); - // EBPF_OP_JNE_IMM pc=71 dst=r1 src=r0 offset=38 imm=116 + // EBPF_OP_JNE_IMM pc=67 dst=r1 src=r0 offset=36 imm=116 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(116)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=72 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=68 dst=r1 src=r10 offset=0 imm=0 #line 59 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=73 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=69 dst=r1 src=r0 offset=0 imm=-8 #line 64 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_IMM pc=74 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=70 dst=r2 src=r0 offset=0 imm=4 #line 64 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=75 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=71 dst=r3 src=r0 offset=0 imm=0 #line 64 "sample/utility.c" r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=76 dst=r0 src=r0 offset=0 imm=24 + // EBPF_OP_CALL pc=72 dst=r0 src=r0 offset=0 imm=24 #line 64 "sample/utility.c" r0 = UtilityTest_helpers[2].address(r1, r2, r3, r4, r5, context); #line 64 "sample/utility.c" @@ -350,81 +340,78 @@ UtilityTest(void* context) return 0; #line 64 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=77 dst=r1 src=r0 offset=0 imm=0 -#line 64 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=78 dst=r0 src=r0 offset=0 imm=6 + // EBPF_OP_MOV64_IMM pc=73 dst=r6 src=r0 offset=0 imm=6 #line 64 "sample/utility.c" - r0 = IMMEDIATE(6); - // EBPF_OP_JEQ_IMM pc=79 dst=r1 src=r0 offset=30 imm=0 + r6 = IMMEDIATE(6); + // EBPF_OP_JEQ_IMM pc=74 dst=r0 src=r0 offset=29 imm=0 #line 64 "sample/utility.c" - if (r1 == IMMEDIATE(0)) { + if (r0 == IMMEDIATE(0)) { #line 64 "sample/utility.c" goto label_1; #line 64 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=80 dst=r0 src=r0 offset=0 imm=7 + // EBPF_OP_MOV64_IMM pc=75 dst=r6 src=r0 offset=0 imm=7 #line 64 "sample/utility.c" - r0 = IMMEDIATE(7); - // EBPF_OP_LDXB pc=81 dst=r1 src=r10 offset=-8 imm=0 + r6 = IMMEDIATE(7); + // EBPF_OP_LDXB pc=76 dst=r1 src=r10 offset=-8 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_JNE_IMM pc=82 dst=r1 src=r0 offset=27 imm=0 + // EBPF_OP_JNE_IMM pc=77 dst=r1 src=r0 offset=26 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=83 dst=r1 src=r10 offset=-7 imm=0 + // EBPF_OP_LDXB pc=78 dst=r1 src=r10 offset=-7 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-7)); - // EBPF_OP_JNE_IMM pc=84 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JNE_IMM pc=79 dst=r1 src=r0 offset=24 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=85 dst=r1 src=r10 offset=-6 imm=0 + // EBPF_OP_LDXB pc=80 dst=r1 src=r10 offset=-6 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-6)); - // EBPF_OP_JNE_IMM pc=86 dst=r1 src=r0 offset=23 imm=0 + // EBPF_OP_JNE_IMM pc=81 dst=r1 src=r0 offset=22 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=87 dst=r1 src=r10 offset=-5 imm=0 + // EBPF_OP_LDXB pc=82 dst=r1 src=r10 offset=-5 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-5)); - // EBPF_OP_JNE_IMM pc=88 dst=r1 src=r0 offset=21 imm=0 + // EBPF_OP_JNE_IMM pc=83 dst=r1 src=r0 offset=20 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=89 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=84 dst=r1 src=r10 offset=0 imm=0 #line 74 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=90 dst=r1 src=r0 offset=0 imm=-30 + // EBPF_OP_ADD64_IMM pc=85 dst=r1 src=r0 offset=0 imm=-30 #line 74 "sample/utility.c" r1 += IMMEDIATE(-30); - // EBPF_OP_MOV64_REG pc=91 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=86 dst=r3 src=r10 offset=0 imm=0 #line 74 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=92 dst=r3 src=r0 offset=0 imm=-32 + // EBPF_OP_ADD64_IMM pc=87 dst=r3 src=r0 offset=0 imm=-32 #line 74 "sample/utility.c" r3 += IMMEDIATE(-32); - // EBPF_OP_MOV64_IMM pc=93 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=88 dst=r2 src=r0 offset=0 imm=4 #line 74 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=94 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=89 dst=r4 src=r0 offset=0 imm=4 #line 74 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=95 dst=r0 src=r0 offset=0 imm=25 + // EBPF_OP_CALL pc=90 dst=r0 src=r0 offset=0 imm=25 #line 74 "sample/utility.c" r0 = UtilityTest_helpers[3].address(r1, r2, r3, r4, r5, context); #line 74 "sample/utility.c" @@ -433,70 +420,70 @@ UtilityTest(void* context) return 0; #line 74 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=96 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=91 dst=r6 src=r0 offset=0 imm=8 #line 74 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=97 dst=r0 src=r0 offset=0 imm=8 + r6 = IMMEDIATE(8); + // EBPF_OP_MOV64_IMM pc=92 dst=r1 src=r0 offset=0 imm=0 #line 74 "sample/utility.c" - r0 = IMMEDIATE(8); - // EBPF_OP_MOV64_IMM pc=98 dst=r2 src=r0 offset=0 imm=0 -#line 74 "sample/utility.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=99 dst=r2 src=r1 offset=10 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=93 dst=r1 src=r0 offset=10 imm=0 #line 74 "sample/utility.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 74 "sample/utility.c" goto label_1; #line 74 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=100 dst=r0 src=r0 offset=0 imm=9 + // EBPF_OP_MOV64_IMM pc=94 dst=r6 src=r0 offset=0 imm=9 #line 74 "sample/utility.c" - r0 = IMMEDIATE(9); - // EBPF_OP_LDXB pc=101 dst=r1 src=r10 offset=-30 imm=0 + r6 = IMMEDIATE(9); + // EBPF_OP_LDXB pc=95 dst=r1 src=r10 offset=-30 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-30)); - // EBPF_OP_JNE_IMM pc=102 dst=r1 src=r0 offset=7 imm=49 + // EBPF_OP_JNE_IMM pc=96 dst=r1 src=r0 offset=7 imm=49 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(49)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=103 dst=r1 src=r10 offset=-29 imm=0 + // EBPF_OP_LDXB pc=97 dst=r1 src=r10 offset=-29 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-29)); - // EBPF_OP_JNE_IMM pc=104 dst=r1 src=r0 offset=5 imm=50 + // EBPF_OP_JNE_IMM pc=98 dst=r1 src=r0 offset=5 imm=50 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(50)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=105 dst=r1 src=r10 offset=-28 imm=0 + // EBPF_OP_LDXB pc=99 dst=r1 src=r10 offset=-28 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-28)); - // EBPF_OP_JNE_IMM pc=106 dst=r1 src=r0 offset=3 imm=51 + // EBPF_OP_JNE_IMM pc=100 dst=r1 src=r0 offset=3 imm=51 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(51)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=107 dst=r1 src=r10 offset=-27 imm=0 + // EBPF_OP_LDXB pc=101 dst=r1 src=r10 offset=-27 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-27)); - // EBPF_OP_JNE_IMM pc=108 dst=r1 src=r0 offset=1 imm=52 + // EBPF_OP_JNE_IMM pc=102 dst=r1 src=r0 offset=1 imm=52 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(52)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=109 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=103 dst=r6 src=r0 offset=0 imm=0 #line 79 "sample/utility.c" - r0 = IMMEDIATE(0); + r6 = IMMEDIATE(0); label_1: - // EBPF_OP_EXIT pc=110 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=104 dst=r0 src=r6 offset=0 imm=0 +#line 84 "sample/utility.c" + r0 = r6; + // EBPF_OP_EXIT pc=105 dst=r0 src=r0 offset=0 imm=0 #line 84 "sample/utility.c" return r0; #line 24 "sample/utility.c" @@ -516,7 +503,7 @@ static program_entry_t _programs[] = { 0, UtilityTest_helpers, 4, - 111, + 106, &UtilityTest_program_type_guid, &UtilityTest_attach_type_guid, }, @@ -534,7 +521,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/utility_sys.c b/tests/bpf2c_tests/expected/utility_sys.c index c9af25e343..0f61b19ff3 100644 --- a/tests/bpf2c_tests/expected/utility_sys.c +++ b/tests/bpf2c_tests/expected/utility_sys.c @@ -213,6 +213,8 @@ UtilityTest(void* context) register uint64_t r4 = 0; #line 24 "sample/utility.c" register uint64_t r5 = 0; +#line 24 "sample/utility.c" + register uint64_t r6 = 0; #line 24 "sample/utility.c" register uint64_t r10 = 0; @@ -281,50 +283,47 @@ UtilityTest(void* context) return 0; #line 31 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=19 dst=r1 src=r0 offset=0 imm=0 -#line 31 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=20 dst=r0 src=r0 offset=0 imm=1 + // EBPF_OP_MOV64_IMM pc=19 dst=r6 src=r0 offset=0 imm=1 #line 31 "sample/utility.c" - r0 = IMMEDIATE(1); - // EBPF_OP_LSH64_IMM pc=21 dst=r1 src=r0 offset=0 imm=32 + r6 = IMMEDIATE(1); + // EBPF_OP_LSH64_IMM pc=20 dst=r0 src=r0 offset=0 imm=32 #line 31 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_RSH64_IMM pc=22 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_RSH64_IMM pc=21 dst=r0 src=r0 offset=0 imm=32 #line 31 "sample/utility.c" - r1 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=86 imm=0 + r0 >>= (IMMEDIATE(32) & 63); + // EBPF_OP_JNE_IMM pc=22 dst=r0 src=r0 offset=81 imm=0 #line 31 "sample/utility.c" - if (r1 != IMMEDIATE(0)) { + if (r0 != IMMEDIATE(0)) { #line 31 "sample/utility.c" goto label_1; #line 31 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=24 dst=r1 src=r0 offset=0 imm=84 + // EBPF_OP_MOV64_IMM pc=23 dst=r1 src=r0 offset=0 imm=84 #line 31 "sample/utility.c" r1 = IMMEDIATE(84); - // EBPF_OP_STXB pc=25 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXB pc=24 dst=r10 src=r1 offset=-8 imm=0 #line 35 "sample/utility.c" *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint8_t)r1; - // EBPF_OP_MOV64_REG pc=26 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=25 dst=r1 src=r10 offset=0 imm=0 #line 35 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=27 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=26 dst=r1 src=r0 offset=0 imm=-8 #line 35 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=28 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=27 dst=r3 src=r10 offset=0 imm=0 #line 35 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=29 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=28 dst=r3 src=r0 offset=0 imm=-16 #line 35 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=30 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=29 dst=r2 src=r0 offset=0 imm=4 #line 37 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=31 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=30 dst=r4 src=r0 offset=0 imm=4 #line 37 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=32 dst=r0 src=r0 offset=0 imm=23 + // EBPF_OP_CALL pc=31 dst=r0 src=r0 offset=0 imm=23 #line 37 "sample/utility.c" r0 = UtilityTest_helpers[0].address(r1, r2, r3, r4, r5, context); #line 37 "sample/utility.c" @@ -333,44 +332,44 @@ UtilityTest(void* context) return 0; #line 37 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=33 dst=r1 src=r0 offset=0 imm=0 -#line 37 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=34 dst=r0 src=r0 offset=0 imm=2 + // EBPF_OP_MOV64_IMM pc=32 dst=r6 src=r0 offset=0 imm=2 #line 37 "sample/utility.c" - r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=35 dst=r1 src=r0 offset=0 imm=32 + r6 = IMMEDIATE(2); + // EBPF_OP_LSH64_IMM pc=33 dst=r0 src=r0 offset=0 imm=32 #line 37 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=36 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=34 dst=r0 src=r0 offset=0 imm=32 #line 37 "sample/utility.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_JSGT_IMM pc=37 dst=r1 src=r0 offset=72 imm=-1 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_JSGT_IMM pc=35 dst=r0 src=r0 offset=68 imm=-1 #line 37 "sample/utility.c" - if ((int64_t)r1 > IMMEDIATE(-1)) { + if ((int64_t)r0 > IMMEDIATE(-1)) { #line 37 "sample/utility.c" goto label_1; #line 37 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=38 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=36 dst=r1 src=r10 offset=0 imm=0 #line 37 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=39 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=37 dst=r1 src=r0 offset=0 imm=-8 #line 43 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=40 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=38 dst=r6 src=r0 offset=0 imm=3 +#line 43 "sample/utility.c" + r6 = IMMEDIATE(3); + // EBPF_OP_MOV64_REG pc=39 dst=r3 src=r10 offset=0 imm=0 #line 43 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=41 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=40 dst=r3 src=r0 offset=0 imm=-16 #line 43 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=42 dst=r2 src=r0 offset=0 imm=3 + // EBPF_OP_MOV64_IMM pc=41 dst=r2 src=r0 offset=0 imm=3 #line 43 "sample/utility.c" r2 = IMMEDIATE(3); - // EBPF_OP_MOV64_IMM pc=43 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=42 dst=r4 src=r0 offset=0 imm=4 #line 43 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=44 dst=r0 src=r0 offset=0 imm=23 + // EBPF_OP_CALL pc=43 dst=r0 src=r0 offset=0 imm=23 #line 43 "sample/utility.c" r0 = UtilityTest_helpers[0].address(r1, r2, r3, r4, r5, context); #line 43 "sample/utility.c" @@ -379,50 +378,44 @@ UtilityTest(void* context) return 0; #line 43 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=45 dst=r1 src=r0 offset=0 imm=0 -#line 43 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=46 dst=r0 src=r0 offset=0 imm=3 -#line 43 "sample/utility.c" - r0 = IMMEDIATE(3); - // EBPF_OP_LSH64_IMM pc=47 dst=r1 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=44 dst=r0 src=r0 offset=0 imm=32 #line 43 "sample/utility.c" - r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=48 dst=r1 src=r0 offset=0 imm=32 + r0 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_ARSH64_IMM pc=45 dst=r0 src=r0 offset=0 imm=32 #line 43 "sample/utility.c" - r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_JSGT_IMM pc=49 dst=r1 src=r0 offset=60 imm=-1 + r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(32) & 63); + // EBPF_OP_JSGT_IMM pc=46 dst=r0 src=r0 offset=57 imm=-1 #line 43 "sample/utility.c" - if ((int64_t)r1 > IMMEDIATE(-1)) { + if ((int64_t)r0 > IMMEDIATE(-1)) { #line 43 "sample/utility.c" goto label_1; #line 43 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=50 dst=r1 src=r0 offset=0 imm=1414743380 + // EBPF_OP_MOV64_IMM pc=47 dst=r1 src=r0 offset=0 imm=1414743380 #line 43 "sample/utility.c" r1 = IMMEDIATE(1414743380); - // EBPF_OP_STXW pc=51 dst=r10 src=r1 offset=-8 imm=0 + // EBPF_OP_STXW pc=48 dst=r10 src=r1 offset=-8 imm=0 #line 48 "sample/utility.c" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint32_t)r1; - // EBPF_OP_MOV64_REG pc=52 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=49 dst=r1 src=r10 offset=0 imm=0 #line 48 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=53 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=50 dst=r1 src=r0 offset=0 imm=-8 #line 48 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_REG pc=54 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=51 dst=r3 src=r10 offset=0 imm=0 #line 48 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=55 dst=r3 src=r0 offset=0 imm=-16 + // EBPF_OP_ADD64_IMM pc=52 dst=r3 src=r0 offset=0 imm=-16 #line 48 "sample/utility.c" r3 += IMMEDIATE(-16); - // EBPF_OP_MOV64_IMM pc=56 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=53 dst=r2 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=57 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=54 dst=r4 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=58 dst=r0 src=r0 offset=0 imm=22 + // EBPF_OP_CALL pc=55 dst=r0 src=r0 offset=0 imm=22 #line 54 "sample/utility.c" r0 = UtilityTest_helpers[1].address(r1, r2, r3, r4, r5, context); #line 54 "sample/utility.c" @@ -431,78 +424,75 @@ UtilityTest(void* context) return 0; #line 54 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=59 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=56 dst=r1 src=r0 offset=0 imm=0 #line 54 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=60 dst=r2 src=r0 offset=0 imm=0 -#line 54 "sample/utility.c" - r2 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=61 dst=r0 src=r0 offset=0 imm=4 + r1 = IMMEDIATE(0); + // EBPF_OP_MOV64_IMM pc=57 dst=r6 src=r0 offset=0 imm=4 #line 54 "sample/utility.c" - r0 = IMMEDIATE(4); - // EBPF_OP_JSGT_REG pc=62 dst=r2 src=r1 offset=47 imm=0 + r6 = IMMEDIATE(4); + // EBPF_OP_JSGT_REG pc=58 dst=r1 src=r0 offset=45 imm=0 #line 54 "sample/utility.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 54 "sample/utility.c" goto label_1; #line 54 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=63 dst=r0 src=r0 offset=0 imm=5 + // EBPF_OP_MOV64_IMM pc=59 dst=r6 src=r0 offset=0 imm=5 #line 54 "sample/utility.c" - r0 = IMMEDIATE(5); - // EBPF_OP_LDXB pc=64 dst=r1 src=r10 offset=-8 imm=0 + r6 = IMMEDIATE(5); + // EBPF_OP_LDXB pc=60 dst=r1 src=r10 offset=-8 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_JNE_IMM pc=65 dst=r1 src=r0 offset=44 imm=116 + // EBPF_OP_JNE_IMM pc=61 dst=r1 src=r0 offset=42 imm=116 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(116)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=66 dst=r1 src=r10 offset=-7 imm=0 + // EBPF_OP_LDXB pc=62 dst=r1 src=r10 offset=-7 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-7)); - // EBPF_OP_JNE_IMM pc=67 dst=r1 src=r0 offset=42 imm=101 + // EBPF_OP_JNE_IMM pc=63 dst=r1 src=r0 offset=40 imm=101 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(101)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=68 dst=r1 src=r10 offset=-6 imm=0 + // EBPF_OP_LDXB pc=64 dst=r1 src=r10 offset=-6 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-6)); - // EBPF_OP_JNE_IMM pc=69 dst=r1 src=r0 offset=40 imm=115 + // EBPF_OP_JNE_IMM pc=65 dst=r1 src=r0 offset=38 imm=115 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(115)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_LDXB pc=70 dst=r1 src=r10 offset=-5 imm=0 + // EBPF_OP_LDXB pc=66 dst=r1 src=r10 offset=-5 imm=0 #line 59 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-5)); - // EBPF_OP_JNE_IMM pc=71 dst=r1 src=r0 offset=38 imm=116 + // EBPF_OP_JNE_IMM pc=67 dst=r1 src=r0 offset=36 imm=116 #line 59 "sample/utility.c" if (r1 != IMMEDIATE(116)) { #line 59 "sample/utility.c" goto label_1; #line 59 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=72 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=68 dst=r1 src=r10 offset=0 imm=0 #line 59 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=73 dst=r1 src=r0 offset=0 imm=-8 + // EBPF_OP_ADD64_IMM pc=69 dst=r1 src=r0 offset=0 imm=-8 #line 64 "sample/utility.c" r1 += IMMEDIATE(-8); - // EBPF_OP_MOV64_IMM pc=74 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=70 dst=r2 src=r0 offset=0 imm=4 #line 64 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=75 dst=r3 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=71 dst=r3 src=r0 offset=0 imm=0 #line 64 "sample/utility.c" r3 = IMMEDIATE(0); - // EBPF_OP_CALL pc=76 dst=r0 src=r0 offset=0 imm=24 + // EBPF_OP_CALL pc=72 dst=r0 src=r0 offset=0 imm=24 #line 64 "sample/utility.c" r0 = UtilityTest_helpers[2].address(r1, r2, r3, r4, r5, context); #line 64 "sample/utility.c" @@ -511,81 +501,78 @@ UtilityTest(void* context) return 0; #line 64 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=77 dst=r1 src=r0 offset=0 imm=0 -#line 64 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=78 dst=r0 src=r0 offset=0 imm=6 + // EBPF_OP_MOV64_IMM pc=73 dst=r6 src=r0 offset=0 imm=6 #line 64 "sample/utility.c" - r0 = IMMEDIATE(6); - // EBPF_OP_JEQ_IMM pc=79 dst=r1 src=r0 offset=30 imm=0 + r6 = IMMEDIATE(6); + // EBPF_OP_JEQ_IMM pc=74 dst=r0 src=r0 offset=29 imm=0 #line 64 "sample/utility.c" - if (r1 == IMMEDIATE(0)) { + if (r0 == IMMEDIATE(0)) { #line 64 "sample/utility.c" goto label_1; #line 64 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=80 dst=r0 src=r0 offset=0 imm=7 + // EBPF_OP_MOV64_IMM pc=75 dst=r6 src=r0 offset=0 imm=7 #line 64 "sample/utility.c" - r0 = IMMEDIATE(7); - // EBPF_OP_LDXB pc=81 dst=r1 src=r10 offset=-8 imm=0 + r6 = IMMEDIATE(7); + // EBPF_OP_LDXB pc=76 dst=r1 src=r10 offset=-8 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_JNE_IMM pc=82 dst=r1 src=r0 offset=27 imm=0 + // EBPF_OP_JNE_IMM pc=77 dst=r1 src=r0 offset=26 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=83 dst=r1 src=r10 offset=-7 imm=0 + // EBPF_OP_LDXB pc=78 dst=r1 src=r10 offset=-7 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-7)); - // EBPF_OP_JNE_IMM pc=84 dst=r1 src=r0 offset=25 imm=0 + // EBPF_OP_JNE_IMM pc=79 dst=r1 src=r0 offset=24 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=85 dst=r1 src=r10 offset=-6 imm=0 + // EBPF_OP_LDXB pc=80 dst=r1 src=r10 offset=-6 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-6)); - // EBPF_OP_JNE_IMM pc=86 dst=r1 src=r0 offset=23 imm=0 + // EBPF_OP_JNE_IMM pc=81 dst=r1 src=r0 offset=22 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_LDXB pc=87 dst=r1 src=r10 offset=-5 imm=0 + // EBPF_OP_LDXB pc=82 dst=r1 src=r10 offset=-5 imm=0 #line 69 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-5)); - // EBPF_OP_JNE_IMM pc=88 dst=r1 src=r0 offset=21 imm=0 + // EBPF_OP_JNE_IMM pc=83 dst=r1 src=r0 offset=20 imm=0 #line 69 "sample/utility.c" if (r1 != IMMEDIATE(0)) { #line 69 "sample/utility.c" goto label_1; #line 69 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=89 dst=r1 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=84 dst=r1 src=r10 offset=0 imm=0 #line 74 "sample/utility.c" r1 = r10; - // EBPF_OP_ADD64_IMM pc=90 dst=r1 src=r0 offset=0 imm=-30 + // EBPF_OP_ADD64_IMM pc=85 dst=r1 src=r0 offset=0 imm=-30 #line 74 "sample/utility.c" r1 += IMMEDIATE(-30); - // EBPF_OP_MOV64_REG pc=91 dst=r3 src=r10 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=86 dst=r3 src=r10 offset=0 imm=0 #line 74 "sample/utility.c" r3 = r10; - // EBPF_OP_ADD64_IMM pc=92 dst=r3 src=r0 offset=0 imm=-32 + // EBPF_OP_ADD64_IMM pc=87 dst=r3 src=r0 offset=0 imm=-32 #line 74 "sample/utility.c" r3 += IMMEDIATE(-32); - // EBPF_OP_MOV64_IMM pc=93 dst=r2 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=88 dst=r2 src=r0 offset=0 imm=4 #line 74 "sample/utility.c" r2 = IMMEDIATE(4); - // EBPF_OP_MOV64_IMM pc=94 dst=r4 src=r0 offset=0 imm=4 + // EBPF_OP_MOV64_IMM pc=89 dst=r4 src=r0 offset=0 imm=4 #line 74 "sample/utility.c" r4 = IMMEDIATE(4); - // EBPF_OP_CALL pc=95 dst=r0 src=r0 offset=0 imm=25 + // EBPF_OP_CALL pc=90 dst=r0 src=r0 offset=0 imm=25 #line 74 "sample/utility.c" r0 = UtilityTest_helpers[3].address(r1, r2, r3, r4, r5, context); #line 74 "sample/utility.c" @@ -594,70 +581,70 @@ UtilityTest(void* context) return 0; #line 74 "sample/utility.c" } - // EBPF_OP_MOV64_REG pc=96 dst=r1 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=91 dst=r6 src=r0 offset=0 imm=8 #line 74 "sample/utility.c" - r1 = r0; - // EBPF_OP_MOV64_IMM pc=97 dst=r0 src=r0 offset=0 imm=8 + r6 = IMMEDIATE(8); + // EBPF_OP_MOV64_IMM pc=92 dst=r1 src=r0 offset=0 imm=0 #line 74 "sample/utility.c" - r0 = IMMEDIATE(8); - // EBPF_OP_MOV64_IMM pc=98 dst=r2 src=r0 offset=0 imm=0 -#line 74 "sample/utility.c" - r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=99 dst=r2 src=r1 offset=10 imm=0 + r1 = IMMEDIATE(0); + // EBPF_OP_JSGT_REG pc=93 dst=r1 src=r0 offset=10 imm=0 #line 74 "sample/utility.c" - if ((int64_t)r2 > (int64_t)r1) { + if ((int64_t)r1 > (int64_t)r0) { #line 74 "sample/utility.c" goto label_1; #line 74 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=100 dst=r0 src=r0 offset=0 imm=9 + // EBPF_OP_MOV64_IMM pc=94 dst=r6 src=r0 offset=0 imm=9 #line 74 "sample/utility.c" - r0 = IMMEDIATE(9); - // EBPF_OP_LDXB pc=101 dst=r1 src=r10 offset=-30 imm=0 + r6 = IMMEDIATE(9); + // EBPF_OP_LDXB pc=95 dst=r1 src=r10 offset=-30 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-30)); - // EBPF_OP_JNE_IMM pc=102 dst=r1 src=r0 offset=7 imm=49 + // EBPF_OP_JNE_IMM pc=96 dst=r1 src=r0 offset=7 imm=49 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(49)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=103 dst=r1 src=r10 offset=-29 imm=0 + // EBPF_OP_LDXB pc=97 dst=r1 src=r10 offset=-29 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-29)); - // EBPF_OP_JNE_IMM pc=104 dst=r1 src=r0 offset=5 imm=50 + // EBPF_OP_JNE_IMM pc=98 dst=r1 src=r0 offset=5 imm=50 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(50)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=105 dst=r1 src=r10 offset=-28 imm=0 + // EBPF_OP_LDXB pc=99 dst=r1 src=r10 offset=-28 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-28)); - // EBPF_OP_JNE_IMM pc=106 dst=r1 src=r0 offset=3 imm=51 + // EBPF_OP_JNE_IMM pc=100 dst=r1 src=r0 offset=3 imm=51 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(51)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_LDXB pc=107 dst=r1 src=r10 offset=-27 imm=0 + // EBPF_OP_LDXB pc=101 dst=r1 src=r10 offset=-27 imm=0 #line 79 "sample/utility.c" r1 = *(uint8_t*)(uintptr_t)(r10 + OFFSET(-27)); - // EBPF_OP_JNE_IMM pc=108 dst=r1 src=r0 offset=1 imm=52 + // EBPF_OP_JNE_IMM pc=102 dst=r1 src=r0 offset=1 imm=52 #line 79 "sample/utility.c" if (r1 != IMMEDIATE(52)) { #line 79 "sample/utility.c" goto label_1; #line 79 "sample/utility.c" } - // EBPF_OP_MOV64_IMM pc=109 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_IMM pc=103 dst=r6 src=r0 offset=0 imm=0 #line 79 "sample/utility.c" - r0 = IMMEDIATE(0); + r6 = IMMEDIATE(0); label_1: - // EBPF_OP_EXIT pc=110 dst=r0 src=r0 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=104 dst=r0 src=r6 offset=0 imm=0 +#line 84 "sample/utility.c" + r0 = r6; + // EBPF_OP_EXIT pc=105 dst=r0 src=r0 offset=0 imm=0 #line 84 "sample/utility.c" return r0; #line 24 "sample/utility.c" @@ -677,7 +664,7 @@ static program_entry_t _programs[] = { 0, UtilityTest_helpers, 4, - 111, + 106, &UtilityTest_program_type_guid, &UtilityTest_attach_type_guid, }, @@ -695,7 +682,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_dll.c b/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_dll.c index 4902562abf..31b8852019 100644 --- a/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_dll.c +++ b/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_dll.c @@ -179,7 +179,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_raw.c b/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_raw.c index f24f47902b..f3dda74caa 100644 --- a/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_raw.c +++ b/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_raw.c @@ -153,7 +153,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; } diff --git a/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_sys.c b/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_sys.c index b30f30dfcc..0c348a24c7 100644 --- a/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_sys.c +++ b/tests/bpf2c_tests/expected/xdp_invalid_socket_cookie_sys.c @@ -314,7 +314,7 @@ static void _get_version(_Out_ bpf2c_version_t* version) { version->major = 0; - version->minor = 20; + version->minor = 21; version->revision = 0; }