• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Riscv
          • Specification
            • Semantics
            • Features
            • Instructions
              • Instr
                • Instrp
                • Instr-fix
                • Instr-case
                • Instr-store
                • Instr-op-imms64
                • Instr-op-imms32
                • Instr-op-imms-32
                • Instr-op-imm-32
                • Instr-op-imm
                • Instr-op-32
                • Instr-op
                • Instr-load
                • Instr-branch
                • Instr-equiv
                • Instr-jalr
                • Instr-lui
                • Instr-jal
                • Instr-auipc
                • Instr-kind
              • Op-funct
              • Op-32-funct
              • Op-imm-funct
              • Load-funct
              • Instr-validp
              • Branch-funct
              • Op-imms-funct
              • Store-funct
              • Op-imms-32-funct
              • Instr-option
              • Op-imm-32-funct
            • Encoding
            • States
            • Reads-over-writes
            • Semantics-equivalences
            • Decoding
            • Execution
          • Executable
          • Specialized
          • Optimized
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Instructions

Instr

Fixtype of instructions.

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:op-imm → instr-op-imm
:op-imms32 → instr-op-imms32
:op-imms64 → instr-op-imms64
:op-imm-32 → instr-op-imm-32
:op-imms-32 → instr-op-imms-32
:lui → instr-lui
:auipc → instr-auipc
:op → instr-op
:op-32 → instr-op-32
:jal → instr-jal
:jalr → instr-jalr
:branch → instr-branch
:load → instr-load
:store → instr-store

The tags of the summands of this fixtype correspond to opcodes. The components of each summand correspond to the non-opcode fields. Register indices always consist of 5 bits, in order to designate the 32 registers of RV32I and RV64I; for RV32E and RV64E, only the low four bits are used, with the high bit needing to be 0 [ISA:3.2]; we enforce that in instr-validp.

The OP-IMM opcode corresponds to :op-imm for non-shift instructions, :op-imms32 for RV32I shift instructions, and :op-imms64 for RV64I shift instructions. They are distinct summands because the formats differ: non-shift instructions use the I-type format; shift instructions use a specialization of the I-type format, but a slightly different one in RV32I vs. RV64I, namely in the number of bits of the shift amount (5 vs. 6).

The OP-IMM-32 opcode corresponds to :op-imm-32 for non-shift instructions, and :op-imms-32 for shift instructions. They are distinct summands because the formats differ: non-shift instructions use the I-type format; shift instructions use a specialization of the I-type format.

The LUI opcode [ISA:2.4.1] [ISA:4.2.1] corresponds to :lui.

The AUIPC [ISA:2.4.1] [ISA:4.2.1] opcode corresponds to :auipc.

The OP opcode corresponds to :op.

The OP-32 opcode corresponds to :op-32.

The JAL opcode [ISA:2.5.1] corresponds to :jal.

The JALR opcode [ISA:2.5.1] corresponds to :jalr.

The BRANCH opcode corresponds to :branch.

The LOAD opcode corresponds to :load.

The STORE opcode corresponds to :store.

Subtopics

Instrp
Recognizer for instr structures.
Instr-fix
Fixing function for instr structures.
Instr-case
Case macro for the different kinds of instr structures.
Instr-store
Instr-op-imms64
Instr-op-imms32
Instr-op-imms-32
Instr-op-imm-32
Instr-op-imm
Instr-op-32
Instr-op
Instr-load
Instr-branch
Instr-equiv
Basic equivalence relation for instr structures.
Instr-jalr
Instr-lui
Instr-jal
Instr-auipc
Instr-kind
Get the kind (tag) of a instr structure.