Skip to content

Commit

Permalink
bpf, docs: Document the opcode classes
Browse files Browse the repository at this point in the history
Add a description for each opcode class.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
Christoph Hellwig authored and Alexei Starovoitov committed Jan 5, 2022
1 parent be3193c commit 894cda5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Documentation/bpf/instruction-set.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ Instruction classes

The three LSB bits of the 'opcode' field store the instruction class:

========= =====
class value
========= =====
BPF_LD 0x00
BPF_LDX 0x01
BPF_ST 0x02
BPF_STX 0x03
BPF_ALU 0x04
BPF_JMP 0x05
BPF_JMP32 0x06
BPF_ALU64 0x07
========= =====
========= ===== ===============================
class value description
========= ===== ===============================
BPF_LD 0x00 non-standard load operations
BPF_LDX 0x01 load into register operations
BPF_ST 0x02 store from immediate operations
BPF_STX 0x03 store from register operations
BPF_ALU 0x04 32-bit arithmetic operations
BPF_JMP 0x05 64-bit jump operations
BPF_JMP32 0x06 32-bit jump operations
BPF_ALU64 0x07 64-bit arithmetic operations
========= ===== ===============================

Arithmetic and jump instructions
================================
Expand Down

0 comments on commit 894cda5

Please sign in to comment.