OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
new repo
[bytom/vapor.git]
/
vendor
/
golang.org
/
x
/
net
/
bpf
/
testdata
/
all_instructions.txt
1
# This filter is compiled to all_instructions.bpf by the `bpf_asm`
2
# tool, which can be found in the linux kernel source tree under
3
# tools/net.
4
5
# Load immediate
6
ld #42
7
ldx #42
8
9
# Load scratch
10
ld M[3]
11
ldx M[3]
12
13
# Load absolute
14
ldb [42]
15
ldh [42]
16
ld [42]
17
18
# Load indirect
19
ldb [x + 42]
20
ldh [x + 42]
21
ld [x + 42]
22
23
# Load IPv4 header length
24
ldx 4*([42]&0xf)
25
26
# Run extension function
27
ld #len
28
ld #proto
29
ld #type
30
ld #rand
31
32
# Store scratch
33
st M[3]
34
stx M[3]
35
36
# A <op> constant
37
add #42
38
sub #42
39
mul #42
40
div #42
41
or #42
42
and #42
43
lsh #42
44
rsh #42
45
mod #42
46
xor #42
47
48
# A <op> X
49
add x
50
sub x
51
mul x
52
div x
53
or x
54
and x
55
lsh x
56
rsh x
57
mod x
58
xor x
59
60
# !A
61
neg
62
63
# Jumps
64
ja end
65
jeq #42,prev,end
66
jne #42,end
67
jlt #42,end
68
jle #42,end
69
jgt #42,prev,end
70
jge #42,prev,end
71
jset #42,prev,end
72
73
# Register transfers
74
tax
75
txa
76
77
# Returns
78
prev: ret a
79
end: ret #42