rfc9669xml2.original.xml | rfc9669.xml | |||
---|---|---|---|---|
<?xml version="1.0" encoding="UTF-8"?> | <?xml version='1.0' encoding='utf-8'?> | |||
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?> | ||||
<!-- generated by https://github.com/dthaler/rst2rfcxml version 0.1 --> | ||||
<!DOCTYPE rfc [ | <!DOCTYPE rfc [ | |||
<!ENTITY nbsp " "> | ||||
<!ENTITY zwsp "​"> | ||||
<!ENTITY nbhy "‑"> | ||||
<!ENTITY wj "⁠"> | ||||
]> | ]> | |||
<?rfc rfcedstyle="yes"?> | <rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft | |||
<?rfc toc="yes"?> | -ietf-bpf-isa-04" number="9669" updates="" obsoletes="" consensus="true" catego | |||
<?rfc tocindent="yes"?> | ry="std" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" | |||
<?rfc sortrefs="yes"?> | version="3" xml:lang="en"> | |||
<?rfc symrefs="yes"?> | ||||
<?rfc strict="yes"?> | ||||
<?rfc comments="yes"?> | ||||
<?rfc inline="yes"?> | ||||
<?rfc text-list-symbols="-o*+"?> | ||||
<?rfc docmapping="yes"?> | ||||
<rfc ipr="trust200902" docName="draft-ietf-bpf-isa-04" category="std" submission | <front> | |||
Type="IETF"> | <title abbrev="BPF ISA">BPF Instruction Set Architecture (ISA)</title> | |||
<front> | <seriesInfo name="RFC" value="9669"/> | |||
<title abbrev="BPF ISA"> | <author initials="D." surname="Thaler" fullname="Dave Thaler" role="editor"> | |||
BPF Instruction Set Architecture (ISA) | <address> | |||
</title> | <postal> | |||
<author initials="D." surname="Thaler" fullname="Dave Thaler" role="editor"> | <city>Redmond</city> | |||
<address> | <code>98052</code> | |||
<postal> | <country>United States of America</country> | |||
<city>Redmond</city> | <region>WA</region> | |||
<code>98052</code> | </postal> | |||
<country>USA</country> | <email>dave.thaler.ietf@gmail.com</email> | |||
<region>WA</region> | </address> | |||
</postal> | </author> | |||
<email>dave.thaler.ietf@gmail.com</email> | <date month="October" year="2024"/> | |||
</address> | <area>INT</area> | |||
</author> | <workgroup>bdf</workgroup> | |||
<abstract> | ||||
<t> | <keyword>eBPF</keyword> | |||
eBPF (which is no longer an acronym for anything), also commonly referred to | <keyword>virtual machine</keyword> | |||
as BPF, is a technology with origins in the Linux kernel that can run untrusted | <keyword>extensibility</keyword> | |||
programs in a privileged context such as an operating system kernel. This docum | ||||
ent specifies the BPF instruction set architecture (ISA). | <abstract> | |||
</t> | <t> eBPF (which is no longer an acronym for anything), also commonly | |||
</abstract> | referred to as BPF, is a technology with origins in the Linux kernel | |||
</front> | that can run untrusted programs in a privileged context such as an | |||
<middle> | operating system kernel. This document specifies the BPF instruction set | |||
<section anchor="introduction" title="Introduction"> | architecture (ISA). | |||
<t> | </t> | |||
</abstract> | ||||
</front> | ||||
<middle> | ||||
<section anchor="introduction"> | ||||
<name>Introduction</name> | ||||
<t> | ||||
eBPF, also commonly | eBPF, also commonly | |||
referred to as BPF, is a technology with origins in the Linux kernel | 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 | that can run untrusted programs in a privileged context such as an | |||
operating system kernel. This document specifies the BPF instruction | operating system kernel. This document specifies the BPF instruction | |||
set architecture (ISA). | set architecture (ISA). | |||
</t> | </t> | |||
<t> | <t> | |||
As a historical note, BPF originally stood for Berkeley Packet Filter, | As a historical note, BPF originally stood for Berkeley Packet Filter, | |||
but now that it can do so much more than packet filtering, the acronym | 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 | no longer makes sense. BPF is now considered a standalone term that | |||
does not stand for anything. The original BPF is sometimes referred to | does not stand for anything. The original BPF is sometimes referred to | |||
as cBPF (classic BPF) to distinguish it from the now widely deployed | as cBPF (classic BPF) to distinguish it from the now widely deployed | |||
eBPF (extended BPF). | eBPF (extended BPF). | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="documentation-conventions" title="Documentation conventions"> | <section anchor="documentation-conventions"> | |||
<t> | <name>Documentation Conventions</name> | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | <t> | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", | |||
"OPTIONAL" in this document are to be interpreted as described in | "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14> | |||
BCP 14 <xref target="RFC2119"></xref> | ", | |||
<xref target="RFC8174"></xref> | "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", | |||
when, and only when, they appear in all capitals, as shown here. | "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", | |||
</t> | "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to | |||
<t> | be | |||
interpreted as described in BCP 14 <xref target="RFC2119"/> <xref | ||||
target="RFC8174"/> when, and only when, they appear in all capitals, as | ||||
shown here. | ||||
</t> | ||||
<t> | ||||
For brevity and consistency, this document refers to families | For brevity and consistency, this document refers to families | |||
of types using a shorthand syntax and refers to several expository, | of types using a shorthand syntax and refers to several expository, | |||
mnemonic functions when describing the semantics of instructions. | mnemonic functions when describing the semantics of instructions. | |||
The range of valid values for those types and the semantics of those | The range of valid values for those types and the semantics of those | |||
functions are defined in the following subsections. | functions are defined in the following subsections. | |||
</t> | </t> | |||
<section anchor="types" title="Types"> | <section anchor="types"> | |||
<t> | <name>Types</name> | |||
This document refers to integer types with the notation <em>SN</em> to spec | ||||
ify | ||||
a type's signedness (<em>S</em>) and bit width (<em>N</em>), respectively. | ||||
</t> | ||||
<table> | ||||
<name>Meaning of signedness notation</name> | ||||
<thead> | ||||
<tr> | ||||
<th>S</th> | ||||
<th>Meaning</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | <t> | |||
u | This document refers to integer types with the notation SN to specify | |||
a type's signedness (S) and bit width (N), respectively. | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Meaning of Signedness Notation</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>S</th> | ||||
<th>Meaning</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
u | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
unsigned | unsigned | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
s | s | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
signed | signed | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<table> | <table> | |||
<name>Meaning of bit-width notation</name> | <name>Meaning of Bit-Width Notation</name> | |||
<thead> | <thead> | |||
<tr> | <tr> | |||
<th>N</th> | <th>N</th> | |||
<th>Bit width</th> | <th>Bit Width</th> | |||
</tr> | </tr> | |||
</thead> | </thead> | |||
<tbody> | <tbody> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
8 | 8 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
8 bits | 8 bits | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
16 | 16 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
16 bits | 16 bits | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
32 | 32 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
32 bits | 32 bits | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
64 | 64 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
64 bits | 64 bits | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
128 | 128 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
128 bits | 128 bits | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
For example, <em>u32</em> is a type whose valid values are all the 32-bit u nsigned | For example, <em>u32</em> is a type whose valid values are all the 32-bit u nsigned | |||
numbers and <em>s16</em> is a type whose valid values are all the 16-bit si gned | numbers and <em>s16</em> is a type whose valid values are all the 16-bit si gned | |||
numbers. | numbers. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="functions" title="Functions"> | <section anchor="functions"> | |||
<t> | <name>Functions</name> | |||
The following byteswap functions are direction-agnostic. That is, | <t> | |||
The following byte swap functions are direction agnostic. That is, | ||||
the same function is used for conversion in either direction discussed | the same function is used for conversion in either direction discussed | |||
below. | below. | |||
</t> | </t> | |||
<ul> | <ul> | |||
<li> | <li> | |||
be16: Takes an unsigned 16-bit number and converts it between | be16: Takes an unsigned 16-bit number and converts it between | |||
host byte order and big-endian | host byte order and big-endian | |||
(<xref target="IEN137">IEN137</xref>) byte order. | byte order <xref target="IEN137"/>. | |||
</li> | </li> | |||
<li> | <li> | |||
be32: Takes an unsigned 32-bit number and converts it between | be32: Takes an unsigned 32-bit number and converts it between | |||
host byte order and big-endian byte order. | host byte order and big-endian byte order. | |||
</li> | </li> | |||
<li> | <li> | |||
be64: Takes an unsigned 64-bit number and converts it between | be64: Takes an unsigned 64-bit number and converts it between | |||
host byte order and big-endian byte order. | host byte order and big-endian byte order. | |||
</li> | </li> | |||
<li> | <li> | |||
bswap16: Takes an unsigned 16-bit number in either big- or little-endian | bswap16: Takes an unsigned 16-bit number in either big- or little-endian | |||
format and returns the equivalent number with the same bit width but | format and returns the equivalent number with the same bit width but | |||
opposite endianness. | opposite endianness. | |||
</li> | </li> | |||
<li> | <li> | |||
bswap32: Takes an unsigned 32-bit number in either big- or little-endian | bswap32: Takes an unsigned 32-bit number in either big- or little-endian | |||
format and returns the equivalent number with the same bit width but | format and returns the equivalent number with the same bit width but | |||
opposite endianness. | opposite endianness. | |||
</li> | </li> | |||
<li> | <li> | |||
bswap64: Takes an unsigned 64-bit number in either big- or little-endian | bswap64: Takes an unsigned 64-bit number in either big- or little-endian | |||
format and returns the equivalent number with the same bit width but | format and returns the equivalent number with the same bit width but | |||
opposite endianness. | opposite endianness. | |||
</li> | </li> | |||
<li> | <li> | |||
le16: Takes an unsigned 16-bit number and converts it between | le16: Takes an unsigned 16-bit number and converts it between | |||
host byte order and little-endian byte order. | host byte order and little-endian byte order. | |||
</li> | </li> | |||
<li> | <li> | |||
le32: Takes an unsigned 32-bit number and converts it between | le32: Takes an unsigned 32-bit number and converts it between | |||
host byte order and little-endian byte order. | host byte order and little-endian byte order. | |||
</li> | </li> | |||
<li> | <li> | |||
le64: Takes an unsigned 64-bit number and converts it between | le64: Takes an unsigned 64-bit number and converts it between | |||
host byte order and little-endian byte order. | host byte order and little-endian byte order. | |||
</li> | </li> | |||
</ul> | </ul> | |||
</section> | </section> | |||
<section anchor="definitions" title="Definitions"> | <section anchor="definitions"> | |||
<dl> | <name>Definitions</name> | |||
<dt anchor="term-sign-extend"> | <dl> | |||
Sign Extend | <dt anchor="term-sign-extend"> | |||
</dt> | Sign Extend: | |||
<dd> | </dt> | |||
<t> | <dd> | |||
To <em>sign extend an</em> <tt>X</tt> <em>-bit number, A, to a</em> <tt>Y | <t>To sign extend an <tt>X</tt>-bit number, A, to a <tt>Y</tt>-bit | |||
</tt> <em>-bit number, B ,</em> means to | number, B, means to | |||
</t> | </t> | |||
<ol> | <ol> | |||
<li> | <li> | |||
Copy all <tt>X</tt> bits from <em>A</em> to the lower <tt>X</tt> bits of <em>B</em>. | Copy all <tt>X</tt> bits from A to the lower <tt>X</tt> bits of B. | |||
</li> | </li> | |||
<li> | <li> | |||
Set the value of the remaining <tt>Y</tt> - <tt>X</tt> bits of <em>B</em | Set the value of the remaining <tt>Y</tt> - <tt>X</tt> bits of B to the | |||
> to the value of | value of | |||
the most-significant bit of <em>A</em>. | the most significant bit of A. | |||
</li> | </li> | |||
</ol> | </ol> | |||
</dd> | </dd> | |||
</dl> | </dl> | |||
<aside> | <aside> | |||
<t><strong>Example</strong></t> | <t><strong>Example</strong></t> | |||
<t> | <t> | |||
Sign extend an 8-bit number <tt>A</tt> to a 16-bit number <tt>B</tt> on a | Sign extend an 8-bit number A to a 16-bit number B on a big-endian platfor | |||
big-endian platform: | m: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
A: 10000110 | A: 10000110 | |||
B: 11111111 10000110 | B: 11111111 10000110 | |||
</artwork> | ]]></artwork> | |||
</aside> | </aside> | |||
</section> | </section> | |||
<section anchor="conformance-groups" title="Conformance groups"> | <section anchor="conformance-groups"> | |||
<t> | <name>Conformance Groups</name> | |||
<t> | ||||
An implementation does not need to support all instructions specified in th is | An implementation does not need to support all instructions specified in th is | |||
document (e.g., deprecated instructions). Instead, a number of conformance | document (e.g., deprecated instructions). Instead, a number of conformance | |||
groups are specified. An implementation MUST support the base32 conformanc | groups are specified. An implementation <bcp14>MUST</bcp14> support the ba | |||
e | se32 conformance | |||
group and MAY support additional conformance groups, where supporting a | group and <bcp14>MAY</bcp14> support additional conformance groups, where s | |||
conformance group means it MUST support all instructions in that conformanc | upporting a | |||
e | conformance group means it <bcp14>MUST</bcp14> support all instructions in | |||
that conformance | ||||
group. | group. | |||
</t> | </t> | |||
<t> | <t> | |||
The use of named conformance groups enables interoperability between a runt ime | The use of named conformance groups enables interoperability between a runt ime | |||
that executes instructions, and tools such as compilers that generate | that executes instructions, and tools such as compilers that generate | |||
instructions for the runtime. Thus, capability discovery in terms of | instructions for the runtime. Thus, capability discovery in terms of | |||
conformance groups might be done manually by users or automatically by tool s. | conformance groups might be done manually by users or automatically by tool s. | |||
</t> | </t> | |||
<t> | <t> | |||
Each conformance group has a short ASCII label (e.g., "base32") that | Each conformance group has a short ASCII label (e.g., "base32") that | |||
corresponds to a set of instructions that are mandatory. That is, each | corresponds to a set of instructions that are mandatory. That is, each | |||
instruction has one or more conformance groups of which it is a member. | instruction has one or more conformance groups of which it is a member. | |||
</t> | </t> | |||
<t> | <t> | |||
This document defines the following conformance groups: | This document defines the following conformance groups: | |||
</t> | </t> | |||
<ul> | <dl> | |||
<li> | <dt>base32:</dt><dd> includes all instructions defined in this | |||
base32: includes all instructions defined in this | specification unless otherwise noted.</dd> | |||
specification unless otherwise noted. | <dt> | |||
</li> | base64:</dt><dd> includes base32, plus instructions explicitly noted | |||
<li> | as being in the base64 conformance group.</dd> | |||
base64: includes base32, plus instructions explicitly noted | ||||
as being in the base64 conformance group. | <dt> | |||
</li> | atomic32:</dt><dd> includes 32-bit atomic operation instructions (see <xre | |||
<li> | f target="atomic-operations"/>).</dd> | |||
atomic32: includes 32-bit atomic operation instructions (see <xref target= | ||||
"atomic-operations">Atomic operations</xref>). | <dt> | |||
</li> | atomic64:</dt><dd> includes atomic32, plus 64-bit atomic operation instruc | |||
<li> | tions. | |||
atomic64: includes atomic32, plus 64-bit atomic operation instructions. | </dd> | |||
</li> | <dt> | |||
<li> | divmul32:</dt><dd> includes 32-bit division, multiplication, and modulo in | |||
divmul32: includes 32-bit division, multiplication, and modulo instruction | structions. | |||
s. | </dd> | |||
</li> | <dt> | |||
<li> | divmul64:</dt><dd> includes divmul32, plus 64-bit division, multiplication | |||
divmul64: includes divmul32, plus 64-bit division, multiplication, | , | |||
and modulo instructions. | and modulo instructions. | |||
</li> | </dd> | |||
<li> | <dt> | |||
packet: deprecated packet access instructions. | packet:</dt> <dd>deprecated packet access instructions. | |||
</li> | </dd> | |||
</ul> | </dl> | |||
</section> | </section> | |||
</section> | </section> | |||
<section anchor="instruction-encoding" title="Instruction encoding"> | <section anchor="instruction-encoding"> | |||
<t> | <name>Instruction Encoding</name> | |||
<t> | ||||
BPF has two instruction encodings: | BPF has two instruction encodings: | |||
</t> | </t> | |||
<ul> | <ul> | |||
<li> | <li> | |||
the basic instruction encoding, which uses 64 bits to encode an instruction | the basic instruction encoding, which uses 64 bits to encode an instruction | |||
</li> | </li> | |||
<li> | <li> | |||
the wide instruction encoding, which appends a second 64 bits | the wide instruction encoding, which appends a second 64 bits | |||
after the basic instruction for a total of 128 bits. | after the basic instruction for a total of 128 bits. | |||
</li> | </li> | |||
</ul> | </ul> | |||
<section anchor="basic-instruction-encoding" title="Basic instruction encodin | <section anchor="basic-instruction-encoding"> | |||
g"> | <name>Basic Instruction Encoding</name> | |||
<t> | <t> | |||
A basic instruction is encoded as follows: | A basic instruction is encoded as follows: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| opcode | regs | offset | | | opcode | regs | offset | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| imm | | | imm | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
</artwork> | ]]></artwork> | |||
<dl> | <dl> | |||
<dt anchor="term---opcode--"> | <dt anchor="term---opcode--"> | |||
<strong>opcode</strong> | <strong>opcode:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
operation to perform, encoded as follows: | operation to perform, encoded as follows: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
|specific |class| | |specific |class| | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
</artwork> | ]]></artwork> | |||
<dl> | <dl> | |||
<dt anchor="term---specific--"> | <dt anchor="term---specific--"> | |||
<strong>specific</strong> | <strong>specific:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
The format of these bits varies by instruction class | The format of these bits varies by instruction class | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---class--"> | <dt anchor="term---class--"> | |||
<strong>class</strong> | <strong>class:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
The instruction class (see <xref target="instruction-classes">Instructi | the instruction class (see <xref target="instruction-classes"/>) | |||
on classes</xref>) | </t> | |||
</t> | </dd> | |||
</dd> | </dl> | |||
</dl> | </dd> | |||
</dd> | <dt anchor="term---regs--"> | |||
<dt anchor="term---regs--"> | <strong>regs:</strong> | |||
<strong>regs</strong> | </dt> | |||
</dt> | <dd> | |||
<dd> | <t> | |||
<t> | the source and destination register numbers, encoded as follows | |||
The source and destination register numbers, encoded as follows | ||||
on a little-endian host: | on a little-endian host: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
|src_reg|dst_reg| | |src_reg|dst_reg| | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
and as follows on a big-endian host: | and as follows on a big-endian host: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
|dst_reg|src_reg| | |dst_reg|src_reg| | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
</artwork> | ]]></artwork> | |||
<dl> | <dl> | |||
<dt anchor="term---src_reg--"> | <dt anchor="term---src_reg--"> | |||
<strong>src_reg</strong> | <strong>src_reg:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
the source register number (0-10), except where otherwise specified | the source register number (0-10), except where otherwise specified | |||
(<xref target="-4-bit-immediate-instructions">64-bit immediate instruct | (64-bit immediate instructions (see <xref target="_4-bit-immediate-inst | |||
ions</xref> reuse this field for other purposes) | ructions"/>) reuse this field for other purposes) | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---dst_reg--"> | <dt anchor="term---dst_reg--"> | |||
<strong>dst_reg</strong> | <strong>dst_reg:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
destination register number (0-10), unless otherwise specified | the destination register number (0-10), unless otherwise specified | |||
(future instructions might reuse this field for other purposes) | (future instructions might reuse this field for other purposes) | |||
</t> | </t> | |||
</dd> | </dd> | |||
</dl> | </dl> | |||
</dd> | </dd> | |||
<dt anchor="term---offset--"> | <dt anchor="term---offset--"> | |||
<strong>offset</strong> | <strong>offset:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
signed integer offset used with pointer arithmetic, except where | signed integer offset used with pointer arithmetic, except where | |||
otherwise specified (some arithmetic instructions reuse this field | otherwise specified (some arithmetic instructions reuse this field | |||
for other purposes) | for other purposes) | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---imm--"> | <dt anchor="term---imm--"> | |||
<strong>imm</strong> | <strong>imm:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
signed integer immediate value | signed integer immediate value | |||
</t> | </t> | |||
</dd> | </dd> | |||
</dl> | </dl> | |||
<t> | <t> | |||
Note that the contents of multi-byte fields ('offset' and 'imm') are | Note that the contents of multi-byte fields ('offset' and 'imm') are | |||
stored using big-endian byte ordering on big-endian hosts and | stored using big-endian byte ordering on big-endian hosts and | |||
little-endian byte ordering on little-endian hosts. | little-endian byte ordering on little-endian hosts. | |||
</t> | </t> | |||
<t> | <t> | |||
For example: | For example: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
opcode offset imm assembly | opcode offset imm assembly | |||
src_reg dst_reg | src_reg dst_reg | |||
07 0 1 00 00 44 33 22 11 r1 += 0x11223344 // little | 07 0 1 00 00 44 33 22 11 r1 += 0x11223344 // little | |||
dst_reg src_reg | dst_reg src_reg | |||
07 1 0 00 00 11 22 33 44 r1 += 0x11223344 // big | 07 1 0 00 00 11 22 33 44 r1 += 0x11223344 // big | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
Note that most instructions do not use all of the fields. | Note that most instructions do not use all of the fields. | |||
Unused fields SHALL be cleared to zero. | Unused fields <bcp14>SHALL</bcp14> be cleared to zero. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="wide-instruction-encoding" title="Wide instruction encoding" | <section anchor="wide-instruction-encoding"> | |||
> | <name>Wide Instruction Encoding</name> | |||
<t> | <t> | |||
Some instructions are defined to use the wide instruction encoding, | Some instructions are defined to use the wide instruction encoding, | |||
which uses two 32-bit immediate values. The 64 bits following | which uses two 32-bit immediate values. The 64 bits following | |||
the basic instruction format contain a pseudo instruction | the basic instruction format contain a pseudo instruction | |||
with 'opcode', 'dst_reg', 'src_reg', and 'offset' all set to zero. | with 'opcode', 'dst_reg', 'src_reg', and 'offset' all set to zero. | |||
</t> | </t> | |||
<t> | <t> | |||
This is depicted in the following figure: | This is depicted in the following figure: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| opcode | regs | offset | | | opcode | regs | offset | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| imm | | | imm | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| reserved | | | reserved | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| next_imm | | | next_imm | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
</artwork> | ]]></artwork> | |||
<dl> | <dl> | |||
<dt anchor="term---opcode---"> | <dt anchor="term---opcode---"> | |||
<strong>opcode</strong> | <strong>opcode:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
operation to perform, encoded as explained above | operation to perform, encoded as explained above | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---regs---"> | <dt anchor="term---regs---"> | |||
<strong>regs</strong> | <strong>regs:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
The source and destination register numbers (unless otherwise | the source and destination register numbers (unless otherwise | |||
specified), encoded as explained above | specified), encoded as explained above | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---offset---"> | <dt anchor="term---offset---"> | |||
<strong>offset</strong> | <strong>offset:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
signed integer offset used with pointer arithmetic, unless | signed integer offset used with pointer arithmetic, unless | |||
otherwise specified | otherwise specified | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---imm---"> | <dt anchor="term---imm---"> | |||
<strong>imm</strong> | <strong>imm:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
signed integer immediate value | signed integer immediate value | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---reserved--"> | <dt anchor="term---reserved--"> | |||
<strong>reserved</strong> | <strong>reserved:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
unused, set to zero | unused, set to zero | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---next_imm--"> | <dt anchor="term---next_imm--"> | |||
<strong>next_imm</strong> | <strong>next_imm:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
second signed integer immediate value | second signed integer immediate value | |||
</t> | </t> | |||
</dd> | </dd> | |||
</dl> | </dl> | |||
</section> | </section> | |||
<section anchor="instruction-classes" title="Instruction classes"> | <section anchor="instruction-classes"> | |||
<t> | <name>Instruction Classes</name> | |||
The three least significant bits of the 'opcode' field store the instructio | ||||
n class: | ||||
</t> | ||||
<table> | ||||
<name>Instruction class</name> | ||||
<thead> | ||||
<tr> | ||||
<th>class</th> | ||||
<th>value</th> | ||||
<th>description</th> | ||||
<th>reference</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | <t> | |||
LD | The three least significant bits of the 'opcode' field store the instructio n class: | |||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Instruction Class</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>class</th> | ||||
<th>Value</th> | ||||
<th>Description</th> | ||||
<th>Reference</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
LD | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | 0x0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
non-standard load operations | non-standard load operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="load-and-store-instructions">Load and store instructions< | <xref target="load-and-store-instructions"/> | |||
/xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
LDX | LDX | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x1 | 0x1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
load into register operations | load into register operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="load-and-store-instructions">Load and store instructions< | <xref target="load-and-store-instructions"/> | |||
/xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
ST | ST | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x2 | 0x2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
store from immediate operations | store from immediate operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="load-and-store-instructions">Load and store instructions< | <xref target="load-and-store-instructions"/> | |||
/xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
STX | STX | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x3 | 0x3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
store from register operations | store from register operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="load-and-store-instructions">Load and store instructions< | <xref target="load-and-store-instructions"/> | |||
/xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
ALU | ALU | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x4 | 0x4 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
32-bit arithmetic operations | 32-bit arithmetic operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="arithmetic-and-jump-instructions">Arithmetic and jump ins | <xref target="arithmetic-and-jump-instructions"/> | |||
tructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
JMP | JMP | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x5 | 0x5 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
64-bit jump operations | 64-bit jump operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="arithmetic-and-jump-instructions">Arithmetic and jump ins | <xref target="arithmetic-and-jump-instructions"/> | |||
tructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
JMP32 | JMP32 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x6 | 0x6 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
32-bit jump operations | 32-bit jump operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="arithmetic-and-jump-instructions">Arithmetic and jump ins | <xref target="arithmetic-and-jump-instructions"/> | |||
tructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
ALU64 | ALU64 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x7 | 0x7 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
64-bit arithmetic operations | 64-bit arithmetic operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="arithmetic-and-jump-instructions">Arithmetic and jump ins | <xref target="arithmetic-and-jump-instructions"/> | |||
tructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | </tbody> | |||
</tbody> | </table> | |||
</table> | </section> | |||
</section> | </section> | |||
</section> | <section anchor="arithmetic-and-jump-instructions"> | |||
<section anchor="arithmetic-and-jump-instructions" title="Arithmetic and jump | <name>Arithmetic and Jump Instructions</name> | |||
instructions"> | <t> | |||
<t> | For arithmetic and jump instructions (<tt>ALU</tt>, <tt>ALU64</tt>, <tt>JMP< | |||
For arithmetic and jump instructions (<tt>ALU</tt>, <tt>ALU64</tt>, <tt>JMP< | /tt>, and | |||
/tt> and | ||||
<tt>JMP32</tt>), the 8-bit 'opcode' field is divided into three parts: | <tt>JMP32</tt>), the 8-bit 'opcode' field is divided into three parts: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
| code |s|class| | | code |s|class| | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
</artwork> | ]]></artwork> | |||
<dl> | <dl> | |||
<dt anchor="term---code--"> | <dt anchor="term---code--"> | |||
<strong>code</strong> | <strong>code:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
the operation code, whose meaning varies by instruction class | the operation code, whose meaning varies by instruction class | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---s--source---"> | <dt anchor="term---s--source---"> | |||
<strong>s (source)</strong> | <strong>s (source):</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
the source operand location, which unless otherwise specified is one of: | the source operand location, which unless otherwise specified is one of: | |||
</t> | </t> | |||
<table> | <table> | |||
<name>Source operand location</name> | <name>Source Operand Location</name> | |||
<thead> | <thead> | |||
<tr> | <tr> | |||
<th>source</th> | <th>source</th> | |||
<th>value</th> | <th>Value</th> | |||
<th>description</th> | <th>Description</th> | |||
</tr> | </tr> | |||
</thead> | </thead> | |||
<tbody> | <tbody> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
K | K | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
use 32-bit 'imm' value as source operand | use 32-bit 'imm' value as source operand | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
X | X | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
1 | 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
use 'src_reg' register value as source operand | use 'src_reg' register value as source operand | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
</dd> | </dd> | |||
<dt anchor="term---instruction-class--"> | <dt anchor="term---instruction-class--"> | |||
<strong>instruction class</strong> | <strong>class:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
the instruction class (see <xref target="instruction-classes">Instruction | the instruction class (see <xref target="instruction-classes"/>) | |||
classes</xref>) | </t> | |||
</t> | </dd> | |||
</dd> | </dl> | |||
</dl> | <section anchor="arithmetic-instructions"> | |||
<section anchor="arithmetic-instructions" title="Arithmetic instructions"> | <name>Arithmetic Instructions</name> | |||
<t> | <t> | |||
<tt>ALU</tt> uses 32-bit wide operands while <tt>ALU64</tt> uses 64-bit wid e operands for | <tt>ALU</tt> uses 32-bit wide operands while <tt>ALU64</tt> uses 64-bit wid e operands for | |||
otherwise identical operations. <tt>ALU64</tt> instructions belong to the | otherwise identical operations. <tt>ALU64</tt> instructions belong to the | |||
base64 conformance group unless noted otherwise. | base64 conformance group unless noted otherwise. | |||
The 'code' field encodes the operation as below, where 'src' refers to the | 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 | source operand and 'dst' refers to the value of the destination | |||
register. | register. | |||
</t> | ||||
<table> | ||||
<name>Arithmetic instructions</name> | ||||
<thead> | ||||
<tr> | ||||
<th>name</th> | ||||
<th>code</th> | ||||
<th>offset</th> | ||||
<th>description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
ADD | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Arithmetic Instructions</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>Name</th> | ||||
<th>code</th> | ||||
<th>offset</th> | ||||
<th>Description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
ADD | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | 0x0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst += src | dst += src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
SUB | SUB | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x1 | 0x1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst -= src | dst -= src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
MUL | MUL | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x2 | 0x2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst *= src | dst *= src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
DIV | DIV | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x3 | 0x3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (src != 0) ? (dst / src) : 0 | dst = (src != 0) ? (dst / src) : 0 | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
SDIV | SDIV | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x3 | 0x3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
1 | 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (src != 0) ? (dst s/ src) : 0 | dst = (src != 0) ? (dst s/ src) : 0 | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
OR | OR | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x4 | 0x4 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst |= src | dst |= src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
AND | AND | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x5 | 0x5 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst &= src | dst &= src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
LSH | LSH | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x6 | 0x6 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst <<= (src & mask) | dst <<= (src & mask) | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
RSH | RSH | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x7 | 0x7 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst >>= (src & mask) | dst >>= (src & mask) | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
NEG | NEG | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x8 | 0x8 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = -dst | dst = -dst | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
MOD | MOD | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x9 | 0x9 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (src != 0) ? (dst % src) : dst | dst = (src != 0) ? (dst % src) : dst | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
SMOD | SMOD | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x9 | 0x9 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
1 | 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (src != 0) ? (dst s% src) : dst | dst = (src != 0) ? (dst s% src) : dst | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
XOR | XOR | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xa | 0xa | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst ^= src | dst ^= src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
MOV | MOV | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xb | 0xb | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = src | dst = src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
MOVSX | MOVSX | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xb | 0xb | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
8/16/32 | 8/16/32 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (s8,s16,s32)src | dst = (s8,s16,s32)src | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
ARSH | ARSH | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xc | 0xc | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="term-sign-extend">sign extending</xref> dst >>= (sr | sign extending (<xref target="term-sign-extend"/>) dst >>= (src & | |||
c & mask) | amp; mask) | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
END | END | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xd | 0xd | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | ||||
byte swap operations (see <xref target="byte-swap-instructions"/>) | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
</tbody> | ||||
</table> | ||||
<t> | <t> | |||
byte swap operations (see <xref target="byte-swap-instructions">Byte sw | ||||
ap instructions</xref> below) | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
</tbody> | ||||
</table> | ||||
<t> | ||||
Underflow and overflow are allowed during arithmetic operations, meaning | Underflow and overflow are allowed during arithmetic operations, meaning | |||
the 64-bit or 32-bit value will wrap. If BPF program execution would | 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 . | result in division by zero, the destination register is instead set to zero . | |||
If execution would result in modulo by zero, for <tt>ALU64</tt> the value o f | If execution would result in modulo by zero, for <tt>ALU64</tt> the value o f | |||
the destination register is unchanged whereas for <tt>ALU</tt> the upper | the destination register is unchanged whereas for <tt>ALU</tt> the upper | |||
32 bits of the destination register are zeroed. | 32 bits of the destination register are zeroed. | |||
</t> | </t> | |||
<t> | <t> | |||
<tt>{ADD, X, ALU}</tt>, where 'code' = <tt>ADD</tt>, 'source' = <tt>X</tt>, and 'class' = <tt>ALU</tt>, means: | <tt>{ADD, X, ALU}</tt>, where 'code' = <tt>ADD</tt>, 'source' = <tt>X</tt>, and 'class' = <tt>ALU</tt>, means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = (u32) ((u32) dst + (u32) src) | dst = (u32) ((u32) dst + (u32) src) | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
where '(u32)' indicates that the upper 32 bits are zeroed. | where '(u32)' indicates that the upper 32 bits are zeroed. | |||
</t> | </t> | |||
<t> | <t> | |||
<tt>{ADD, X, ALU64}</tt> means: | <tt>{ADD, X, ALU64}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = dst + src | dst = dst + src | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
<tt>{XOR, K, ALU}</tt> means: | <tt>{XOR, K, ALU}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = (u32) dst ^ (u32) imm | dst = (u32) dst ^ (u32) imm | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
<tt>{XOR, K, ALU64}</tt> means: | <tt>{XOR, K, ALU64}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = dst ^ imm | dst = dst ^ imm | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
Note that most arithmetic instructions have 'offset' set to 0. Only three i nstructions | Note that most arithmetic instructions have 'offset' set to 0. Only three i nstructions | |||
(<tt>SDIV</tt>, <tt>SMOD</tt>, <tt>MOVSX</tt>) have a non-zero 'offset'. | (<tt>SDIV</tt>, <tt>SMOD</tt>, <tt>MOVSX</tt>) have a non-zero 'offset'. | |||
</t> | </t> | |||
<t> | <t> | |||
Division, multiplication, and modulo operations for <tt>ALU</tt> are part | Division, multiplication, and modulo operations for <tt>ALU</tt> are part | |||
of the "divmul32" conformance group, and division, multiplication, and | of the "divmul32" conformance group, and division, multiplication, and | |||
modulo operations for <tt>ALU64</tt> are part of the "divmul64" conformance | modulo operations for <tt>ALU64</tt> are part of the "divmul64" conformance | |||
group. | group. | |||
The division and modulo operations support both unsigned and signed flavors . | The division and modulo operations support both unsigned and signed flavors . | |||
</t> | </t> | |||
<t> | <t> | |||
For unsigned operations (<tt>DIV</tt> and <tt>MOD</tt>), for <tt>ALU</tt>, | For unsigned operations (<tt>DIV</tt> and <tt>MOD</tt>), for <tt>ALU</tt>, | |||
'imm' is interpreted as a 32-bit unsigned value. For <tt>ALU64</tt>, | 'imm' is interpreted as a 32-bit unsigned value. For <tt>ALU64</tt>, | |||
'imm' is first <xref target="term-sign-extend">sign extended</xref> from 32 to 64 bits, and then | 'imm' is first sign extended (<xref target="term-sign-extend"/>) from 32 to 64 bits, and then | |||
interpreted as a 64-bit unsigned value. | interpreted as a 64-bit unsigned value. | |||
</t> | </t> | |||
<t> | <t> | |||
For signed operations (<tt>SDIV</tt> and <tt>SMOD</tt>), for <tt>ALU</tt>, | For signed operations (<tt>SDIV</tt> and <tt>SMOD</tt>), for <tt>ALU</tt>, | |||
'imm' is interpreted as a 32-bit signed value. For <tt>ALU64</tt>, 'imm' | 'imm' is interpreted as a 32-bit signed value. For <tt>ALU64</tt>, 'imm' | |||
is first <xref target="term-sign-extend">sign extended</xref> from 32 to 64 bits, and then | is first sign extended (<xref target="term-sign-extend"/>) from 32 to 64 bi ts, and then | |||
interpreted as a 64-bit signed value. | interpreted as a 64-bit signed value. | |||
</t> | </t> | |||
<t> | <t> | |||
Note that there are varying definitions of the signed modulo operation | Note that there are varying definitions of the signed modulo operation | |||
when the dividend or divisor are negative, where implementations often | when the dividend or divisor are negative, where implementations often | |||
vary by language such that Python, Ruby, etc. differ from C, Go, Java, | vary by language such that Python, Ruby, etc. differ from C, Go, Java, | |||
etc. This specification requires that signed modulo MUST use truncated divi sion | etc. This specification requires that signed modulo <bcp14>MUST</bcp14> use truncated division | |||
(where -13 % 3 == -1) as implemented in C, Go, etc.: | (where -13 % 3 == -1) as implemented in C, Go, etc.: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
a % n = a - n * trunc(a / n) | a % n = a - n * trunc(a / n) | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
The <tt>MOVSX</tt> instruction does a move operation with sign extension. | The <tt>MOVSX</tt> instruction does a move operation with sign extension. | |||
<tt>{MOVSX, X, ALU}</tt> <xref target="term-sign-extend">sign extends</xref > 8-bit and 16-bit operands into | <tt>{MOVSX, X, ALU}</tt> sign extends (<xref target="term-sign-extend"/>) 8 -bit and 16-bit operands into | |||
32-bit operands, and zeroes the remaining upper 32 bits. | 32-bit operands, and zeroes the remaining upper 32 bits. | |||
<tt>{MOVSX, X, ALU64}</tt> <xref target="term-sign-extend">sign extends</xr ef> 8-bit, 16-bit, and 32-bit | <tt>{MOVSX, X, ALU64}</tt> sign extends (<xref target="term-sign-extend"/>) 8-bit, 16-bit, and 32-bit | |||
operands into 64-bit operands. Unlike other arithmetic instructions, | operands into 64-bit operands. Unlike other arithmetic instructions, | |||
<tt>MOVSX</tt> is only defined for register source operands (<tt>X</tt>). | <tt>MOVSX</tt> is only defined for register source operands (<tt>X</tt>). | |||
</t> | </t> | |||
<t> | <t> | |||
<tt>{MOV, K, ALU64}</tt> means: | <tt>{MOV, K, ALU64}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = (s64)imm | dst = (s64)imm | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
<tt>{MOV, X, ALU}</tt> means: | <tt>{MOV, X, ALU}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = (u32)src | dst = (u32)src | |||
</artwork> | ]]></artwork> | |||
<t> | <t> | |||
<tt>{MOVSX, X, ALU}</tt> with 'offset' 8 means: | <tt>{MOVSX, X, ALU}</tt> with 'offset' 8 means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = (u32)(s32)(s8)src | dst = (u32)(s32)(s8)src | |||
]]></artwork> | ||||
</artwork> | <t> | |||
<t> | ||||
The <tt>NEG</tt> instruction is only defined when the source bit is clear | The <tt>NEG</tt> instruction is only defined when the source bit is clear | |||
(<tt>K</tt>). | (<tt>K</tt>). | |||
</t> | </t> | |||
<t> | <t> | |||
Shift operations use a mask of 0x3F (63) for 64-bit operations and 0x1F (31 ) | Shift operations use a mask of 0x3F (63) for 64-bit operations and 0x1F (31 ) | |||
for 32-bit operations. | for 32-bit operations. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="byte-swap-instructions" title="Byte swap instructions"> | <section anchor="byte-swap-instructions"> | |||
<t> | <name>Byte Swap Instructions</name> | |||
<t> | ||||
The byte swap instructions use instruction classes of <tt>ALU</tt> and <tt> ALU64</tt> | The byte swap instructions use instruction classes of <tt>ALU</tt> and <tt> ALU64</tt> | |||
and a 4-bit 'code' field of <tt>END</tt>. | and a 4-bit 'code' field of <tt>END</tt>. | |||
</t> | </t> | |||
<t> | <t> | |||
The byte swap instructions operate on the destination register | The byte swap instructions operate on the destination register | |||
only and do not use a separate source register or immediate value. | only and do not use a separate source register or immediate value. | |||
</t> | </t> | |||
<t> | <t> | |||
For <tt>ALU</tt>, the 1-bit source operand field in the opcode is used to | For <tt>ALU</tt>, the 1-bit source operand field in the opcode is used to | |||
select what byte order the operation converts from or to. For | select what byte order the operation converts from or to. For | |||
<tt>ALU64</tt>, the 1-bit source operand field in the opcode is reserved | <tt>ALU64</tt>, the 1-bit source operand field in the opcode is reserved | |||
and MUST be set to 0. | and <bcp14>MUST</bcp14> be set to 0. | |||
</t> | ||||
<table> | ||||
<name>Byte swap instructions</name> | ||||
<thead> | ||||
<tr> | ||||
<th>class</th> | ||||
<th>source</th> | ||||
<th>value</th> | ||||
<th>description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
ALU | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Byte Swap Instructions</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>class</th> | ||||
<th>source</th> | ||||
<th>Value</th> | ||||
<th>Description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
ALU | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
LE | LE | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
convert between host byte order and little endian | convert between host byte order and little endian | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
ALU | ALU | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
BE | BE | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
1 | 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
convert between host byte order and big endian | convert between host byte order and big endian | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
ALU64 | ALU64 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Reserved | Reserved | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
do byte swap unconditionally | do byte swap unconditionally | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
The 'imm' field encodes the width of the swap operations. The following wi dths | The 'imm' field encodes the width of the swap operations. The following wi dths | |||
are supported: 16, 32 and 64. Width 64 operations belong to the base64 | 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 and other swap operations belong to the base32 | |||
conformance group. | conformance group. | |||
</t> | ||||
<t> | ||||
Examples: | ||||
</t> | ||||
<t> | ||||
<tt>{END, LE, ALU}</tt> with 'imm' = 16/32/64 means: | ||||
</t> | ||||
<artwork> | ||||
dst = le16(dst) | ||||
dst = le32(dst) | ||||
dst = le64(dst) | ||||
</artwork> | ||||
<t> | ||||
<tt>{END, BE, ALU}</tt> with 'imm' = 16/32/64 means: | ||||
</t> | ||||
<artwork> | ||||
dst = be16(dst) | ||||
dst = be32(dst) | ||||
dst = be64(dst) | ||||
</artwork> | ||||
<t> | ||||
<tt>{END, TO, ALU64}</tt> with 'imm' = 16/32/64 means: | ||||
</t> | ||||
<artwork> | ||||
dst = bswap16(dst) | ||||
dst = bswap32(dst) | ||||
dst = bswap64(dst) | ||||
</artwork> | ||||
</section> | ||||
<section anchor="jump-instructions" title="Jump instructions"> | ||||
<t> | ||||
<tt>JMP32</tt> uses 32-bit wide operands and indicates the base32 | ||||
conformance group, while <tt>JMP</tt> 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: | ||||
</t> | ||||
<table> | ||||
<name>Jump instructions</name> | ||||
<thead> | ||||
<tr> | ||||
<th>code</th> | ||||
<th>value</th> | ||||
<th>src_reg</th> | ||||
<th>description</th> | ||||
<th>notes</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
JA | ||||
</t> | </t> | |||
</td> | ||||
<td> | ||||
<t> | <t> | |||
0x0 | Examples: | |||
</t> | </t> | |||
</td> | ||||
<td> | ||||
<t> | <t> | |||
0x0 | <tt>{END, LE, ALU}</tt> with 'imm' = 16/32/64 means: | |||
</t> | </t> | |||
</td> | <artwork><![CDATA[ | |||
<td> | dst = le16(dst) | |||
dst = le32(dst) | ||||
dst = le64(dst)]]></artwork> | ||||
<t> | <t> | |||
PC += offset | <tt>{END, BE, ALU}</tt> with 'imm' = 16/32/64 means: | |||
</t> | </t> | |||
</td> | <artwork><![CDATA[ | |||
<td> | dst = be16(dst) | |||
dst = be32(dst) | ||||
dst = be64(dst)]]></artwork> | ||||
<t> | <t> | |||
{JA, K, JMP} only | <tt>{END, TO, ALU64}</tt> with 'imm' = 16/32/64 means: | |||
</t> | </t> | |||
</td> | <artwork><![CDATA[ | |||
</tr> | dst = bswap16(dst) | |||
<tr> | dst = bswap32(dst) | |||
<td> | dst = bswap64(dst)]]></artwork> | |||
</section> | ||||
<section anchor="jump-instructions"> | ||||
<name>Jump Instructions</name> | ||||
<t> | <t> | |||
JA | <tt>JMP32</tt> uses 32-bit wide operands and indicates the base32 conformance | |||
group; <tt>JMP</tt> 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: | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Jump Instructions</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>code</th> | ||||
<th>Value</th> | ||||
<th>src_reg</th> | ||||
<th>Description</th> | ||||
<th>Notes</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
JA | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | 0x0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | 0x0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
{JA, K, JMP} only | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
JA | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
PC += imm | PC += imm | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
{JA, K, JMP32} only | {JA, K, JMP32} only | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JEQ | JEQ | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x1 | 0x1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst == src | PC += offset if dst == src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JGT | JGT | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x2 | 0x2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst > src | PC += offset if dst > src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
unsigned | unsigned | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JGE | JGE | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x3 | 0x3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst >= src | PC += offset if dst >= src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
unsigned | unsigned | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JSET | JSET | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x4 | 0x4 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst & src | PC += offset if dst & src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JNE | JNE | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x5 | 0x5 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst != src | PC += offset if dst != src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JSGT | JSGT | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x6 | 0x6 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst > src | PC += offset if dst > src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
signed | signed | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JSGE | JSGE | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x7 | 0x7 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst >= src | PC += offset if dst >= src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
signed | signed | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
CALL | CALL | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x8 | 0x8 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | 0x0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
call helper function by static ID | call helper function by static ID | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
{CALL, K, JMP} only, see <xref target="helper-functions">Helper functio | {CALL, K, JMP} only, see <xref target="helper-functions"/> | |||
ns</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
CALL | CALL | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x8 | 0x8 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x1 | 0x1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
call PC += imm | call PC += imm | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
{CALL, K, JMP} only, see <xref target="program-local-functions">Program | {CALL, K, JMP} only, see <xref target="program-local-functions"/> | |||
-local functions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
CALL | CALL | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x8 | 0x8 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x2 | 0x2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
call helper function by BTF ID | call helper function by BTF ID | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
{CALL, K, JMP} only, see <xref target="helper-functions">Helper functio | {CALL, K, JMP} only, see <xref target="helper-functions"/> | |||
ns</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
EXIT | EXIT | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x9 | 0x9 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | 0x0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
return | return | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
{CALL, K, JMP} only | {CALL, K, JMP} only | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JLT | JLT | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xa | 0xa | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst < src | PC += offset if dst < src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
unsigned | unsigned | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JLE | JLE | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xb | 0xb | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst <= src | PC += offset if dst <= src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
unsigned | unsigned | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JSLT | JSLT | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xc | 0xc | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst < src | PC += offset if dst < src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
signed | signed | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
JSLE | JSLE | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xd | 0xd | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | any | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
PC += offset if dst <= src | PC += offset if dst <= src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
signed | signed | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
where 'PC' denotes the program counter, and the offset to increment by | where 'PC' denotes the program counter, and the offset to increment by | |||
is in units of 64-bit instructions relative to the instruction following | is in units of 64-bit instructions relative to the instruction following | |||
the jump instruction. Thus 'PC += 1' skips execution of the next | the jump instruction. Thus 'PC += 1' skips execution of the next | |||
instruction if it's a basic instruction or results in undefined behavior | instruction if it's a basic instruction or results in undefined behavior | |||
if the next instruction is a 128-bit wide instruction. | if the next instruction is a 128-bit wide instruction. | |||
</t> | </t> | |||
<t> | <t> | |||
Example: | Example: | |||
</t> | </t> | |||
<t> | <t> | |||
<tt>{JSGE, X, JMP32}</tt> means: | <tt>{JSGE, X, JMP32}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
if (s32)dst s>= (s32)src goto +offset | if (s32)dst s>= (s32)src goto +offset]]></artwork> | |||
</artwork> | <t> | |||
<t> | ||||
where 's>=' indicates a signed '>=' comparison. | where 's>=' indicates a signed '>=' comparison. | |||
</t> | </t> | |||
<t> | <t> | |||
<tt>{JLE, K, JMP}</tt> means: | <tt>{JLE, K, JMP}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
if dst <= (u64)(s64)imm goto +offset | if dst <= (u64)(s64)imm goto +offset]]></artwork> | |||
</artwork> | <t> | |||
<t> | ||||
<tt>{JA, K, JMP32}</tt> means: | <tt>{JA, K, JMP32}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
gotol +imm | gotol +imm]]></artwork> | |||
</artwork> | <t> | |||
<t> | ||||
where 'imm' means the branch offset comes from the 'imm' field. | where 'imm' means the branch offset comes from the 'imm' field. | |||
</t> | </t> | |||
<t> | <t> | |||
Note that there are two flavors of <tt>JA</tt> instructions. The | Note that there are two flavors of <tt>JA</tt> instructions. The | |||
<tt>JMP</tt> class permits a 16-bit jump offset specified by the 'offset' | <tt>JMP</tt> class permits a 16-bit jump offset specified by the 'offset' | |||
field, whereas the <tt>JMP32</tt> class permits a 32-bit jump offset | field, whereas the <tt>JMP32</tt> class permits a 32-bit jump offset | |||
specified by the 'imm' field. A > 16-bit conditional jump may be | specified by the 'imm' field. A conditional jump greater than 16 bits may b | |||
converted to a < 16-bit conditional jump plus a 32-bit unconditional | e | |||
converted to a conditional jump less than 16 bits plus a 32-bit uncondition | ||||
al | ||||
jump. | jump. | |||
</t> | </t> | |||
<t> | <t> | |||
All <tt>CALL</tt> and <tt>JA</tt> instructions belong to the | All <tt>CALL</tt> and <tt>JA</tt> instructions belong to the | |||
base32 conformance group. | base32 conformance group. | |||
</t> | </t> | |||
<section anchor="helper-functions" title="Helper functions"> | <section anchor="helper-functions"> | |||
<t> | <name>Helper Functions</name> | |||
<t> | ||||
Helper functions are a concept whereby BPF programs can call into a | Helper functions are a concept whereby BPF programs can call into a | |||
set of function calls exposed by the underlying platform. | set of function calls exposed by the underlying platform. | |||
</t> | </t> | |||
<t> | <t> | |||
Historically, each helper function was identified by a static ID | Historically, each helper function was identified by a static ID | |||
encoded in the 'imm' field. Further documentation of helper functions | encoded in the 'imm' field. Further documentation of helper functions | |||
is outside the scope of this document and standardization is left for | is outside the scope of this document and standardization is left for | |||
future work, but use is widely deployed and more information can be | future work, but use is widely deployed and more information can be | |||
found in platform-specific documentation (e.g., Linux kernel documentation ). | found in platform-specific documentation (e.g., Linux kernel documentation ). | |||
</t> | </t> | |||
<t> | <t> | |||
Platforms that support the BPF Type Format (BTF) support identifying | Platforms 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 | 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 | identifies the helper name and type. Further documentation of BTF | |||
is outside the scope of this document and standardization is left for | is outside the scope of this document and standardization is left for | |||
future work, but use is widely deployed and more information can be | future work, but use is widely deployed and more information can be | |||
found in platform-specific documentation (e.g., Linux kernel documentation ). | found in platform-specific documentation (e.g., Linux kernel documentation ). | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="program-local-functions" title="Program-local functions"> | <section anchor="program-local-functions"> | |||
<t> | <name>Program-Local Functions</name> | |||
<t> | ||||
Program-local functions are functions exposed by the same BPF program as t he | Program-local functions are functions exposed by the same BPF program as t he | |||
caller, and are referenced by offset from the instruction following the ca ll | caller, and are referenced by offset from the instruction following the ca ll | |||
instruction, similar to <tt>JA</tt>. The offset is encoded in the 'imm' f ield of | instruction, similar to <tt>JA</tt>. The offset is encoded in the 'imm' f ield of | |||
the call instruction. An <tt>EXIT</tt> within the program-local function w ill | the call instruction. An <tt>EXIT</tt> within the program-local function w ill | |||
return to the caller. | return to the caller. | |||
</t> | </t> | |||
</section> | ||||
</section> | ||||
</section> | </section> | |||
</section> | <section anchor="load-and-store-instructions"> | |||
</section> | <name>Load and Store Instructions</name> | |||
<section anchor="load-and-store-instructions" title="Load and store instructio | <t> | |||
ns"> | ||||
<t> | ||||
For load and store instructions (<tt>LD</tt>, <tt>LDX</tt>, <tt>ST</tt>, and <tt>STX</tt>), the | For load and store instructions (<tt>LD</tt>, <tt>LDX</tt>, <tt>ST</tt>, and <tt>STX</tt>), the | |||
8-bit 'opcode' field is divided as follows: | 8-bit 'opcode' field is divided as follows: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
|mode |sz |class| | |mode |sz |class| | |||
+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+ | |||
</artwork> | ]]></artwork> | |||
<dl> | <dl> | |||
<dt anchor="term---mode--"> | <dt anchor="term---mode--"> | |||
<strong>mode</strong> | <strong>mode:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
The mode modifier is one of: | The mode modifier is one of: | |||
</t> | </t> | |||
<table> | <table> | |||
<name>Mode modifier</name> | <name>Mode Modifier</name> | |||
<thead> | <thead> | |||
<tr> | <tr> | |||
<th>mode modifier</th> | <th>mode</th> | |||
<th>value</th> | <th>Value</th> | |||
<th>description</th> | <th>Description</th> | |||
<th>reference</th> | <th>Reference</th> | |||
</tr> | </tr> | |||
</thead> | </thead> | |||
<tbody> | <tbody> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
IMM | IMM | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
64-bit immediate instructions | 64-bit immediate instructions | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instruct | <xref target="_4-bit-immediate-instructions"/> | |||
ions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
ABS | ABS | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
1 | 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
legacy BPF packet access (absolute) | legacy BPF packet access (absolute) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet | <xref target="legacy-bpf-packet-access-instructions"/> | |||
access instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
IND | IND | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
2 | 2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
legacy BPF packet access (indirect) | legacy BPF packet access (indirect) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet | <xref target="legacy-bpf-packet-access-instructions"/> | |||
access instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
MEM | MEM | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
3 | 3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
regular load and store operations | regular load and store operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="regular-load-and-store-operations">Regular load and stor | <xref target="regular-load-and-store-operations"/> | |||
e operations</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
MEMSX | MEMSX | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
4 | 4 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
sign-extension load operations | sign-extension load operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="sign-extension-load-operations">Sign-extension load oper | <xref target="sign-extension-load-operations"/> | |||
ations</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | ||||
ATOMIC | ATOMIC | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
6 | 6 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
atomic operations | atomic operations | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="atomic-operations">Atomic operations</xref> | <xref target="atomic-operations"/> | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
</dd> | </dd> | |||
<dt anchor="term---sz--size---"> | <dt anchor="term---sz--size---"> | |||
<strong>sz (size)</strong> | <strong>sz (size):</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
The size modifier is one of: | The size modifier is one of: | |||
</t> | </t> | |||
<table> | <table> | |||
<name>Size modifier</name> | <name>Size Modifier</name> | |||
<thead> | <thead> | |||
<tr> | <tr> | |||
<th>size</th> | <th>size</th> | |||
<th>value</th> | <th>Value</th> | |||
<th>description</th> | <th>Description</th> | |||
</tr> | </tr> | |||
</thead> | </thead> | |||
<tbody> | <tbody> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
W | W | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
word (4 bytes) | word (4 bytes) | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
H | H | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
1 | 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
half word (2 bytes) | half word (2 bytes) | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
B | B | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
2 | 2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
byte | byte | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
DW | DW | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
3 | 3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
double word (8 bytes) | double word (8 bytes) | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
Instructions using <tt>DW</tt> belong to the base64 conformance group. | Instructions using <tt>DW</tt> belong to the base64 conformance group. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term---class---"> | <dt anchor="term---class---"> | |||
<strong>class</strong> | <strong>class:</strong> | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
The instruction class (see <xref target="instruction-classes">Instruction | The instruction class (see <xref target="instruction-classes"/>) | |||
classes</xref>) | </t> | |||
</t> | </dd> | |||
</dd> | </dl> | |||
</dl> | <section anchor="regular-load-and-store-operations"> | |||
<section anchor="regular-load-and-store-operations" title="Regular load and s | <name>Regular Load and Store Operations</name> | |||
tore operations"> | <t> | |||
<t> | ||||
The <tt>MEM</tt> mode modifier is used to encode regular load and store | The <tt>MEM</tt> mode modifier is used to encode regular load and store | |||
instructions that transfer data between a register and memory. | instructions that transfer data between a register and memory. | |||
</t> | </t> | |||
<t> | <t> | |||
<tt>{MEM, <size>, STX}</tt> means: | <tt>{MEM, <size>, STX}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
*(size *) (dst + offset) = src | *(size *) (dst + offset) = src]]></artwork> | |||
</artwork> | <t> | |||
<t> | ||||
<tt>{MEM, <size>, ST}</tt> means: | <tt>{MEM, <size>, ST}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
*(size *) (dst + offset) = imm | *(size *) (dst + offset) = imm]]></artwork> | |||
</artwork> | <t> | |||
<t> | ||||
<tt>{MEM, <size>, LDX}</tt> means: | <tt>{MEM, <size>, LDX}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = *(unsigned size *) (src + offset) | dst = *(unsigned size *) (src + offset)]]></artwork> | |||
</artwork> | <t> | |||
<t> | ||||
Where '<size>' is one of: <tt>B</tt>, <tt>H</tt>, <tt>W</tt>, or <tt> DW</tt>, and | Where '<size>' is one of: <tt>B</tt>, <tt>H</tt>, <tt>W</tt>, or <tt> DW</tt>, and | |||
'unsigned size' is one of: u8, u16, u32, or u64. | 'unsigned size' is one of: u8, u16, u32, or u64. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="sign-extension-load-operations" title="Sign-extension load o | <section anchor="sign-extension-load-operations"> | |||
perations"> | <name>Sign-Extension Load Operations</name> | |||
<t> | <t> | |||
The <tt>MEMSX</tt> mode modifier is used to encode <xref target="term-sign- | The <tt>MEMSX</tt> mode modifier is used to encode sign-extension load inst | |||
extend">sign-extension</xref> load | ructions (<xref target="term-sign-extend"/>) | |||
instructions that transfer data between a register and memory. | that transfer data between a register and memory. | |||
</t> | </t> | |||
<t> | <t> | |||
<tt>{MEMSX, <size>, LDX}</tt> means: | <tt>{MEMSX, <size>, LDX}</tt> means: | |||
</t> | </t> | |||
<artwork> | <artwork><![CDATA[ | |||
dst = *(signed size *) (src + offset) | dst = *(signed size *) (src + offset)]]></artwork> | |||
</artwork> | <t> | |||
<t> | ||||
Where '<size>' is one of: <tt>B</tt>, <tt>H</tt>, or <tt>W</tt>, and | Where '<size>' is one of: <tt>B</tt>, <tt>H</tt>, or <tt>W</tt>, and | |||
'signed size' is one of: s8, s16, or s32. | 'signed size' is one of: s8, s16, or s32. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="atomic-operations" title="Atomic operations"> | <section anchor="atomic-operations"> | |||
<t> | <name>Atomic Operations</name> | |||
Atomic operations are operations that operate on memory and can not be | <t> | |||
Atomic operations operate on memory and cannot be | ||||
interrupted or corrupted by other access to the same memory region | interrupted or corrupted by other access to the same memory region | |||
by other BPF programs or means outside of this specification. | by other BPF programs or means outside of this specification. | |||
</t> | </t> | |||
<t> | <t> | |||
All atomic operations supported by BPF are encoded as store operations | All atomic operations supported by BPF are encoded as store operations | |||
that use the <tt>ATOMIC</tt> mode modifier as follows: | that use the <tt>ATOMIC</tt> mode modifier as follows: | |||
</t> | </t> | |||
<ul> | <ul> | |||
<li> | <li> | |||
<tt>{ATOMIC, W, STX}</tt> for 32-bit operations, which are | <tt>{ATOMIC, W, STX}</tt> for 32-bit operations, which are | |||
part of the "atomic32" conformance group. | part of the "atomic32" conformance group. | |||
</li> | </li> | |||
<li> | <li> | |||
<tt>{ATOMIC, DW, STX}</tt> for 64-bit operations, which are | <tt>{ATOMIC, DW, STX}</tt> for 64-bit operations, which are | |||
part of the "atomic64" conformance group. | part of the "atomic64" conformance group. | |||
</li> | </li> | |||
<li> | <li> | |||
8-bit and 16-bit wide atomic operations are not supported. | 8-bit and 16-bit wide atomic operations are not supported. | |||
</li> | </li> | |||
</ul> | </ul> | |||
<t> | <t> | |||
The 'imm' field is used to encode the actual atomic operation. | The 'imm' field is used to encode the actual atomic operation. | |||
Simple atomic operation use a subset of the values defined to encode | Simple atomic operations use a subset of the values defined to encode | |||
arithmetic operations in the 'imm' field to encode the atomic operation: | arithmetic operations in the 'imm' field to encode the atomic operation: | |||
</t> | ||||
<table> | ||||
<name>Simple atomic operations</name> | ||||
<thead> | ||||
<tr> | ||||
<th>imm</th> | ||||
<th>value</th> | ||||
<th>description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
ADD | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Simple Atomic Operations</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>imm</th> | ||||
<th>Value</th> | ||||
<th>Description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
ADD | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | 0x00 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
atomic add | atomic add | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
OR | OR | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x40 | 0x40 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
atomic or | atomic or | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
AND | AND | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x50 | 0x50 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
atomic and | atomic and | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
XOR | XOR | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xa0 | 0xa0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
atomic xor | atomic xor | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | ||||
<tt>{ATOMIC, W, STX}</tt> with 'imm' = ADD means: | ||||
</t> | ||||
<artwork> | ||||
*(u32 *)(dst + offset) += src | ||||
</artwork> | ||||
<t> | ||||
<tt>{ATOMIC, DW, STX}</tt> with 'imm' = ADD means: | ||||
</t> | ||||
<artwork> | ||||
*(u64 *)(dst + offset) += src | ||||
</artwork> | ||||
<t> | ||||
In addition to the simple atomic operations, there also is a modifier and | ||||
two complex atomic operations: | ||||
</t> | ||||
<table> | ||||
<name>Complex atomic operations</name> | ||||
<thead> | ||||
<tr> | ||||
<th>imm</th> | ||||
<th>value</th> | ||||
<th>description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | <t> | |||
FETCH | <tt>{ATOMIC, W, STX}</tt> with 'imm' = ADD means: | |||
</t> | </t> | |||
</td> | <artwork><![CDATA[ | |||
<td> | *(u32 *)(dst + offset) += src]]></artwork> | |||
<t> | <t> | |||
0x01 | <tt>{ATOMIC, DW, STX}</tt> with 'imm' = ADD means: | |||
</t> | </t> | |||
</td> | <artwork><![CDATA[ | |||
<td> | *(u64 *)(dst + offset) += src]]></artwork> | |||
<t> | <t> | |||
modifier: return old value | In addition to the simple atomic operations, there is also a modifier and | |||
two complex atomic operations: | ||||
</t> | </t> | |||
</td> | ||||
</tr> | <table> | |||
<tr> | <name>Complex Atomic Operations and a Modifier</name> | |||
<td> | <thead> | |||
<t> | <tr> | |||
<th>imm</th> | ||||
<th>Value</th> | ||||
<th>Description</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
FETCH | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x01 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
modifier: return old value | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
XCHG | XCHG | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xe0 | FETCH | 0xe0 | FETCH | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
atomic exchange | atomic exchange | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
CMPXCHG | CMPXCHG | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xf0 | FETCH | 0xf0 | FETCH | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
atomic compare and exchange | atomic compare and exchange | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
The <tt>FETCH</tt> modifier is optional for simple atomic operations, and | The <tt>FETCH</tt> modifier is optional for simple atomic operations and | |||
always set for the complex atomic operations. If the <tt>FETCH</tt> flag | is always set for the complex atomic operations. If the <tt>FETCH</tt> fla | |||
g | ||||
is set, then the operation also overwrites <tt>src</tt> with the value that | is set, then the operation also overwrites <tt>src</tt> with the value that | |||
was in memory before it was modified. | was in memory before it was modified. | |||
</t> | </t> | |||
<t> | <t> | |||
The <tt>XCHG</tt> operation atomically exchanges <tt>src</tt> with the valu e | The <tt>XCHG</tt> operation atomically exchanges <tt>src</tt> with the valu e | |||
addressed by <tt>dst + offset</tt>. | addressed by <tt>dst + offset</tt>. | |||
</t> | </t> | |||
<t> | <t> | |||
The <tt>CMPXCHG</tt> operation atomically compares the value addressed by | The <tt>CMPXCHG</tt> operation atomically compares the value addressed by | |||
<tt>dst + offset</tt> with <tt>R0</tt>. If they match, the value addressed by | <tt>dst + offset</tt> with <tt>R0</tt>. If they match, the value addressed by | |||
<tt>dst + offset</tt> is replaced with <tt>src</tt>. In either case, the | <tt>dst + offset</tt> is replaced with <tt>src</tt>. In either case, the | |||
value that was at <tt>dst + offset</tt> before the operation is zero-extend ed | value that was at <tt>dst + offset</tt> before the operation is zero-extend ed | |||
and loaded back to <tt>R0</tt>. | and loaded back to <tt>R0</tt>. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="-4-bit-immediate-instructions" title="64-bit immediate instr | <section anchor="_4-bit-immediate-instructions"> | |||
uctions"> | <name>64-bit Immediate Instructions</name> | |||
<t> | <t> | |||
Instructions with the <tt>IMM</tt> 'mode' modifier use the wide instruction | Instructions with the <tt>IMM</tt> 'mode' modifier use the wide instruction | |||
encoding defined in <xref target="instruction-encoding">Instruction encodin g</xref>, and use the 'src_reg' field of the | encoding defined in <xref target="instruction-encoding"/>, and use the 'src _reg' field of the | |||
basic instruction to hold an opcode subtype. | basic instruction to hold an opcode subtype. | |||
</t> | </t> | |||
<t> | <t> | |||
The following table defines a set of <tt>{IMM, DW, LD}</tt> instructions | The following table defines a set of <tt>{IMM, DW, LD}</tt> instructions | |||
with opcode subtypes in the 'src_reg' field, using new terms such as "map" | with opcode subtypes in the 'src_reg' field, using new terms such as "map" | |||
defined further below: | defined further below: | |||
</t> | ||||
<table> | ||||
<name>64-bit immediate instructions</name> | ||||
<thead> | ||||
<tr> | ||||
<th>src_reg</th> | ||||
<th>pseudocode</th> | ||||
<th>imm type</th> | ||||
<th>dst type</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>64-bit Immediate Instructions</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>src_reg</th> | ||||
<th>Pseudocode</th> | ||||
<th>imm Type</th> | ||||
<th>dst Type</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = (next_imm << 32) | imm | dst = (next_imm << 32) | imm | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
integer | integer | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
integer | integer | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
0x1 | 0x1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = map_by_fd(imm) | dst = map_by_fd(imm) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
map fd | map fd | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
map | map | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
0x2 | 0x2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = map_val(map_by_fd(imm)) + next_imm | dst = map_val(map_by_fd(imm)) + next_imm | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
map fd | map fd | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
data address | data address | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
0x3 | 0x3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = var_addr(imm) | dst = var_addr(imm) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
variable id | variable id | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
data address | data address | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
0x4 | 0x4 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = code_addr(imm) | dst = code_addr(imm) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
integer | integer | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
code address | code address | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
0x5 | 0x5 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = map_by_idx(imm) | dst = map_by_idx(imm) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
map index | map index | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
map | map | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
0x6 | 0x6 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = map_val(map_by_idx(imm)) + next_imm | dst = map_val(map_by_idx(imm)) + next_imm | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
map index | map index | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
data address | data address | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
where | where | |||
</t> | </t> | |||
<ul> | <ul> | |||
<li> | <li> | |||
map_by_fd(imm) means to convert a 32-bit file descriptor into an address o | map_by_fd(imm) means to convert a 32-bit file descriptor into an address o | |||
f a map (see <xref target="maps">Maps</xref>) | f a map (see <xref target="maps"/>) | |||
</li> | </li> | |||
<li> | <li> | |||
map_by_idx(imm) means to convert a 32-bit index into an address of a map | map_by_idx(imm) means to convert a 32-bit index into an address of a map | |||
</li> | </li> | |||
<li> | <li> | |||
map_val(map) gets the address of the first value in a given map | map_val(map) gets the address of the first value in a given map | |||
</li> | </li> | |||
<li> | <li> | |||
var_addr(imm) gets the address of a platform variable (see <xref target="p | var_addr(imm) gets the address of a platform variable (see <xref target="p | |||
latform-variables">Platform Variables</xref>) with a given id | latform-variables"/>) with a given id | |||
</li> | </li> | |||
<li> | <li> | |||
code_addr(imm) gets the address of the instruction at a specified relative offset in number of (64-bit) instructions | code_addr(imm) gets the address of the instruction at a specified relative offset in number of (64-bit) instructions | |||
</li> | </li> | |||
<li> | <li> | |||
the 'imm type' can be used by disassemblers for display | the 'imm type' can be used by disassemblers for display | |||
</li> | </li> | |||
<li> | ||||
the 'dst type' can be used for verification and JIT compilation purposes | <li> | |||
the 'dst type' can be used for verification and just-in-time compilation p | ||||
urposes | ||||
</li> | </li> | |||
</ul> | </ul> | |||
<section anchor="maps" title="Maps"> | <section anchor="maps"> | |||
<t> | <name>Maps</name> | |||
<t> | ||||
Maps are shared memory regions accessible by BPF programs on some platform s. | Maps are shared memory regions accessible by BPF programs on some platform s. | |||
A map can have various semantics as defined in a separate document, and ma y or | A map can have various semantics as defined in a separate document, and ma y or | |||
may not have a single contiguous memory region, but the 'map_val(map)' is | 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 re gion. | currently only defined for maps that do have a single contiguous memory re gion. | |||
</t> | </t> | |||
<t> | <t> | |||
Each map can have a file descriptor (fd) if supported by the platform, whe re | Each map can have a file descriptor (fd) if supported by the platform, whe re | |||
'map_by_fd(imm)' means to get the map with the specified file descriptor. Each | '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 | 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 | 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 instructio n. | index in the set associated with the BPF program containing the instructio n. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="platform-variables" title="Platform Variables"> | <section anchor="platform-variables"> | |||
<t> | <name>Platform Variables</name> | |||
<t> | ||||
Platform variables are memory regions, identified by integer ids, exposed by | Platform variables are memory regions, identified by integer ids, exposed by | |||
the runtime and accessible by BPF programs on some platforms. The | the runtime, and accessible by BPF programs on some platforms. The | |||
'var_addr(imm)' operation means to get the address of the memory region | 'var_addr(imm)' operation means to get the address of the memory region | |||
identified by the given id. | identified by the given id. | |||
</t> | </t> | |||
</section> | </section> | |||
</section> | </section> | |||
<section anchor="legacy-bpf-packet-access-instructions" title="Legacy BPF Pac | <section anchor="legacy-bpf-packet-access-instructions"> | |||
ket access instructions"> | <name>Legacy BPF Packet Access Instructions</name> | |||
<t> | <t> | |||
BPF previously introduced special instructions for access to packet data th at were | BPF previously introduced special instructions for access to packet data th at were | |||
carried over from classic BPF. These instructions used an instruction | carried over from classic BPF. These instructions used an instruction | |||
class of <tt>LD</tt>, a size modifier of <tt>W</tt>, <tt>H</tt>, or <tt>B</ tt>, and a | class of <tt>LD</tt>, a size modifier of <tt>W</tt>, <tt>H</tt>, or <tt>B</ tt>, and a | |||
mode modifier of <tt>ABS</tt> or <tt>IND</tt>. The 'dst_reg' and 'offset' fields were | mode modifier of <tt>ABS</tt> or <tt>IND</tt>. The 'dst_reg' and 'offset' fields were | |||
set to zero, and 'src_reg' was set to zero for <tt>ABS</tt>. However, thes e | set to zero, and 'src_reg' was set to zero for <tt>ABS</tt>. However, thes e | |||
instructions are deprecated and SHOULD no longer be used. All legacy packe t | instructions are deprecated and <bcp14>SHOULD</bcp14> no longer be used. A ll legacy packet | |||
access instructions belong to the "packet" conformance group. | access instructions belong to the "packet" conformance group. | |||
</t> | </t> | |||
</section> | </section> | |||
</section> | </section> | |||
<section anchor="security-considerations" title="Security Considerations"> | <section anchor="security-considerations"> | |||
<t> | <name>Security Considerations</name> | |||
<t> | ||||
BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, | BPF programs could use BPF instructions to do malicious things with memory, CPU, networking, | |||
or other system resources. This is not fundamentally different from any oth er type of | or other system resources. This is not fundamentally different from any oth er type of | |||
software that may run on a device. Execution environments should be careful ly designed | software that may run on a device. Execution environments should be careful ly designed | |||
to only run BPF programs that are trusted and verified, and sandboxing and p rivilege level | to only run BPF programs that are trusted and verified, and sandboxing and p rivilege level | |||
separation are key strategies for limiting security and abuse impact. For e xample, BPF | separation are key strategies for limiting security and abuse impact. For e xample, BPF | |||
verifiers are well-known and widely deployed and are responsible for ensurin g that BPF programs | verifiers are well-known and widely deployed and are responsible for ensurin g that BPF programs | |||
will terminate within a reasonable time, only interact with memory in safe w ays, adhere to | will terminate within a reasonable time, only interact with memory in safe w ays, adhere to | |||
platform-specified API contracts, and don't use instructions with undefined behavior. | platform-specified API contracts, and don't use instructions with undefined behavior. | |||
This level of verification can often provide a stronger level | This level of verification can often provide a stronger level | |||
of security assurance than for other software and operating system code. | of security assurance than for other software and operating system code. | |||
While the details are out of scope of this document, | While the details are out of scope of this document, | |||
<xref target="LINUX">Linux</xref> and | Linux <xref target="LINUX"/> and PREVAIL | |||
<xref target="PREVAIL">PREVAIL</xref> do provide many details. Future IETF | <xref target="PREVAIL"/> provide many details. Future IETF work will docume | |||
work will document verifier expectations | nt verifier expectations | |||
and building blocks for allowing safe execution of untrusted BPF programs. | and building blocks for allowing safe execution of untrusted BPF programs. | |||
</t> | </t> | |||
<t> | ||||
<t> | ||||
Executing programs using the BPF instruction set also requires either an int erpreter or a compiler | Executing programs using the BPF instruction set also requires either an int erpreter or a compiler | |||
to translate them to hardware processor native instructions. In general, int erpreters are considered a | to translate them to built-in hardware processor instructions. In general, i nterpreters are considered a | |||
source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) | source of insecurity (e.g., gadgets susceptible to side-channel attacks due to speculative execution) | |||
whenever one is used in the same memory address space as data with confident iality | whenever one is used in the same memory address space as data with confident iality | |||
concerns. As such, use of a compiler is recommended instead. Compilers sho uld be audited | concerns. As such, use of a compiler is recommended instead. Compilers sho uld be audited | |||
carefully for vulnerabilities to ensure that compilation of a trusted and ve rified BPF program | carefully for vulnerabilities to ensure that compilation of a trusted and ve rified BPF program | |||
to native processor instructions does not introduce vulnerabilities. | to built-in processor instructions does not introduce vulnerabilities. | |||
</t> | </t> | |||
<t> | <t> | |||
Exposing functionality via BPF extends the interface between the component e xecuting the BPF program and the | Exposing functionality via BPF extends the interface between the component e xecuting the BPF program and the | |||
component submitting it. Careful consideration of what functionality is expo sed and how | component submitting it. Careful consideration of what functionality is expo sed and how | |||
that impacts the security properties desired is required. | that impacts the security properties desired is required. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="iana-considerations" title="IANA Considerations"> | <section anchor="iana-considerations"> | |||
<t> | <name>IANA Considerations</name> | |||
<t> | ||||
This document defines two registries. | This document defines two registries. | |||
</t> | </t> | |||
<section anchor="bpf-instruction-conformance-group-registry" title="BPF Instr | <section anchor="bpf-instruction-conformance-group-registry"> | |||
uction Conformance Group Registry"> | <name>BPF Instruction Conformance Groups Registry</name> | |||
<t> | <t> | |||
This document defines an IANA registry for BPF instruction conformance grou ps, as follows: | This document defines an IANA registry for BPF instruction conformance grou ps, as follows: | |||
</t> | </t> | |||
<ul> | <ul> | |||
<li> | <li> | |||
Name of the registry: BPF Instruction Conformance Groups | Name of the registry: BPF Instruction Conformance Groups | |||
</li> | </li> | |||
<li> | <li> | |||
Name of the registry group: BPF Instructions | Name of the registry group: BPF Instructions | |||
</li> | </li> | |||
<li> | <li> | |||
Required information for registrations: See <xref target="bpf-instruction- | Required information for registrations: See the BPF Instruction Conformanc | |||
conformance-group-registration-template">BPF Instruction Conformance Group Regis | e Groups Registration Template (<xref target="bpf-instruction-conformance-group- | |||
tration Template</xref> | registration-template"/>) | |||
</li> | </li> | |||
<li> | <li> | |||
Syntax of registry entries: Each entry has the following fields: name, des cription, includes, excludes, | Syntax of registry entries: Each entry has the following fields: name, des cription, includes, excludes, | |||
status, and reference. See <xref target="bpf-instruction-conformance-group -registration-template">BPF Instruction Conformance Group Registration Template< /xref> for more details. | status, change controller, and reference. See <xref target="bpf-instructio n-conformance-group-registration-template"/> for more details. | |||
</li> | </li> | |||
<li> | <li> | |||
<t> | ||||
Registration policy (see <xref target="RFC8126" section="4"/> for details) : | Registration policy (see <xref target="RFC8126" section="4"/> for details) : | |||
<ul> | </t> | |||
<li> | <ul> | |||
Permanent: Standards action or IESG Approval | <li> | |||
Permanent: Standards Action or IESG Approval | ||||
</li> | </li> | |||
<li> | <li> | |||
Provisional: Specification required | Provisional: Specification Required | |||
</li> | </li> | |||
<li> | <li> | |||
Historical: Specification required | Historical: Specification Required | |||
</li> | </li> | |||
</ul> | </ul> | |||
</li> | </li> | |||
</ul> | <li>Contact: The IESG</li> | |||
<t> | <li>Change Controller: IETF</li> | |||
Initial entries in this registry are as follows: | ||||
</t> | </ul> | |||
<table> | ||||
<name>Initial conformance groups</name> | ||||
<thead> | ||||
<tr> | ||||
<th>name</th> | ||||
<th>description</th> | ||||
<th>includes</th> | ||||
<th>excludes</th> | ||||
<th>status</th> | ||||
<th>reference</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
32-bit atomic instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Permanent | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFCXXX <xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
64-bit atomic instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Permanent | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFCXXX <xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
32-bit base instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Permanent | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFCXXX | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
64-bit base instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Permanent | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFCXXX | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
divmul32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
32-bit division and modulo | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Permanent | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFCXXX <xref target="arithmetic-instructions">Arithmetic instructions</ | ||||
xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
divmul64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
64-bit division and modulo | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
divmul32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Permanent | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFCXXX <xref target="arithmetic-instructions">Arithmetic instructions</ | ||||
xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
packet | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Legacy packet instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Historical | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | <t> | |||
RFCXXX <xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet access instructions</xref> | Initial entries in this registry are as follows: | |||
</t> | </t> | |||
</td> | <table> | |||
</tr> | <name>Initial Conformance Groups</name> | |||
</tbody> | <thead> | |||
</table> | <tr> | |||
<t> | <th>Name</th> | |||
NOTE TO RFC-EDITOR: Upon publication, please replace RFCXXX above with refe | <th>Description</th> | |||
rence to this document. | <th>Includes</th> | |||
</t> | <th>Excludes</th> | |||
<section anchor="bpf-instruction-conformance-group-registration-template" ti | <th>Status</th> | |||
tle="BPF Instruction Conformance Group Registration Template"> | <th>Reference</th> | |||
<t> | </tr> | |||
This template describes the fields that must be supplied in a registration | </thead> | |||
request | <tbody> | |||
suitable for adding to the registry: | <tr> | |||
</t> | <td> | |||
<dl> | <t> atomic32 </t> | |||
<dt anchor="term-name:"> | </td> | |||
<td> | ||||
<t> | ||||
32-bit atomic instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> Permanent </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFC 9669, | ||||
<xref target="atomic-operations"/> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> atomic64 </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
64-bit atomic instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> atomic32 </t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> Permanent </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFC 9669, | ||||
<xref target="atomic-operations"/> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> base32 </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
32-bit base instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> Permanent </t> | ||||
</td> | ||||
<td> | ||||
<t> RFC 9669 </t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> base64 </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
64-bit base instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> base32 </t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> Permanent </t> | ||||
</td> | ||||
<td> | ||||
<t> RFC 9669 </t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> divmul32 </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
32-bit division and modulo | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> Permanent </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFC 9669, | ||||
<xref target="arithmetic-instructions"/> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> divmul64 </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
64-bit division and modulo | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> divmul32 </t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> Permanent </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFC 9669, | ||||
<xref target="arithmetic-instructions"/> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> packet </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Legacy packet instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> - </t> | ||||
</td> | ||||
<td> | ||||
<t> Historical </t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
RFC 9669, | ||||
<xref target="legacy-bpf-packet-access-instructions"/> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
</tbody> | ||||
</table> | ||||
<section anchor="bpf-instruction-conformance-group-registration-template | ||||
"> | ||||
<name>BPF Instruction Conformance Groups Registration Template</name> | ||||
<t> | ||||
This template describes the fields that must be supplied in a registration | ||||
request: | ||||
</t> | ||||
<dl> | ||||
<dt anchor="term-name_"> | ||||
Name: | Name: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Alphanumeric label indicating the name of the conformance group. | Alphanumeric label indicating the name of the conformance group. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-description:"> | <dt anchor="term-description_"> | |||
Description: | Description: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Brief description of the conformance group. | Brief description of the conformance group. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-includes:"> | <dt anchor="term-includes_"> | |||
Includes: | Includes: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Any other conformance groups that are included by this group. | Any other conformance groups that are included by this group. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-excludes:"> | <dt anchor="term-excludes_"> | |||
Excludes: | Excludes: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Any other conformance groups that are excluded by this group. | Any other conformance groups that are excluded by this group. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-status:"> | <dt anchor="term-status_"> | |||
Status: | Status: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
This reflects the status requested and must be one of 'Permanent', | This reflects the status requested and must be one of 'Permanent', | |||
'Provisional', or 'Historical'. | 'Provisional', or 'Historical'. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-contact:"> | <dt anchor="term-contact_"> | |||
Contact: | Contact: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Person (including contact information) to contact for further informatio n. | Person (including contact information) to contact for further informatio n. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-change-controller:"> | <dt anchor="term-change-controller_"> | |||
Change controller: | Change Controller: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Organization or person (often the author), including contact information | Organization or person (often the author of the defining specification), | |||
, | including contact information, | |||
authorized to change this. | authorized to change this. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-reference:"> | <dt anchor="term-reference_"> | |||
Reference: | Reference: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
A reference to the defining specification. | A reference to the defining specification. Include full | |||
Include full citations for all referenced documents. | citations for all referenced documents. Registration requests for | |||
Registration requests for 'Provisional' registration can be | 'Provisional' registration can be included in an Internet-Draft; | |||
included in an Internet-Draft; when the documents are | when the documents are approved for publication as an RFC, the | |||
approved for publication as an RFC, the registration will be | registration will be updated to 'Permanent'. | |||
updated. | </t> | |||
</t> | </dd> | |||
</dd> | </dl> | |||
</dl> | </section> | |||
</section> | </section> | |||
</section> | <section anchor="bpf-instruction-set-registry"> | |||
<section anchor="bpf-instruction-set-registry" title="BPF Instruction Set Reg | <name>BPF Instruction Set Registry</name> | |||
istry"> | <t> | |||
<t> | This document defines an IANA registry for BPF instructions, as follows: | |||
This document proposes a new IANA registry for BPF instructions, as follows | </t> | |||
: | <ul> | |||
</t> | <li> | |||
<ul> | ||||
<li> | ||||
Name of the registry: BPF Instruction Set | Name of the registry: BPF Instruction Set | |||
</li> | </li> | |||
<li> | <li> | |||
Name of the registry group: BPF Instructions | Name of the registry group: BPF Instructions | |||
</li> | </li> | |||
<li> | <li> | |||
Required information for registrations: See <xref target="bpf-instruction- | Required information for registrations: See the BPF Instruction Registrati | |||
registration-template">BPF Instruction Registration Template</xref> | on Template (<xref target="bpf-instruction-registration-template"/>) | |||
</li> | </li> | |||
<li> | <li> | |||
Syntax of registry entries: Each entry has the following fields: opcode, s | Syntax of registry entries: Each entry has the following fields: opcode, s | |||
rc, imm, offset, description, | rc, offset, imm, description, | |||
groups, and reference. See <xref target="bpf-instruction-registration-temp | groups, change controller, and reference. See <xref target="bpf-instructio | |||
late">BPF Instruction Registration Template</xref> for more details. | n-registration-template"/> for more details. | |||
</li> | </li> | |||
<li> | ||||
<li> | ||||
Registration policy: New instructions require a new entry in the conforman ce group | Registration policy: New instructions require a new entry in the conforman ce group | |||
registry and the same registration policies apply. | registry and the same registration policies apply. | |||
</li> | </li> | |||
<li> | <li>Contact: The IESG</li> | |||
Initial registrations: See the Appendix. Instructions other than those lis | <li>Change Controller: IETF</li> | |||
ted | <li> | |||
Initial registrations: See <xref target="appendix"/>. Instructions other t | ||||
han those listed | ||||
as deprecated are Permanent. Any listed as deprecated are Historical. | as deprecated are Permanent. Any listed as deprecated are Historical. | |||
</li> | </li> | |||
</ul> | </ul> | |||
<section anchor="bpf-instruction-registration-template" title="BPF Instructi | <section anchor="bpf-instruction-registration-template"> | |||
on Registration Template"> | <name>BPF Instruction Registration Template</name> | |||
<t> | <t> | |||
This template describes the fields that must be supplied in a registration | This template describes the fields that must be supplied in a registration | |||
request | request: | |||
suitable for adding to the registry: | </t> | |||
</t> | <dl> | |||
<dl> | <dt anchor="term-opcode_"> | |||
<dt anchor="term-opcode:"> | ||||
Opcode: | Opcode: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
A 1-byte value in hex format indicating the value of the opcode field | A 1-byte value in hex format indicating the value of the opcode field. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-src:"> | <dt anchor="term-src_"> | |||
Src: | Src_reg: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Either a numeric value indicating the value of the src field, or "any" | Either a numeric value indicating the value of the src_reg field, or "an | |||
</t> | y". | |||
</dd> | </t> | |||
<dt anchor="term-imm:"> | </dd> | |||
Imm: | ||||
</dt> | <dt anchor="term-offset_"> | |||
<dd> | ||||
<t> | ||||
Either a value indicating the value of the imm field, or "any" | ||||
</t> | ||||
</dd> | ||||
<dt anchor="term-offset:"> | ||||
Offset: | Offset: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Either a numeric value indicating the value of the offset field, or "any | Either a numeric value indicating the value of the offset field, or "any | |||
" | ". | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-description:-"> | ||||
<dt anchor="term-imm_"> | ||||
Imm: | ||||
</dt> | ||||
<dd> | ||||
<t> | ||||
Either a value indicating the value of the imm field, or "any". | ||||
</t> | ||||
</dd> | ||||
<dt anchor="term-description_-"> | ||||
Description: | Description: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Description of what the instruction does, typically in pseudocode | Description of what the instruction does, typically in pseudocode. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-groups:"> | <dt anchor="term-groups_"> | |||
Groups: | Groups: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
A list of one or more comma-separated conformance groups to which the in | A list of one or more comma-separated conformance groups to which the in | |||
struction belongs | struction belongs. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-contact:-"> | <dt anchor="term-contact_-"> | |||
Contact: | Contact: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Person (including contact information) to contact for further informatio n. | Person (including contact information) to contact for further informatio n. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-change-controller:-"> | <dt anchor="term-change-controller_-"> | |||
Change controller: | Change Controller: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
Organization or person (often the author), including contact information , | Organization or person (often the author), including contact information , | |||
authorized to change this. | authorized to change this. | |||
</t> | </t> | |||
</dd> | </dd> | |||
<dt anchor="term-reference:-"> | <dt anchor="term-reference_-"> | |||
Reference: | Reference: | |||
</dt> | </dt> | |||
<dd> | <dd> | |||
<t> | <t> | |||
A reference to the defining specification. | A reference to the defining specification. Include full | |||
Include full citations for all referenced documents. | citations for all referenced documents. Registration requests for | |||
Registration requests for 'Provisional' registration can be | 'Provisional' registration can be included in an Internet-Draft; | |||
included in an Internet-Draft; when the documents are | when the documents are approved for publication as an RFC, the | |||
approved for publication as an RFC, the registration will be | registration will be updated to 'Permanent'. | |||
updated. | </t> | |||
</t> | </dd> | |||
</dd> | </dl> | |||
</dl> | </section> | |||
</section> | </section> | |||
</section> | <section anchor="adding-instructions"> | |||
<section anchor="adding-instructions" title="Adding instructions"> | <name>Adding Instructions</name> | |||
<t> | <t> | |||
A specification may add additional instructions to the BPF Instruction Set registry. | A specification may add additional instructions to the BPF Instruction Set registry. | |||
Once a conformance group is registered with a set of instructions, | Once a conformance group is registered with a set of instructions, | |||
no further instructions can be added to that conformance group. A specifica tion | no further instructions can be added to that conformance group. A specifica tion | |||
should instead create a new conformance group that includes the original co nformance group, | should instead create a new conformance group that includes the original co nformance group, | |||
plus any newly added instructions. Inclusion of the original conformance g roup is done | plus any newly added instructions. Inclusion of the original conformance g roup is done | |||
via the "includes" column of the BPF Instruction Conformance Group Registry | via the "includes" column of the BPF Instruction Conformance Groups registr | |||
, and inclusion | y, and inclusion | |||
of newly added instructions is done via the "groups" column of the BPF Inst | of newly added instructions is done via the "groups" column of the BPF Inst | |||
ruction Set Registry. | ruction Set registry. | |||
</t> | </t> | |||
<t> | <t> | |||
For example, consider an existing hypothetical group called "example" with two instructions in it. | For example, consider an existing hypothetical group called "example" with two instructions in it. | |||
One might add two more instructions by first adding an "examplev2" group to the | One might add two more instructions by first adding an "examplev2" group to the | |||
BPF Instruction Conformance Group Registry as follows: | BPF Instruction Conformance Groups registry as follows: | |||
</t> | ||||
<table> | ||||
<name>Conformance group example for addition</name> | ||||
<thead> | ||||
<tr> | ||||
<th>name</th> | ||||
<th>description</th> | ||||
<th>includes</th> | ||||
<th>excludes</th> | ||||
<th>status</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
example | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Conformance Group Example for Addition</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>Name</th> | ||||
<th>Description</th> | ||||
<th>Includes</th> | ||||
<th>Excludes</th> | ||||
<th>Status</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
example | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Original example instructions | Original example instructions | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
- | - | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
- | - | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Permanent | Permanent | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
examplev2 | examplev2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Newer set of example instructions | Newer set of example instructions | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example | example | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
- | - | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Permanent | Permanent | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | ||||
And then adding the new instructions into the BPF Instruction Set Registry | ||||
as follows: | ||||
</t> | ||||
<table> | ||||
<name>Instruction addition example</name> | ||||
<thead> | ||||
<tr> | ||||
<th>opcode</th> | ||||
<th>...</th> | ||||
<th>description</th> | ||||
<th>groups</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | <t> | |||
aaa | And then adding the new instructions into the BPF Instruction Set registry as follows: | |||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Instruction Addition Example</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>opcode</th> | ||||
<th>...</th> | ||||
<th>Description</th> | ||||
<th>Groups</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
aaa | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Original example instruction 1 | Original example instruction 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example | example | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
bbb | bbb | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Original example instruction 2 | Original example instruction 2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example | example | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
ccc | ccc | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Added example instruction 3 | Added example instruction 3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
examplev2 | examplev2 | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
ddd | ddd | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Added example instruction 4 | Added example instruction 4 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
examplev2 | examplev2 | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
Supporting the "examplev2" group thus requires supporting all four example instructions. | Supporting the "examplev2" group thus requires supporting all four example instructions. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="deprecating-instructions" title="Deprecating instructions"> | <section anchor="deprecating-instructions"> | |||
<t> | <name>Deprecating Instructions</name> | |||
<t> | ||||
Deprecating instructions that are part of an existing conformance group can be done by defining a | Deprecating instructions that are part of an existing conformance group can be done by defining a | |||
new conformance group for the newly deprecated instructions, and defining a new conformance group | new conformance group for the newly deprecated instructions, and defining a new conformance group | |||
that supersedes the existing conformance group containing the instructions, where the new conformance | that supersedes the existing conformance group containing the instructions, where the new conformance | |||
group includes the existing one and excludes the deprecated instruction gro up. | group includes the existing one and excludes the deprecated instruction gro up. | |||
</t> | ||||
<t> | ||||
For example, if deprecating an instruction in an existing hypothetical grou | ||||
p called "example", two new groups | ||||
("legacyexample" and "examplev2") might be registered in the BPF Instructio | ||||
n Conformance Group | ||||
Registry as follows: | ||||
</t> | ||||
<table> | ||||
<name>Conformance group example for deprecation</name> | ||||
<thead> | ||||
<tr> | ||||
<th>name</th> | ||||
<th>description</th> | ||||
<th>includes</th> | ||||
<th>excludes</th> | ||||
<th>status</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
example | ||||
</t> | </t> | |||
</td> | ||||
<td> | ||||
<t> | <t> | |||
Original example instructions | For example, if deprecating an instruction in an existing hypothetical grou | |||
p called "example", two new groups | ||||
("legacyexample" and "examplev2") might be registered in the BPF Instructio | ||||
n Conformance Groups | ||||
registry as follows: | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Conformance Group Example for Deprecation</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>Name</th> | ||||
<th>Description</th> | ||||
<th>Includes</th> | ||||
<th>Excludes</th> | ||||
<th>Status</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
example | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
Original example instructions | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
- | - | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
- | - | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Permanent | Permanent | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
legacyexample | legacyexample | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Legacy example instructions | Legacy example instructions | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
- | - | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
- | - | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Historical | Historical | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
examplev2 | examplev2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Example instructions | Example instructions | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example | example | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
legacyexample | legacyexample | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Permanent | Permanent | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | ||||
The BPF Instruction Set Registry entries for the deprecated instructions wo | ||||
uld then be updated | ||||
to add "legacyexample" to the set of groups for those instructions, as foll | ||||
ows: | ||||
</t> | ||||
<table> | ||||
<name>Instruction deprecation example</name> | ||||
<thead> | ||||
<tr> | ||||
<th>opcode</th> | ||||
<th>...</th> | ||||
<th>description</th> | ||||
<th>groups</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | <t> | |||
aaa | The BPF Instruction Set registry entries for the deprecated instructions wo | |||
uld then be updated | ||||
to add "legacyexample" to the set of groups for those instructions, as foll | ||||
ows: | ||||
</t> | </t> | |||
</td> | <table> | |||
<td> | <name>Instruction Deprecation Example</name> | |||
<t> | <thead> | |||
<tr> | ||||
<th>opcode</th> | ||||
<th>...</th> | ||||
<th>Description</th> | ||||
<th>Groups</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
aaa | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Good original instruction 1 | Good original instruction 1 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example | example | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
bbb | bbb | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Good original instruction 2 | Good original instruction 2 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example | example | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
ccc | ccc | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Bad original instruction 3 | Bad original instruction 3 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example, legacyexample | example, legacyexample | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> | |||
ddd | ddd | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
... | ... | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
Bad original instruction 4 | Bad original instruction 4 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
example, legacyexample | example, legacyexample | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
</tbody> | </tbody> | |||
</table> | </table> | |||
<t> | <t> | |||
Finally, updated implementations that dropped support for the deprecated in structions | Finally, updated implementations that dropped support for the deprecated in structions | |||
would then be able to claim conformance to "examplev2" rather than "example ". | would then be able to claim conformance to "examplev2" rather than "example ". | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="change-control" title="Change Control"> | <section anchor="change-control"> | |||
<t> | <name>Change Control</name> | |||
Registrations can be updated in a registry by the same mechanism as | ||||
required for an initial registration. In cases where the original | <t> | |||
definition of an entry is contained in an IESG-approved document, | Registrations can be updated in a registry by the same mechanism as | |||
update of the specification also requires IESG approval. | required for an initial registration. In cases where the original | |||
</t> | definition of an entry is contained in an IESG-approved document, | |||
<t> | in which case the IETF would be the change controller, | |||
update of the specification also requires IESG approval. | ||||
</t> | ||||
<t> | ||||
'Provisional' registrations can be updated by the change controller | 'Provisional' registrations can be updated by the change controller | |||
designated in the existing registration. In addition, the | designated in the existing registration. In addition, the | |||
IESG can reassign responsibility for a 'Provisional' registration | IESG can reassign responsibility for a 'Provisional' registration | |||
or can request specific changes to an entry. | or can request specific changes to an entry. | |||
This will enable changes to be made to entries where the original | This will enable changes to be made to entries where the original | |||
registrant is out of contact or unwilling or unable to make changes. | registrant is out of contact or unwilling or unable to make changes. | |||
</t> | </t> | |||
<t> | <t> | |||
Transition from 'Provisional' to 'Permanent' status can be requested | Transition from 'Provisional' to 'Permanent' status can be requested | |||
and approved in the same manner as a new 'Permanent' registration. | and approved in the same manner as a new 'Permanent' registration. | |||
Transition from 'Permanent' to 'Historical' status requires IESG | Transition from 'Permanent' to 'Historical' status requires IESG | |||
approval. Transition from 'Provisional' to 'Historical' can be | approval. Transition from 'Provisional' to 'Historical' can be | |||
requested by anyone authorized to update the 'Provisional' | requested by anyone authorized to update the 'Provisional' | |||
registration. | registration. | |||
</t> | </t> | |||
</section> | </section> | |||
<section anchor="expert-review-instructions" title="Expert Review Instruction | <section anchor="expert-review-instructions"> | |||
s"> | <name>Expert Review Instructions</name> | |||
<t> | <t> | |||
The IANA registries established by this document are informed by written | The IANA registries established by this document are informed by written | |||
specifications, which themselves are facilitated and approved by | specifications, which themselves are facilitated and approved by | |||
an Expert Review <xref target="RFC8126" section="5.3"/> | an Expert Review process (see <xref target="RFC8126" section="5.3"/>). | |||
process. | </t> | |||
</t> | <t> | |||
<t> | Designated experts are expected to consult with the active | |||
Designated Experts are expected to consult with the active | ||||
BPF working group (e.g., via email to the working group's mailing list) | BPF working group (e.g., via email to the working group's mailing list) | |||
if it exists, as well as other interested parties (e.g., via email to | if it exists, as well as other interested parties (e.g., via email to | |||
one or more active mailing list(s) for relevant BPF communities and | one or more active mailing list(s) for relevant BPF communities and | |||
platforms). The Designed Expert is expected to verify that the encoding | platforms). The designated expert is expected to verify that the encoding | |||
and semantics for any new instructions are properly documented in a | and semantics for any new instructions are properly documented in a | |||
public-facing specification. In the event of future RFC documents for ISA | public-facing specification. In the event of future RFC documents for ISA | |||
extensions, experts may permit early assignment before the RFC document | extensions, experts may permit early assignment before the RFC document | |||
is available, as long as a specification exists which satisfies the above | is available, as long as a specification that satisfies the above | |||
requirements. | requirements exists. | |||
</t> | </t> | |||
</section> | </section> | |||
</section> | </section> | |||
<section anchor="acknowledgements" title="Acknowledgements"> | ||||
<t> | </middle> | |||
This draft was generated from instruction-set.rst in the Linux | <back> | |||
kernel repository, to which a number of other individuals have authored cont | <references> | |||
ributions | <name>References</name> | |||
over time, including Akhil Raj, Alexei Starovoitov, Brendan Jackman, Christo | <references> | |||
ph Hellwig, Daniel Borkmann, | <name>Normative References</name> | |||
Ilya Leoshkevich, Jiong Wang, Jose E. Marchesi, Kosuke Fujimoto, | ||||
Shahab Vahedi, Tiezhu Yang, Will Hawkins, and Zheng Yejian, with review and | <reference anchor="IEN137" target="https://www.rfc-editor.org/ien/ien137 | |||
suggestions by many others including | .txt"> | |||
Alan Jowett, Andrii Nakryiko, David Vernet, Jim Harris, | <front> | |||
Quentin Monnet, Song Liu, Shung-Hsi Yu, Stanislav Fomichev, Watson Ladd, and | <title>ON HOLY WARS AND A PLEA FOR PEACE</title> | |||
Yonghong Song. | <author fullname="D. Cohen" initials="D." surname="Cohen"/> | |||
</t> | <date month="April" year="1980" day="1"/> | |||
</section> | </front> | |||
<section anchor="appendix" title="Appendix"> | <seriesInfo name="IEN" value="137"/> | |||
<t> | </reference> | |||
Initial values for the BPF Instruction sub-registry are given below. | ||||
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2 | ||||
119.xml"/> | ||||
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8 | ||||
126.xml"/> | ||||
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8 | ||||
174.xml"/> | ||||
</references> | ||||
<references> | ||||
<name>Informative References</name> | ||||
<reference anchor="LINUX" target="https://www.kernel.org/doc/html/latest | ||||
/bpf/verifier.html"> | ||||
<front> | ||||
<title>eBPF verifier</title> | ||||
<author/> | ||||
</front> | ||||
</reference> | ||||
<reference anchor="PREVAIL"> | ||||
<front> | ||||
<title>Simple and Precise Static Analysis of Untrusted Linux Kernel | ||||
Extensions</title> | ||||
<author fullname="E. Gershuni" initials="E." surname="Gershuni"/> | ||||
<author fullname="N. Amit" initials="N." surname="Amit"/> | ||||
<author fullname="A. Gurfinkel" initials="A." surname="Gurfinkel"/> | ||||
<author fullname="N. Narodytska" initials="N." surname="Narodytska"/ | ||||
> | ||||
<author fullname="J. Navas" initials="J." surname="Navas"/> | ||||
<author fullname="N. Rinetzky" initials="N." surname="Rinetzky"/> | ||||
<author fullname="L. Ryzhyk" initials="L." surname="Ryzhyk"/> | ||||
<author fullname="M. Sagiv" initials="M." surname="Sagiv"/> | ||||
<date month="June" year="2019"/> | ||||
</front> | ||||
<seriesInfo name="DOI" value="10.1145/3314221.3314590"/> | ||||
</reference> | ||||
</references> | ||||
</references> | ||||
<section anchor="appendix"> | ||||
<name>Initial BPF Instruction Set Values</name> | ||||
<t> | ||||
Initial values for the BPF Instruction Set registry are given below. | ||||
The descriptions in this table are informative. In case of any discrepancy, the reference | The descriptions in this table are informative. In case of any discrepancy, the reference | |||
is authoritative. | is authoritative. | |||
</t> | </t> | |||
<table> | <table> | |||
<name>BPF Instruction sub-registry initial values</name> | <name>Initial BPF Instruction Set Values</name> | |||
<thead> | <thead> | |||
<tr> | <tr> | |||
<th>opcode</th> | <th>opcode</th> | |||
<th>src_reg</th> | <th>src_reg</th> | |||
<th>offset</th> | <th>off-set</th> | |||
<th>imm</th> | <th>imm</th> | |||
<th>description</th> | <th>Description</th> | |||
<th>groups</th> | <th>Groups</th> | |||
<th>reference</th> | <th>Ref</th> | |||
</tr> | </tr> | |||
</thead> | </thead> | |||
<tbody> | <tbody> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> | |||
</td> | (additional immediate value) | |||
<td> | </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
(additional immediate value) | RFC 9669, | |||
</t> | <xref target="_4-bit-immediate-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
base64 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x04 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | <t> 0x0 </t> | |||
ns</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x04 | <td> | |||
</t> | <t> | |||
</td> | dst = (u32)((u32)dst + (u32)imm) | |||
<td> | </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x05 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (u32)((u32)dst + (u32)imm) | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> goto +offset </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x05 | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x0 | <td> | |||
</t> | <t> 0x06 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> goto +imm </t> | |||
<t> | </td> | |||
goto +offset | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
base32 | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
<xref target="jump-instructions">Jump instructions</xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x07 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
0x06 | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> dst += imm </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
goto +imm | <td> | |||
</t> | <t> 0x0c </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | dst = (u32)((u32)dst + (u32)src) | |||
<td> | </t> | |||
<t> | </td> | |||
0x07 | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x0f </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
dst += imm | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst += src </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x0c | <td> | |||
</t> | <t> 0x14 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | dst = (u32)((u32)dst - (u32)imm) | |||
0x00 | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
dst = (u32)((u32)dst + (u32)src) | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
base32 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x15 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x0f | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> if dst == imm goto +offset </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0x00 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x16 </t> | |||
<t> | </td> | |||
dst += src | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | if (u32)dst == imm goto +offset | |||
</td> | </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
0x14 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="jump-instructions"/> | |||
<t> | </t> | |||
0x0 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x17 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst = (u32)((u32)dst - (u32)imm) | <td> | |||
</t> | <t> dst -= imm </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> 0x18 </t> | |||
<t> | </td> | |||
0x15 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | dst = (next_imm << 32) | imm | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
if dst == imm goto +offset | <xref target="_4-bit-immediate-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
base64 | <td> | |||
</t> | <t> 0x18 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x1 </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x16 | <td> | |||
</t> | <t> dst = map_by_fd(imm) </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="_4-bit-immediate-instructions"/> | |||
any | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
any | <t> 0x18 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x2 </t> | |||
<t> | </td> | |||
if (u32)dst == imm goto +offset | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | dst = map_val(map_by_fd(imm)) + next_imm | |||
<t> | </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x17 | <xref target="_4-bit-immediate-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x0 | <td> | |||
</t> | <t> 0x18 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x3 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst = var_addr(imm) </t> | |||
<t> | </td> | |||
dst -= imm | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
base64 | RFC 9669, | |||
</t> | <xref target="_4-bit-immediate-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x18 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0x4 </t> | |||
<t> | </td> | |||
0x18 | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> dst = code_addr(imm) </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="_4-bit-immediate-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
dst = (next_imm << 32) | imm | <td> | |||
</t> | <t> 0x18 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x5 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | <t> any </t> | |||
ns</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> dst = map_by_idx(imm) </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> base64 </t> | |||
<t> | </td> | |||
0x18 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="_4-bit-immediate-instructions"/> | |||
<t> | </t> | |||
0x1 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x18 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x6 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst = map_by_fd(imm) | <td> | |||
</t> | <t> | |||
</td> | dst = map_val(map_by_idx(imm)) + next_imm | |||
<td> | </t> | |||
<t> | </td> | |||
base64 | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | RFC 9669, | |||
ns</xref> | <xref target="_4-bit-immediate-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x1c </t> | |||
0x18 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x2 | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> | |||
</td> | dst = (u32)((u32)dst - (u32)src) | |||
<td> | </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = map_val(map_by_fd(imm)) + next_imm | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
base64 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x1d </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | <t> any </t> | |||
ns</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
0x18 | <td> | |||
</t> | <t> if dst == src goto +offset </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
0x3 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
0 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
any | <t> 0x1e </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst = var_addr(imm) | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | if (u32)dst == (u32)src goto +offset | |||
<t> | </t> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | </td> | |||
ns</xref> | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
0x18 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
0x4 | <t> 0x1f </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> dst -= src </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = code_addr(imm) | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
base64 | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | <td> | |||
ns</xref> | <t> 0x20 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x0 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
0x18 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x5 | <t> | |||
</t> | (deprecated, implementation-specific) | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> packet </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="legacy-bpf-packet-access-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
dst = map_by_idx(imm) | <td> | |||
</t> | <t> 0x24 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | <t> any </t> | |||
ns</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> dst = (u32)(dst * imm) </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> divmul32 </t> | |||
<t> | </td> | |||
0x18 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
0x6 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x25 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst = map_val(map_by_idx(imm)) + next_imm | <td> | |||
</t> | <t> if dst > imm goto +offset </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
<xref target="-4-bit-immediate-instructions">64-bit immediate instructio | </t> | |||
ns</xref> | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
</tr> | <td> | |||
<tr> | <t> 0x26 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x1c | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | if (u32)dst > imm goto +offset | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
dst = (u32)((u32)dst - (u32)src) | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
base32 | <t> 0x27 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x1d | <t> dst *= imm </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> divmul64 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
any | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x28 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
if dst == src goto +offset | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
base64 | <td> | |||
</t> | <t> | |||
</td> | (deprecated, implementation-specific) | |||
<td> | </t> | |||
<t> | </td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> packet </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="legacy-bpf-packet-access-instructions"/> | |||
0x1e | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
any | <t> 0x2c </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> dst = (u32)(dst * src) </t> | |||
<td> | </td> | |||
<t> | <td> | |||
if (u32)dst == (u32)src goto +offset | <t> divmul32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
base32 | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> 0x2d </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x1f | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> if dst > src goto +offset </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
0x00 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
dst -= src | <t> 0x2e </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
base64 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
</tr> | if (u32)dst > (u32)src goto +offset | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x20 | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x0 | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0 | <td> | |||
</t> | <t> 0x2f </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
(deprecated, implementation-specific) | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst *= src </t> | |||
<t> | </td> | |||
packet | <td> | |||
</t> | <t> divmul64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet a | RFC 9669, | |||
ccess instructions</xref> | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x30 </t> | |||
0x24 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> | |||
</td> | (deprecated, implementation-specific) | |||
<td> | </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> packet </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (u32)(dst * imm) | RFC 9669, | |||
</t> | <xref target="legacy-bpf-packet-access-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
divmul32 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x34 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x25 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | dst = (u32)((imm != 0) ? ((u32)dst / (u32)imm) : 0) | |||
<t> | </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> divmul32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x34 </t> | |||
<t> | </td> | |||
if dst > imm goto +offset | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 1 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> | |||
</t> | dst = (u32)((imm != 0) ? ((s32)dst s/ imm) : 0) | |||
</td> | </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> divmul32 </t> | |||
<t> | </td> | |||
0x26 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
0x0 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x35 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
if (u32)dst > imm goto +offset | <td> | |||
</t> | <t> if dst >= imm goto +offset </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
<xref target="jump-instructions">Jump instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> 0x36 </t> | |||
<t> | </td> | |||
0x27 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> | |||
</t> | if (u32)dst >= imm goto +offset | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
dst *= imm | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
divmul64 | <td> | |||
</t> | <t> 0x37 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x28 | <td> | |||
</t> | <t> | |||
</td> | dst = (imm != 0) ? (dst / (u32)imm) : 0 | |||
<td> | </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> divmul64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x37 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
(deprecated, implementation-specific) | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 1 </t> | |||
<t> | </td> | |||
packet | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet a | dst = (imm != 0) ? (dst s/ imm) : 0 | |||
ccess instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> divmul64 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x2c | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x3c </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (u32)(dst * src) | dst = (u32)((src != 0) ? ((u32)dst / (u32)src) : 0) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> divmul32 </t> | |||
divmul32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> 0x3c </t> | |||
<t> | </td> | |||
0x2d | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 1 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | dst = (u32)((src != 0) ? ((s32)dst s/(s32)src) : 0) | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> divmul32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
if dst > src goto +offset | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
base64 | <td> | |||
</t> | <t> 0x3d </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
0x2e | <td> | |||
</t> | <t> if dst >= src goto +offset </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
any | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
0x00 | <t> 0x3e </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
if (u32)dst > (u32)src goto +offset | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | if (u32)dst >= (u32)src goto +offset | |||
<t> | </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x2f | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
any | <td> | |||
</t> | <t> 0x3f </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | dst = (src != 0) ? (dst / src) : 0 | |||
dst *= src | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> divmul64 </t> | |||
<t> | </td> | |||
divmul64 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
</tr> | <td> | |||
<tr> | <t> 0x3f </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x30 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 1 </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | dst = (src != 0) ? (dst s/ src) : 0 | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> divmul64 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
(deprecated, implementation-specific) | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
packet | <t> 0x40 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet a | <td> | |||
ccess instructions</xref> | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> any </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x34 | (deprecated, implementation-specific) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> packet </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="legacy-bpf-packet-access-instructions"/> | |||
0 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
any | <t> 0x44 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
dst = (u32)((imm != 0) ? ((u32)dst / (u32)imm) : 0) | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
divmul32 | </td> | |||
</t> | <td> | |||
</td> | <t> dst = (u32)(dst | imm) </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
0x34 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x45 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
1 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> if dst & imm goto +offset </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
dst = (u32)((imm != 0) ? ((s32)dst s/ imm) : 0) | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
divmul32 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> 0x46 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x0 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x35 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> | |||
</t> | if (u32)dst & imm goto +offset | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
if dst >= imm goto +offset | <td> | |||
</t> | <t> 0x47 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> dst |= imm </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
0x36 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
0x0 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
any | <t> 0x48 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
if (u32)dst >= imm goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | (deprecated, implementation-specific) | |||
<t> | </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> packet </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="legacy-bpf-packet-access-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x37 | <td> | |||
</t> | <t> 0x4c </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst = (u32)(dst | src) </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (imm != 0) ? (dst / (u32)imm) : 0 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
divmul64 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x4d </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> any </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x37 | </td> | |||
</t> | <td> | |||
</td> | <t> if dst & src goto +offset </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
1 | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
any | <td> | |||
</t> | <t> 0x4e </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
dst = (imm != 0) ? (dst s/ imm) : 0 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
divmul64 | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | if (u32)dst & (u32)src goto +offset | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> base32 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x3c | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x4f </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst |= src </t> | |||
dst = (u32)((src != 0) ? ((u32)dst / (u32)src) : 0) | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
divmul32 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
</tr> | <t> 0x50 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x3c | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | (deprecated, implementation-specific) | |||
1 | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> packet </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="legacy-bpf-packet-access-instructions"/> | |||
<t> | </t> | |||
dst = (u32)((src != 0) ? ((s32)dst s/(s32)src) : 0) | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x54 </t> | |||
divmul32 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> any </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = (u32)(dst & imm) </t> | |||
0x3d | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x55 </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
if dst >= src goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base64 | <t> if dst != imm goto +offset </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base64 </t> | |||
<t> | </td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
</tr> | <xref target="jump-instructions"/> | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0x3e | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x56 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x00 | if (u32)dst != imm goto +offset | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
if (u32)dst >= (u32)src goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
base32 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> 0x57 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x0 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
0x3f | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> dst &= imm </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base64 </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
0x00 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x5c </t> | |||
dst = (src != 0) ? (dst / src) : 0 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
divmul64 | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> dst = (u32)(dst & src) </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x3f | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x5d </t> | |||
<t> | </td> | |||
1 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (src != 0) ? (dst s/ src) : 0 | <t> if dst != src goto +offset </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base64 </t> | |||
<t> | </td> | |||
divmul64 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="jump-instructions"/> | |||
<t> | </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
</tr> | <td> | |||
<tr> | <t> 0x5e </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x40 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | if (u32)dst != (u32)src goto +offset | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
(deprecated, implementation-specific) | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
packet | <t> 0x5f </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet a | <td> | |||
ccess instructions</xref> | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x00 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> dst &= src </t> | |||
0x44 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x61 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
dst = (u32)(dst | imm) | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> | |||
</t> | dst = *(u32 *)(src + offset) | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | RFC 9669, | |||
<td> | <xref target="load-and-store-instructions"/> | |||
<t> | </t> | |||
0x45 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x62 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> | |||
</td> | *(u32 *)(dst + offset) = imm | |||
<td> | </t> | |||
<t> | </td> | |||
if dst & imm goto +offset | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
base64 | RFC 9669, | |||
</t> | <xref target="load-and-store-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
<xref target="jump-instructions">Jump instructions</xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x63 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x46 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | *(u32 *)(dst + offset) = src | |||
<t> | </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="load-and-store-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
if (u32)dst & imm goto +offset | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x64 </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> dst = (u32)(dst << imm) </t> | |||
<t> | </td> | |||
0x47 | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x65 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst |= imm | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> if dst s> imm goto +offset </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x48 | <td> | |||
</t> | <t> 0x66 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | if (s32)dst s> (s32)imm goto +offset | |||
any | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
(deprecated, implementation-specific) | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="jump-instructions"/> | |||
<t> | </t> | |||
packet | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x67 </t> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet a | </td> | |||
ccess instructions</xref> | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x4c | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst <<= imm </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0x00 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x69 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (u32)(dst | src) | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | dst = *(u16 *)(src + offset) | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x4d | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="load-and-store-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x6a </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
if dst & src goto +offset | <t> | |||
</t> | *(u16 *)(dst + offset) = imm | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base64 | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
<xref target="jump-instructions">Jump instructions</xref> | <xref target="load-and-store-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x6b </t> | |||
0x4e | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> | |||
</td> | *(u16 *)(dst + offset) = src | |||
<td> | </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
if (u32)dst & (u32)src goto +offset | RFC 9669, | |||
</t> | <xref target="load-and-store-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
base32 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x6c </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x4f | </td> | |||
</t> | <td> | |||
</td> | <t> dst = (u32)(dst << src) </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0 | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x00 | <td> | |||
</t> | <t> 0x6d </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
dst |= src | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base64 | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> if dst s> src goto +offset </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
0x50 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
any | <t> 0x6e </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | if (s32)dst s> (s32)src goto +offset | |||
<t> | </t> | |||
(deprecated, implementation-specific) | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
packet | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
<xref target="legacy-bpf-packet-access-instructions">Legacy BPF Packet a | </tr> | |||
ccess instructions</xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x6f </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x54 | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> dst <<= src </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
dst = (u32)(dst & imm) | <td> | |||
</t> | <t> 0x71 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | dst = *(u8 *)(src + offset) | |||
<td> | </t> | |||
<t> | </td> | |||
0x55 | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | RFC 9669, | |||
</t> | <xref target="load-and-store-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x72 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
if dst != imm goto +offset | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
base64 | *(u8 *)(dst + offset) = imm | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
</tr> | RFC 9669, | |||
<tr> | <xref target="load-and-store-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0x56 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x73 </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | *(u8 *)(dst + offset) = src | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
if (u32)dst != imm goto +offset | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
base32 | <xref target="load-and-store-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> 0x74 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x57 | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> dst = (u32)(dst >> imm) </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
any | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
dst &= imm | <t> 0x75 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
base64 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
</tr> | if dst s>= imm goto +offset | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x5c | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0 | <td> | |||
</t> | <t> 0x76 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (u32)(dst & src) | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | if (s32)dst s>= (s32)imm goto +offset | |||
base32 | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
</tr> | <xref target="jump-instructions"/> | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0x5d | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x77 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst >>= imm </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
if dst != src goto +offset | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
base64 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x79 </t> | |||
<t> | </td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x5e | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | dst = *(u64 *)(src + offset) | |||
any | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base64 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="load-and-store-instructions"/> | |||
<t> | </t> | |||
0x00 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x7a </t> | |||
if (u32)dst != (u32)src goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> | |||
</td> | *(u64 *)(dst + offset) = imm | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
0x5f | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="load-and-store-instructions"/> | |||
any | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
0 | <t> 0x7b </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
dst &= src | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | *(u64 *)(dst + offset) = src | |||
<t> | </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="load-and-store-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x61 | <td> | |||
</t> | <t> 0x7c </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst = (u32)(dst >> src) </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = *(u32 *)(src + offset) | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
base32 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x7d </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | <t> any </t> | |||
xref> | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
0x62 | <td> | |||
</t> | <t> | |||
</td> | if dst s>= src goto +offset | |||
<td> | </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x7e </t> | |||
<td> | </td> | |||
<t> | <td> | |||
*(u32 *)(dst + offset) = imm | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | if (s32)dst s>= (s32)src goto +offset | |||
xref> | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> base32 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x63 | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x7f </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst >>= src </t> | |||
*(u32 *)(dst + offset) = src | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | </tr> | |||
xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x84 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
0x64 | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> dst = (u32)-dst </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
dst = (u32)(dst << imm) | <td> | |||
</t> | <t> 0x85 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | call helper function by static ID | |||
<td> | </t> | |||
<t> | </td> | |||
0x65 | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | RFC 9669, | |||
</t> | <xref target="helper-functions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
any | <tr> | |||
</t> | <td> | |||
</td> | <t> 0x85 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x1 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
if dst s> imm goto +offset | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> call PC += imm </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="program-local-functions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x66 | <td> | |||
</t> | <t> 0x85 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x2 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | call helper function by BTF ID | |||
any | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
if (s32)dst s> (s32)imm goto +offset | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="helper-functions"/> | |||
<t> | </t> | |||
base32 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x87 </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
0x67 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = -dst </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0x94 </t> | |||
<t> | </td> | |||
dst <<= imm | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | dst = (u32)((imm != 0)?((u32)dst % (u32)imm) : dst) | |||
</td> | </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> divmul32 </t> | |||
<t> | </td> | |||
0x69 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
any | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x94 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> 1 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst = *(u16 *)(src + offset) | <td> | |||
</t> | <t> | |||
</td> | dst = (u32)((imm != 0) ? ((s32)dst s% imm) : dst) | |||
<td> | </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> divmul32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | RFC 9669, | |||
xref> | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x95 </t> | |||
0x6a | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> return </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
*(u16 *)(dst + offset) = imm | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
base32 | <t> 0x97 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | <td> | |||
xref> | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> any </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x6b | dst = (imm != 0) ? (dst % (u32)imm) : dst | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> divmul64 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
any | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
0x00 | <t> 0x97 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
*(u16 *)(dst + offset) = src | <td> | |||
</t> | <t> 1 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | dst = (imm != 0) ? (dst s% imm) : dst | |||
<t> | </t> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | </td> | |||
xref> | <td> | |||
</t> | <t> divmul64 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
0x6c | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
any | <t> 0x9c </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> 0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | dst = (u32)((src != 0)?((u32)dst % (u32)src) : dst) | |||
<t> | </t> | |||
dst = (u32)(dst << src) | </td> | |||
</t> | <td> | |||
</td> | <t> divmul32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
</tr> | <t> 0x9c </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x6d | </td> | |||
</t> | <td> | |||
</td> | <t> 1 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | dst = (u32)((src != 0)?((s32)dst s% (s32)src) :dst) | |||
any | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> divmul32 </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
if dst s> src goto +offset | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0x9f </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x00 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x6e | dst = (src != 0) ? (dst % src) : dst | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> divmul64 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
any | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
0x00 | <t> 0x9f </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
if (s32)dst s> (s32)src goto +offset | <td> | |||
</t> | <t> 1 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | dst = (src != 0) ? (dst s% src) : dst | |||
<t> | </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> divmul64 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x6f | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
any | <td> | |||
</t> | <t> 0xa4 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst = (u32)(dst ^ imm) </t> | |||
<t> | </td> | |||
dst <<= src | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
base64 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xa5 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
0x71 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> if dst < imm goto +offset </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x00 | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
dst = *(u8 *)(src + offset) | <td> | |||
</t> | <t> 0xa6 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | <t> any </t> | |||
xref> | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
</tr> | if (u32)dst < imm goto +offset | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x72 | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x0 | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
any | <td> | |||
</t> | <t> 0xa7 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
*(u8 *)(dst + offset) = imm | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst ^= imm </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | RFC 9669, | |||
xref> | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xac </t> | |||
0x73 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> dst = (u32)(dst ^ src) </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
*(u8 *)(dst + offset) = src | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
base32 | <t> 0xad </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | <td> | |||
xref> | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x00 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> if dst < src goto +offset </t> | |||
0x74 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xae </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
dst = (u32)(dst >> imm) | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> | |||
</t> | if (u32)dst < (u32)src goto +offset | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | RFC 9669, | |||
<td> | <xref target="jump-instructions"/> | |||
<t> | </t> | |||
0x75 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xaf </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x00 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> dst ^= src </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
if dst s>= imm goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
base64 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> 0xb4 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x0 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
0x76 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> dst = (u32) imm </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
any | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xb5 </t> | |||
if (s32)dst s>= (s32)imm goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> if dst <= imm goto +offset </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x77 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0x0 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xb6 </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst >>= imm | <t> | |||
</t> | if (u32)dst <= imm goto +offset | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base64 | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <xref target="jump-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | </tr> | |||
<tr> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xb7 </t> | |||
0x79 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> dst = imm </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base64 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="arithmetic-instructions"/> | |||
dst = *(u64 *)(src + offset) | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
base64 | <t> 0xbc </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | <td> | |||
xref> | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x00 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = (u32) src </t> | |||
0x7a | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xbc </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 8 </t> | |||
*(u64 *)(dst + offset) = imm | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base64 | <t> dst = (u32) (s32) (s8) src </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | <td> | |||
xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x7b | <td> | |||
</t> | <t> 0xbc </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 16 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | dst = (u32) (s32) (s16) src | |||
0x00 | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
*(u64 *)(dst + offset) = src | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
base64 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xbd </t> | |||
<xref target="load-and-store-instructions">Load and store instructions</ | </td> | |||
xref> | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x7c | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> if dst <= src goto +offset </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0x00 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xbe </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (u32)(dst >> src) | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | if (u32)dst <= (u32)src goto +offset | |||
</t> | </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x7d | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xbf </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
0x00 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
if dst s>= src goto +offset | <t> dst = src </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base64 </t> | |||
<t> | </td> | |||
base64 | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="arithmetic-instructions"/> | |||
<t> | </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
</tr> | <td> | |||
<tr> | <t> 0xbf </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x7e | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 8 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = (s64) (s8) src </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
if (s32)dst s>= (s32)src goto +offset | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xbf </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 16 </t> | |||
<xref target="jump-instructions">Jump instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> dst = (s64) (s16) src </t> | |||
<t> | </td> | |||
0x7f | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xbf </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 32 </t> | |||
<t> | </td> | |||
dst >>= src | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = (s64) (s32) src </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="arithmetic-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0x84 | <td> | |||
</t> | <t> 0xc3 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | lock *(u32 *)(dst + offset) += src | |||
0x00 | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> atomic32 </t> | |||
<t> | </td> | |||
dst = (u32)-dst | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="atomic-operations"/> | |||
<t> | </t> | |||
base32 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xc3 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x85 | <td> | |||
</t> | <t> 0x01 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | src = atomic_fetch_add_32((u32 *)(dst + offset), src) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> atomic32 </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="atomic-operations"/> | |||
any | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
call helper function by static ID | <t> 0xc3 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x40 </t> | |||
<xref target="helper-functions">Helper functions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
</tr> | lock *(u32 *)(dst + offset) |= src | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x85 | <t> atomic32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x1 | <xref target="atomic-operations"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0 | <td> | |||
</t> | <t> 0xc3 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
call PC += imm | <t> 0x41 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | src = atomic_fetch_or_32((u32 *)(dst + offset), src) | |||
base32 | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> atomic32 </t> | |||
<t> | </td> | |||
<xref target="program-local-functions">Program-local functions</xref> | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
</tr> | <xref target="atomic-operations"/> | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0x85 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xc3 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x2 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> 0x50 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | lock *(u32 *)(dst + offset) &= src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> atomic32 </t> | |||
call helper function by BTF ID | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="atomic-operations"/> | |||
base32 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
<xref target="helper-functions">Helper functions</xref> | <t> 0xc3 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> any </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0x87 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x51 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> | |||
</t> | src = atomic_fetch_and_32((u32 *)(dst + offset), src) | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> atomic32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x00 | <xref target="atomic-operations"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
dst = -dst | <td> | |||
</t> | <t> 0xc3 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> 0xa0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | lock *(u32 *)(dst + offset) ^= src | |||
<td> | </t> | |||
<t> | </td> | |||
0x94 | <td> | |||
</t> | <t> atomic32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x0 | RFC 9669, | |||
</t> | <xref target="atomic-operations"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xc3 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst = (u32)((imm != 0)?((u32)dst % (u32)imm) : dst) | <td> | |||
</t> | <t> 0xa1 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
divmul32 | src = atomic_fetch_xor_32((u32 *)(dst + offset), src) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> atomic32 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
</tr> | RFC 9669, | |||
<tr> | <xref target="atomic-operations"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0x94 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xc3 </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
1 | </td> | |||
</t> | <td> | |||
</td> | <t> 0xe1 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | src = xchg_32((u32 *)(dst + offset), src) | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (u32)((imm != 0) ? ((s32)dst s% imm) : dst) | <t> atomic32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
divmul32 | <xref target="atomic-operations"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> 0xc3 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x95 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0xf1 </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> | |||
</td> | r0 = cmpxchg_32((u32 *)(dst + offset), r0, src) | |||
<td> | </t> | |||
<t> | </td> | |||
0 | <td> | |||
</t> | <t> atomic32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x00 | RFC 9669, | |||
</t> | <xref target="atomic-operations"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
return | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xc4 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> dst = (u32)(dst s>> imm) </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x97 | <t> base32 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x0 | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0 | <td> | |||
</t> | <t> 0xc5 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (imm != 0) ? (dst % (u32)imm) : dst | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> if dst s< imm goto +offset </t> | |||
<t> | </td> | |||
divmul64 | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
</tr> | </td> | |||
<tr> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
0x97 | <t> 0xc6 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x0 </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
1 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | if (s32)dst s< (s32)imm goto +offset | |||
<t> | </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (imm != 0) ? (dst s% imm) : dst | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
divmul64 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xc7 </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x9c | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst s>>= imm </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0 | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0x00 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xcc </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (u32)((src != 0)?((u32)dst % (u32)src) : dst) | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
divmul32 | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = (u32)(dst s>> src) </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x9c | <xref target="arithmetic-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
any | <td> | |||
</t> | <t> 0xcd </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
1 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> 0x00 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> if dst s< src goto +offset </t> | |||
<t> | </td> | |||
dst = (u32)((src != 0)?((s32)dst s% (s32)src) :dst) | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
divmul32 | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xce </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0x9f | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | if (s32)dst s< (s32)src goto +offset | |||
<t> | </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
dst = (src != 0) ? (dst % src) : dst | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xcf </t> | |||
<t> | </td> | |||
divmul64 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> dst s>>= src </t> | |||
<t> | </td> | |||
0x9f | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | RFC 9669, | |||
</t> | <xref target="arithmetic-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
1 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xd4 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
dst = (src != 0) ? (dst s% src) : dst | <td> | |||
</t> | <t> 0x10 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = htole16(dst) </t> | |||
divmul64 | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="byte-swap-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0xa4 | <td> | |||
</t> | <t> 0xd4 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> 0x20 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst = htole32(dst) </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (u32)(dst ^ imm) | RFC 9669, | |||
</t> | <xref target="byte-swap-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
base32 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xd4 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x40 </t> | |||
0xa5 | </td> | |||
</t> | <td> | |||
</td> | <t> dst = htole64(dst) </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> base64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
any | <xref target="byte-swap-instructions"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
any | <td> | |||
</t> | <t> 0xd5 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
if dst < imm goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base64 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | if dst s<= imm goto +offset | |||
<xref target="jump-instructions">Jump instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> base64 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0xa6 | RFC 9669, | |||
</t> | <xref target="jump-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0x0 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xd6 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
if (u32)dst < imm goto +offset | if (s32)dst s<= (s32)imm goto +offset | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> base32 </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="jump-instructions"/> | |||
<xref target="jump-instructions">Jump instructions</xref> | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
</tr> | <tr> | |||
<tr> | <td> | |||
<td> | <t> 0xd7 </t> | |||
<t> | </td> | |||
0xa7 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x10 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> dst = bswap16(dst) </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="byte-swap-instructions"/> | |||
<t> | </t> | |||
dst ^= imm | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xd7 </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> 0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> 0x20 </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = bswap32(dst) </t> | |||
0xac | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="byte-swap-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xd7 </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
dst = (u32)(dst ^ src) | </td> | |||
</t> | <td> | |||
</td> | <t> 0x40 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> dst = bswap64(dst) </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> base64 </t> | |||
<t> | </td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
</tr> | <xref target="byte-swap-instructions"/> | |||
<tr> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0xad | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xdb </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> 0x00 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
0x00 | lock *(u64 *)(dst + offset) += src | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> atomic64 </t> | |||
if dst < src goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | RFC 9669, | |||
<t> | <xref target="atomic-operations"/> | |||
base64 | </t> | |||
</t> | </td> | |||
</td> | </tr> | |||
<td> | <tr> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> 0xdb </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> any </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0xae | </td> | |||
</t> | <td> | |||
</td> | <t> 0x01 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | src = atomic_fetch_add_64((u64 *)(dst + offset), src) | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> atomic64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
0x00 | <xref target="atomic-operations"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
if (u32)dst < (u32)src goto +offset | <td> | |||
</t> | <t> 0xdb </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> 0x40 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | lock *(u64 *)(dst + offset) |= src | |||
<td> | </t> | |||
<t> | </td> | |||
0xaf | <td> | |||
</t> | <t> atomic64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | RFC 9669, | |||
</t> | <xref target="atomic-operations"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
0 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xdb </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
dst ^= src | <td> | |||
</t> | <t> 0x41 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
base64 | src = atomic_fetch_or_64((u64 *)(dst + offset), src) | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> atomic64 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
</tr> | RFC 9669, | |||
<tr> | <xref target="atomic-operations"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0xb4 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xdb </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x50 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | lock *(u64 *)(dst + offset) &= src | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
dst = (u32) imm | <t> atomic64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> | |||
<t> | RFC 9669, | |||
base32 | <xref target="atomic-operations"/> | |||
</t> | </t> | |||
</td> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <td> | |||
</t> | <t> 0xdb </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0xb5 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0x51 </t> | |||
<t> | </td> | |||
0x0 | <td> | |||
</t> | <t> | |||
</td> | src = atomic_fetch_and_64((u64 *)(dst + offset), src) | |||
<td> | </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> atomic64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | RFC 9669, | |||
</t> | <xref target="atomic-operations"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
if dst <= imm goto +offset | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xdb </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base64 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <td> | |||
</t> | <t> 0xa0 </t> | |||
</td> | </td> | |||
</tr> | <td> | |||
<tr> | <t> | |||
<td> | lock *(u64 *)(dst + offset) ^= src | |||
<t> | </t> | |||
0xb6 | </td> | |||
</t> | <td> | |||
</td> | <t> atomic64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x0 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="atomic-operations"/> | |||
<td> | </t> | |||
<t> | </td> | |||
any | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xdb </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
if (u32)dst <= imm goto +offset | </td> | |||
</t> | <td> | |||
</td> | <t> 0xa1 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
base32 | <t> | |||
</t> | src = atomic_fetch_xor_64((u64 *)(dst + offset), src) | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> atomic64 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> | |||
<tr> | RFC 9669, | |||
<td> | <xref target="atomic-operations"/> | |||
<t> | </t> | |||
0xb7 | </td> | |||
</t> | </tr> | |||
</td> | <tr> | |||
<td> | <td> | |||
<t> | <t> 0xdb </t> | |||
0x0 | </td> | |||
</t> | <td> | |||
</td> | <t> any </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0 | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0xe1 </t> | |||
<t> | </td> | |||
any | <td> | |||
</t> | <t> | |||
</td> | src = xchg_64((u64 *)(dst + offset), src) | |||
<td> | </t> | |||
<t> | </td> | |||
dst = imm | <td> | |||
</t> | <t> atomic64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
base64 | RFC 9669, | |||
</t> | <xref target="atomic-operations"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xdb </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> any </t> | |||
<t> | </td> | |||
0xbc | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0xf1 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | r0 = cmpxchg_64((u64 *)(dst + offset), r0, src) | |||
<t> | </t> | |||
0 | </td> | |||
</t> | <td> | |||
</td> | <t> atomic64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="atomic-operations"/> | |||
<td> | </t> | |||
<t> | </td> | |||
dst = (u32) src | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xdc </t> | |||
<t> | </td> | |||
base32 | <td> | |||
</t> | <t> 0x0 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0 </t> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | </td> | |||
</t> | <td> | |||
</td> | <t> 0x10 </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> dst = htobe16(dst) </t> | |||
<t> | </td> | |||
0xbc | <td> | |||
</t> | <t> base32 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
any | RFC 9669, | |||
</t> | <xref target="byte-swap-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
8 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xdc </t> | |||
<td> | </td> | |||
<t> | <td> | |||
0x00 | <t> 0x0 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> 0 </t> | |||
<t> | </td> | |||
dst = (u32) (s32) (s8) src | <td> | |||
</t> | <t> 0x20 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> dst = htobe32(dst) </t> | |||
base32 | </td> | |||
</t> | <td> | |||
</td> | <t> base32 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="byte-swap-instructions"/> | |||
</tr> | </t> | |||
<tr> | </td> | |||
<td> | </tr> | |||
<t> | <tr> | |||
0xbc | <td> | |||
</t> | <t> 0xdc </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x0 </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> 0 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
16 | <t> 0x40 </t> | |||
</t> | </td> | |||
</td> | <td> | |||
<td> | <t> dst = htobe64(dst) </t> | |||
<t> | </td> | |||
0x00 | <td> | |||
</t> | <t> base64 </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> | |||
dst = (u32) (s32) (s16) src | RFC 9669, | |||
</t> | <xref target="byte-swap-instructions"/> | |||
</td> | </t> | |||
<td> | </td> | |||
<t> | </tr> | |||
base32 | <tr> | |||
</t> | <td> | |||
</td> | <t> 0xdd </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | <t> any </t> | |||
</t> | </td> | |||
</td> | <td> | |||
</tr> | <t> any </t> | |||
<tr> | </td> | |||
<td> | <td> | |||
<t> | <t> 0x00 </t> | |||
0xbd | </td> | |||
</t> | <td> | |||
</td> | <t> | |||
<td> | if dst s<= src goto +offset | |||
<t> | </t> | |||
any | </td> | |||
</t> | <td> | |||
</td> | <t> base64 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
any | <t> | |||
</t> | RFC 9669, | |||
</td> | <xref target="jump-instructions"/> | |||
<td> | </t> | |||
<t> | </td> | |||
0x00 | </tr> | |||
</t> | <tr> | |||
</td> | <td> | |||
<td> | <t> 0xde </t> | |||
<t> | </td> | |||
if dst <= src goto +offset | <td> | |||
</t> | <t> any </t> | |||
</td> | </td> | |||
<td> | <td> | |||
<t> | <t> any </t> | |||
base64 | </td> | |||
</t> | <td> | |||
</td> | <t> 0x00 </t> | |||
<td> | </td> | |||
<t> | <td> | |||
<xref target="jump-instructions">Jump instructions</xref> | <t> | |||
</t> | if (s32)dst s<= (s32)src goto +offset | |||
</td> | </t> | |||
</tr> | </td> | |||
<tr> | <td> | |||
<td> | <t> base32 </t> | |||
<t> | </td> | |||
0xbe | <td> | |||
</t> | <t> | |||
</td> | RFC 9669, | |||
<td> | <xref target="jump-instructions"/> | |||
<t> | </t> | |||
any | </td> | |||
</t> | </tr> | |||
</td> | </tbody> | |||
<td> | </table> | |||
<t> | </section> | |||
any | <section anchor="acknowledgements" numbered="false"> | |||
</t> | <name>Acknowledgements</name> | |||
</td> | <t> | |||
<td> | This document was generated from instruction-set.rst in the Linux | |||
<t> | kernel repository, to which a number of other individuals have authored cont | |||
0x00 | ributions | |||
</t> | over time, including <contact fullname="Akhil Raj"/>, <contact fullname="Ale | |||
</td> | xei Starovoitov"/>, <contact fullname="Brendan Jackman"/>, <contact fullname="Ch | |||
<td> | ristoph Hellwig"/>, <contact fullname="Daniel Borkmann"/>, | |||
<t> | <contact fullname="Ilya Leoshkevich"/>, <contact fullname="Jiong Wang"/>, <c | |||
if (u32)dst <= (u32)src goto +offset | ontact fullname="Jose E. Marchesi"/>, <contact fullname="Kosuke Fujimoto"/> | |||
</t> | , | |||
</td> | <contact fullname="Shahab Vahedi"/>, <contact fullname="Tiezhu Yang"/>, <con | |||
<td> | tact fullname="Will Hawkins"/>, and <contact fullname="Zheng Yejian"/>, with rev | |||
<t> | iew and suggestions by many others including | |||
base32 | <contact fullname="Alan Jowett"/>, <contact fullname="Andrii Nakryiko"/>, <c | |||
</t> | ontact fullname="David Vernet"/>, <contact fullname="Jim Harris"/>, | |||
</td> | <contact fullname="Quentin Monnet"/>, <contact fullname="Song Liu"/>, <conta | |||
<td> | ct fullname="Shung-Hsi Yu"/>, <contact fullname="Stanislav Fomichev"/>, <contact | |||
<t> | fullname="Watson Ladd"/>, and <contact fullname="Yonghong Song"/>. | |||
<xref target="jump-instructions">Jump instructions</xref> | </t> | |||
</t> | </section> | |||
</td> | ||||
</tr> | </back> | |||
<tr> | ||||
<td> | ||||
<t> | ||||
0xbf | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xbf | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
8 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = (s64) (s8) src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xbf | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
16 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = (s64) (s16) src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xbf | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = (s64) (s32) src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u32 *)(dst + offset) += src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x01 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_add_32((u32 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x40 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u32 *)(dst + offset) |= src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x41 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_or_32((u32 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x50 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u32 *)(dst + offset) &= src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x51 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_and_32((u32 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xa0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u32 *)(dst + offset) ^= src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xa1 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_xor_32((u32 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xe1 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = xchg_32((u32 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc3 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xf1 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
r0 = cmpxchg_32((u32 *)(dst + offset), r0, src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc4 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = (u32)(dst s>> imm) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc5 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if dst s< imm goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc6 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if (s32)dst s< (s32)imm goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xc7 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst s>>= imm | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xcc | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = (u32)(dst s>> src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xcd | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if dst s< src goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xce | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if (s32)dst s< (s32)src goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xcf | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst s>>= src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="arithmetic-instructions">Arithmetic instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd4 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x10 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = htole16(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd4 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x20 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = htole32(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd4 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x40 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = htole64(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd5 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if dst s<= imm goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd6 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if (s32)dst s<= (s32)imm goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd7 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x10 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = bswap16(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd7 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x20 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = bswap32(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xd7 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x40 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = bswap64(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u64 *)(dst + offset) += src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x01 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_add_64((u64 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x40 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u64 *)(dst + offset) |= src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x41 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_or_64((u64 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x50 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u64 *)(dst + offset) &= src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x51 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_and_64((u64 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xa0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
lock *(u64 *)(dst + offset) ^= src | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xa1 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = atomic_fetch_xor_64((u64 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xe1 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
src = xchg_64((u64 *)(dst + offset), src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdb | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0xf1 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
r0 = cmpxchg_64((u64 *)(dst + offset), r0, src) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
atomic64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="atomic-operations">Atomic operations</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdc | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x10 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = htobe16(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdc | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x20 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = htobe32(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdc | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x40 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
dst = htobe64(dst) | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="byte-swap-instructions">Byte swap instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xdd | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if dst s<= src goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base64 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
<td> | ||||
<t> | ||||
0xde | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
any | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
0x00 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
if (s32)dst s<= (s32)src goto +offset | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
base32 | ||||
</t> | ||||
</td> | ||||
<td> | ||||
<t> | ||||
<xref target="jump-instructions">Jump instructions</xref> | ||||
</t> | ||||
</td> | ||||
</tr> | ||||
</tbody> | ||||
</table> | ||||
</section> | ||||
</middle> | ||||
<back> | ||||
<references><name>Normative References</name> | ||||
<reference anchor="IEN137"> | ||||
<front> | ||||
<title>On Holy Wars and a Plea for Peace</title> | ||||
<author fullname="D. Cohen" initials="D." surname="Cohen"/> | ||||
<date month="April" year="1980"/> | ||||
</front> | ||||
<seriesInfo name='IEN' value='137'/> | ||||
</reference> | ||||
<reference anchor="RFC2119"> | ||||
<front> | ||||
<title>Key words for use in RFCs to Indicate Requirement Levels</title> | ||||
<author fullname="S. Bradner" initials="S." surname="Bradner"/> | ||||
<date month="March" year="1997"/> | ||||
</front> | ||||
<seriesInfo name='BCP' value='14'/> | ||||
<seriesInfo name='RFC' value='2119'/> | ||||
<seriesInfo name='DOI' value='10.17487/RFC2119'/> | ||||
</reference> | ||||
<reference anchor="RFC8126"> | ||||
<front> | ||||
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title> | ||||
<author fullname="M. Cotton" initials="M." surname="Cotton"/> | ||||
<author fullname="B. Leiba" initials="B." surname="Leiba"/> | ||||
<author fullname="T. Narten" initials="T." surname="Narten"/> | ||||
<date month="June" year="2017"/> | ||||
</front> | ||||
<seriesInfo name='BCP' value='26'/> | ||||
<seriesInfo name='RFC' value='8126'/> | ||||
<seriesInfo name='DOI' value='10.17487/RFC8126'/> | ||||
</reference> | ||||
<reference anchor="RFC8174"> | ||||
<front> | ||||
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title> | ||||
<author fullname="B. Leiba" initials="B." surname="Leiba"/> | ||||
<date month="May" year="2017"/> | ||||
</front> | ||||
<seriesInfo name='BCP' value='14'/> | ||||
<seriesInfo name='RFC' value='8174'/> | ||||
<seriesInfo name='DOI' value='10.17487/RFC8174'/> | ||||
</reference> | ||||
</references> | ||||
<references><name>Informative References</name> | ||||
<reference anchor="LINUX" target="https://www.kernel.org/doc/html/latest/bpf/v | ||||
erifier.html"> | ||||
<front> | ||||
<title>eBPF verifier</title> | ||||
<author/> | ||||
</front> | ||||
</reference> | ||||
<reference anchor="PREVAIL"> | ||||
<front> | ||||
<title>Simple and Precise Static Analysis of Untrusted Linux Kernel Extensio | ||||
ns</title> | ||||
<author fullname="E. Gershuni" initials="E." surname="Gershuni"/> | ||||
<author fullname="N. Amit" initials="N." surname="Amit"/> | ||||
<author fullname="A. Gurfinkel" initials="A." surname="Gurfinkel"/> | ||||
<author fullname="N. Narodytska" initials="N." surname="Narodytska"/> | ||||
<author fullname="J. Navas" initials="J." surname="Navas"/> | ||||
<author fullname="N. Rinetzky" initials="N." surname="Rinetzky"/> | ||||
<author fullname="L. Ryzhyk" initials="L." surname="Ryzhyk"/> | ||||
<author fullname="M. Sagiv" initials="M." surname="Sagiv"/> | ||||
<date month="June" year="2019"/> | ||||
</front> | ||||
<seriesInfo name='DOI' value='10.1145/3314221.3314590'/> | ||||
</reference> | ||||
</references> | ||||
</back> | ||||
</rfc> | </rfc> | |||
End of changes. 554 change blocks. | ||||
9364 lines changed or deleted | 7618 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. |