Skip to content

Commit 56950c4

Browse files
dthalerAlan-Jowett
andauthored
Put callx register into dst (#202)
* Clang puts callx register into imm not src_reg Fix bug pointed out by Will. Still waiting to confirm what gcc does. Signed-off-by: Dave Thaler <[email protected]> * Put callx register into dst_reg not imm or src_reg Per latest mailing list discussion at https://mailarchive.ietf.org/arch/msg/bpf/Vx1H3ViPUWoGKNssCO22lOIjyXU/ Signed-off-by: Dave Thaler <[email protected]> --------- Signed-off-by: Dave Thaler <[email protected]> Co-authored-by: Alan Jowett <[email protected]>
1 parent 4111cb1 commit 56950c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bpf_assembler.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ typedef class _bpf_assembler
311311
if (mode == "helper") {
312312
if (target.starts_with('%')) {
313313
inst.opcode |= EBPF_SRC_REG;
314-
inst.imm = _decode_register(target);
314+
inst.dst = _decode_register(target);
315315
} else {
316316
inst.opcode |= EBPF_SRC_IMM;
317317
inst.imm = _decode_imm32(target);

0 commit comments

Comments
 (0)