sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget7/translations/zh_CN/bpf/standardization/instruction-setmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/zh_TW/bpf/standardization/instruction-setmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/it_IT/bpf/standardization/instruction-setmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ja_JP/bpf/standardization/instruction-setmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ko_KR/bpf/standardization/instruction-setmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/sp_SP/bpf/standardization/instruction-setmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhtopic)}(h Contents h](htitle)}(hContentsh]hContents}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhQ/var/lib/git/docbuild/linux/Documentation/bpf/standardization/instruction-set.rsthKubh bullet_list)}(hhh]h list_item)}(hhh](h paragraph)}(hhh]h reference)}(hhh](h generated)}(hhh]h1   }(hhhhhNhNubah}(h]h ]sectnumah"]h$]h&]uh1hhNhNhhubh&BPF Instruction Set Architecture (ISA)}(hhhhhNhNubeh}(h]id13ah ]h"]h$]h&]refid$bpf-instruction-set-architecture-isauh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh](h)}(hhh]h)}(hhh](h)}(hhh]h 1.1   }(hhhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhhubhDocumentation conventions}(hhhhhNhNubeh}(h]id14ah ]h"]h$]h&]refiddocumentation-conventionsuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.1.1   }(hj'hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhj$ubhTypes}(hj$hhhNhNubeh}(h]id15ah ]h"]h$]h&]refidtypesuh1hhj!ubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.1.2   }(hjVhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjSubh Functions}(hjShhhNhNubeh}(h]id16ah ]h"]h$]h&]refid functionsuh1hhjPubah}(h]h ]h"]h$]h&]uh1hhjMubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.1.3   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubh Definitions}(hjhhhNhNubeh}(h]id17ah ]h"]h$]h&]refid definitionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhj|ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.1.4   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhConformance groups}(hjhhhNhNubeh}(h]id18ah ]h"]h$]h&]refidconformance-groupsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]auto-tocah"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh]h)}(hhh](h)}(hhh]h 1.2   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhInstruction encoding}(hjhhhNhNubeh}(h]id19ah ]h"]h$]h&]refidinstruction-encodinguh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.2.1   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhBasic instruction encoding}(hjhhhNhNubeh}(h]id20ah ]h"]h$]h&]refidbasic-instruction-encodinguh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.2.2   }(hjKhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjHubhWide instruction encoding}(hjHhhhNhNubeh}(h]id21ah ]h"]h$]h&]refidwide-instruction-encodinguh1hhjEubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.2.3   }(hjzhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjwubhInstruction classes}(hjwhhhNhNubeh}(h]id22ah ]h"]h$]h&]refidinstruction-classesuh1hhjtubah}(h]h ]h"]h$]h&]uh1hhjqubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]jah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh]h)}(hhh](h)}(hhh]h 1.3   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubh Arithmetic and jump instructions}(hjhhhNhNubeh}(h]id23ah ]h"]h$]h&]refid arithmetic-and-jump-instructionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.3.1   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhArithmetic instructions}(hjhhhNhNubeh}(h]id24ah ]h"]h$]h&]refidarithmetic-instructionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.3.2   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhj ubhByte swap instructions}(hj hhhNhNubeh}(h]id25ah ]h"]h$]h&]refidbyte-swap-instructionsuh1hhj ubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh](h)}(hhh]h)}(hhh](h)}(hhh]h 1.3.3   }(hj?hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhj<ubhJump instructions}(hj<hhhNhNubeh}(h]id26ah ]h"]h$]h&]refidjump-instructionsuh1hhj9ubah}(h]h ]h"]h$]h&]uh1hhj6ubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.3.3.1   }(hjkhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjhubhHelper functions}(hjhhhhNhNubeh}(h]id27ah ]h"]h$]h&]refidhelper-functionsuh1hhjeubah}(h]h ]h"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]uh1hhj_ubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.3.3.2   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhProgram-local functions}(hjhhhNhNubeh}(h]id28ah ]h"]h$]h&]refidprogram-local-functionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhj_ubeh}(h]h ]jah"]h$]h&]uh1hhj6ubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]jah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh]h)}(hhh](h)}(hhh]h 1.4   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhLoad and store instructions}(hjhhhNhNubeh}(h]id29ah ]h"]h$]h&]refidload-and-store-instructionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.4.1   }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhj ubh!Regular load and store operations}(hj hhhNhNubeh}(h]id30ah ]h"]h$]h&]refid!regular-load-and-store-operationsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.4.2   }(hj<hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhj9ubhSign-extension load operations}(hj9hhhNhNubeh}(h]id31ah ]h"]h$]h&]refidsign-extension-load-operationsuh1hhj6ubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.4.3   }(hjkhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjhubhAtomic operations}(hjhhhhNhNubeh}(h]id32ah ]h"]h$]h&]refidatomic-operationsuh1hhjeubah}(h]h ]h"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh](h)}(hhh]h)}(hhh](h)}(hhh]h 1.4.4   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubh64-bit immediate instructions}(hjhhhNhNubeh}(h]id33ah ]h"]h$]h&]refidbit-immediate-instructionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh](h)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.4.4.1   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhMaps}(hjhhhNhNubeh}(h]id34ah ]h"]h$]h&]refidmapsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.4.4.2   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhjubhPlatform Variables}(hjhhhNhNubeh}(h]id35ah ]h"]h$]h&]refidplatform-variablesuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]jah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hhh]h)}(hhh]h)}(hhh](h)}(hhh]h 1.4.5   }(hj0hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhNhNhj-ubh%Legacy BPF Packet access instructions}(hj-hhhNhNubeh}(h]id36ah ]h"]h$]h&]refid%legacy-bpf-packet-access-instructionsuh1hhj*ubah}(h]h ]h"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]jah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]jah"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]jah"]h$]h&]uh1hhhhhhNhNubeh}(h]contentsah ]contentsah"]contentsah$]h&]uh1hhhhKhhhhubhsection)}(hhh](h)}(h&BPF Instruction Set Architecture (ISA)h](h)}(hhh]h1   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjhhhNhNubh&BPF Instruction Set Architecture (ISA)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]autoKrefidhuh1hhjhhhhhKubh)}(heBPF, also commonly referred to as BPF, is a technology with origins in the Linux kernel that can run untrusted programs in a privileged context such as an operating system kernel. This document specifies the BPF instruction set architecture (ISA).h]heBPF, also commonly referred to as BPF, is a technology with origins in the Linux kernel that can run untrusted programs in a privileged context such as an operating system kernel. This document specifies the BPF instruction set architecture (ISA).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXsAs a historical note, BPF originally stood for Berkeley Packet Filter, but now that it can do so much more than packet filtering, the acronym no longer makes sense. BPF is now considered a standalone term that does not stand for anything. The original BPF is sometimes referred to as cBPF (classic BPF) to distinguish it from the now widely deployed eBPF (extended BPF).h]hXsAs a historical note, BPF originally stood for Berkeley Packet Filter, but now that it can do so much more than packet filtering, the acronym no longer makes sense. BPF is now considered a standalone term that does not stand for anything. The original BPF is sometimes referred to as cBPF (classic BPF) to distinguish it from the now widely deployed eBPF (extended BPF).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj~)}(hhh](h)}(hDocumentation conventionsh](h)}(hhh]h 1.1   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjhhhNhNubhDocumentation conventions}(hjhhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhjhhhhhKubh)}(hXlThe key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 ``_ ``_ when, and only when, they appear in all capitals, as shown here.h](hThe key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 }(hjhhhNhNubh)}(h,``_h]h'https://www.rfc-editor.org/info/rfc2119}(hjhhhNhNubah}(h]h ]h"]h$]h&]name'https://www.rfc-editor.org/info/rfc2119refurijuh1hhjubhtarget)}(h)h]h}(h]%https-www-rfc-editor-org-info-rfc2119ah ]h"]'https://www.rfc-editor.org/info/rfc2119ah$]h&]refurijuh1j referencedKhjubh }(hjhhhNhNubh)}(h,``_h]h'https://www.rfc-editor.org/info/rfc8174}(hjhhhNhNubah}(h]h ]h"]h$]h&]name'https://www.rfc-editor.org/info/rfc8174jjuh1hhjubj)}(h)h]h}(h]%https-www-rfc-editor-org-info-rfc8174ah ]h"]'https://www.rfc-editor.org/info/rfc8174ah$]h&]refurijuh1jjKhjubhA when, and only when, they appear in all capitals, as shown here.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX<For brevity and consistency, this document refers to families of types using a shorthand syntax and refers to several expository, mnemonic functions when describing the semantics of instructions. The range of valid values for those types and the semantics of those functions are defined in the following subsections.h]hX<For brevity and consistency, this document refers to families of types using a shorthand syntax and refers to several expository, mnemonic functions when describing the semantics of instructions. The range of valid values for those types and the semantics of those functions are defined in the following subsections.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj~)}(hhh](h)}(hTypesh](h)}(hhh]h 1.1.1   }(hjBhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj>hhhNhNubhTypes}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]jKjj:uh1hhj;hhhhhK&ubh)}(hThis document refers to integer types with the notation `SN` to specify a type's signedness (`S`) and bit width (`N`), respectively.h](h8This document refers to integer types with the notation }(hjYhhhNhNubhtitle_reference)}(h`SN`h]hSN}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jahjYubh# to specify a type’s signedness (}(hjYhhhNhNubjb)}(h`S`h]hS}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jahjYubh) and bit width (}(hjYhhhNhNubjb)}(h`N`h]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jahjYubh), respectively.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK'hj;hhubhtable)}(hhh](h)}(hMeaning of signedness notationh]hMeaning of signedness notation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hSh]hS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hMeaningh]hMeaning}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(huh]hu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hunsignedh]hunsigned}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hj2ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hsh]hs}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjRubah}(h]h ]h"]h$]h&]uh1jhjOubj)}(hhh]h)}(hsignedh]hsigned}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjiubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h]id1ah ]h"]h$]h&]uh1jhj;hhhhhNubj)}(hhh](h)}(hMeaning of bit-width notationh]hMeaning of bit-width notation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hNh]hN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Bit widthh]h Bit width}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h8h]h8}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h8 bitsh]h8 bits}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h16h]h16}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hj?ubah}(h]h ]h"]h$]h&]uh1jhj<ubj)}(hhh]h)}(h16 bitsh]h16 bits}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjVubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h32h]h32}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjvubah}(h]h ]h"]h$]h&]uh1jhjsubj)}(hhh]h)}(h32 bitsh]h32 bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h64h]h64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h64 bitsh]h64 bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h128h]h128}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`_) byte order.h]h)}(hbe16: Takes an unsigned 16-bit number and converts it between host byte order and big-endian (`IEN137 `_) byte order.h](h^be16: Takes an unsigned 16-bit number and converts it between host byte order and big-endian (}(hj hhhNhNubh)}(h5`IEN137 `_h]hIEN137}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameIEN137j)https://www.rfc-editor.org/ien/ien137.txtuh1hhj ubj)}(h, h]h}(h]ien137ah ]h"]ien137ah$]h&]refurij uh1jjKhj ubh ) byte order.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKJhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hhbe32: Takes an unsigned 32-bit number and converts it between host byte order and big-endian byte order.h]h)}(hhbe32: Takes an unsigned 32-bit number and converts it between host byte order and big-endian byte order.h]hhbe32: Takes an unsigned 32-bit number and converts it between host byte order and big-endian byte order.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hhbe64: Takes an unsigned 64-bit number and converts it between host byte order and big-endian byte order.h]h)}(hhbe64: Takes an unsigned 64-bit number and converts it between host byte order and big-endian byte order.h]hhbe64: Takes an unsigned 64-bit number and converts it between host byte order and big-endian byte order.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hbswap16: Takes an unsigned 16-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.h]h)}(hbswap16: Takes an unsigned 16-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.h]hbswap16: Takes an unsigned 16-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hbswap32: Takes an unsigned 32-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.h]h)}(hbswap32: Takes an unsigned 32-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.h]hbswap32: Takes an unsigned 32-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hbswap64: Takes an unsigned 64-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.h]h)}(hbswap64: Takes an unsigned 64-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.h]hbswap64: Takes an unsigned 64-bit number in either big- or little-endian format and returns the equivalent number with the same bit width but opposite endianness.}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhj. ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hkle16: Takes an unsigned 16-bit number and converts it between host byte order and little-endian byte order.h]h)}(hkle16: Takes an unsigned 16-bit number and converts it between host byte order and little-endian byte order.h]hkle16: Takes an unsigned 16-bit number and converts it between host byte order and little-endian byte order.}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjF ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hkle32: Takes an unsigned 32-bit number and converts it between host byte order and little-endian byte order.h]h)}(hkle32: Takes an unsigned 32-bit number and converts it between host byte order and little-endian byte order.h]hkle32: Takes an unsigned 32-bit number and converts it between host byte order and little-endian byte order.}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hj^ ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hlle64: Takes an unsigned 64-bit number and converts it between host byte order and little-endian byte order. h]h)}(hkle64: Takes an unsigned 64-bit number and converts it between host byte order and little-endian byte order.h]hkle64: Takes an unsigned 64-bit number and converts it between host byte order and little-endian byte order.}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjv ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1hhhhKJhje hhubeh}(h]joah ]h"] functionsah$]h&]uh1j}hjhhhhhKDubj~)}(hhh](h)}(h Definitionsh](h)}(hhh]h 1.1.3   }(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj hhhNhNubh Definitions}(hj hhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhj hhhhhKbubhglossary)}(hhh]hdefinition_list)}(hhh]hdefinition_list_item)}(hhh](hterm)}(h Sign Extendh](h Sign Extend}(hj hhhNhNubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single Sign Extendterm-Sign-ExtendmainNtauh1j hhhKehj ubeh}(h]j ah ]h"]h$]h&]uh1j hhhKehj ubh definition)}(hhh](h)}(hSTo `sign extend an` ``X`` `-bit number, A, to a` ``Y`` `-bit number, B ,` means toh](hTo }(hj hhhNhNubjb)}(h`sign extend an`h]hsign extend an}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jahj ubh }(hj hhhNhNubhliteral)}(h``X``h]hX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh }hj sbjb)}(h`-bit number, A, to a`h]h-bit number, A, to a}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jahj ubh }hj sbj )}(h``Y``h]hY}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh }hj sbjb)}(h`-bit number, B ,`h]h-bit number, B ,}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1jahj ubh means to}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKghj ubhenumerated_list)}(hhh](h)}(hubj )}(hhh]h)}(h2the instruction class (see `Instruction classes`_)h](hthe instruction class (see }(hj\hhhNhNubh)}(h`Instruction classes`_h]hInstruction classes}(hjdhhhNhNubah}(h]h ]h"]h$]h&]nameInstruction classesjjuh1hhj\jM Kubh)}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM9hjYubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hhhM9hjhhubeh}(h]h ]h"]h$]h&]uh1j hj hhhhhNubj~)}(hhh](h)}(hArithmetic instructionsh](h)}(hhh]h 1.3.1   }(hjhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjhhhNhNubhArithmetic instructions}(hjhhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhjhhhhhM<ubh)}(hX^``ALU`` uses 32-bit wide operands while ``ALU64`` uses 64-bit wide operands for otherwise identical operations. ``ALU64`` instructions belong to the base64 conformance group unless noted otherwise. The 'code' field encodes the operation as below, where 'src' refers to the the source operand and 'dst' refers to the value of the destination register.h](j )}(h``ALU``h]hALU}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh! uses 32-bit wide operands while }(hjhhhNhNubj )}(h ``ALU64``h]hALU64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh? uses 64-bit wide operands for otherwise identical operations. }(hjhhhNhNubj )}(h ``ALU64``h]hALU64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh instructions belong to the base64 conformance group unless noted otherwise. The ‘code’ field encodes the operation as below, where ‘src’ refers to the the source operand and ‘dst’ refers to the value of the destination register.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM>hjhhubj)}(hhh](h)}(hArithmetic instructionsh]hArithmetic instructions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKSuh1jhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hnameh]hname}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj0ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(hcodeh]hcode}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjGubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(hoffseth]hoffset}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj^ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(h descriptionh]h description}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjuubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hADDh]hADD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x0h]h0x0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dst += srch]h dst += src}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hSUBh]hSUB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x1h]h0x1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj0ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dst -= srch]h dst -= src}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjFubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hMULh]hMUL}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjfubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h)}(h0x2h]h0x2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj}ubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h)}(h dst \*= srch]h dst *= src}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hDIVh]hDIV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x3h]h0x3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"dst = (src != 0) ? (dst / src) : 0h]h"dst = (src != 0) ? (dst / src) : 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hSDIVh]hSDIV}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhj.ubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(h0x3h]h0x3}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjEubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(hjh]h1}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhj\ubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(hSdst = (src == 0) ? 0 : ((src == -1 && dst == LLONG_MIN) ? LLONG_MIN : (dst s/ src))h]hSdst = (src == 0) ? 0 : ((src == -1 && dst == LLONG_MIN) ? LLONG_MIN : (dst s/ src))}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjrubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hORh]hOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x4h]h0x4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dst \|= srch]h dst |= src}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hANDh]hAND}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x5h]h0x5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj$ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dst &= srch]h dst &= src}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj:ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hLSHh]hLSH}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjZubah}(h]h ]h"]h$]h&]uh1jhjWubj)}(hhh]h)}(h0x6h]h0x6}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjqubah}(h]h ]h"]h$]h&]uh1jhjWubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjubah}(h]h ]h"]h$]h&]uh1jhjWubj)}(hhh]h)}(hdst <<= (src & mask)h]hdst <<= (src & mask)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hRSHh]hRSH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x7h]h0x7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hdst >>= (src & mask)h]hdst >>= (src & mask)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hNEGh]hNEG}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj"ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x8h]h0x8}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj9ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjPubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dst = -dsth]h dst = -dst}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjfubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hMODh]hMOD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x9h]h0x9}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h$dst = (src != 0) ? (dst % src) : dsth]h$dst = (src != 0) ? (dst % src) : dst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hSMODh]hSMOD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0x9h]h0x9}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLdst = (src == 0) ? dst : ((src == -1 && dst == LLONG_MIN) ? 0: (dst s% src))h]hLdst = (src == 0) ? dst : ((src == -1 && dst == LLONG_MIN) ? 0: (dst s% src))}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj.ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hXORh]hXOR}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjNubah}(h]h ]h"]h$]h&]uh1jhjKubj)}(hhh]h)}(h0xah]h0xa}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjeubah}(h]h ]h"]h$]h&]uh1jhjKubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj|ubah}(h]h ]h"]h$]h&]uh1jhjKubj)}(hhh]h)}(h dst ^= srch]h dst ^= src}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hMOVh]hMOV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0xbh]h0xb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dst = srch]h dst = src}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hMOVSXh]hMOVSX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0xbh]h0xb}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj- ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h8/16/32h]h8/16/32}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjD ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hdst = (s8,s16,s32)srch]hdst = (s8,s16,s32)src}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj[ ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hARSHh]hARSH}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj{ ubah}(h]h ]h"]h$]h&]uh1jhjx ubj)}(hhh]h)}(h0xch]h0xc}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj ubah}(h]h ]h"]h$]h&]uh1jhjx ubj)}(hhh]h)}(hjh]h0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj ubah}(h]h ]h"]h$]h&]uh1jhjx ubj)}(hhh]h)}(h8:term:`sign extending` dst >>= (src & mask)h](h)}(h#:term:`sign extending`h]hinline)}(hj h]hsign extending}(hj hhhNhNubah}(h]h ](xrefstdstd-termeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdoc#bpf/standardization/instruction-set refdomainj reftypeterm refexplicitrefwarn reftarget Sign Extenduh1hhhhMZhj ubh dst >>= (src & mask)}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMYhj ubah}(h]h ]h"]h$]h&]uh1jhjx ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hENDh]hEND}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(h0xdh]h0xd}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(hjh]h0}(hj5!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj2!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(h:byte swap operations (see `Byte swap instructions`_ below)h](hbyte swap operations (see }(hjK!hhhNhNubh)}(h`Byte swap instructions`_h]hByte swap instructions}(hjS!hhhNhNubah}(h]h ]h"]h$]h&]nameByte swap instructionsjj)uh1hhjK!jM Kubh below)}(hjK!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMZhjH!ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h]id5ah ]h"]h$]h&]uh1jhjhhhhhNubh)}(hXUnderflow and overflow are allowed during arithmetic operations, meaning the 64-bit or 32-bit value will wrap. If BPF program execution would result in division by zero, the destination register is instead set to zero. Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN`` dividing -1, the desination register is instead set to ``LLONG_MIN``. For ``ALU``, if execution would result in ``INT_MIN`` dividing -1, the desination register is instead set to ``INT_MIN``.h](hUnderflow and overflow are allowed during arithmetic operations, meaning the 64-bit or 32-bit value will wrap. If BPF program execution would result in division by zero, the destination register is instead set to zero. Otherwise, for }(hj!hhhNhNubj )}(h ``ALU64``h]hALU64}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh, if execution would result in }(hj!hhhNhNubj )}(h ``LLONG_MIN``h]h LLONG_MIN}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh8 dividing -1, the desination register is instead set to }(hj!hhhNhNubj )}(h ``LLONG_MIN``h]h LLONG_MIN}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh. For }(hj!hhhNhNubj )}(h``ALU``h]hALU}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh, if execution would result in }hj!sbj )}(h ``INT_MIN``h]hINT_MIN}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh8 dividing -1, the desination register is instead set to }(hj!hhhNhNubj )}(h ``INT_MIN``h]hINT_MIN}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM]hjhhubh)}(hXIf execution would result in modulo by zero, for ``ALU64`` the value of the destination register is unchanged whereas for ``ALU`` the upper 32 bits of the destination register are zeroed. Otherwise, for ``ALU64``, if execution would resuslt in ``LLONG_MIN`` modulo -1, the destination register is instead set to 0. For ``ALU``, if execution would result in ``INT_MIN`` modulo -1, the destination register is instead set to 0.h](h1If execution would result in modulo by zero, for }(hj"hhhNhNubj )}(h ``ALU64``h]hALU64}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh@ the value of the destination register is unchanged whereas for }(hj"hhhNhNubj )}(h``ALU``h]hALU}(hj!"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubhJ the upper 32 bits of the destination register are zeroed. Otherwise, for }(hj"hhhNhNubj )}(h ``ALU64``h]hALU64}(hj3"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh , if execution would resuslt in }(hj"hhhNhNubj )}(h ``LLONG_MIN``h]h LLONG_MIN}(hjE"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh> modulo -1, the destination register is instead set to 0. For }(hj"hhhNhNubj )}(h``ALU``h]hALU}(hjW"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh, if execution would result in }(hj"hhhNhNubj )}(h ``INT_MIN``h]hINT_MIN}(hji"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh9 modulo -1, the destination register is instead set to 0.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMehjhhubh)}(h[``{ADD, X, ALU}``, where 'code' = ``ADD``, 'source' = ``X``, and 'class' = ``ALU``, means::h](j )}(h``{ADD, X, ALU}``h]h {ADD, X, ALU}}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh, where ‘code’ = }(hj"hhhNhNubj )}(h``ADD``h]hADD}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh, ‘source’ = }(hj"hhhNhNubj )}(h``X``h]hX}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh, and ‘class’ = }(hj"hhhNhNubj )}(h``ALU``h]hALU}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh, means:}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMlhjhhubj )}(h#dst = (u32) ((u32) dst + (u32) src)h]h#dst = (u32) ((u32) dst + (u32) src)}hj"sbah}(h]h ]h"]h$]h&]j j uh1j hhhMnhjhhubh)}(h:where '(u32)' indicates that the upper 32 bits are zeroed.h]h>where ‘(u32)’ indicates that the upper 32 bits are zeroed.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjhhubh)}(h``{ADD, X, ALU64}`` means::h](j )}(h``{ADD, X, ALU64}``h]h{ADD, X, ALU64}}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj"ubh means:}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMrhjhhubj )}(hdst = dst + srch]hdst = dst + src}hj #sbah}(h]h ]h"]h$]h&]j j uh1j hhhMthjhhubh)}(h``{XOR, K, ALU}`` means::h](j )}(h``{XOR, K, ALU}``h]h {XOR, K, ALU}}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubh means:}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMvhjhhubj )}(hdst = (u32) dst ^ (u32) immh]hdst = (u32) dst ^ (u32) imm}hj5#sbah}(h]h ]h"]h$]h&]j j uh1j hhhMxhjhhubh)}(h``{XOR, K, ALU64}`` means::h](j )}(h``{XOR, K, ALU64}``h]h{XOR, K, ALU64}}(hjG#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjC#ubh means:}(hjC#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMzhjhhubj )}(hdst = dst ^ immh]hdst = dst ^ imm}hj_#sbah}(h]h ]h"]h$]h&]j j uh1j hhhM|hjhhubh)}(hNote that most arithmetic instructions have 'offset' set to 0. Only three instructions (``SDIV``, ``SMOD``, ``MOVSX``) have a non-zero 'offset'.h](h\Note that most arithmetic instructions have ‘offset’ set to 0. Only three instructions (}(hjm#hhhNhNubj )}(h``SDIV``h]hSDIV}(hju#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjm#ubh, }(hjm#hhhNhNubj )}(h``SMOD``h]hSMOD}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjm#ubh, }hjm#sbj )}(h ``MOVSX``h]hMOVSX}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjm#ubh) have a non-zero ‘offset’.}(hjm#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM~hjhhubh)}(hX&Division, multiplication, and modulo operations for ``ALU`` are part of the "divmul32" conformance group, and division, multiplication, and modulo operations for ``ALU64`` are part of the "divmul64" conformance group. The division and modulo operations support both unsigned and signed flavors.h](h4Division, multiplication, and modulo operations for }(hj#hhhNhNubj )}(h``ALU``h]hALU}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubhk are part of the “divmul32” conformance group, and division, multiplication, and modulo operations for }(hj#hhhNhNubj )}(h ``ALU64``h]hALU64}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubh are part of the “divmul64” conformance group. The division and modulo operations support both unsigned and signed flavors.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hFor unsigned operations (``DIV`` and ``MOD``), for ``ALU``, 'imm' is interpreted as a 32-bit unsigned value. For ``ALU64``, 'imm' is first :term:`sign extended` from 32 to 64 bits, and then interpreted as a 64-bit unsigned value.h](hFor unsigned operations (}(hj#hhhNhNubj )}(h``DIV``h]hDIV}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubh and }(hj#hhhNhNubj )}(h``MOD``h]hMOD}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubh), for }(hj#hhhNhNubj )}(h``ALU``h]hALU}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubh;, ‘imm’ is interpreted as a 32-bit unsigned value. For }(hj#hhhNhNubj )}(h ``ALU64``h]hALU64}(hj!$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubh, ‘imm’ is first }(hj#hhhNhNubh)}(h":term:`sign extended`h]j )}(hj5$h]h sign extended}(hj7$hhhNhNubah}(h]h ](j stdstd-termeh"]h$]h&]uh1j hj3$ubah}(h]h ]h"]h$]h&]refdocj refdomainjA$reftypeterm refexplicitrefwarnj Sign Extenduh1hhhhMhj#ubhE from 32 to 64 bits, and then interpreted as a 64-bit unsigned value.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hFor signed operations (``SDIV`` and ``SMOD``), for ``ALU``, 'imm' is interpreted as a 32-bit signed value. For ``ALU64``, 'imm' is first :term:`sign extended` from 32 to 64 bits, and then interpreted as a 64-bit signed value.h](hFor signed operations (}(hj]$hhhNhNubj )}(h``SDIV``h]hSDIV}(hje$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj]$ubh and }(hj]$hhhNhNubj )}(h``SMOD``h]hSMOD}(hjw$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj]$ubh), for }(hj]$hhhNhNubj )}(h``ALU``h]hALU}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj]$ubh9, ‘imm’ is interpreted as a 32-bit signed value. For }(hj]$hhhNhNubj )}(h ``ALU64``h]hALU64}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj]$ubh, ‘imm’ is first }(hj]$hhhNhNubh)}(h":term:`sign extended`h]j )}(hj$h]h sign extended}(hj$hhhNhNubah}(h]h ](j stdstd-termeh"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&]refdocj refdomainj$reftypeterm refexplicitrefwarnj Sign Extenduh1hhhhMhj]$ubhC from 32 to 64 bits, and then interpreted as a 64-bit signed value.}(hj]$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX[Note that there are varying definitions of the signed modulo operation when the dividend or divisor are negative, where implementations often vary by language such that Python, Ruby, etc. differ from C, Go, Java, etc. This specification requires that signed modulo MUST use truncated division (where -13 % 3 == -1) as implemented in C, Go, etc.::h]hXZNote that there are varying definitions of the signed modulo operation when the dividend or divisor are negative, where implementations often vary by language such that Python, Ruby, etc. differ from C, Go, Java, etc. This specification requires that signed modulo MUST use truncated division (where -13 % 3 == -1) as implemented in C, Go, etc.:}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(ha % n = a - n * trunc(a / n)h]ha % n = a - n * trunc(a / n)}hj$sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjhhubh)}(hXThe ``MOVSX`` instruction does a move operation with sign extension. ``{MOVSX, X, ALU}`` :term:`sign extends` 8-bit and 16-bit operands into 32-bit operands, and zeroes the remaining upper 32 bits. ``{MOVSX, X, ALU64}`` :term:`sign extends` 8-bit, 16-bit, and 32-bit operands into 64-bit operands. Unlike other arithmetic instructions, ``MOVSX`` is only defined for register source operands (``X``).h](hThe }(hj$hhhNhNubj )}(h ``MOVSX``h]hMOVSX}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh8 instruction does a move operation with sign extension. }(hj$hhhNhNubj )}(h``{MOVSX, X, ALU}``h]h{MOVSX, X, ALU}}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh }(hj$hhhNhNubh)}(h!:term:`sign extends`h]j )}(hj!%h]h sign extends}(hj#%hhhNhNubah}(h]h ](j stdstd-termeh"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&]refdocj refdomainj-%reftypeterm refexplicitrefwarnj Sign Extenduh1hhhhMhj$ubhY 8-bit and 16-bit operands into 32-bit operands, and zeroes the remaining upper 32 bits. }(hj$hhhNhNubj )}(h``{MOVSX, X, ALU64}``h]h{MOVSX, X, ALU64}}(hjC%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh }hj$sbh)}(h!:term:`sign extends`h]j )}(hjW%h]h sign extends}(hjY%hhhNhNubah}(h]h ](j stdstd-termeh"]h$]h&]uh1j hjU%ubah}(h]h ]h"]h$]h&]refdocj refdomainjc%reftypeterm refexplicitrefwarnj Sign Extenduh1hhhhMhj$ubha 8-bit, 16-bit, and 32-bit operands into 64-bit operands. Unlike other arithmetic instructions, }(hj$hhhNhNubj )}(h ``MOVSX``h]hMOVSX}(hjy%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh/ is only defined for register source operands (}(hj$hhhNhNubj )}(h``X``h]hX}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubh).}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h``{MOV, K, ALU64}`` means::h](j )}(h``{MOV, K, ALU64}``h]h{MOV, K, ALU64}}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubh means:}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(hdst = (s64)immh]hdst = (s64)imm}hj%sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjhhubh)}(h``{MOV, X, ALU}`` means::h](j )}(h``{MOV, X, ALU}``h]h {MOV, X, ALU}}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubh means:}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(hdst = (u32)srch]hdst = (u32)src}hj%sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjhhubh)}(h+``{MOVSX, X, ALU}`` with 'offset' 8 means::h](j )}(h``{MOVSX, X, ALU}``h]h{MOVSX, X, ALU}}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubh with ‘offset’ 8 means:}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(hdst = (u32)(s32)(s8)srch]hdst = (u32)(s32)(s8)src}hj&sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjhhubh)}(hMThe ``NEG`` instruction is only defined when the source bit is clear (``K``).h](hThe }(hj!&hhhNhNubj )}(h``NEG``h]hNEG}(hj)&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!&ubh; instruction is only defined when the source bit is clear (}(hj!&hhhNhNubj )}(h``K``h]hK}(hj;&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!&ubh).}(hj!&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hcShift operations use a mask of 0x3F (63) for 64-bit operations and 0x1F (31) for 32-bit operations.h]hcShift operations use a mask of 0x3F (63) for 64-bit operations and 0x1F (31) for 32-bit operations.}(hjS&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]jah ]h"]arithmetic instructionsah$]h&]uh1j}hj hhhhhM<ubj~)}(hhh](h)}(hByte swap instructionsh](h)}(hhh]h 1.3.2   }(hjo&hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjk&hhhNhNubhByte swap instructions}(hjk&hhhNhNubeh}(h]h ]h"]h$]h&]jKjj#uh1hhjh&hhhhhMubh)}(hpThe byte swap instructions use instruction classes of ``ALU`` and ``ALU64`` and a 4-bit 'code' field of ``END``.h](h6The byte swap instructions use instruction classes of }(hj&hhhNhNubj )}(h``ALU``h]hALU}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj&ubh and }(hj&hhhNhNubj )}(h ``ALU64``h]hALU64}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj&ubh! and a 4-bit ‘code’ field of }(hj&hhhNhNubj )}(h``END``h]hEND}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj&ubh.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubh)}(hThe byte swap instructions operate on the destination register only and do not use a separate source register or immediate value.h]hThe byte swap instructions operate on the destination register only and do not use a separate source register or immediate value.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubh)}(hFor ``ALU``, the 1-bit source operand field in the opcode is used to select what byte order the operation converts from or to. For ``ALU64``, the 1-bit source operand field in the opcode is reserved and MUST be set to 0.h](hFor }(hj&hhhNhNubj )}(h``ALU``h]hALU}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj&ubhx, the 1-bit source operand field in the opcode is used to select what byte order the operation converts from or to. For }(hj&hhhNhNubj )}(h ``ALU64``h]hALU64}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj&ubhP, the 1-bit source operand field in the opcode is reserved and MUST be set to 0.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubj)}(hhh](h)}(hByte swap instructionsh]hByte swap instructions}(hj 'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj 'ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj'ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj'ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj'ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK1uh1jhj'ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hclassh]hclass}(hjO'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjL'ubah}(h]h ]h"]h$]h&]uh1jhjI'ubj)}(hhh]h)}(hsourceh]hsource}(hjf'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjc'ubah}(h]h ]h"]h$]h&]uh1jhjI'ubj)}(hhh]h)}(hvalueh]hvalue}(hj}'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjz'ubah}(h]h ]h"]h$]h&]uh1jhjI'ubj)}(hhh]h)}(h descriptionh]h description}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jhjI'ubeh}(h]h ]h"]h$]h&]uh1jhjF'ubah}(h]h ]h"]h$]h&]uh1jhj'ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hALUh]hALU}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubj)}(hhh]h)}(hLEh]hLE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubj)}(hhh]h)}(hjh]h0}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubj)}(hhh]h)}(h1convert between host byte order and little endianh]h1convert between host byte order and little endian}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'ubj)}(hhh](j)}(hhh]h)}(hALUh]hALU}(hj!(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hBEh]hBE}(hj8(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hjh]h1}(hjO(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjL(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(h.convert between host byte order and big endianh]h.convert between host byte order and big endian}(hje(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj'ubj)}(hhh](j)}(hhh]h)}(hALU64h]hALU64}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hReservedh]hReserved}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hjh]h0}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hdo byte swap unconditionallyh]hdo byte swap unconditionally}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]colsKuh1jhj 'ubeh}(h]id6ah ]h"]h$]h&]uh1jhjh&hhhhhNubh)}(hThe 'imm' field encodes the width of the swap operations. The following widths are supported: 16, 32 and 64. Width 64 operations belong to the base64 conformance group and other swap operations belong to the base32 conformance group.h]hThe ‘imm’ field encodes the width of the swap operations. The following widths are supported: 16, 32 and 64. Width 64 operations belong to the base64 conformance group and other swap operations belong to the base32 conformance group.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubh)}(h Examples:h]h Examples:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubh)}(h0``{END, LE, ALU}`` with 'imm' = 16/32/64 means::h](j )}(h``{END, LE, ALU}``h]h{END, LE, ALU}}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubh! with ‘imm’ = 16/32/64 means:}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubj )}(h/dst = le16(dst) dst = le32(dst) dst = le64(dst)h]h/dst = le16(dst) dst = le32(dst) dst = le64(dst)}hj/)sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjh&hhubh)}(h0``{END, BE, ALU}`` with 'imm' = 16/32/64 means::h](j )}(h``{END, BE, ALU}``h]h{END, BE, ALU}}(hjA)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj=)ubh! with ‘imm’ = 16/32/64 means:}(hj=)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubj )}(h/dst = be16(dst) dst = be32(dst) dst = be64(dst)h]h/dst = be16(dst) dst = be32(dst) dst = be64(dst)}hjY)sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjh&hhubh)}(h2``{END, TO, ALU64}`` with 'imm' = 16/32/64 means::h](j )}(h``{END, TO, ALU64}``h]h{END, TO, ALU64}}(hjk)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjg)ubh! with ‘imm’ = 16/32/64 means:}(hjg)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjh&hhubj )}(h8dst = bswap16(dst) dst = bswap32(dst) dst = bswap64(dst)h]h8dst = bswap16(dst) dst = bswap32(dst) dst = bswap64(dst)}hj)sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjh&hhubeh}(h]j)ah ]h"]byte swap instructionsah$]h&]uh1j}hj hhhhhMjKubj~)}(hhh](h)}(hJump instructionsh](h)}(hhh]h 1.3.3   }(hj)hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj)hhhNhNubhJump instructions}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]jKjjRuh1hhj)hhhhhMubh)}(hX``JMP32`` uses 32-bit wide operands and indicates the base32 conformance group, while ``JMP`` uses 64-bit wide operands for otherwise identical operations, and indicates the base64 conformance group unless otherwise specified. The 'code' field encodes the operation as below:h](j )}(h ``JMP32``h]hJMP32}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubhM uses 32-bit wide operands and indicates the base32 conformance group, while }(hj)hhhNhNubj )}(h``JMP``h]hJMP}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubh uses 64-bit wide operands for otherwise identical operations, and indicates the base64 conformance group unless otherwise specified. The ‘code’ field encodes the operation as below:}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj)}(hhh](h)}(hJump instructionsh]hJump instructions}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj)ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj)ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj)ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhj)ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK3uh1jhj)ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hcodeh]hcode}(hj3*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0*ubah}(h]h ]h"]h$]h&]uh1jhj-*ubj)}(hhh]h)}(hvalueh]hvalue}(hjJ*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjG*ubah}(h]h ]h"]h$]h&]uh1jhj-*ubj)}(hhh]h)}(hsrc_regh]hsrc_reg}(hja*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^*ubah}(h]h ]h"]h$]h&]uh1jhj-*ubj)}(hhh]h)}(h descriptionh]h description}(hjx*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhju*ubah}(h]h ]h"]h$]h&]uh1jhj-*ubj)}(hhh]h)}(hnotesh]hnotes}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj-*ubeh}(h]h ]h"]h$]h&]uh1jhj**ubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hJAh]hJA}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh]h)}(h0x0h]h0x0}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh]h)}(h0x0h]h0x0}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh]h)}(h PC += offseth]h PC += offset}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh]h)}(h{JA, K, JMP} onlyh]h{JA, K, JMP} only}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJAh]hJA}(hj4+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1+ubah}(h]h ]h"]h$]h&]uh1jhj.+ubj)}(hhh]h)}(h0x0h]h0x0}(hjK+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjH+ubah}(h]h ]h"]h$]h&]uh1jhj.+ubj)}(hhh]h)}(h0x0h]h0x0}(hjb+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_+ubah}(h]h ]h"]h$]h&]uh1jhj.+ubj)}(hhh]h)}(h PC += immh]h PC += imm}(hjy+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjv+ubah}(h]h ]h"]h$]h&]uh1jhj.+ubj)}(hhh]h)}(h{JA, K, JMP32} onlyh]h{JA, K, JMP32} only}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj.+ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJEQh]hJEQ}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(h0x1h]h0x1}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(hanyh]hany}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(hPC += offset if dst == srch]hPC += offset if dst == src}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJGTh]hJGT}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(h0x2h]h0x2}(hj5,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(hanyh]hany}(hjL,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjI,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(hPC += offset if dst > srch]hPC += offset if dst > src}(hjc,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(hunsignedh]hunsigned}(hjz,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJGEh]hJGE}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(h0x3h]h0x3}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(hanyh]hany}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(hPC += offset if dst >= srch]hPC += offset if dst >= src}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(hunsignedh]hunsigned}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJSETh]hJSET}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(h0x4h]h0x4}(hj--hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*-ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(hanyh]hany}(hjD-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjA-ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(hPC += offset if dst & srch]hPC += offset if dst & src}(hj[-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjX-ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJNEh]hJNE}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj~-ubj)}(hhh]h)}(h0x5h]h0x5}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj~-ubj)}(hhh]h)}(hanyh]hany}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj~-ubj)}(hhh]h)}(hPC += offset if dst != srch]hPC += offset if dst != src}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj~-ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj~-ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJSGTh]hJSGT}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(h0x6h]h0x6}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(hanyh]hany}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(hPC += offset if dst > srch]hPC += offset if dst > src}(hj7.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4.ubah}(h]h ]h"]h$]h&]uh1jhj-ubj)}(hhh]h)}(hsignedh]hsigned}(hjN.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK.ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJSGEh]hJSGE}(hjn.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjk.ubah}(h]h ]h"]h$]h&]uh1jhjh.ubj)}(hhh]h)}(h0x7h]h0x7}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhjh.ubj)}(hhh]h)}(hanyh]hany}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhjh.ubj)}(hhh]h)}(hPC += offset if dst >= srch]hPC += offset if dst >= src}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhjh.ubj)}(hhh]h)}(hsignedh]hsigned}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhjh.ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hCALLh]hCALL}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubj)}(hhh]h)}(h0x8h]h0x8}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubj)}(hhh]h)}(h0x0h]h0x0}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhj.ubj)}(hhh]h)}(h!call helper function by static IDh]h!call helper function by static ID}(hj//hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,/ubah}(h]h ]h"]h$]h&]uh1jhj.ubj)}(hhh]h)}(h,{CALL, K, JMP} only, see `Helper functions`_h](h{CALL, K, JMP} only, see }(hjF/hhhNhNubh)}(h`Helper functions`_h]hHelper functions}(hjN/hhhNhNubah}(h]h ]h"]h$]h&]nameHelper functionsjjuh1hhjF/jM Kubeh}(h]h ]h"]h$]h&]uh1hhhhMhjC/ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hCALLh]hCALL}(hjv/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjs/ubah}(h]h ]h"]h$]h&]uh1jhjp/ubj)}(hhh]h)}(h0x8h]h0x8}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhjp/ubj)}(hhh]h)}(h0x1h]h0x1}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhjp/ubj)}(hhh]h)}(hcall PC += immh]hcall PC += imm}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhjp/ubj)}(hhh]h)}(h3{CALL, K, JMP} only, see `Program-local functions`_h](h{CALL, K, JMP} only, see }(hj/hhhNhNubh)}(h`Program-local functions`_h]hProgram-local functions}(hj/hhhNhNubah}(h]h ]h"]h$]h&]nameProgram-local functionsjjuh1hhj/jM Kubeh}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhjp/ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hCALLh]hCALL}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhj/ubj)}(hhh]h)}(h0x8h]h0x8}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj/ubj)}(hhh]h)}(h0x2h]h0x2}(hj00hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-0ubah}(h]h ]h"]h$]h&]uh1jhj/ubj)}(hhh]h)}(hcall helper function by BTF IDh]hcall helper function by BTF ID}(hjG0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjD0ubah}(h]h ]h"]h$]h&]uh1jhj/ubj)}(hhh]h)}(h,{CALL, K, JMP} only, see `Helper functions`_h](h{CALL, K, JMP} only, see }(hj^0hhhNhNubh)}(h`Helper functions`_h]hHelper functions}(hjf0hhhNhNubah}(h]h ]h"]h$]h&]nameHelper functionsjjuh1hhj^0jM Kubeh}(h]h ]h"]h$]h&]uh1hhhhMhj[0ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hEXITh]hEXIT}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h)}(h0x9h]h0x9}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h)}(h0x0h]h0x0}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h)}(hreturnh]hreturn}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h)}(h{CALL, K, JMP} onlyh]h{CALL, K, JMP} only}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJLTh]hJLT}(hj 1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(h0xah]h0xa}(hj!1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hanyh]hany}(hj81hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj51ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hPC += offset if dst < srch]hPC += offset if dst < src}(hjO1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjL1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hunsignedh]hunsigned}(hjf1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjc1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJLEh]hJLE}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(h0xbh]h0xb}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hanyh]hany}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hPC += offset if dst <= srch]hPC += offset if dst <= src}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hunsignedh]hunsigned}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJSLTh]hJSLT}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(h0xch]h0xc}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hanyh]hany}(hj02hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-2ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hPC += offset if dst < srch]hPC += offset if dst < src}(hjG2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjD2ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(hhh]h)}(hsignedh]hsigned}(hj^2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[2ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj*ubj)}(hhh](j)}(hhh]h)}(hJSLEh]hJSLE}(hj~2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{2ubah}(h]h ]h"]h$]h&]uh1jhjx2ubj)}(hhh]h)}(h0xdh]h0xd}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhjx2ubj)}(hhh]h)}(hanyh]hany}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhjx2ubj)}(hhh]h)}(hPC += offset if dst <= srch]hPC += offset if dst <= src}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhjx2ubj)}(hhh]h)}(hsignedh]hsigned}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhjx2ubeh}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]colsKuh1jhj)ubeh}(h]id7ah ]h"]h$]h&]uh1jhj)hhhhhNubh)}(hXQwhere 'PC' denotes the program counter, and the offset to increment by is in units of 64-bit instructions relative to the instruction following the jump instruction. Thus 'PC += 1' skips execution of the next instruction if it's a basic instruction or results in undefined behavior if the next instruction is a 128-bit wide instruction.h]hX[where ‘PC’ denotes the program counter, and the offset to increment by is in units of 64-bit instructions relative to the instruction following the jump instruction. Thus ‘PC += 1’ skips execution of the next instruction if it’s a basic instruction or results in undefined behavior if the next instruction is a 128-bit wide instruction.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(hExample:h]hExample:}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj)hhubh)}(h``{JSGE, X, JMP32}`` means::h](j )}(h``{JSGE, X, JMP32}``h]h{JSGE, X, JMP32}}(hj(3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$3ubh means:}(hj$3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj)hhubj )}(h%if (s32)dst s>= (s32)src goto +offseth]h%if (s32)dst s>= (s32)src goto +offset}hj@3sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhj)hhubh)}(h/where 's>=' indicates a signed '>=' comparison.h]h7where ‘s>=’ indicates a signed ‘>=’ comparison.}(hjN3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(h``{JLE, K, JMP}`` means::h](j )}(h``{JLE, K, JMP}``h]h {JLE, K, JMP}}(hj`3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj\3ubh means:}(hj\3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj )}(h$if dst <= (u64)(s64)imm goto +offseth]h$if dst <= (u64)(s64)imm goto +offset}hjx3sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhj)hhubh)}(h``{JA, K, JMP32}`` means::h](j )}(h``{JA, K, JMP32}``h]h{JA, K, JMP32}}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj3ubh means:}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubj )}(h gotol +immh]h gotol +imm}hj3sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhj)hhubh)}(h?where 'imm' means the branch offset comes from the 'imm' field.h]hGwhere ‘imm’ means the branch offset comes from the ‘imm’ field.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(hXLNote that there are two flavors of ``JA`` instructions. The ``JMP`` class permits a 16-bit jump offset specified by the 'offset' field, whereas the ``JMP32`` class permits a 32-bit jump offset specified by the 'imm' field. A > 16-bit conditional jump may be converted to a < 16-bit conditional jump plus a 32-bit unconditional jump.h](h#Note that there are two flavors of }(hj3hhhNhNubj )}(h``JA``h]hJA}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj3ubh instructions. The }(hj3hhhNhNubj )}(h``JMP``h]hJMP}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj3ubhU class permits a 16-bit jump offset specified by the ‘offset’ field, whereas the }(hj3hhhNhNubj )}(h ``JMP32``h]hJMP32}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj3ubh class permits a 32-bit jump offset specified by the ‘imm’ field. A > 16-bit conditional jump may be converted to a < 16-bit conditional jump plus a 32-bit unconditional jump.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj)hhubh)}(hLAll ``CALL`` and ``JA`` instructions belong to the base32 conformance group.h](hAll }(hj4hhhNhNubj )}(h``CALL``h]hCALL}(hj 4hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj4ubh and }(hj4hhhNhNubj )}(h``JA``h]hJA}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj4ubh5 instructions belong to the base32 conformance group.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM$hj)hhubj~)}(hhh](h)}(hHelper functionsh](h)}(hhh]h 1.3.3.1   }(hj;4hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj74hhhNhNubhHelper functions}(hj74hhhNhNubeh}(h]h ]h"]h$]h&]jKjj~uh1hhj44hhhhhM(ubh)}(h}Helper functions are a concept whereby BPF programs can call into a set of function calls exposed by the underlying platform.h]h}Helper functions are a concept whereby BPF programs can call into a set of function calls exposed by the underlying platform.}(hjR4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj44hhubh)}(hX^Historically, each helper function was identified by a static ID encoded in the 'imm' field. Further documentation of helper functions is outside the scope of this document and standardization is left for future work, but use is widely deployed and more information can be found in platform-specific documentation (e.g., Linux kernel documentation).h]hXbHistorically, each helper function was identified by a static ID encoded in the ‘imm’ field. Further documentation of helper functions is outside the scope of this document and standardization is left for future work, but use is widely deployed and more information can be found in platform-specific documentation (e.g., Linux kernel documentation).}(hj`4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj44hhubh)}(hXPlatforms that support the BPF Type Format (BTF) support identifying a helper function by a BTF ID encoded in the 'imm' field, where the BTF ID identifies the helper name and type. Further documentation of BTF is outside the scope of this document and standardization is left for future work, but use is widely deployed and more information can be found in platform-specific documentation (e.g., Linux kernel documentation).h]hXPlatforms that support the BPF Type Format (BTF) support identifying a helper function by a BTF ID encoded in the ‘imm’ field, where the BTF ID identifies the helper name and type. Further documentation of BTF is outside the scope of this document and standardization is left for future work, but use is widely deployed and more information can be found in platform-specific documentation (e.g., Linux kernel documentation).}(hjn4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj44hhubeh}(h]jah ]h"]helper functionsah$]h&]uh1j}hj)hhhhhM(jKubj~)}(hhh](h)}(hProgram-local functionsh](h)}(hhh]h 1.3.3.2   }(hj4hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj4hhhNhNubhProgram-local functions}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhj4hhhhhM;ubh)}(hXEProgram-local functions are functions exposed by the same BPF program as the caller, and are referenced by offset from the instruction following the call instruction, similar to ``JA``. The offset is encoded in the 'imm' field of the call instruction. An ``EXIT`` within the program-local function will return to the caller.h](hProgram-local functions are functions exposed by the same BPF program as the caller, and are referenced by offset from the instruction following the call instruction, similar to }(hj4hhhNhNubj )}(h``JA``h]hJA}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj4ubhL. The offset is encoded in the ‘imm’ field of the call instruction. An }(hj4hhhNhNubj )}(h``EXIT``h]hEXIT}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj4ubh= within the program-local function will return to the caller.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM<hj4hhubeh}(h]jah ]h"]program-local functionsah$]h&]uh1j}hj)hhhhhM;jKubeh}(h]jXah ]h"]jump instructionsah$]h&]uh1j}hj hhhhhMubeh}(h]jah ]h"] arithmetic and jump instructionsah$]h&]uh1j}hjhhhhhM jKubj~)}(hhh](h)}(hLoad and store instructionsh](h)}(hhh]h 1.4   }(hj4hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj4hhhNhNubhLoad and store instructions}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhj4hhhhhMCubh)}(hxFor load and store instructions (``LD``, ``LDX``, ``ST``, and ``STX``), the 8-bit 'opcode' field is divided as follows::h](h!For load and store instructions (}(hj5hhhNhNubj )}(h``LD``h]hLD}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj5ubh, }(hj5hhhNhNubj )}(h``LDX``h]hLDX}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj5ubh, }hj5sbj )}(h``ST``h]hST}(hj25hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj5ubh, and }(hj5hhhNhNubj )}(h``STX``h]hSTX}(hjD5hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj5ubh6), the 8-bit ‘opcode’ field is divided as follows:}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMEhj4hhubj )}(h5+-+-+-+-+-+-+-+-+ |mode |sz |class| +-+-+-+-+-+-+-+-+h]h5+-+-+-+-+-+-+-+-+ |mode |sz |class| +-+-+-+-+-+-+-+-+}hj\5sbah}(h]h ]h"]h$]h&]j j uh1j hhhMHhj4hhubj )}(hhh](j )}(hX**mode** The mode modifier is one of: .. table:: Mode modifier ============= ===== ==================================== ============= mode modifier value description reference ============= ===== ==================================== ============= IMM 0 64-bit immediate instructions `64-bit immediate instructions`_ ABS 1 legacy BPF packet access (absolute) `Legacy BPF Packet access instructions`_ IND 2 legacy BPF packet access (indirect) `Legacy BPF Packet access instructions`_ MEM 3 regular load and store operations `Regular load and store operations`_ MEMSX 4 sign-extension load operations `Sign-extension load operations`_ ATOMIC 6 atomic operations `Atomic operations`_ ============= ===== ==================================== ============= h](j )}(h**mode**h]jz)}(hjs5h]hmode}(hju5hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjq5ubah}(h]h ]h"]h$]h&]uh1j hhhMZhjm5ubj )}(hhh](h)}(hThe mode modifier is one of:h]hThe mode modifier is one of:}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj5ubj)}(hhh](h)}(h Mode modifierh]h Mode modifier}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj5ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhj5ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj5ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK$uh1jhj5ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK(uh1jhj5ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h mode modifierh]h mode modifier}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(hhh]h)}(hvalueh]hvalue}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(hhh]h)}(h descriptionh]h description}(hj 6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj 6ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(hhh]h)}(h referenceh]h reference}(hj#6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj 6ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hIMMh]hIMM}(hjL6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjI6ubah}(h]h ]h"]h$]h&]uh1jhjF6ubj)}(hhh]h)}(hjh]h0}(hjc6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj`6ubah}(h]h ]h"]h$]h&]uh1jhjF6ubj)}(hhh]h)}(h64-bit immediate instructionsh]h64-bit immediate instructions}(hjy6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjv6ubah}(h]h ]h"]h$]h&]uh1jhjF6ubj)}(hhh]h)}(h `64-bit immediate instructions`_h]h)}(hj6h]h64-bit immediate instructions}(hj6hhhNhNubah}(h]h ]h"]h$]h&]name64-bit immediate instructionsjjuh1hhj6jM Kubah}(h]h ]h"]h$]h&]uh1hhhhMThj6ubah}(h]h ]h"]h$]h&]uh1jhjF6ubeh}(h]h ]h"]h$]h&]uh1jhjC6ubj)}(hhh](j)}(hhh]h)}(hABSh]hABS}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubj)}(hhh]h)}(hjh]h1}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubj)}(hhh]h)}(h#legacy BPF packet access (absolute)h]h#legacy BPF packet access (absolute)}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubj)}(hhh]h)}(h(`Legacy BPF Packet access instructions`_h]h)}(hj7h]h%Legacy BPF Packet access instructions}(hj7hhhNhNubah}(h]h ]h"]h$]h&]name%Legacy BPF Packet access instructionsjjIuh1hhj6jM Kubah}(h]h ]h"]h$]h&]uh1hhhhMUhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhjC6ubj)}(hhh](j)}(hhh]h)}(hINDh]hIND}(hj*7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj'7ubah}(h]h ]h"]h$]h&]uh1jhj$7ubj)}(hhh]h)}(h2h]h2}(hjA7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj>7ubah}(h]h ]h"]h$]h&]uh1jhj$7ubj)}(hhh]h)}(h#legacy BPF packet access (indirect)h]h#legacy BPF packet access (indirect)}(hjX7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjU7ubah}(h]h ]h"]h$]h&]uh1jhj$7ubj)}(hhh]h)}(h(`Legacy BPF Packet access instructions`_h]h)}(hjq7h]h%Legacy BPF Packet access instructions}(hjs7hhhNhNubah}(h]h ]h"]h$]h&]name%Legacy BPF Packet access instructionsjjIuh1hhjo7jM Kubah}(h]h ]h"]h$]h&]uh1hhhhMVhjl7ubah}(h]h ]h"]h$]h&]uh1jhj$7ubeh}(h]h ]h"]h$]h&]uh1jhjC6ubj)}(hhh](j)}(hhh]h)}(hMEMh]hMEM}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj7ubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h3h]h3}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj7ubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h!regular load and store operationsh]h!regular load and store operations}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj7ubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h$`Regular load and store operations`_h]h)}(hj7h]h!Regular load and store operations}(hj7hhhNhNubah}(h]h ]h"]h$]h&]name!Regular load and store operationsjj&uh1hhj7jM Kubah}(h]h ]h"]h$]h&]uh1hhhhMWhj7ubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhjC6ubj)}(hhh](j)}(hhh]h)}(hMEMSXh]hMEMSX}(hj 8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj8ubah}(h]h ]h"]h$]h&]uh1jhj8ubj)}(hhh]h)}(h4h]h4}(hj!8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj8ubah}(h]h ]h"]h$]h&]uh1jhj8ubj)}(hhh]h)}(hsign-extension load operationsh]hsign-extension load operations}(hj88hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj58ubah}(h]h ]h"]h$]h&]uh1jhj8ubj)}(hhh]h)}(h!`Sign-extension load operations`_h]h)}(hjQ8h]hSign-extension load operations}(hjS8hhhNhNubah}(h]h ]h"]h$]h&]nameSign-extension load operationsjjUuh1hhjO8jM Kubah}(h]h ]h"]h$]h&]uh1hhhhMXhjL8ubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhjC6ubj)}(hhh](j)}(hhh]h)}(hATOMICh]hATOMIC}(hjz8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjw8ubah}(h]h ]h"]h$]h&]uh1jhjt8ubj)}(hhh]h)}(h6h]h6}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj8ubah}(h]h ]h"]h$]h&]uh1jhjt8ubj)}(hhh]h)}(hatomic operationsh]hatomic operations}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj8ubah}(h]h ]h"]h$]h&]uh1jhjt8ubj)}(hhh]h)}(h`Atomic operations`_h]h)}(hj8h]hAtomic operations}(hj8hhhNhNubah}(h]h ]h"]h$]h&]nameAtomic operationsjjuh1hhj8jM Kubah}(h]h ]h"]h$]h&]uh1hhhhMYhj8ubah}(h]h ]h"]h$]h&]uh1jhjt8ubeh}(h]h ]h"]h$]h&]uh1jhjC6ubeh}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]colsKuh1jhj5ubeh}(h]id8ah ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1j hjm5ubeh}(h]h ]h"]h$]h&]uh1j hhhMZhjj5ubj )}(hX**sz (size)** The size modifier is one of: .. table:: Size modifier ==== ===== ===================== size value description ==== ===== ===================== W 0 word (4 bytes) H 1 half word (2 bytes) B 2 byte DW 3 double word (8 bytes) ==== ===== ===================== Instructions using ``DW`` belong to the base64 conformance group. h](j )}(h **sz (size)**h]jz)}(hj 9h]h sz (size)}(hj 9hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj9ubah}(h]h ]h"]h$]h&]uh1j hhhMjhj9ubj )}(hhh](h)}(hThe size modifier is one of:h]hThe size modifier is one of:}(hj"9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hj9ubj)}(hhh](h)}(h Size modifierh]h Size modifier}(hj39hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hj09ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjA9ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjA9ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjA9ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hsizeh]hsize}(hjk9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjh9ubah}(h]h ]h"]h$]h&]uh1jhje9ubj)}(hhh]h)}(hvalueh]hvalue}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj9ubah}(h]h ]h"]h$]h&]uh1jhje9ubj)}(hhh]h)}(h descriptionh]h description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhj9ubah}(h]h ]h"]h$]h&]uh1jhje9ubeh}(h]h ]h"]h$]h&]uh1jhjb9ubah}(h]h ]h"]h$]h&]uh1jhjA9ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hWh]hW}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh]h)}(hjh]h0}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh]h)}(hword (4 bytes)h]hword (4 bytes)}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh](j)}(hhh]h)}(hHh]hH}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj :ubah}(h]h ]h"]h$]h&]uh1jhj :ubj)}(hhh]h)}(hjh]h1}(hj&:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj#:ubah}(h]h ]h"]h$]h&]uh1jhj :ubj)}(hhh]h)}(hhalf word (2 bytes)h]hhalf word (2 bytes)}(hj<:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj9:ubah}(h]h ]h"]h$]h&]uh1jhj :ubeh}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh](j)}(hhh]h)}(hBh]hB}(hj\:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjY:ubah}(h]h ]h"]h$]h&]uh1jhjV:ubj)}(hhh]h)}(hjC7h]h2}(hjs:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjp:ubah}(h]h ]h"]h$]h&]uh1jhjV:ubj)}(hhh]h)}(hbyteh]hbyte}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhj:ubah}(h]h ]h"]h$]h&]uh1jhjV:ubeh}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh](j)}(hhh]h)}(hDWh]hDW}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(hj7h]h3}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(hdouble word (8 bytes)h]hdouble word (8 bytes)}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhjA9ubeh}(h]h ]h"]h$]h&]colsKuh1jhj09ubeh}(h]id9ah ]h"]h$]h&]uh1jhj9ubh)}(hAInstructions using ``DW`` belong to the base64 conformance group.h](hInstructions using }(hj;hhhNhNubj )}(h``DW``h]hDW}(hj ;hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;ubh( belong to the base64 conformance group.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMjhj9ubeh}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hhhMjhjj5hhubj )}(h=**class** The instruction class (see `Instruction classes`_) h](j )}(h **class**h]jz)}(hj6;h]hclass}(hj8;hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj4;ubah}(h]h ]h"]h$]h&]uh1j hhhMmhj0;ubj )}(hhh]h)}(h2The instruction class (see `Instruction classes`_)h](hThe instruction class (see }(hjN;hhhNhNubh)}(h`Instruction classes`_h]hInstruction classes}(hjV;hhhNhNubah}(h]h ]h"]h$]h&]nameInstruction classesjjuh1hhjN;jM Kubh)}(hjN;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMmhjK;ubah}(h]h ]h"]h$]h&]uh1j hj0;ubeh}(h]h ]h"]h$]h&]uh1j hhhMmhjj5hhubeh}(h]h ]h"]h$]h&]uh1j hj4hhhNhNubj~)}(hhh](h)}(h!Regular load and store operationsh](h)}(hhh]h 1.4.1   }(hj;hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj;hhhNhNubh!Regular load and store operations}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]jKjj uh1hhj;hhhhhMpubh)}(hThe ``MEM`` mode modifier is used to encode regular load and store instructions that transfer data between a register and memory.h](hThe }(hj;hhhNhNubj )}(h``MEM``h]hMEM}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;ubhv mode modifier is used to encode regular load and store instructions that transfer data between a register and memory.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMrhj;hhubh)}(h``{MEM, , STX}`` means::h](j )}(h``{MEM, , STX}``h]h{MEM, , STX}}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;ubh means:}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMuhj;hhubj )}(h*(size *) (dst + offset) = srch]h*(size *) (dst + offset) = src}hj;sbah}(h]h ]h"]h$]h&]j j uh1j hhhMwhj;hhubh)}(h``{MEM, , ST}`` means::h](j )}(h``{MEM, , ST}``h]h{MEM, , ST}}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;ubh means:}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhj;hhubj )}(h*(size *) (dst + offset) = immh]h*(size *) (dst + offset) = imm}hj<sbah}(h]h ]h"]h$]h&]j j uh1j hhhM{hj;hhubh)}(h``{MEM, , LDX}`` means::h](j )}(h``{MEM, , LDX}``h]h{MEM, , LDX}}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubh means:}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM}hj;hhubj )}(h'dst = *(unsigned size *) (src + offset)h]h'dst = *(unsigned size *) (src + offset)}hj0<sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhj;hhubh)}(hnWhere '' is one of: ``B``, ``H``, ``W``, or ``DW``, and 'unsigned size' is one of: u8, u16, u32, or u64.h](hWhere ‘’ is one of: }(hj><hhhNhNubj )}(h``B``h]hB}(hjF<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj><ubh, }(hj><hhhNhNubj )}(h``H``h]hH}(hjX<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj><ubh, }hj><sbj )}(h``W``h]hW}(hjj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj><ubh, or }(hj><hhhNhNubj )}(h``DW``h]hDW}(hj|<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj><ubh:, and ‘unsigned size’ is one of: u8, u16, u32, or u64.}(hj><hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj;hhubeh}(h]j&ah ]h"]!regular load and store operationsah$]h&]uh1j}hj4hhhhhMpjKubj~)}(hhh](h)}(hSign-extension load operationsh](h)}(hhh]h 1.4.2   }(hj<hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj<hhhNhNubhSign-extension load operations}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]jKjjOuh1hhj<hhhhhMubh)}(hThe ``MEMSX`` mode modifier is used to encode :term:`sign-extension` load instructions that transfer data between a register and memory.h](hThe }(hj<hhhNhNubj )}(h ``MEMSX``h]hMEMSX}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubh! mode modifier is used to encode }(hj<hhhNhNubh)}(h#:term:`sign-extension`h]j )}(hj<h]hsign-extension}(hj<hhhNhNubah}(h]h ](j stdstd-termeh"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&]refdocj refdomainj<reftypeterm refexplicitrefwarnj Sign Extenduh1hhhhMhj<ubhD load instructions that transfer data between a register and memory.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubh)}(h ``{MEMSX, , LDX}`` means::h](j )}(h``{MEMSX, , LDX}``h]h{MEMSX, , LDX}}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubh means:}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubj )}(h%dst = *(signed size *) (src + offset)h]h%dst = *(signed size *) (src + offset)}hj=sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhj<hhubh)}(h_Where '' is one of: ``B``, ``H``, or ``W``, and 'signed size' is one of: s8, s16, or s32.h](hWhere ‘’ is one of: }(hj'=hhhNhNubj )}(h``B``h]hB}(hj/=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj'=ubh, }(hj'=hhhNhNubj )}(h``H``h]hH}(hjA=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj'=ubh, or }(hj'=hhhNhNubj )}(h``W``h]hW}(hjS=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj'=ubh3, and ‘signed size’ is one of: s8, s16, or s32.}(hj'=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubeh}(h]jUah ]h"]sign-extension load operationsah$]h&]uh1j}hj4hhhhhMjKubj~)}(hhh](h)}(hAtomic operationsh](h)}(hhh]h 1.4.3   }(hjy=hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhju=hhhNhNubhAtomic operations}(hju=hhhNhNubeh}(h]h ]h"]h$]h&]jKjj~uh1hhjr=hhhhhMubh)}(hAtomic operations are operations that operate on memory and can not be interrupted or corrupted by other access to the same memory region by other BPF programs or means outside of this specification.h]hAtomic operations are operations that operate on memory and can not be interrupted or corrupted by other access to the same memory region by other BPF programs or means outside of this specification.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubh)}(hxAll atomic operations supported by BPF are encoded as store operations that use the ``ATOMIC`` mode modifier as follows:h](hTAll atomic operations supported by BPF are encoded as store operations that use the }(hj=hhhNhNubj )}(h ``ATOMIC``h]hATOMIC}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj=ubh mode modifier as follows:}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubh)}(hhh](h)}(h_``{ATOMIC, W, STX}`` for 32-bit operations, which are part of the "atomic32" conformance group.h]h)}(h_``{ATOMIC, W, STX}`` for 32-bit operations, which are part of the "atomic32" conformance group.h](j )}(h``{ATOMIC, W, STX}``h]h{ATOMIC, W, STX}}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj=ubhO for 32-bit operations, which are part of the “atomic32” conformance group.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhNubh)}(h```{ATOMIC, DW, STX}`` for 64-bit operations, which are part of the "atomic64" conformance group.h]h)}(h```{ATOMIC, DW, STX}`` for 64-bit operations, which are part of the "atomic64" conformance group.h](j )}(h``{ATOMIC, DW, STX}``h]h{ATOMIC, DW, STX}}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj=ubhO for 64-bit operations, which are part of the “atomic64” conformance group.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhNubh)}(h;8-bit and 16-bit wide atomic operations are not supported. h]h)}(h:8-bit and 16-bit wide atomic operations are not supported.h]h:8-bit and 16-bit wide atomic operations are not supported.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj >ubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhNubeh}(h]h ]h"]h$]h&]j j uh1hhhhMhjr=hhubh)}(hThe 'imm' field is used to encode the actual atomic operation. Simple atomic operation use a subset of the values defined to encode arithmetic operations in the 'imm' field to encode the atomic operation:h]hThe ‘imm’ field is used to encode the actual atomic operation. Simple atomic operation use a subset of the values defined to encode arithmetic operations in the ‘imm’ field to encode the atomic operation:}(hj+>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubj)}(hhh](h)}(hSimple atomic operationsh]hSimple atomic operations}(hj<>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9>ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjJ>ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjJ>ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjJ>ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(himmh]himm}(hjt>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjq>ubah}(h]h ]h"]h$]h&]uh1jhjn>ubj)}(hhh]h)}(hvalueh]hvalue}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jhjn>ubj)}(hhh]h)}(h descriptionh]h description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jhjn>ubeh}(h]h ]h"]h$]h&]uh1jhjk>ubah}(h]h ]h"]h$]h&]uh1jhjJ>ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hADDh]hADD}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh]h)}(h0x00h]h0x00}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh]h)}(h atomic addh]h atomic add}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>ubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh](j)}(hhh]h)}(hORh]hOR}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h)}(h0x40h]h0x40}(hj0?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-?ubah}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h)}(h atomic orh]h atomic or}(hjG?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjD?ubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh](j)}(hhh]h)}(hANDh]hAND}(hjg?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjd?ubah}(h]h ]h"]h$]h&]uh1jhja?ubj)}(hhh]h)}(h0x50h]h0x50}(hj~?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{?ubah}(h]h ]h"]h$]h&]uh1jhja?ubj)}(hhh]h)}(h atomic andh]h atomic and}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jhja?ubeh}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh](j)}(hhh]h)}(hXORh]hXOR}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h)}(h0xa0h]h0xa0}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h)}(h atomic xorh]h atomic xor}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj?ubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhjJ>ubeh}(h]h ]h"]h$]h&]colsKuh1jhj9>ubeh}(h]id10ah ]h"]h$]h&]uh1jhjr=hhhhhNubh)}(h-``{ATOMIC, W, STX}`` with 'imm' = ADD means::h](j )}(h``{ATOMIC, W, STX}``h]h{ATOMIC, W, STX}}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj@ubh with ‘imm’ = ADD means:}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubj )}(h*(u32 *)(dst + offset) += srch]h*(u32 *)(dst + offset) += src}hj-@sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjr=hhubh)}(h.``{ATOMIC, DW, STX}`` with 'imm' = ADD means::h](j )}(h``{ATOMIC, DW, STX}``h]h{ATOMIC, DW, STX}}(hj?@hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;@ubh with ‘imm’ = ADD means:}(hj;@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubj )}(h*(u64 *)(dst + offset) += srch]h*(u64 *)(dst + offset) += src}hjW@sbah}(h]h ]h"]h$]h&]j j uh1j hhhMhjr=hhubh)}(hhIn addition to the simple atomic operations, there also is a modifier and two complex atomic operations:h]hhIn addition to the simple atomic operations, there also is a modifier and two complex atomic operations:}(hje@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubj)}(hhh](h)}(hComplex atomic operationsh]hComplex atomic operations}(hjv@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjs@ubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhj@ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj@ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj@ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(himmh]himm}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh]h)}(hvalueh]hvalue}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh]h)}(h descriptionh]h description}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hFETCHh]hFETCH}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh]h)}(h0x01h]h0x01}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh]h)}(hmodifier: return old valueh]hmodifier: return old value}(hj3AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0Aubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh](j)}(hhh]h)}(hXCHGh]hXCHG}(hjSAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPAubah}(h]h ]h"]h$]h&]uh1jhjMAubj)}(hhh]h)}(h 0xe0 | FETCHh]h 0xe0 | FETCH}(hjjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgAubah}(h]h ]h"]h$]h&]uh1jhjMAubj)}(hhh]h)}(hatomic exchangeh]hatomic exchange}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~Aubah}(h]h ]h"]h$]h&]uh1jhjMAubeh}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh](j)}(hhh]h)}(hCMPXCHGh]hCMPXCHG}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjAubj)}(hhh]h)}(h 0xf0 | FETCHh]h 0xf0 | FETCH}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjAubj)}(hhh]h)}(hatomic compare and exchangeh]hatomic compare and exchange}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]colsKuh1jhjs@ubeh}(h]id11ah ]h"]h$]h&]uh1jhjr=hhhhhNubh)}(hThe ``FETCH`` modifier is optional for simple atomic operations, and always set for the complex atomic operations. If the ``FETCH`` flag is set, then the operation also overwrites ``src`` with the value that was in memory before it was modified.h](hThe }(hjAhhhNhNubj )}(h ``FETCH``h]hFETCH}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjAubhn modifier is optional for simple atomic operations, and always set for the complex atomic operations. If the }(hjAhhhNhNubj )}(h ``FETCH``h]hFETCH}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjAubh1 flag is set, then the operation also overwrites }(hjAhhhNhNubj )}(h``src``h]hsrc}(hj)BhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjAubh: with the value that was in memory before it was modified.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubh)}(haThe ``XCHG`` operation atomically exchanges ``src`` with the value addressed by ``dst + offset``.h](hThe }(hjABhhhNhNubj )}(h``XCHG``h]hXCHG}(hjIBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjABubh operation atomically exchanges }(hjABhhhNhNubj )}(h``src``h]hsrc}(hj[BhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjABubh with the value addressed by }(hjABhhhNhNubj )}(h``dst + offset``h]h dst + offset}(hjmBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjABubh.}(hjABhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubh)}(hX+The ``CMPXCHG`` operation atomically compares the value addressed by ``dst + offset`` with ``R0``. If they match, the value addressed by ``dst + offset`` is replaced with ``src``. In either case, the value that was at ``dst + offset`` before the operation is zero-extended and loaded back to ``R0``.h](hThe }(hjBhhhNhNubj )}(h ``CMPXCHG``h]hCMPXCHG}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjBubh6 operation atomically compares the value addressed by }(hjBhhhNhNubj )}(h``dst + offset``h]h dst + offset}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjBubh with }(hjBhhhNhNubj )}(h``R0``h]hR0}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjBubh(. If they match, the value addressed by }(hjBhhhNhNubj )}(h``dst + offset``h]h dst + offset}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjBubh is replaced with }(hjBhhhNhNubj )}(h``src``h]hsrc}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjBubh(. In either case, the value that was at }(hjBhhhNhNubj )}(h``dst + offset``h]h dst + offset}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjBubh: before the operation is zero-extended and loaded back to }(hjBhhhNhNubj )}(h``R0``h]hR0}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjBubh.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjr=hhubeh}(h]jah ]h"]atomic operationsah$]h&]uh1j}hj4hhhhhMjKubj~)}(hhh](h)}(h64-bit immediate instructionsh](h)}(hhh]h 1.4.4   }(hjChhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjChhhNhNubh64-bit immediate instructions}(hjChhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhjChhhhhMubh)}(hInstructions with the ``IMM`` 'mode' modifier use the wide instruction encoding defined in `Instruction encoding`_, and use the 'src_reg' field of the basic instruction to hold an opcode subtype.h](hInstructions with the }(hj6ChhhNhNubj )}(h``IMM``h]hIMM}(hj>ChhhNhNubah}(h]h ]h"]h$]h&]uh1j hj6CubhB ‘mode’ modifier use the wide instruction encoding defined in }(hj6ChhhNhNubh)}(h`Instruction encoding`_h]hInstruction encoding}(hjPChhhNhNubah}(h]h ]h"]h$]h&]nameInstruction encodingjj uh1hhj6CjM KubhU, and use the ‘src_reg’ field of the basic instruction to hold an opcode subtype.}(hj6ChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjChhubh)}(hThe following table defines a set of ``{IMM, DW, LD}`` instructions with opcode subtypes in the 'src_reg' field, using new terms such as "map" defined further below:h](h%The following table defines a set of }(hjjChhhNhNubj )}(h``{IMM, DW, LD}``h]h {IMM, DW, LD}}(hjrChhhNhNubah}(h]h ]h"]h$]h&]uh1j hjjCubhw instructions with opcode subtypes in the ‘src_reg’ field, using new terms such as “map” defined further below:}(hjjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjChhubj)}(hhh](h)}(h64-bit immediate instructionsh]h64-bit immediate instructions}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjCubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK)uh1jhjCubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjCubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjCubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hsrc_regh]hsrc_reg}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh]h)}(h pseudocodeh]h pseudocode}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh]h)}(himm typeh]himm type}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh]h)}(hdst typeh]hdst type}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hj=DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:Dubah}(h]h ]h"]h$]h&]uh1jhj7Dubj)}(hhh]h)}(hdst = (next_imm << 32) | immh]hdst = (next_imm << 32) | imm}(hjTDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQDubah}(h]h ]h"]h$]h&]uh1jhj7Dubj)}(hhh]h)}(hintegerh]hinteger}(hjkDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhDubah}(h]h ]h"]h$]h&]uh1jhj7Dubj)}(hhh]h)}(hintegerh]hinteger}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhj7Dubeh}(h]h ]h"]h$]h&]uh1jhj4Dubj)}(hhh](j)}(hhh]h)}(h0x1h]h0x1}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhjDubj)}(hhh]h)}(hdst = map_by_fd(imm)h]hdst = map_by_fd(imm)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhjDubj)}(hhh]h)}(hmap fdh]hmap fd}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhjDubj)}(hhh]h)}(hmaph]hmap}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1jhj4Dubj)}(hhh](j)}(hhh]h)}(h0x2h]h0x2}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh]h)}(h(dst = map_val(map_by_fd(imm)) + next_immh]h(dst = map_val(map_by_fd(imm)) + next_imm}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh]h)}(hmap fdh]hmap fd}(hj5EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2Eubah}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh]h)}(h data addressh]h data address}(hjLEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIEubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhj4Dubj)}(hhh](j)}(hhh]h)}(h0x3h]h0x3}(hjlEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjiEubah}(h]h ]h"]h$]h&]uh1jhjfEubj)}(hhh]h)}(hdst = var_addr(imm)h]hdst = var_addr(imm)}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjfEubj)}(hhh]h)}(h variable idh]h variable id}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjfEubj)}(hhh]h)}(h data addressh]h data address}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjfEubeh}(h]h ]h"]h$]h&]uh1jhj4Dubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh]h)}(hdst = code_addr(imm)h]hdst = code_addr(imm)}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh]h)}(hintegerh]hinteger}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jhjEubj)}(hhh]h)}(h code addressh]h code address}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhj4Dubj)}(hhh](j)}(hhh]h)}(h0x5h]h0x5}(hj6FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3Fubah}(h]h ]h"]h$]h&]uh1jhj0Fubj)}(hhh]h)}(hdst = map_by_idx(imm)h]hdst = map_by_idx(imm)}(hjMFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJFubah}(h]h ]h"]h$]h&]uh1jhj0Fubj)}(hhh]h)}(h map indexh]h map index}(hjdFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaFubah}(h]h ]h"]h$]h&]uh1jhj0Fubj)}(hhh]h)}(hmaph]hmap}(hj{FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxFubah}(h]h ]h"]h$]h&]uh1jhj0Fubeh}(h]h ]h"]h$]h&]uh1jhj4Dubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h)dst = map_val(map_by_idx(imm)) + next_immh]h)dst = map_val(map_by_idx(imm)) + next_imm}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h map indexh]h map index}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h data addressh]h data address}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjFubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhj4Dubeh}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]colsKuh1jhjCubeh}(h]id12ah ]h"]h$]h&]uh1jhjChhhhhNubh)}(hwhereh]hwhere}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjChhubh)}(hhh](h)}(h_map_by_fd(imm) means to convert a 32-bit file descriptor into an address of a map (see `Maps`_)h]h)}(hj!Gh](hWmap_by_fd(imm) means to convert a 32-bit file descriptor into an address of a map (see }(hj#GhhhNhNubh)}(h`Maps`_h]hMaps}(hj*GhhhNhNubah}(h]h ]h"]h$]h&]nameMapsjjuh1hhj#GjM Kubh)}(hj#GhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhNubh)}(hHmap_by_idx(imm) means to convert a 32-bit index into an address of a maph]h)}(hjLGh]hHmap_by_idx(imm) means to convert a 32-bit index into an address of a map}(hjNGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJGubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhNubh)}(h?map_val(map) gets the address of the first value in a given maph]h)}(hjcGh]h?map_val(map) gets the address of the first value in a given map}(hjeGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaGubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhNubh)}(havar_addr(imm) gets the address of a platform variable (see `Platform Variables`_) with a given idh]h)}(hjzGh](h;var_addr(imm) gets the address of a platform variable (see }(hj|GhhhNhNubh)}(h`Platform Variables`_h]hPlatform Variables}(hjGhhhNhNubah}(h]h ]h"]h$]h&]namePlatform Variablesjjuh1hhj|GjM Kubh) with a given id}(hj|GhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjxGubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhNubh)}(htcode_addr(imm) gets the address of the instruction at a specified relative offset in number of (64-bit) instructionsh]h)}(hjGh]htcode_addr(imm) gets the address of the instruction at a specified relative offset in number of (64-bit) instructions}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhNubh)}(h7the 'imm type' can be used by disassemblers for displayh]h)}(hjGh]h;the ‘imm type’ can be used by disassemblers for display}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhNubh)}(hIthe 'dst type' can be used for verification and JIT compilation purposes h]h)}(hHthe 'dst type' can be used for verification and JIT compilation purposesh]hLthe ‘dst type’ can be used for verification and JIT compilation purposes}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1hhjGhhhhhNubeh}(h]h ]h"]h$]h&]j j uh1hhhhMhjChhubj~)}(hhh](h)}(hMapsh](h)}(hhh]h 1.4.4.1   }(hjGhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjGhhhNhNubhMaps}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhjGhhhhhMubh)}(hX5Maps are shared memory regions accessible by BPF programs on some platforms. A map can have various semantics as defined in a separate document, and may or may not have a single contiguous memory region, but the 'map_val(map)' is currently only defined for maps that do have a single contiguous memory region.h]hX9Maps are shared memory regions accessible by BPF programs on some platforms. A map can have various semantics as defined in a separate document, and may or may not have a single contiguous memory region, but the ‘map_val(map)’ is currently only defined for maps that do have a single contiguous memory region.}(hj HhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGhhubh)}(hXEach map can have a file descriptor (fd) if supported by the platform, where 'map_by_fd(imm)' means to get the map with the specified file descriptor. Each BPF program can also be defined to use a set of maps associated with the program at load time, and 'map_by_idx(imm)' means to get the map with the given index in the set associated with the BPF program containing the instruction.h]hXEach map can have a file descriptor (fd) if supported by the platform, where ‘map_by_fd(imm)’ means to get the map with the specified file descriptor. Each BPF program can also be defined to use a set of maps associated with the program at load time, and ‘map_by_idx(imm)’ means to get the map with the given index in the set associated with the BPF program containing the instruction.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGhhubeh}(h]jah ]h"]mapsah$]h&]uh1j}hjChhhhhMjKubj~)}(hhh](h)}(hPlatform Variablesh](h)}(hhh]h 1.4.4.2   }(hj7HhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj3HhhhNhNubhPlatform Variables}(hj3HhhhNhNubeh}(h]h ]h"]h$]h&]jKjjuh1hhj0HhhhhhMubh)}(hPlatform variables are memory regions, identified by integer ids, exposed by the runtime and accessible by BPF programs on some platforms. The 'var_addr(imm)' operation means to get the address of the memory region identified by the given id.h]hPlatform variables are memory regions, identified by integer ids, exposed by the runtime and accessible by BPF programs on some platforms. The ‘var_addr(imm)’ operation means to get the address of the memory region identified by the given id.}(hjNHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0Hhhubeh}(h]jah ]h"]platform variablesah$]h&]uh1j}hjChhhhhMjKubeh}(h]jah ]h"]64-bit immediate instructionsah$]h&]uh1j}hj4hhhhhMjKubj~)}(hhh](h)}(h%Legacy BPF Packet access instructionsh](h)}(hhh]h 1.4.5   }(hjqHhhhNhNubah}(h]h ]hah"]h$]h&]uh1hhjmHhhhNhNubh%Legacy BPF Packet access instructions}(hjmHhhhNhNubeh}(h]h ]h"]h$]h&]jKjjCuh1hhjjHhhhhhMubh)}(hXBPF previously introduced special instructions for access to packet data that were carried over from classic BPF. These instructions used an instruction class of ``LD``, a size modifier of ``W``, ``H``, or ``B``, and a mode modifier of ``ABS`` or ``IND``. The 'dst_reg' and 'offset' fields were set to zero, and 'src_reg' was set to zero for ``ABS``. However, these instructions are deprecated and SHOULD no longer be used. All legacy packet access instructions belong to the "packet" conformance group.h](hBPF previously introduced special instructions for access to packet data that were carried over from classic BPF. These instructions used an instruction class of }(hjHhhhNhNubj )}(h``LD``h]hLD}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubh, a size modifier of }(hjHhhhNhNubj )}(h``W``h]hW}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubh, }(hjHhhhNhNubj )}(h``H``h]hH}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubh, or }(hjHhhhNhNubj )}(h``B``h]hB}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubh, and a mode modifier of }(hjHhhhNhNubj )}(h``ABS``h]hABS}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubh or }(hjHhhhNhNubj )}(h``IND``h]hIND}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubhe. The ‘dst_reg’ and ‘offset’ fields were set to zero, and ‘src_reg’ was set to zero for }(hjHhhhNhNubj )}(h``ABS``h]hABS}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubh. However, these instructions are deprecated and SHOULD no longer be used. All legacy packet access instructions belong to the “packet” conformance group.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjjHhhubeh}(h]jIah ]h"]%legacy bpf packet access instructionsah$]h&]uh1j}hj4hhhhhMjKubeh}(h]jah ]h"]load and store instructionsah$]h&]uh1j}hjhhhhhMCjKubeh}(h]hah ]h"]&bpf instruction set architecture (isa)ah$]h&]uh1j}hhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjKIerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(atomic operations](j= j8einstruction classes](jjdjV;e64-bit immediate instructions](jj6eload and store instructions](jj*jj e arithmetic and jump instructions](jzjjZjebyte swap instructions]jS!ahelper functions](jN/jf0eprogram-local functions]j/a%legacy bpf packet access instructions](j7js7e!regular load and store operations]j7asign-extension load operations]jS8ainstruction encoding]jPCamaps]j*Gaplatform variables]jGaurefids}nameids}(jzjvj&Ihj jjjjjjb j@j joj j j jj jj Cj jj5jjdjjj4jje&jj)j)j4jXj4jj4jjIjj<j&jo=jUjCjjgHjj-Hjj`HjjIjIu nametypes}(jzj&Ij jjjb j j j j j jjjj4je&j)j4j4j4jIj<jo=jCjgHj-Hj`HjIuh}(jvhhjjjjjjjj@j;joje j j jj j j jj j j j5j4jdjjjjj jjj)jh&jXj)jj44jj4jj4j&j;jUj<jjr=jjCjjGjj0HjIjjHjjj' jjjj-jj!jj(j 'j3j)j8j5j:j09j @j9>jAjs@j GjChhjhj:j$jijSjjjjjjj/jj^jHjjwjjjjj#j jRj<j~jhjjjjj j jOj9j~jhjjjjjjjCj-u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jYIK$sRparse_messages]transform_messages] transformerN include_log] decorationNhhub.