]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/doc/c-bpf.texi
4742f89ea170ce3a4848df93bb7a28cd7bf79a41
[thirdparty/binutils-gdb.git] / gas / doc / c-bpf.texi
1 @c Copyright (C) 2019-2023 Free Software Foundation, Inc.
2 @c This is part of the GAS manual.
3 @c For copying conditions, see the file as.texinfo.
4
5 @ifset GENERIC
6 @page
7 @node BPF-Dependent
8 @chapter BPF Dependent Features
9 @end ifset
10
11 @ifclear GENERIC
12 @node Machine Dependencies
13 @chapter BPF Dependent Features
14 @end ifclear
15
16 @cindex BPF support
17 @menu
18 * BPF Options:: BPF specific command-line options.
19 * BPF Special Characters:: Comments and statements.
20 * BPF Registers:: Register names.
21 * BPF Directives:: Machine directives.
22 * BPF Instructions:: Machine instructions.
23 @end menu
24
25 @node BPF Options
26 @section BPF Options
27 @cindex BPF options (none)
28 @cindex options for BPF (none)
29
30 @c man begin OPTIONS
31 @table @gcctabopt
32
33 @cindex @option{-EB} command-line option, BPF
34 @item -EB
35 This option specifies that the assembler should emit big-endian eBPF.
36
37 @cindex @option{-EL} command-line option, BPF
38 @item -EL
39 This option specifies that the assembler should emit little-endian
40 eBPF.
41
42 @cindex @option{-mdialect} command-line options, BPF
43 @item -mdialect=@var{dialect}
44 This option specifies the assembly language dialect to recognize while
45 assembling. The assembler supports @option{normal} and
46 @option{pseudoc}.
47
48 @cindex @option{-misa-spec} command-line options, BPF
49 @item -misa-spec=@var{spec}
50 This option specifies the version of the BPF instruction set to use
51 when assembling. The BPF ISA versions supported are @option{v1} @option{v2}, @option{v3} and @option{v4}.
52
53 The value @option{xbpf} can be specified to recognize extra
54 instructions that are used by GCC for testing purposes. But beware
55 this is not valid BPF.
56 @end table
57
58 Note that if no endianness option is specified in the command line,
59 the host endianness is used.
60 @c man end
61
62 @node BPF Special Characters
63 @section BPF Special Characters
64
65 @cindex line comment character, BPF
66 @cindex BPF line comment character
67 The presence of a @samp{;} on a line indicates the start of a comment
68 that extends to the end of the current line. If a @samp{#} appears as
69 the first character of a line, the whole line is treated as a comment.
70
71 @cindex statement separator, BPF
72 Statements and assembly directives are separated by newlines.
73
74 @node BPF Registers
75 @section BPF Registers
76
77 @cindex BPF register names
78 @cindex register names, BPF
79 The eBPF processor provides ten general-purpose 64-bit registers,
80 which are read-write, and a read-only frame pointer register:
81
82 @noindent
83 In normal syntax:
84
85 @table @samp
86 @item %r0 .. %r9
87 General-purpose registers.
88 @item %r10
89 @itemx %fp
90 Read-only frame pointer register.
91 @end table
92
93 All BPF registers are 64-bit long. However, in the Pseudo-C syntax
94 registers can be referred using different names, which actually
95 reflect the kind of instruction they appear on:
96
97 @noindent
98 In pseudoc syntax:
99
100 @table @samp
101 @item r0..r9
102 General-purpose register in an instruction that operates on its value
103 as if it was a 64-bit value.
104 @item w0..w9
105 General-purpose register in an instruction that operates on its value
106 as if it was a 32-bit value.
107 @item r10
108 Read-only frame pointer register.
109 @end table
110
111 @noindent
112 Note that in the Pseudo-C syntax register names are not preceded by
113 @code{%} characters.
114
115 @node BPF Directives
116 @section BPF Directives
117
118 @cindex machine directives, BPF
119
120 The BPF version of @code{@value{AS}} supports the following additional
121 machine directives:
122
123 @table @code
124 @cindex @code{half} directive, BPF
125 @item .word
126 The @code{.half} directive produces a 16 bit value.
127
128 @cindex @code{word} directive, BPF
129 @item .word
130 The @code{.word} directive produces a 32 bit value.
131
132 @cindex @code{dword} directive, BPF
133 @item .dword
134 The @code{.dword} directive produces a 64 bit value.
135 @end table
136
137 @node BPF Instructions
138 @section BPF Instructions
139
140 @cindex BPF opcodes
141 @cindex opcodes for BPF
142 In the instruction descriptions below the following field descriptors
143 are used:
144
145 @table @code
146 @item rd
147 Destination general-purpose register whose role is to be the
148 destination of an operation.
149 @item rs
150 Source general-purpose register whose role is to be the source of an
151 operation.
152 @item disp16
153 16-bit signed PC-relative offset, measured in number of 64-bit words,
154 minus one.
155 @item disp32
156 32-bit signed PC-relative offset, measured in number of 64-bit words,
157 minus one.
158 @item offset16
159 Signed 16-bit immediate representing an offset in bytes.
160 @item disp16
161 Signed 16-bit immediate representing a displacement to a target,
162 measured in number of 64-bit words @emph{minus one}.
163 @item imm32
164 Signed 32-bit immediate.
165 @item imm64
166 Signed 64-bit immediate.
167 @end table
168
169 @subsection Arithmetic instructions
170
171 The destination register in these instructions act like an
172 accumulator.
173
174 Note that in pseudoc syntax these instructions should use @code{r}
175 registers.
176
177 @table @code
178 @item add rd, rs
179 @itemx add rd, imm32
180 @itemx rd += rs
181 @itemx rd += imm32
182 64-bit arithmetic addition.
183
184 @item sub rd, rs
185 @itemx sub rd, rs
186 @itemx rd -= rs
187 @itemx rd -= imm32
188 64-bit arithmetic subtraction.
189
190 @item mul rd, rs
191 @itemx mul rd, imm32
192 @itemx rd *= rs
193 @itemx rd *= imm32
194 64-bit arithmetic multiplication.
195
196 @item div rd, rs
197 @itemx div rd, imm32
198 @itemx rd /= rs
199 @itemx rd /= imm32
200 64-bit arithmetic integer division.
201
202 @item mod rd, rs
203 @itemx mod rd, imm32
204 @itemx rd %= rs
205 @itemx rd %= imm32
206 64-bit integer remainder.
207
208 @item and rd, rs
209 @itemx and rd, imm32
210 @itemx rd &= rs
211 @itemx rd &= imm32
212 64-bit bit-wise ``and'' operation.
213
214 @item or rd, rs
215 @itemx or rd, imm32
216 @itemx rd |= rs
217 @itemx rd |= imm32
218 64-bit bit-wise ``or'' operation.
219
220 @item xor rd, imm32
221 @itemx xor rd, rs
222 @itemx rd ^= rs
223 @itemx rd ^= imm32
224 64-bit bit-wise exclusive-or operation.
225
226 @item lsh rd, rs
227 @itemx ldh rd, imm32
228 @itemx rd <<= rs
229 @itemx rd <<= imm32
230 64-bit left shift, by @code{rs} or @code{imm32} bits.
231
232 @item rsh %d, %s
233 @itemx rsh rd, imm32
234 @itemx rd >>= rs
235 @itemx rd >>= imm32
236 64-bit right logical shift, by @code{rs} or @code{imm32} bits.
237
238 @item arsh rd, rs
239 @itemx arsh rd, imm32
240 @itemx rd s>>= rs
241 @itemx rd s>>= imm32
242 64-bit right arithmetic shift, by @code{rs} or @code{imm32} bits.
243
244 @item neg rd, rs
245 @itemx neg rd, imm32
246 @itemx rd = - rs
247 @itemx rd = - imm32
248 64-bit arithmetic negation.
249
250 Note that in the @code{rd = - imm32} syntax there must be at least
251 one white space between @code{-} and @code{imm32}. Otherwise the
252 instruction is parsed as a @code{mov rd, imm32} instruction with a
253 negative 32-bit immediate. This is a consequence of a syntactic
254 ambiguity in the pseudoc syntax.
255
256 @item mov rd, rs
257 @itemx mov rd, imm32
258 @itemx rd = rs
259 @itemx rd = imm32
260 Move the 64-bit value of @code{rs} in @code{rd}, or load @code{imm32}
261 in @code{rd}.
262 @end table
263
264 @subsection 32-bit arithmetic instructions
265
266 The destination register in these instructions act as an accumulator.
267
268 Note that in pseudoc syntax these instructions should use @code{w}
269 registers. It is not allowed to mix @code{w} and @code{r} registers
270 in the same instruction.
271
272 @table @code
273 @item add32 rd, rs
274 @itemx add32 rd, imm32
275 @itemx rd += rs
276 @itemx rd += imm32
277 32-bit arithmetic addition.
278
279 @item sub32 rd, rs
280 @itemx sub32 rd, imm32
281 @itemx rd -= rs
282 @itemx rd += imm32
283 32-bit arithmetic subtraction.
284
285 @item mul32 rd, rs
286 @itemx mul32 rd, imm32
287 @itemx rd *= rs
288 @itemx rd *= imm32
289 32-bit arithmetic multiplication.
290
291 @item div32 rd, rs
292 @itemx div32 rd, imm32
293 @itemx rd /= rs
294 @itemx rd /= imm32
295 32-bit arithmetic integer division.
296
297 @item mod32 rd, rs
298 @itemx mod32 rd, imm32
299 @itemx rd %= rs
300 @itemx rd %= imm32
301 32-bit integer remainder.
302
303 @item and32 rd, rs
304 @itemx and32 rd, imm32
305 @itemx rd &= rs
306 @itemx rd &= imm32
307 32-bit bit-wise ``and'' operation.
308
309 @item or32 rd, rs
310 @itemx or32 rd, imm32
311 @itemx rd |= rs
312 @itemx rd |= imm32
313 32-bit bit-wise ``or'' operation.
314
315 @item xor32 rd, rs
316 @itemx xor32 rd, imm32
317 @itemx rd ^= rs
318 @itemx rd ^= imm32
319 32-bit bit-wise exclusive-or operation.
320
321 @item lsh32 rd, rs
322 @itemx lsh32 rd, imm32
323 @itemx rd <<= rs
324 @itemx rd <<= imm32
325 32-bit left shift, by @code{rs} or @code{imm32} bits.
326
327 @item rsh32 rd, rs
328 @itemx rsh32 rd, imm32
329 @itemx rd >>= rs
330 @itemx rd >>= imm32
331 32-bit right logical shift, by @code{rs} or @code{imm32} bits.
332
333 @item arsh32 rd, rs
334 @itemx arsh32 rd, imm32
335 @itemx rd s>>= rs
336 @itemx rd s>>= imm32
337 32-bit right arithmetic shift, by @code{rs} or @code{imm32} bits.
338
339 @item neg32 rd, rs
340 @itemx neg32 rd, imm32
341 @itemx rd = - rs
342 @itemx rd = - imm32
343 32-bit arithmetic negation.
344
345 Note that in the @code{rd = - imm32} syntax there must be at least
346 one white space between @code{-} and @code{imm32}. Otherwise the
347 instruction is parsed as a @code{mov32 rd, imm32} instruction with a
348 negative 32-bit immediate. This is a consequence of a syntactic
349 ambiguity in the pseudoc syntax.
350
351 @item mov32 rd, rs
352 @itemx mov32 rd, imm32
353 @itemx rd = rs
354 @itemx rd = imm32
355 Move the 32-bit value of @code{rs} in @code{rd}, or load @code{imm32}
356 in @code{rd}.
357 @end table
358
359 @subsection Endianness conversion instructions
360
361 @table @code
362 @item endle rd, 16
363 @itemx endle rd, 32
364 @itemx endle rd, 64
365 @itemx rd = le16 rd
366 @itemx rd = le32 rd
367 @itemx rd = le64 rd
368 Convert the 16-bit, 32-bit or 64-bit value in @code{rd} to
369 little-endian and store it back in @code{rd}.
370 @item endbe %d, 16
371 @itemx endbe %d, 32
372 @itemx endbe %d, 64
373 @itemx rd = be16 rd
374 @itemx rd = be32 rd
375 @itemx rd = be64 rd
376 Convert the 16-bit, 32-bit or 64-bit value in @code{rd} to big-endian
377 and store it back in @code{rd}.
378 @end table
379
380 @subsection 64-bit load and pseudo maps
381
382 @table @code
383 @item lddw rd, imm64
384 @itemx rd = imm64 ll
385 Load the given signed 64-bit immediate to the destination register
386 @code{rd}.
387 @end table
388
389 @subsection Load instructions for socket filters
390
391 The following instructions are intended to be used in socket filters,
392 and are therefore not general-purpose: they make assumptions on the
393 contents of several registers. See the file
394 @file{Documentation/networking/filter.txt} in the Linux kernel source
395 tree for more information.
396
397 Absolute loads:
398
399 @table @code
400 @item ldabsdw imm32
401 @itemx r0 = *(u64 *) skb[imm32]
402 Absolute 64-bit load.
403
404 @item ldabsw imm32
405 @itemx r0 = *(u32 *) skb[imm32]
406 Absolute 32-bit load.
407
408 @item ldabsh imm32
409 @itemx r0 = *(u16 *) skb[imm32]
410 Absolute 16-bit load.
411
412 @item ldabsb imm32
413 @itemx r0 = *(u8 *) skb[imm32]
414 Absolute 8-bit load.
415 @end table
416
417 Indirect loads:
418
419 @table @code
420 @item ldinddw rs, imm32
421 @itemx r0 = *(u64 *) skb[rs + imm32]
422 Indirect 64-bit load.
423
424 @item ldindw rs, imm32
425 @itemx r0 = *(u32 *) skb[rs + imm32]
426 Indirect 32-bit load.
427
428 @item ldindh rs, imm32
429 @itemx r0 = *(u16 *) skb[rs + imm32]
430 Indirect 16-bit load.
431
432 @item ldindb %s, imm32
433 @itemx r0 = *(u8 *) skb[rs + imm32]
434 Indirect 8-bit load.
435 @end table
436
437 @subsection Generic load/store instructions
438
439 General-purpose load and store instructions are provided for several
440 word sizes.
441
442 Load to register instructions:
443
444 @table @code
445 @item ldxdw rd, [rs + offset16]
446 @itemx rd = *(u64 *) (rs + offset16)
447 Generic 64-bit load.
448
449 @item ldxw rd, [rs + offset16]
450 @itemx rd = *(u32 *) (rs + offset16)
451 Generic 32-bit load.
452
453 @item ldxh rd, [rs + offset16]
454 @itemx rd = *(u16 *) (rs + offset16)
455 Generic 16-bit load.
456
457 @item ldxb rd, [rs + offset16]
458 @itemx rd = *(u8 *) (rs + offset16)
459 Generic 8-bit load.
460 @end table
461
462 Store from register instructions:
463
464 @table @code
465 @item stxdw [rd + offset16], %s
466 @itemx *(u64 *) (rd + offset16)
467 Generic 64-bit store.
468
469 @item stxw [rd + offset16], %s
470 @itemx *(u32 *) (rd + offset16)
471 Generic 32-bit store.
472
473 @item stxh [rd + offset16], %s
474 @itemx *(u16 *) (rd + offset16)
475 Generic 16-bit store.
476
477 @item stxb [rd + offset16], %s
478 @itemx *(u8 *) (rd + offset16)
479 Generic 8-bit store.
480 @end table
481
482 Store from immediates instructions:
483
484 @table @code
485 @item stdw [rd + offset16], imm32
486 @itemx *(u64 *) (rd + offset16) = imm32
487 Store immediate as 64-bit.
488
489 @item stw [rd + offset16], imm32
490 @itemx *(u32 *) (rd + offset16) = imm32
491 Store immediate as 32-bit.
492
493 @item sth [rd + offset16], imm32
494 @itemx *(u16 *) (rd + offset16) = imm32
495 Store immediate as 16-bit.
496
497 @item stb [rd + offset16], imm32
498 @itemx *(u8 *) (rd + offset16) = imm32
499 Store immediate as 8-bit.
500 @end table
501
502 @subsection Jump instructions
503
504 eBPF provides the following compare-and-jump instructions, which
505 compare the values of the two given registers, or the values of a
506 register and an immediate, and perform a branch in case the comparison
507 holds true.
508
509 @table @code
510 @item ja disp16
511 @itemx goto disp16
512 Jump-always.
513
514 @item jeq rd, rs, disp16
515 @itemx jeq rd, imm32, disp16
516 @itemx if rd == rs goto disp16
517 @itemx if rd == imm32 goto disp16
518 Jump if equal, unsigned.
519
520 @item jgt rd, rs, disp16
521 @itemx jgt rd, imm32, disp16
522 @itemx if rd > rs goto disp16
523 @itemx if rd > imm32 goto disp16
524 Jump if greater, unsigned.
525
526 @item jge rd, rs, disp16
527 @itemx jge rd, imm32, disp16
528 @itemx if rd >= rs goto disp16
529 @itemx if rd >= imm32 goto disp16
530 Jump if greater or equal.
531
532 @item jlt rd, rs, disp16
533 @itemx jlt rd, imm32, disp16
534 @itemx if rd < rs goto disp16
535 @itemx if rd < imm32 goto disp16
536 Jump if lesser.
537
538 @item jle rd , rs, disp16
539 @itemx jle rd, imm32, disp16
540 @itemx if rd <= rs goto disp16
541 @itemx if rd <= imm32 goto disp16
542 Jump if lesser or equal.
543
544 @item jset rd, rs, disp16
545 @itemx jset rd, imm32, disp16
546 @itemx if rd & rs goto disp16
547 @itemx if rd & imm32 goto disp16
548 Jump if signed equal.
549
550 @item jne rd, rs, disp16
551 @itemx jne rd, imm32, disp16
552 @itemx if rd != rs goto disp16
553 @itemx if rd != imm32 goto disp16
554 Jump if not equal.
555
556 @item jsgt rd, rs, disp16
557 @itemx jsgt rd, imm32, disp16
558 @itemx if rd s> rs goto disp16
559 @itemx if rd s> imm32 goto disp16
560 Jump if signed greater.
561
562 @item jsge rd, rs, disp16
563 @itemx jsge rd, imm32, disp16
564 @itemx if rd s>= rd goto disp16
565 @itemx if rd s>= imm32 goto disp16
566 Jump if signed greater or equal.
567
568 @item jslt rd, rs, disp16
569 @itemx jslt rd, imm32, disp16
570 @itemx if rd s< rs goto disp16
571 @itemx if rd s< imm32 goto disp16
572 Jump if signed lesser.
573
574 @item jsle rd, rs, disp16
575 @itemx jsle rd, imm32, disp16
576 @itemx if rd s<= rs goto disp16
577 @itemx if rd s<= imm32 goto disp16
578 Jump if signed lesser or equal.
579 @end table
580
581 A call instruction is provided in order to perform calls to other eBPF
582 functions, or to external kernel helpers:
583
584 @table @code
585 @item call disp32
586 @item call imm32
587 Jump and link to the offset @emph{disp32}, or to the kernel helper
588 function identified by @emph{imm32}.
589 @end table
590
591 Finally:
592
593 @table @code
594 @item exit
595 Terminate the eBPF program.
596 @end table
597
598 @subsection 32-bit jump instructions
599
600 eBPF provides the following compare-and-jump instructions, which
601 compare the 32-bit values of the two given registers, or the values of
602 a register and an immediate, and perform a branch in case the
603 comparison holds true.
604
605 These instructions are only available in BPF v3 or later.
606
607 @table @code
608 @item jeq32 rd, rs, disp16
609 @itemx jeq32 rd, imm32, disp16
610 @itemx if rd == rs goto disp16
611 @itemx if rd == imm32 goto disp16
612 Jump if equal, unsigned.
613
614 @item jgt32 rd, rs, disp16
615 @itemx jgt32 rd, imm32, disp16
616 @itemx if rd > rs goto disp16
617 @itemx if rd > imm32 goto disp16
618 Jump if greater, unsigned.
619
620 @item jge32 rd, rs, disp16
621 @itemx jge32 rd, imm32, disp16
622 @itemx if rd >= rs goto disp16
623 @itemx if rd >= imm32 goto disp16
624 Jump if greater or equal.
625
626 @item jlt32 rd, rs, disp16
627 @itemx jlt32 rd, imm32, disp16
628 @itemx if rd < rs goto disp16
629 @itemx if rd < imm32 goto disp16
630 Jump if lesser.
631
632 @item jle32 rd , rs, disp16
633 @itemx jle32 rd, imm32, disp16
634 @itemx if rd <= rs goto disp16
635 @itemx if rd <= imm32 goto disp16
636 Jump if lesser or equal.
637
638 @item jset32 rd, rs, disp16
639 @itemx jset32 rd, imm32, disp16
640 @itemx if rd & rs goto disp16
641 @itemx if rd & imm32 goto disp16
642 Jump if signed equal.
643
644 @item jne32 rd, rs, disp16
645 @itemx jne32 rd, imm32, disp16
646 @itemx if rd != rs goto disp16
647 @itemx if rd != imm32 goto disp16
648 Jump if not equal.
649
650 @item jsgt32 rd, rs, disp16
651 @itemx jsgt32 rd, imm32, disp16
652 @itemx if rd s> rs goto disp16
653 @itemx if rd s> imm32 goto disp16
654 Jump if signed greater.
655
656 @item jsge32 rd, rs, disp16
657 @itemx jsge32 rd, imm32, disp16
658 @itemx if rd s>= rd goto disp16
659 @itemx if rd s>= imm32 goto disp16
660 Jump if signed greater or equal.
661
662 @item jslt32 rd, rs, disp16
663 @itemx jslt32 rd, imm32, disp16
664 @itemx if rd s< rs goto disp16
665 @itemx if rd s< imm32 goto disp16
666 Jump if signed lesser.
667
668 @item jsle32 rd, rs, disp16
669 @itemx jsle32 rd, imm32, disp16
670 @itemx if rd s<= rs goto disp16
671 @itemx if rd s<= imm32 goto disp16
672 Jump if signed lesser or equal.
673 @end table
674
675 @subsection Atomic instructions
676
677 Atomic exchange-and-add instructions are provided in two flavors: one
678 for swapping 64-bit quantities and another for 32-bit quantities.
679
680 @table @code
681 @item aadd [rd + offset16], rs
682 @itemx *(u64 *)(rd + offset16) = rs
683 Atomic add instruction.
684
685 @item aor [rd + offset16], rs
686 @itemx *(u64 *) (rd + offset16) |= rs
687 Atomic or instruction.
688
689 @item aand [rd + offset16], rs
690 @itemx *(u64 *) (rd + offset16) &= rs
691 Atomic and instruction.
692
693 @item axor [rd + offset16], rs
694 @itemx *(u64 *) (rd + offset16) ^= rs
695 Atomic xor instruction
696 @item xaddw [%d+offset16],%s
697 Exchange-and-add a 32-bit value at the specified location.
698 @end table
699
700 @noindent
701 The following variants perform fetching before the atomic operation.
702
703 @table @code
704 @item afadd [dr + offset16], rs
705 @itemx ???
706 Atomic fetch-and-add instruction.
707
708 @item afor [dr + offset16], rs
709 @itemx ???
710 Atomic fetch-and-or instruction.
711
712 @item afand [dr + offset16], rs
713 @itemx ???
714 Atomic fetch-and-and instruction.
715
716 @item afxor [dr + offset16], rs
717 @itemx ???
718 Atomic fetch-and-or instruction
719 @end table
720
721 The above instructions were introduced in the V3 of the BPF
722 instruction set. The following instruction is supported for backwards
723 compatibility:
724
725 @table @code
726 @item xadddw [rd + offset16], rs
727 Alias to @code{aadd}.
728 @end table
729
730 @subsection 32-bit atomic instructions
731
732 Atomic exchange-and-add instructions are provided in two flavors: one
733 for swapping 32-bit quantities and another for 32-bit quantities.
734
735 @table @code
736 @item aadd32 [rd + offset16], rs
737 @itemx *(u32 *)(rd + offset16) = rs
738 Atomic add instruction.
739
740 @item aor32 [rd + offset16], rs
741 @itemx *(u32 *) (rd + offset16) |= rs
742 Atomic or instruction.
743
744 @item aand32 [rd + offset16], rs
745 @itemx *(u32 *) (rd + offset16) &= rs
746 Atomic and instruction.
747
748 @item axor32 [rd + offset16], rs
749 @itemx *(u32 *) (rd + offset16) ^= rs
750 Atomic xor instruction
751 @end table
752
753 @noindent
754 The following variants perform fetching before the atomic operation.
755
756 @table @code
757 @item afadd32 [dr + offset16], rs
758 @itemx ???
759 Atomic fetch-and-add instruction.
760
761 @item afor32 [dr + offset16], rs
762 @itemx ???
763 Atomic fetch-and-or instruction.
764
765 @item afand32 [dr + offset16], rs
766 @itemx ???
767 Atomic fetch-and-and instruction.
768
769 @item afxor32 [dr + offset16], rs
770 @itemx ???
771 Atomic fetch-and-or instruction
772 @end table
773
774 The above instructions were introduced in the V3 of the BPF
775 instruction set. The following instruction is supported for backwards
776 compatibility:
777
778 @table @code
779 @item xaddw [rd + offset16], rs
780 Alias to @code{aadd32}.
781 @end table