File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ eBPF has two instruction encodings:
38
38
* the wide instruction encoding, which appends a second 64-bit immediate (i.e.,
39
39
constant) value after the basic instruction for a total of 128 bits.
40
40
41
- The basic instruction encoding is as follows, where MSB and LSB mean the most significant
42
- bits and least significant bits, respectively:
41
+ The basic instruction encoding looks as follows for a little-endian processor,
42
+ where MSB and LSB mean the most significant bits and least significant bits,
43
+ respectively:
43
44
44
45
============= ======= ======= ======= ============
45
46
32 bits (MSB) 16 bits 4 bits 4 bits 8 bits (LSB)
@@ -63,6 +64,17 @@ imm offset src_reg dst_reg opcode
63
64
**opcode **
64
65
operation to perform
65
66
67
+ and as follows for a big-endian processor:
68
+
69
+ ============= ======= ======= ======= ============
70
+ 32 bits (MSB) 16 bits 4 bits 4 bits 8 bits (LSB)
71
+ ============= ======= ======= ======= ============
72
+ imm offset dst_reg src_reg opcode
73
+ ============= ======= ======= ======= ============
74
+
75
+ Multi-byte fields ('imm' and 'offset') are similarly stored in
76
+ the byte order of the processor.
77
+
66
78
Note that most instructions do not use all of the fields.
67
79
Unused fields shall be cleared to zero.
68
80
You can’t perform that action at this time.
0 commit comments