Skip to content

Commit 10d78a6

Browse files
jemarchAlexei Starovoitov
authored andcommitted
bpf, docs: fix BPF_NEG entry in instruction-set.rst
This patch fixes the documentation of the BPF_NEG instruction to denote that it does not use the source register operand. Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com> Acked-by: Dave Thaler <dthaler@microsoft.com> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230726092543.6362-1-jose.marchesi@oracle.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent 63e2da3 commit 10d78a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Documentation/bpf/standardization/instruction-set.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ BPF_OR 0x40 dst \|= src
165165
BPF_AND 0x50 dst &= src
166166
BPF_LSH 0x60 dst <<= (src & mask)
167167
BPF_RSH 0x70 dst >>= (src & mask)
168-
BPF_NEG 0x80 dst = -src
168+
BPF_NEG 0x80 dst = -dst
169169
BPF_MOD 0x90 dst = (src != 0) ? (dst % src) : dst
170170
BPF_XOR 0xa0 dst ^= src
171171
BPF_MOV 0xb0 dst = src

0 commit comments

Comments
 (0)