Documentation

Solanalib.SBPF.Syntax

SBPF.Syntax — the sBPF instruction set #

Abstract syntax of the Solana eBPF (sBPF) instruction set, ported from rBPFSyntax.thy. The headline type is Solanalib.SBPF.BpfInstruction, the 22-constructor algebraic representation of a decoded instruction, together with the register, operand, operation, condition, and version enumerations it uses.

Main definitions #

The eleven sBPF integer registers. BR10 is the read-only frame pointer.

Instances For
    @[implicit_reducible]
    Equations
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      An instruction's second operand: an immediate or a source register.

      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Operand width selector for ALU operations.

          Instances For
            @[implicit_reducible]
            Equations

            The width, in bits, selected by an Arch.

            Equations
            Instances For

              Branch condition for a conditional jump. The s-prefixed variants are the signed comparisons.

              Instances For
                @[implicit_reducible]
                Equations
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Core ALU binary operations (shared by the 32- and 64-bit ALU classes).

                  Instances For
                    @[implicit_reducible]
                    Equations
                    Equations
                    Instances For

                      Product/quotient/remainder operations (the sBPF PQR class).

                      Instances For
                        @[implicit_reducible]
                        Equations

                        High-half multiply operations (the sBPF PQR2 class).

                        Instances For
                          @[implicit_reducible]
                          Equations
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Byte-swap / load width selector (the source theory's chunk).

                            Instances For
                              @[implicit_reducible]
                              Equations
                              Equations
                              Instances For

                                sBPF bytecode version. v1 is the legacy format; v2 is current.

                                Instances For
                                  @[implicit_reducible]
                                  Equations

                                  A decoded sBPF instruction. Constructors mirror rBPFSyntax.thy's bpf_instruction; immediate fields are U32, offsets U16, interpreted signed where the semantics requires it.

                                  Instances For
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        @[reducible, inline]

                                        A program in assembly form: a list of decoded instructions.

                                        Equations
                                        Instances For
                                          @[reducible, inline]

                                          A program in binary form: a flat list of bytes.

                                          Equations
                                          Instances For

                                            Decode a 4-bit register-index field, rejecting out-of-range values.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For