Skip to content

Commit

Permalink
[Docs][CodeGenerator][eBPF] Correct the values for BPF_X and BPF_K
Browse files Browse the repository at this point in the history
Fix the values of BPF_X and BPF_K according to BPFInstrFormats.td:
"
def BPF_K : BPFSrcType<0x0>;
def BPF_X : BPFSrcType<0x1>;
"

The right value for BPF_X is 0x1, and the right value for BPF_K is 0x0.

Signed-off-by: Wang YanQing <udknight@gmail.com>

Differential Revision: https://reviews.llvm.org/D61512

llvm-svn: 359904
  • Loading branch information
yonghong-song committed May 3, 2019
1 parent a8f3840 commit 33434d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/docs/CodeGenerator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2527,8 +2527,8 @@ When BPF_CLASS(code) == BPF_ALU or BPF_ALU64 or BPF_JMP,

::

BPF_X 0x0 use src_reg register as source operand
BPF_K 0x1 use 32 bit immediate as source operand
BPF_X 0x1 use src_reg register as source operand
BPF_K 0x0 use 32 bit immediate as source operand

and four MSB bits store operation code

Expand Down

0 comments on commit 33434d5

Please sign in to comment.